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

body {
    font-family: 'Inter', sans-serif;
    background: #E8EAED;
    color: #1a1a2e;
    min-height: 100vh;
}

/* ── Site header ── */

.site-header {
    background: #1a1a2e;
    height: 56px;
    display: flex;
    align-items: center;
    padding: 0 2rem;
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.header-brand        { display: flex; align-items: center; gap: 12px; }
.header-logo-img     { height: 28px; border-radius: 4px; padding: 3px 8px; background: #fff; display: block; }
.header-portal-label { color: rgba(255,255,255,0.45); font-size: 13px; font-weight: 400; }

.header-user {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    font-weight: 400;
}

/* ── Main content area ── */

main {
    padding: 2rem 2.5rem 4rem;
}

/* ── Page wrapper (centered, max-width) ── */

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Page header row ── */

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.page-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.875rem;
}

.page-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.2;
}

.record-counts {
    font-size: 13px;
    color: #6b7280;
    font-weight: 400;
    white-space: nowrap;
}

/* ── Buttons ── */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #185FA5;
    color: #fff;
    padding: 9px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
    flex-shrink: 0;
}

.btn-primary:hover {
    background: #144e8a;
}

/* ── Dashboard card ── */

.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #E4E7EC;
    overflow: hidden;
}

/* ── Card toolbar (search) ── */

.card-toolbar {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #EAECF0;
}

