/* ============================================
   Job Hunter - Court Compliance Tracker
   Dark theme, modern UI
   ============================================ */

:root {
    --bg: #0f0f1a;
    --bg-card: #1a1a2e;
    --bg-input: #16213e;
    --bg-hover: #1f2b47;
    --accent: #e94560;
    --accent-hover: #ff6b81;
    --accent-glow: rgba(233, 69, 96, 0.2);
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --text: #eaeaea;
    --text-dim: #8892a4;
    --text-muted: #555e70;
    --border: #2a2a4a;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ---- SIDEBAR ---- */

#sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    color: white;
}

.logo-text {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    padding: 16px 12px;
    flex: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 4px;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-link.active {
    background: var(--accent-glow);
    color: var(--accent);
    font-weight: 600;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.deadline-badge {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    font-size: 13px;
    color: var(--text-dim);
}

.deadline-badge span {
    font-weight: 700;
    color: var(--warning);
    font-size: 18px;
}

.deadline-badge.urgent {
    border-color: var(--danger);
    background: rgba(231, 76, 60, 0.1);
}

.deadline-badge.urgent span {
    color: var(--danger);
}

/* ---- MAIN CONTENT ---- */

#main-content {
    margin-left: 240px;
    flex: 1;
    padding: 32px 40px;
    max-width: 1200px;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- PAGE HEADER ---- */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 4px;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    margin-top: 8px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
}

/* ---- STAT CARDS ---- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card.accent .stat-value { color: var(--accent); }
.stat-card.success .stat-value { color: var(--success); }
.stat-card.warning .stat-value { color: var(--warning); }

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ---- TABLES ---- */

.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--bg-input);
}

th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
}

tr:hover td {
    background: var(--bg-hover);
}

tr:last-child td {
    border-bottom: none;
}

.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-dim);
    font-size: 14px;
}

/* ---- FORMS ---- */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
}

.form-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.input-field,
.input-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    outline: none;
}

.input-field:focus,
.input-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

textarea.input-field {
    resize: vertical;
    min-height: 60px;
}

.input-select {
    cursor: pointer;
    appearance: auto;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

/* ---- BUTTONS ---- */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-dim);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

/* ---- STATUS BADGES ---- */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-applied { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.badge-interviewing { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.badge-offered { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-rejected { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }
.badge-no-response { background: rgba(136, 146, 164, 0.15); color: #8892a4; }
.badge-scheduled { background: rgba(52, 152, 219, 0.15); color: #3498db; }
.badge-completed { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-pending { background: rgba(243, 156, 18, 0.15); color: #f39c12; }
.badge-accepted { background: rgba(46, 204, 113, 0.15); color: #2ecc71; }
.badge-declined { background: rgba(231, 76, 60, 0.15); color: #e74c3c; }

/* ---- COURT REPORT ---- */

.report-container {
    background: white;
    color: #111;
    border-radius: var(--radius);
    padding: 48px;
    max-width: 850px;
    margin: 0 auto;
    font-family: 'Inter', Arial, sans-serif;
    line-height: 1.5;
}

.report-container h1 {
    text-align: center;
    font-size: 22px;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.report-container .report-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.report-container hr {
    border: none;
    border-top: 2px solid #1a1a2e;
    margin: 16px 0;
}

.report-container h2 {
    font-size: 15px;
    color: #1a1a2e;
    margin: 24px 0 12px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 4px;
}

.report-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 12px 0;
}

.report-container th {
    background: #1a1a2e;
    color: white;
    padding: 8px 10px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
}

.report-container td {
    padding: 8px 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333;
}

.report-container tr:nth-child(even) td {
    background: #f8f8f8;
}

.report-container tr:hover td {
    background: #f0f0f0;
}

.report-info-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 4px 16px;
    font-size: 14px;
    margin-bottom: 16px;
}

.report-info-grid .label {
    font-weight: 600;
    color: #333;
}

.report-info-grid .value {
    color: #555;
}

.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}

.report-summary-card {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.report-summary-card .num {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
}

.report-summary-card .lbl {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.signature-section {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid #ccc;
}

.sig-line {
    border-bottom: 1px solid #333;
    width: 300px;
    display: inline-block;
    margin-bottom: 4px;
}

/* ---- RESUME ---- */

.resume-container {
    background: white;
    color: #111;
    padding: 48px;
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ---- TOAST ---- */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--success);
    border-radius: var(--radius-sm);
    padding: 14px 20px;
    font-size: 14px;
    box-shadow: var(--shadow);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
    max-width: 350px;
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ---- EXPERIENCE/EDUCATION BLOCKS ---- */

.exp-block, .edu-block {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}

.exp-block .form-row, .edu-block .form-row {
    gap: 12px;
}

.remove-block {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    border-radius: 4px;
}

.remove-block:hover {
    color: var(--danger);
    background: rgba(231,76,60,0.1);
}

/* ---- PRINT STYLES ---- */

@media print {
    body {
        background: white;
        color: black;
    }

    #sidebar, #main-content, #toast-container {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    #print-area {
        display: block !important;
        padding: 0;
        margin: 0;
    }

    .report-container, .resume-container {
        box-shadow: none;
        border: none;
        padding: 24px;
    }
}

.print-only {
    display: none;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 900px) {
    #sidebar {
        width: 64px;
        overflow: hidden;
    }

    .logo-text, .nav-link span:not(.nav-icon), .sidebar-footer {
        display: none;
    }

    .logo {
        justify-content: center;
        padding: 16px 8px;
    }

    .nav-link {
        justify-content: center;
        padding: 12px;
    }

    #main-content {
        margin-left: 64px;
        padding: 24px 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-actions {
        width: 100%;
    }

    .report-container {
        padding: 24px 16px;
    }
}
