/**
 * Candidate Dashboard Styles
 * Modern, clean UI for tracking applications
 */

.candidate-dashboard-page {
    min-height: calc(100vh - 200px);
    padding: 120px 0 80px;
}

.ats-candidate-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.ats-dashboard-header {
    margin-bottom: 40px;
    padding-top: 0;
}

.ats-dashboard-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--hi-text-primary, #1a1a1a);
}

[data-theme="dark"] .ats-dashboard-header h1 {
    color: var(--hi-text-primary, #e2e8f0);
}

.ats-dashboard-header p {
    font-size: 16px;
    color: var(--hi-text-secondary, #666);
    margin: 0;
}

[data-theme="dark"] .ats-dashboard-header p {
    color: var(--hi-text-secondary, #a0aec0);
}

/* Empty State */
.ats-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--hi-card-bg, #ffffff);
    border-radius: 16px;
    border: 2px dashed var(--hi-border, #e2e8f0);
}

[data-theme="dark"] .ats-empty-state {
    background: rgba(26, 32, 44, 0.4);
    border-color: rgba(45, 55, 72, 0.6);
}

.ats-empty-state svg {
    color: var(--hi-text-secondary, #a0aec0);
    margin-bottom: 24px;
}

.ats-empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--hi-text-primary, #1a1a1a);
}

[data-theme="dark"] .ats-empty-state h3 {
    color: var(--hi-text-primary, #e2e8f0);
}

.ats-empty-state p {
    font-size: 16px;
    color: var(--hi-text-secondary, #666);
    margin: 0 0 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

[data-theme="dark"] .ats-empty-state p {
    color: var(--hi-text-secondary, #a0aec0);
}

/* Applications Table */
.ats-applications-table-wrapper {
    background: var(--hi-card-bg, #ffffff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--hi-border, #e2e8f0);
}

[data-theme="dark"] .ats-applications-table-wrapper {
    background: rgba(26, 32, 44, 0.6);
    border-color: rgba(45, 55, 72, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ats-applications-table {
    width: 100%;
    border-collapse: collapse;
}

.ats-applications-table thead {
    background: var(--hi-table-header-bg, #f7fafc);
    border-bottom: 2px solid var(--hi-border, #e2e8f0);
}

[data-theme="dark"] .ats-applications-table thead {
    background: rgba(45, 55, 72, 0.4);
    border-bottom-color: rgba(45, 55, 72, 0.8);
}

.ats-applications-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hi-text-secondary, #718096);
}

[data-theme="dark"] .ats-applications-table th {
    color: var(--hi-text-secondary, #a0aec0);
}

.ats-applications-table tbody tr {
    border-bottom: 1px solid var(--hi-border, #e2e8f0);
    transition: background-color 0.2s ease;
}

[data-theme="dark"] .ats-applications-table tbody tr {
    border-bottom-color: rgba(45, 55, 72, 0.6);
}

.ats-applications-table tbody tr:hover {
    background: var(--hi-hover-bg, #f7fafc);
}

[data-theme="dark"] .ats-applications-table tbody tr:hover {
    background: rgba(45, 55, 72, 0.3);
}

.ats-applications-table tbody tr:last-child {
    border-bottom: none;
}

.ats-applications-table td {
    padding: 20px;
    font-size: 15px;
    color: var(--hi-text-primary, #2d3748);
}

[data-theme="dark"] .ats-applications-table td {
    color: var(--hi-text-primary, #e2e8f0);
}

.ats-job-link {
    font-weight: 600;
    color: var(--hi-primary, #667eea);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ats-job-link:hover {
    color: var(--hi-primary-dark, #5a67d8);
    text-decoration: underline;
}

[data-theme="dark"] .ats-job-link {
    color: #818cf8;
}

[data-theme="dark"] .ats-job-link:hover {
    color: #a5b4fc;
}

/* Status Badges */
.ats-status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}

.ats-status-applied {
    background: #fef3c7;
    color: #92400e;
}

[data-theme="dark"] .ats-status-applied {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.ats-status-shortlisted {
    background: #dbeafe;
    color: #1e40af;
}

[data-theme="dark"] .ats-status-shortlisted {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.ats-status-interview {
    background: #e0e7ff;
    color: #4338ca;
}

[data-theme="dark"] .ats-status-interview {
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
}

.ats-status-offer {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .ats-status-offer {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.ats-status-hired {
    background: #d1fae5;
    color: #065f46;
}

[data-theme="dark"] .ats-status-hired {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.ats-status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

[data-theme="dark"] .ats-status-rejected {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.ats-status-withdrawn {
    background: #f3f4f6;
    color: #4b5563;
}

[data-theme="dark"] .ats-status-withdrawn {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

/* Action Buttons */
.ats-btn-small {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--hi-primary, #667eea);
    color: #ffffff;
    margin-right: 8px;
}

.ats-btn-small:hover {
    background: var(--hi-primary-dark, #5a67d8);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
}

.ats-btn-danger {
    background: #ef4444;
}

.ats-btn-danger:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Modal */
.ats-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.ats-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ats-modal-content {
    background: var(--hi-card-bg, #ffffff);
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .ats-modal-content {
    background: #1a202c;
    border: 1px solid rgba(45, 55, 72, 0.8);
}

.ats-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: 300;
    color: var(--hi-text-secondary, #718096);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 1;
}

.ats-modal-close:hover {
    color: var(--hi-text-primary, #2d3748);
}

[data-theme="dark"] .ats-modal-close:hover {
    color: var(--hi-text-primary, #e2e8f0);
}

/* Application Details */
.ats-application-details {
    padding: 40px;
}

.ats-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--hi-border, #e2e8f0);
}

[data-theme="dark"] .ats-detail-header {
    border-bottom-color: rgba(45, 55, 72, 0.6);
}

.ats-detail-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--hi-text-primary, #1a1a1a);
    flex: 1;
}

[data-theme="dark"] .ats-detail-header h3 {
    color: var(--hi-text-primary, #e2e8f0);
}

.ats-detail-section {
    margin-bottom: 32px;
}

.ats-detail-section h4 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--hi-text-secondary, #718096);
    margin: 0 0 16px;
}

[data-theme="dark"] .ats-detail-section h4 {
    color: var(--hi-text-secondary, #a0aec0);
}

.ats-detail-table {
    width: 100%;
    border-collapse: collapse;
}

.ats-detail-table tr {
    border-bottom: 1px solid var(--hi-border, #e2e8f0);
}

[data-theme="dark"] .ats-detail-table tr {
    border-bottom-color: rgba(45, 55, 72, 0.4);
}

.ats-detail-table tr:last-child {
    border-bottom: none;
}

.ats-detail-table th {
    text-align: left;
    padding: 12px 0;
    font-weight: 600;
    color: var(--hi-text-secondary, #718096);
    width: 140px;
}

[data-theme="dark"] .ats-detail-table th {
    color: var(--hi-text-secondary, #a0aec0);
}

.ats-detail-table td {
    padding: 12px 0;
    color: var(--hi-text-primary, #2d3748);
}

[data-theme="dark"] .ats-detail-table td {
    color: var(--hi-text-primary, #e2e8f0);
}

.ats-detail-table td a {
    color: var(--hi-primary, #667eea);
    text-decoration: none;
}

.ats-detail-table td a:hover {
    text-decoration: underline;
}

[data-theme="dark"] .ats-detail-table td a {
    color: #818cf8;
}

.ats-cover-letter {
    padding: 20px;
    background: var(--hi-bg-secondary, #f7fafc);
    border-radius: 12px;
    border-left: 4px solid var(--hi-primary, #667eea);
    line-height: 1.7;
    color: var(--hi-text-primary, #2d3748);
}

[data-theme="dark"] .ats-cover-letter {
    background: rgba(45, 55, 72, 0.3);
    color: var(--hi-text-primary, #e2e8f0);
}

/* Page Layout */
body.page-template-page-candidate-dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.page-template-page-candidate-dashboard .site-content {
    flex: 1 0 auto;
}

body.page-template-page-candidate-dashboard footer {
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .candidate-dashboard-page {
        padding: 100px 0 60px;
    }
    
    .ats-candidate-dashboard {
        padding: 0 16px;
    }
    
    .ats-dashboard-header h1 {
        font-size: 28px;
    }
    
    .ats-applications-table-wrapper {
        overflow-x: auto;
    }
    
    .ats-applications-table {
        min-width: 600px;
    }
    
    .ats-applications-table th,
    .ats-applications-table td {
        padding: 12px;
        font-size: 14px;
    }
    
    .ats-application-details {
        padding: 24px;
    }
    
    .ats-detail-header {
        flex-direction: column;
        gap: 16px;
    }
    
    .ats-btn-small {
        font-size: 12px;
        padding: 6px 12px;
    }
}