.search-input {
    width: 100%;
    max-width: 360px;
    padding: 0.55rem 0.875rem;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.875rem;
    color: #1a1a2e;
    background: #f9fafb;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-input::placeholder { color: #9ca3af; }

.search-input:focus {
    border-color: #185FA5;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

/* ── Data table ── */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table thead tr { border-bottom: 1px solid #EAECF0; }

.data-table th {
    padding: 0.75rem 1.25rem;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 0.875rem 1.25rem;
    color: #1a1a2e;
    vertical-align: middle;
}

.data-table tbody .table-row {
    border-bottom: 1px solid #f7f8fa;
    transition: background 0.1s ease;
}

.data-table tbody .table-row:last-child { border-bottom: none; }
.data-table tbody .table-row:hover { background: #FAFBFC; }

.td-name  { font-weight: 500; }
.td-action { text-align: right; }

/* ── View link ── */

.view-link {
    color: #185FA5;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.view-link:hover { text-decoration: underline; }

/* ── Delete button ── */

.btn-delete {
    background: none;
    border: none;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 400;
    color: #9ca3af;
    cursor: pointer;
    padding: 0 0 0 0.75rem;
    transition: color 0.12s ease;
}

.btn-delete:hover { color: #dc2626; }

/* ── Status badges ── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
}

.badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.badge-draft      { background: #F3F4F6; color: #6B7280; }
.badge-inprogress { background: #E6F1FB; color: #185FA5; }
.badge-complete   { background: #EAF3DE; color: #3B6D11; }

.badge-draft .badge-dot      { background: #6B7280; }
.badge-inprogress .badge-dot { background: #185FA5; }
.badge-complete .badge-dot   { background: #3B6D11; }

/* ── Empty state ── */

.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.7;
}

.empty-cta {
    display: inline-block;
    margin-top: 0.75rem;
    color: #185FA5;
    text-decoration: none;
    font-weight: 500;
}

.empty-cta:hover { text-decoration: underline; }

/* ─────────────────────────────────────────
   Form page
───────────────────────────────────────── */

.form-wrapper { max-width: 860px; }

.form-page-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #185FA5;
    text-decoration: none;
    margin-bottom: 16px;
}

.back-link:hover { text-decoration: underline; }

/* Draft saved banner */

.draft-banner {
    background: #EAF3DE;
    color: #3B6D11;
    border: 1px solid #c6e0a8;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}

/* Form card */

.form-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #E4E7EC;
    overflow: hidden;
}

/* Form sections */

.form-section {
    padding: 20px 24px;
    border-bottom: 1px solid #E4E7EC;
    background: #fff;
}

.form-section-last {
    padding: 20px 24px;
    background: #fff;
}

.form-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: #6B7280;
    margin-bottom: 16px;
}

.form-section-divider {
    height: 1px;
    background: #EAECF0;
}

/* Grids */

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* Spacing utility within form sections */

.mt { margin-top: 1rem; }

/* Form groups */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 11px;
    font-weight: 500;
    color: #6B7280;
    letter-spacing: 0.01em;
}

/* Form inputs */

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D0D5DD;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input::placeholder { color: #9ca3af; }

.form-input:focus {
    border-color: #185FA5;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

.form-input:disabled {
    background: #f5f6f8;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

/* Radio pills */

.pill-group {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    padding: 5px 14px;
    border-radius: 99px;
    border: 1.5px solid #D0D5DD;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.12s ease;
    line-height: 1.4;
}

.pill:hover:not(.selected) {
    border-color: #185FA5;
    color: #185FA5;
}

.pill.selected {
    background: #185FA5;
    border-color: #185FA5;
    color: #fff;
}

/* C2C left-accent box */

.c2c-box {
    background: #FFFBEB;
    border-left: 3px solid #F59E0B;
    border-radius: 0 6px 6px 0;
    padding: 14px 16px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.c2c-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #92400E;
}

/* Form footer */

.form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid #E4E7EC;
    background: #F9FAFB;
    border-radius: 0 0 12px 12px;
    gap: 1rem;
}

.form-footer-right {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-cancel {
    color: #6b7280;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    flex-shrink: 0;
}

.btn-cancel:hover { color: #1a1a2e; }

.btn-secondary {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1.5px solid #D0D5DD;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
    border-color: #185FA5;
    color: #185FA5;
}

.form-footer-note {
    text-align: center;
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 0.875rem;
}

/* ─────────────────────────────────────────
   Login page
───────────────────────────────────────── */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 56px);
    padding: 2rem;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.login-card h1 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 0.75rem;
}

.login-card p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Microsoft sign-in button */

.ms-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #1a1a2e;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease;
}

.ms-btn:hover { background: #26265e; }

/* Microsoft logo — 2×2 colored squares */

.ms-logo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.ms-sq { display: block; }
.ms-sq.red    { background: #f25022; }
.ms-sq.green  { background: #7fba00; }
.ms-sq.blue   { background: #00a4ef; }
.ms-sq.yellow { background: #ffb900; }

/* ─────────────────────────────────────────
   Candidate detail page
───────────────────────────────────────── */

/* Candidate subtitle (client · job title · start date) */

.candidate-subtitle {
    font-size: 13px;
    color: #6B7280;
    margin-top: 2px;
}

/* Info row grid */

.ir {
    padding: 12px 20px;
    border-bottom: 1px solid #F3F4F6;
}

.ir:nth-child(odd) {
    border-right: 1px solid #F3F4F6;
}

.ir label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    margin-bottom: 3px;
}

.ir p {
    font-size: 13px;
    color: #1a1a2e;
    margin: 0;
}

/* Progress bar (tasks footer) */

.progress-left {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.progress-text {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

.progress-track {
    width: 200px;
    height: 4px;
    background: #E4E7EC;
    border-radius: 99px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-fill {
    height: 100%;
    background: #185FA5;
    border-radius: 99px;
    transition: width 0.3s ease;
}

/* Task table */

.task-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.task-table th {
    padding: 0.55rem 0.75rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #EAECF0;
    white-space: nowrap;
}

.task-table td {
    padding: 0.625rem 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #f7f8fa;
    color: #374151;
}

.task-table tbody tr:last-child td { border-bottom: none; }

.task-label {
    font-size: 13px;
    font-weight: 500;
    color: #1a1a2e;
    white-space: nowrap;
    width: 30%;
}

.task-row-na { background: #F9FAFB; }
.task-row-na .task-label { color: #9ca3af; }

.na-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: #f0f1f3;
    color: #9ca3af;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.task-date {
    padding: 0.38rem 0.6rem;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-date:focus {
    border-color: #185FA5;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

.task-select {
    padding: 0.38rem 0.6rem;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.8rem;
    color: #1a1a2e;
    background: #fff;
    outline: none;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.task-select:focus {
    border-color: #185FA5;
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

/* Textarea */

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Task status icons */

.task-table th:first-child,
.task-table td:first-child {
    width: 38px;
    padding-right: 0.25rem;
}

.task-icon-na,
.task-icon-done,
.task-icon-pending {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.task-icon-na      { background: #f0f1f3; color: #9ca3af; }
.task-icon-done    { background: #EAF3DE; color: #3B6D11; }
.task-icon-pending { background: #FEF3C7; color: #B45309; }

/* Error banner */

.error-banner {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
}
