:root {
    --primary: #3f87fc;
    --primary-dark: #246bd5;
    --primary-soft: #eaf2ff;
    --ink: #152033;
    --ink-soft: #526176;
    --muted: #7d8ba0;
    --line: #e3e9f1;
    --surface: #ffffff;
    --surface-soft: #f5f7fb;
    --sidebar: #111b2c;
    --success: #15956d;
    --warning: #bd7516;
    --danger: #d34854;
    --radius: 12px;
    --shadow: 0 8px 26px rgba(24, 42, 72, .07);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { min-height: 100vh; margin: 0; color: var(--ink); font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif; background: var(--surface-soft); -webkit-font-smoothing: antialiased; }
a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: #1659b8; }
button, input, select, textarea { font: inherit; }
.btn { --bs-btn-border-radius: 9px; --bs-btn-font-weight: 650; --bs-btn-padding-y: .65rem; --bs-btn-padding-x: 1rem; }
.btn-primary { --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary); --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark); --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark); }
.btn-light { --bs-btn-bg: #fff; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #f5f7fb; --bs-btn-hover-border-color: #d4ddea; color: #344258; }
.form-label { margin-bottom: .45rem; color: #3a485d; font-size: .84rem; font-weight: 680; }
.form-label > span { color: var(--danger); }
.form-control, .form-select { min-height: 44px; border-color: #d9e1ec; border-radius: 9px; color: var(--ink); box-shadow: none; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(63, 135, 252, .12); }
.form-control::placeholder { color: #9aa6b6; }
.form-text, .form-hint { color: var(--muted); font-size: .75rem; }
.input-group-text { border-color: #d9e1ec; background: #f8fafc; color: #5e6b7d; font-size: .82rem; font-weight: 700; }
.eyebrow { display: block; margin: 0 0 .35rem; color: var(--primary-dark); font-size: .72rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

/* Application shell */
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 1040; inset: 0 auto 0 0; display: flex; width: 258px; flex-direction: column; color: #d6deeb; background: var(--sidebar); transition: transform .22s ease; }
.sidebar-brand { display: flex; min-height: 80px; align-items: center; gap: 11px; padding: 0 22px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-logo { display: block; width: 185px; max-height: 52px; object-fit: contain; object-position: left center; }
.brand-mark { display: inline-flex; width: 39px; height: 39px; flex: 0 0 39px; align-items: center; justify-content: center; border-radius: 10px; color: #fff; background: var(--primary); box-shadow: 0 6px 16px rgba(63,135,252,.25); font-size: .9rem; font-weight: 850; letter-spacing: -.02em; }
.brand-mark-lg { width: 52px; height: 52px; flex-basis: 52px; border-radius: 13px; font-size: 1.05rem; }
.sidebar-brand strong { display: block; color: #fff; font-size: .93rem; letter-spacing: .02em; }
.sidebar-brand small { display: block; margin-top: 2px; color: #8694aa; font-size: .68rem; }
.sidebar-close { margin-left: auto; border: 0; color: #bac5d6; background: transparent; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 5px; overflow-y: auto; padding: 22px 14px; }
.nav-section { padding: 0 12px 8px; color: #6f7e96; font-size: .64rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.sidebar .nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 9px; color: #aeb9ca; font-size: .86rem; font-weight: 590; }
.sidebar .nav-link i { width: 20px; color: #8493aa; font-size: 1.05rem; text-align: center; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.sidebar .nav-link.active { color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgba(20, 82, 182, .2); }
.sidebar .nav-link.active i { color: #fff; }
.sidebar-note { display: flex; gap: 11px; margin: auto 3px 0; padding: 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; background: rgba(255,255,255,.035); }
.sidebar-note > i { color: #70a8ff; font-size: 1.2rem; }
.sidebar-note strong, .sidebar-note small { display: block; }
.sidebar-note strong { color: #dce5f2; font-size: .76rem; }
.sidebar-note small { margin-top: 3px; color: #8493a9; font-size: .66rem; line-height: 1.45; }
.sidebar-footer { padding: 16px 22px 19px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-footer span, .sidebar-footer small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-footer span { color: #99a7ba; font-size: .66rem; font-weight: 650; }
.sidebar-footer small { margin-top: 3px; color: #64738a; font-size: .65rem; }
.sidebar-backdrop { display: none; }
.app-main { display: flex; min-height: 100vh; margin-left: 258px; flex-direction: column; }
.topbar { position: sticky; z-index: 1020; top: 0; display: flex; height: 80px; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.top-search { display: flex; width: min(390px, 33vw); height: 42px; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.top-search i { color: #8290a5; }
.top-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: .83rem; }
.top-search kbd { padding: 2px 6px; border: 1px solid #dce3ed; border-radius: 4px; color: #8995a8; background: #fff; box-shadow: none; font-family: inherit; font-size: .65rem; }
.icon-button { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; color: #536176; background: #fff; }
.icon-button:hover { color: var(--primary-dark); border-color: #c9d8ee; background: var(--primary-soft); }
.user-menu { display: flex; align-items: center; gap: 10px; padding: 5px 7px 5px 5px; border: 0; border-radius: 9px; color: var(--ink); background: transparent; }
.user-menu:hover { background: #f5f7fa; }
.user-avatar, .person-avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: #2463b5; background: #e5efff; font-weight: 800; }
.user-avatar { width: 38px; height: 38px; font-size: .82rem; }
.user-menu strong, .user-menu small { display: block; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu strong { font-size: .78rem; }
.user-menu small { margin-top: 1px; color: var(--muted); font-size: .64rem; }
.user-menu > i { color: #8a96a7; font-size: .67rem; }
.user-dropdown { min-width: 230px; border-color: var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.user-dropdown .dropdown-item { padding: .65rem 1rem; font-size: .82rem; }
.page-content { width: 100%; max-width: 1600px; flex: 1; align-self: center; padding: 28px; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 28px; border-top: 1px solid var(--line); color: #7c899a; background: #fff; font-size: .64rem; }
.app-footer span { font-weight: 750; letter-spacing: .03em; }
.app-alert { display: flex; align-items: center; gap: 10px; border-radius: 10px; font-size: .84rem; }
.app-alert .btn-close { margin-left: auto; }

/* Shared content */
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-heading h1, .profile-heading h1 { margin: 0; color: var(--ink); font-size: clamp(1.65rem, 2.5vw, 2.15rem); font-weight: 760; letter-spacing: -.035em; }
.page-heading p:not(.eyebrow), .profile-heading p { margin: 6px 0 0; color: var(--ink-soft); font-size: .89rem; }
.breadcrumb { margin: 0 0 .45rem; font-size: .75rem; }
.breadcrumb-item + .breadcrumb-item::before { color: #a4afbe; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 2px 7px rgba(35,54,82,.025); }
.panel-header { display: flex; min-height: 71px; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: .98rem; font-weight: 750; }
.panel-header p { margin: 3px 0 0; color: var(--muted); font-size: .73rem; }
.panel-header > a { font-size: .76rem; font-weight: 700; }
.panel-header > a i { margin-left: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { display: flex; min-height: 105px; align-items: center; gap: 13px; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.stat-icon, .list-icon { display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; }
.stat-icon { width: 42px; height: 42px; flex: 0 0 42px; font-size: 1.05rem; }
.tone-blue { color: #276dce; background: #e9f2ff; }
.tone-green { color: #148161; background: #e7f7f1; }
.tone-purple { color: #7755c7; background: #f0ebff; }
.tone-amber { color: #b46c0e; background: #fff4df; }
.tone-cyan { color: #167e96; background: #e8f7fa; }
.tone-red { color: #c4424d; background: #feecee; }
.stat-card span:not(.stat-icon) { display: block; color: #6a778a; font-size: .69rem; font-weight: 650; line-height: 1.3; }
.stat-card strong { display: block; margin-top: 5px; font-size: 1.45rem; font-weight: 780; }
.dashboard-grid > div { min-height: 100%; }
.app-table { --bs-table-bg: transparent; --bs-table-hover-bg: #f8fbff; font-size: .78rem; }
.app-table > thead > tr > th { padding: .72rem 1rem; border-bottom-color: var(--line); color: #7a8799; background: #fafbfd; font-size: .64rem; font-weight: 780; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.app-table > tbody > tr > td { padding: .78rem 1rem; border-bottom-color: #edf1f6; color: #4b596c; vertical-align: middle; }
.app-table > tbody > tr:last-child > td { border-bottom: 0; }
.person-cell { display: flex; min-width: 180px; align-items: center; gap: 10px; color: var(--ink); }
.person-cell:hover strong { color: var(--primary-dark); }
.person-avatar { width: 35px; height: 35px; flex: 0 0 35px; font-size: .72rem; }
.person-cell strong, .person-cell small, .table-primary-text, .table-secondary-text { display: block; }
.person-cell strong, .table-primary-text { color: #26354a; font-size: .77rem; font-weight: 710; }
.person-cell small, .table-secondary-text { margin-top: 2px; color: #8a96a7; font-size: .66rem; }
.status-badge { display: inline-flex; min-height: 24px; align-items: center; padding: 3px 8px; border-radius: 20px; font-size: .64rem; font-weight: 750; white-space: nowrap; }
.status-active, .status-completed, .status-verified, .status-signed { color: #087451; background: #e4f7ef; }
.status-probation, .status-information_required, .status-ready_to_generate, .status-expiring { color: #9b5b08; background: #fff0d5; }
.status-on_leave, .status-generated, .status-printed, .status-sent_to_employee, .status-uploaded { color: #1e67c5; background: #e7f1ff; }
.status-inactive, .status-archived, .status-superseded, .status-waived { color: #667387; background: #edf1f5; }
.status-resigned, .status-terminated, .status-rejected, .status-expired { color: #b8303d; background: #fde9ec; }
.status-not_started { color: #68778a; background: #edf1f5; }
.empty-state { display: flex; min-height: 260px; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; }
.empty-state.compact { min-height: 230px; }
.empty-state > span { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 12px; color: var(--primary-dark); background: var(--primary-soft); font-size: 1.25rem; }
.empty-state h3 { margin: 13px 0 4px; font-size: .92rem; }
.empty-state p { max-width: 350px; margin: 0 0 14px; color: var(--muted); font-size: .75rem; }
.record-list { padding: 5px 0; }
.record-item { display: flex; min-height: 65px; align-items: center; gap: 11px; padding: 10px 18px; border-bottom: 1px solid #edf1f5; color: var(--ink); }
.record-item:last-child { border-bottom: 0; }
.record-item:hover { background: #f8fbff; }
.record-item strong, .record-item small { display: block; }
.record-item strong { font-size: .76rem; }
.record-item small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.record-item > b { color: #506078; font-size: .7rem; }
.mini-progress, .onboarding-progress > span { display: block; overflow: hidden; border-radius: 20px; background: #e9eef5; }
.mini-progress { width: 100%; height: 4px; margin-top: 7px; }
.mini-progress i, .onboarding-progress i, .table-progress i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.list-icon { width: 37px; height: 37px; flex: 0 0 37px; }
.activity-list { padding: 10px 20px; }
.activity-item { position: relative; display: flex; gap: 12px; min-height: 52px; padding: 7px 0; }
.activity-item::before { position: absolute; top: 24px; bottom: -13px; left: 5px; width: 1px; content: ""; background: #dfe6ef; }
.activity-item:last-child::before { display: none; }
.activity-item > span { position: relative; z-index: 1; width: 11px; height: 11px; flex: 0 0 11px; margin-top: 5px; border: 3px solid #d9e8ff; border-radius: 50%; background: var(--primary); }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: .73rem; }
.activity-item small { margin-top: 3px; color: var(--muted); font-size: .64rem; }

/* Employee list */
.filter-panel { margin-bottom: 18px; padding: 18px; }
.table-panel { overflow: hidden; }
.employee-table td { white-space: nowrap; }
.table-progress { display: flex; min-width: 105px; align-items: center; gap: 8px; }
.table-progress > span { display: block; width: 66px; height: 5px; overflow: hidden; border-radius: 20px; background: #e9eef5; }
.table-progress b { color: #657286; font-size: .65rem; }
.pagination-wrap { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.pagination { --bs-pagination-font-size: .72rem; --bs-pagination-padding-x: .7rem; --bs-pagination-padding-y: .38rem; --bs-pagination-border-color: var(--line); --bs-pagination-active-bg: var(--primary); --bs-pagination-active-border-color: var(--primary); }
.dropdown-menu { border-color: var(--line); border-radius: 9px; box-shadow: var(--shadow); }
.dropdown-item { font-size: .78rem; }
.dropdown-item:active { background: var(--primary); }

/* Employee form */
.form-page-heading { align-items: center; }
.validation-summary { border: 1px solid #f5c7cd; border-radius: 10px; }
.validation-summary > div { display: flex; align-items: center; gap: 8px; }
.validation-summary ul { margin: 8px 0 0 24px; font-size: .82rem; }
.duplicate-warning { border: 1px solid #efcf96; border-radius: 10px; color: #68430e; background: #fff9ed; }
.warning-icon { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border-radius: 10px; color: #a8660d; background: #ffedc8; font-size: 1.15rem; }
.duplicate-warning p { margin: 3px 0 10px; font-size: .78rem; }
.duplicate-record { display: flex; align-items: center; gap: 8px; max-width: 620px; padding: 8px 10px; border: 1px solid #ecd5a9; border-radius: 7px; color: #5f4218; background: #fff; font-size: .75rem; }
.duplicate-record + .duplicate-record { margin-top: 6px; }
.duplicate-record b { flex: 1; }
.duplicate-record span { color: #8d6b38; }
.form-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); align-items: start; gap: 18px; }
.form-steps { position: sticky; top: 98px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.form-step { display: flex; width: 100%; min-height: 72px; align-items: center; gap: 10px; padding: 11px 14px; border: 0; border-bottom: 1px solid #edf1f5; color: #68768a; background: #fff; text-align: left; }
.form-step:hover { background: #f8faff; }
.form-step > span { display: inline-flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border-radius: 8px; color: #67768b; background: #eef2f7; font-size: .72rem; font-weight: 800; }
.form-step strong, .form-step small { display: block; }
.form-step strong { color: #445268; font-size: .78rem; }
.form-step small { margin-top: 2px; color: #929dad; font-size: .63rem; }
.form-step > i { margin-left: auto; color: #a6b0bf; font-size: .68rem; }
.form-step.active { background: #f4f8ff; box-shadow: inset 3px 0 var(--primary); }
.form-step.active > span { color: #fff; background: var(--primary); }
.form-step.active strong { color: var(--primary-dark); }
.form-security { display: flex; gap: 9px; margin: 14px; padding: 12px; border-radius: 8px; color: #62738a; background: #f4f7fa; }
.form-security > i { color: var(--primary-dark); }
.form-security p { margin: 0; }
.form-security strong, .form-security span { display: block; }
.form-security strong { color: #405069; font-size: .68rem; }
.form-security span { margin-top: 3px; font-size: .6rem; line-height: 1.4; }
.form-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.form-section { display: none; padding: 25px 26px 30px; }
.form-section.active { display: block; }
.form-section > header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-icon { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border-radius: 10px; color: var(--primary-dark); background: var(--primary-soft); font-size: 1.08rem; }
.form-section h2 { margin: 0; font-size: 1.05rem; font-weight: 760; }
.form-section header p { margin: 3px 0 0; color: var(--muted); font-size: .72rem; }
.subsection-heading { display: flex; align-items: center; gap: 10px; margin: 25px 0 13px; }
.subsection-heading::after { flex: 1; height: 1px; content: ""; background: var(--line); }
.subsection-heading h3 { margin: 0; font-size: .78rem; font-weight: 760; }
.subsection-heading > span { order: 3; padding: 2px 7px; border-radius: 12px; color: #8490a2; background: #f0f3f7; font-size: .58rem; font-weight: 700; text-transform: uppercase; }
.sensitive-heading h3 { color: #8a5b12; }
.sensitive-notice { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding: 12px 14px; border: 1px solid #d9e7fb; border-radius: 8px; color: #46627f; background: #f3f8ff; font-size: .72rem; }
.sensitive-notice i { color: var(--primary-dark); font-size: 1rem; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 30px -26px -30px; padding: 17px 26px; border-top: 1px solid var(--line); background: #fafbfd; }
.save-indicator { color: var(--muted); font-size: .68rem; }

/* Employee profile */
.profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.profile-identity { display: flex; align-items: center; gap: 15px; }
.profile-avatar { display: inline-flex; width: 62px; height: 62px; flex: 0 0 62px; align-items: center; justify-content: center; border-radius: 15px; color: #fff; background: #2f73dc; font-size: 1.18rem; font-weight: 800; }
.profile-heading .breadcrumb { margin-bottom: .25rem; }
.profile-summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.profile-summary-grid > div { padding: 15px 18px; border-right: 1px solid var(--line); }
.profile-summary-grid > div:last-child { border-right: 0; }
.profile-summary-grid span, .profile-summary-grid strong { display: block; }
.profile-summary-grid span { color: var(--muted); font-size: .63rem; font-weight: 650; }
.profile-summary-grid strong { overflow: hidden; margin-top: 5px; color: #35445a; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-panel { overflow: hidden; }
.profile-tabs { gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.profile-tabs button { position: relative; padding: 13px 11px; border: 0; color: #718095; background: transparent; font-size: .72rem; font-weight: 700; }
.profile-tabs button::after { position: absolute; right: 8px; bottom: -1px; left: 8px; height: 2px; content: ""; background: transparent; }
.profile-tabs button.active { color: var(--primary-dark); }
.profile-tabs button.active::after { background: var(--primary); }
.profile-tab-content { padding: 22px; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 9px; }
.detail-grid > div { min-height: 72px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-grid > div:nth-child(3n) { border-right: 0; }
.detail-grid > div:nth-last-child(-n+3) { border-bottom: 0; }
.detail-grid span, .detail-grid strong { display: block; }
.detail-grid span { color: #8995a6; font-size: .62rem; font-weight: 650; }
.detail-grid strong { overflow-wrap: anywhere; margin-top: 6px; color: #344258; font-size: .75rem; font-weight: 680; }
.sensitive-detail { background: #f8fbff; }
.sensitive-detail span i { color: var(--primary-dark); }
.profile-notes { margin-top: 17px; padding: 15px; border-radius: 8px; background: #f7f9fc; }
.profile-notes span { color: #7c899a; font-size: .62rem; font-weight: 700; text-transform: uppercase; }
.profile-notes p { margin: 5px 0 0; color: #526075; font-size: .75rem; line-height: 1.6; }
.progress-summary { display: flex; align-items: baseline; gap: 4px; }
.progress-summary strong { color: var(--primary-dark); font-size: 1.1rem; }
.progress-summary span { color: var(--muted); font-size: .62rem; }
.onboarding-progress { padding: 15px 20px 0; }
.onboarding-progress > span { height: 6px; }
.checklist { padding: 10px 20px 18px; }
.checklist-item { display: flex; min-height: 57px; align-items: center; gap: 11px; border-bottom: 1px solid #edf1f5; }
.checklist-item:last-child { border-bottom: 0; }
.checklist-icon { display: inline-flex; width: 31px; height: 31px; flex: 0 0 31px; align-items: center; justify-content: center; border-radius: 8px; color: #718096; background: #eef2f6; font-size: .8rem; }
.checklist-icon.done { color: #0a7b55; background: #e5f7ef; }
.checklist-item > div { flex: 1; }
.checklist-item strong, .checklist-item small { display: block; }
.checklist-item strong { font-size: .74rem; }
.checklist-item small { margin-top: 3px; color: var(--muted); font-size: .61rem; }
.timeline { padding: 17px 20px; }
.timeline-item { position: relative; display: flex; gap: 12px; min-height: 78px; }
.timeline-item::before { position: absolute; top: 30px; bottom: 0; left: 14px; width: 1px; content: ""; background: #dbe3ed; }
.timeline-item:last-child::before { display: none; }
.timeline-item > span { position: relative; z-index: 1; display: inline-flex; width: 29px; height: 29px; flex: 0 0 29px; align-items: center; justify-content: center; border: 3px solid #e4efff; border-radius: 50%; color: #fff; background: var(--primary); font-size: .64rem; }
.timeline-item strong, .timeline-item small, .timeline-item time { display: block; }
.timeline-item strong { margin-top: 2px; font-size: .73rem; }
.timeline-item small { margin-top: 3px; color: #6f7d90; font-size: .63rem; }
.timeline-item time { margin-top: 2px; color: #a0aaba; font-size: .59rem; }
.quick-facts { overflow: hidden; }
.quick-facts > div:not(.panel-header) { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; border-bottom: 1px solid #edf1f5; font-size: .68rem; }
.quick-facts > div:last-child { border-bottom: 0; }
.quick-facts span { color: var(--muted); }
.quick-facts strong { color: #45536a; font-size: .66rem; text-align: right; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 17px; border: 1px solid #f0cbd0; border-radius: 10px; background: #fff8f9; }
.danger-zone strong { color: #a93440; font-size: .74rem; }
.danger-zone p { margin: 3px 0 0; color: #8d6d71; font-size: .62rem; line-height: 1.4; }

/* Authentication */
.auth-body { overflow-x: hidden; background: #fff; }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(400px, .92fr) minmax(480px, 1.08fr); }
.auth-panel { position: relative; display: flex; overflow: hidden; min-height: 100vh; flex-direction: column; padding: 46px clamp(42px, 5vw, 80px); color: #fff; background: #111d31; }
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.auth-brand-logo { display: block; width: min(285px, 70%); max-height: 72px; object-fit: contain; object-position: left center; }
.auth-copy { position: relative; z-index: 2; margin: auto 0; }
.auth-copy .eyebrow { color: #78adff; }
.auth-copy h1 { max-width: 630px; margin: 13px 0 20px; font-size: clamp(2.35rem, 4.1vw, 4.5rem); font-weight: 720; letter-spacing: -.055em; line-height: 1.03; }
.auth-copy > p { max-width: 580px; color: #a7b4c8; font-size: .98rem; line-height: 1.7; }
.auth-trust { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 30px; color: #c2cede; font-size: .74rem; font-weight: 600; }
.auth-trust span { display: flex; align-items: center; gap: 7px; }
.auth-trust i { color: #78adff; }
.auth-decoration { position: absolute; right: -130px; bottom: -170px; width: 560px; height: 560px; border: 1px solid rgba(101,155,239,.16); border-radius: 50%; }
.auth-decoration span { position: absolute; border: 1px solid rgba(101,155,239,.11); border-radius: 50%; }
.auth-decoration span:nth-child(1) { inset: 60px; }
.auth-decoration span:nth-child(2) { inset: 120px; }
.auth-decoration span:nth-child(3) { inset: 180px; background: rgba(63,135,252,.08); }
.login-panel { display: flex; min-height: 100vh; align-items: center; justify-content: center; flex-direction: column; padding: 40px clamp(28px, 7vw, 100px) 24px; background: #fff; }
.login-card { width: 100%; max-width: 430px; margin: auto; }
.login-heading { display: flex; align-items: center; gap: 12px; }
.mobile-brand-mark { display: inline-flex; width: 42px; height: 42px; flex: 0 0 42px; align-items: center; justify-content: center; border-radius: 10px; background: #111d31; }
.mobile-brand-mark img { width: 30px; height: 30px; object-fit: contain; }
.login-heading p { margin: 0 0 4px; color: var(--primary-dark); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.login-heading h2 { margin: 0; font-size: 1.65rem; font-weight: 760; letter-spacing: -.035em; }
.login-subtitle { margin: 10px 0 27px; color: var(--muted); font-size: .82rem; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; z-index: 2; top: 50%; left: 13px; color: #8c98aa; transform: translateY(-50%); }
.input-icon > .form-control { padding-left: 39px; }
.input-password > .form-control { padding-right: 45px; }
.password-toggle { position: absolute; z-index: 3; top: 50%; right: 6px; display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 0; border-radius: 7px; color: #7f8b9d; background: transparent; transform: translateY(-50%); }
.password-toggle:hover { color: var(--primary-dark); background: #edf4ff; }
.login-security { display: flex; align-items: center; gap: 9px; margin-top: 28px; padding: 13px; border-radius: 9px; color: #68768a; background: #f5f7fa; font-size: .68rem; line-height: 1.45; }
.login-security i { color: var(--primary-dark); font-size: 1rem; }
.auth-footer { display: flex; align-items: center; flex-direction: column; gap: 3px; color: #929dad; text-align: center; font-size: .61rem; }
.auth-footer span { font-weight: 750; }

/* Error */
.error-body { display: flex; align-items: center; justify-content: center; padding: 30px; background: #f5f7fb; }
.empty-page { width: 100%; max-width: 560px; padding: 50px 35px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.empty-page-icon { display: inline-flex; width: 62px; height: 62px; align-items: center; justify-content: center; margin-bottom: 17px; border-radius: 15px; color: var(--primary-dark); background: var(--primary-soft); font-size: 1.65rem; }
.empty-page h1 { margin: 4px 0 10px; font-size: 1.75rem; font-weight: 760; }
.empty-page p { margin: 0 auto 23px; color: var(--muted); font-size: .83rem; line-height: 1.6; }

@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .detail-grid > div:nth-child(3n) { border-right: 1px solid var(--line); }
    .detail-grid > div:nth-child(2n) { border-right: 0; }
    .detail-grid > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
    .detail-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
}

@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar.is-open + .sidebar-backdrop { position: fixed; z-index: 1035; inset: 0; display: block; background: rgba(11,20,34,.46); }
    .app-main { margin-left: 0; }
    .topbar { height: 68px; padding: 0 18px; }
    .page-content { padding: 22px 18px; }
    .form-layout { grid-template-columns: 1fr; }
    .form-steps { position: static; display: flex; overflow-x: auto; }
    .form-step { min-width: 170px; border-right: 1px solid #edf1f5; border-bottom: 0; }
    .form-step.active { box-shadow: inset 0 -3px var(--primary); }
    .form-security { display: none; }
    .profile-summary-grid { grid-template-columns: repeat(3, 1fr); }
    .profile-summary-grid > div:nth-child(3) { border-right: 0; }
    .profile-summary-grid > div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
    .auth-shell { grid-template-columns: 1fr; }
    .auth-panel { display: none; }
    .login-panel { min-height: 100vh; }
}

@media (max-width: 767.98px) {
    .page-heading, .profile-heading { align-items: stretch; flex-direction: column; }
    .page-heading .btn, .profile-heading > .d-flex .btn { flex: 1; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card { min-height: 94px; padding: 14px; }
    .app-footer { align-items: flex-start; flex-direction: column; }
    .profile-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .profile-summary-grid > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .profile-summary-grid > div:nth-child(2n) { border-right: 0; }
    .profile-summary-grid > div:nth-child(3) { border-right: 1px solid var(--line); }
    .profile-summary-grid > div:last-child { border-bottom: 0; }
    .detail-grid { grid-template-columns: 1fr; }
    .detail-grid > div, .detail-grid > div:nth-child(2n), .detail-grid > div:nth-child(3n) { border-right: 0; border-bottom: 1px solid var(--line); }
    .detail-grid > div:last-child { border-bottom: 0; }
    .profile-tabs { overflow-x: auto; flex-wrap: nowrap; }
    .profile-tabs button { white-space: nowrap; }
    .form-section { padding: 20px 17px 25px; }
    .form-actions { align-items: stretch; margin: 25px -17px -25px; padding: 15px 17px; flex-direction: column; }
    .form-actions > div:last-child { width: 100%; }
    .form-actions .btn { flex: 1; }
    .save-indicator { display: none; }
    .pagination-wrap { align-items: flex-start; flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .stat-card { min-height: 82px; }
    .profile-identity { align-items: flex-start; }
    .profile-avatar { width: 50px; height: 50px; flex-basis: 50px; border-radius: 12px; }
    .profile-summary-grid { grid-template-columns: 1fr; }
    .profile-summary-grid > div, .profile-summary-grid > div:nth-child(3) { border-right: 0; border-bottom: 1px solid var(--line); }
    .login-panel { padding-right: 20px; padding-left: 20px; }
}

@media print {
    .sidebar, .topbar, .app-footer, .page-heading .btn, .profile-heading > .d-flex, .danger-zone { display: none !important; }
    .app-main { margin: 0; }
    .page-content { max-width: none; padding: 0; }
    .panel { break-inside: avoid; border-color: #bbb; box-shadow: none; }
    body { background: #fff; }
}
