:root {
    --ink: #18304f;
    --ink-strong: #10233c;
    --muted: #66758a;
    --line: #dce4ee;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --canvas-blue: #eaf1f9;
    --orange: #ff6534;
    --orange-dark: #df4f20;
    --orange-soft: #fff0ea;
    --blue: #285f9d;
    --blue-soft: #e8f1fb;
    --green: #168665;
    --green-soft: #e4f7f0;
    --amber: #aa6a06;
    --amber-soft: #fff4d8;
    --red: #b93e46;
    --red-soft: #ffeaec;
    --shadow: 0 20px 55px rgba(24, 48, 79, 0.09);
    --shadow-soft: 0 10px 30px rgba(24, 48, 79, 0.07);
    --radius: 24px;
    --radius-small: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.employee-portal {
    margin: 0;
    min-width: 320px;
    background:
        radial-gradient(circle at 10% -10%, rgba(255, 101, 52, 0.12), transparent 28rem),
        radial-gradient(circle at 100% 15%, rgba(40, 95, 157, 0.10), transparent 30rem),
        var(--canvas);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
a { color: inherit; }

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1000;
    padding: 10px 14px;
    transform: translateY(-150%);
    border-radius: 10px;
    background: var(--ink-strong);
    color: #fff;
}
.skip-link:focus { transform: translateY(0); }

:focus-visible { outline: 3px solid rgba(255, 101, 52, 0.45); outline-offset: 3px; }

.preview-ribbon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    min-height: 38px;
    padding: 8px 24px;
    background: var(--orange);
    color: #fff;
    font-size: 13px;
}
.preview-ribbon span {
    padding: 2px 8px;
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 999px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.preview-ribbon strong { font-weight: 650; }
.preview-ribbon a { font-weight: 800; text-underline-offset: 3px; }

.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(220, 228, 238, .86);
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(18px);
}
.preview-ribbon + .app-header { top: 0; }
.app-header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: min(1180px, calc(100% - 40px));
    min-height: 74px;
    margin: 0 auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--ink-strong);
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.brand img { display: block; width: 102px; height: auto; }
.brand span { padding-left: 16px; border-left: 1px solid var(--line); }
.app-nav { display: flex; align-items: center; gap: 8px; }
.app-nav a,
.app-nav button {
    padding: 10px 13px;
    border-radius: 10px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border: 0;
    background: transparent;
    cursor: pointer;
}
.app-nav a:hover,
.app-nav button:hover { background: var(--canvas-blue); color: var(--ink); }
.app-nav a.is-active { background: var(--canvas-blue); color: var(--ink); }
.app-nav .nav-exit { color: var(--red); }

.page-wrap { width: min(1180px, calc(100% - 40px)); min-height: calc(100vh - 200px); margin: 0 auto; padding: 38px 0 72px; }
.app-footer {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 26px 0 38px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}

h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { color: var(--ink-strong); line-height: 1.08; letter-spacing: -.035em; }
h1 { margin-bottom: 18px; font-size: clamp(34px, 5vw, 62px); }
h2 { margin-bottom: 10px; font-size: clamp(25px, 3vw, 36px); }
h3 { margin-bottom: 7px; font-size: 20px; }
p { color: var(--muted); }

.eyebrow {
    margin-bottom: 9px;
    color: var(--orange-dark);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    padding: 10px 17px;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .52; }
.button--primary { border-color: var(--orange); background: var(--orange); color: #fff; box-shadow: 0 10px 24px rgba(255,101,52,.22); }
.button--primary:hover:not(:disabled) { background: var(--orange-dark); box-shadow: 0 13px 28px rgba(255,101,52,.28); }
.button--secondary { border-color: rgba(24,48,79,.16); background: var(--ink); color: #fff; }
.button--secondary:hover:not(:disabled) { background: var(--ink-strong); }
.button--ghost { border-color: var(--line); background: #fff; color: var(--ink); }
.button--ghost:hover:not(:disabled) { border-color: #b9c7d8; background: var(--canvas-blue); }
.button--block { width: 100%; }
.button--large { min-height: 52px; padding-inline: 24px; font-size: 15px; }
.text-danger { color: var(--red); }

.alert {
    margin: 0 0 24px;
    padding: 15px 18px;
    border: 1px solid;
    border-radius: 15px;
    font-weight: 650;
}
.alert--danger { border-color: #f1bbc0; background: var(--red-soft); color: #8f2932; }
.alert--success { border-color: #a9ddcc; background: var(--green-soft); color: #0a664c; }
.alert--info { border-color: #b9d1eb; background: var(--blue-soft); color: #174f87; }

.notice-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--ink);
    box-shadow: 0 28px 80px rgba(16, 35, 60, .28);
}
.notice-dialog::backdrop { background: rgba(16, 35, 60, .48); backdrop-filter: blur(3px); }
.notice-dialog form { padding: 28px; }
.notice-dialog__mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px; border-radius: 16px; background: var(--red-soft); color: var(--red); font-size: 24px; font-weight: 900; }
.notice-dialog h2 { margin-bottom: 10px; font-size: 25px; }
.notice-dialog p { margin-bottom: 22px; }

.preview-hero {
    overflow: hidden;
    position: relative;
    padding: clamp(34px, 7vw, 72px);
    border-radius: 32px;
    background:
        linear-gradient(110deg, rgba(16,35,60,.98), rgba(29,65,106,.95)),
        var(--ink);
    box-shadow: var(--shadow);
    color: #fff;
}
.preview-hero::after {
    content: "";
    position: absolute;
    width: 330px;
    height: 330px;
    right: -100px;
    top: -150px;
    border: 70px solid rgba(255,255,255,.055);
    border-radius: 50%;
}
.preview-hero h1 { max-width: 760px; color: #fff; }
.preview-hero p { max-width: 690px; color: rgba(255,255,255,.76); font-size: 19px; }
.preview-hero .eyebrow { color: #ff9a78; }
.preview-hero__meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 30px; }
.preview-hero__meta span { padding: 7px 11px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(255,255,255,.07); font-size: 12px; font-weight: 750; }

.section-intro { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin: 52px 0 22px; }
.section-intro h2 { margin-bottom: 0; }
.section-intro > p { max-width: 480px; margin-bottom: 3px; text-align: right; }
.role-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.role-grid .section-intro { grid-column: 1 / -1; }
.role-card {
    display: flex;
    flex-direction: column;
    min-height: 360px;
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.92);
    box-shadow: var(--shadow-soft);
}
.role-card--employee { background: linear-gradient(160deg, #fff 55%, var(--orange-soft)); }
.role-card__icon, .avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    margin-bottom: 24px;
    border-radius: 15px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 20px;
    font-weight: 900;
}
.role-card--employee .role-card__icon { background: var(--orange-soft); color: var(--orange-dark); }
.role-card__tag { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.role-card p { flex-grow: 1; font-size: 14px; }
.role-card form { margin-top: auto; }
.credentials { margin: 8px 0 20px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.credentials div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 12px; }
.credentials dt { color: var(--muted); }
.credentials dd { margin: 0; font-weight: 800; }
.safety-note { display: flex; align-items: center; gap: 22px; margin-top: 24px; padding: 24px 28px; border: 1px solid #b9decf; border-radius: 20px; background: var(--green-soft); }
.safety-note__icon { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff; font-size: 21px; font-weight: 900; }
.safety-note h2 { margin-bottom: 4px; font-size: 21px; }
.safety-note p { margin-bottom: 0; color: #346859; }

.auth-layout { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(32px, 7vw, 90px); align-items: center; min-height: 660px; }
.auth-layout--single { grid-template-columns: minmax(0, 470px); justify-content: center; }
.auth-story { padding: 30px 0; }
.auth-story h1 { max-width: 700px; }
.auth-story > p { max-width: 610px; font-size: 19px; }
.feature-list { display: grid; gap: 14px; max-width: 610px; margin: 36px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 15px; color: var(--ink); font-weight: 650; }
.feature-list li > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--orange-dark); font-size: 12px; font-weight: 900; }
.auth-card, .recovery-card {
    padding: clamp(26px, 4vw, 40px);
    border: 1px solid var(--line);
    border-radius: 28px;
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow);
}
.auth-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.auth-card__head h1, .auth-card__head h2 { margin-bottom: 0; font-size: 30px; }
.auth-card__icon { display: grid; place-items: center; flex: 0 0 auto; width: 50px; height: 50px; border-radius: 16px; background: var(--orange-soft); color: var(--orange-dark); font-size: 26px; font-weight: 900; }
.field { display: block; margin-bottom: 18px; }
.field > span, .status-form label > span, .password-view > span { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--ink); font-size: 13px; font-weight: 800; }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field textarea, .search-bar input, .search-bar select, .status-form input, .status-form select, .copy-field input {
    width: 100%;
    min-height: 49px;
    padding: 12px 14px;
    border: 1px solid #cad6e4;
    border-radius: 12px;
    background: #fff;
    color: var(--ink-strong);
    outline: none;
}
.field textarea { resize: vertical; min-height: 94px; }
.field input:focus, .field textarea:focus, .search-bar input:focus, .search-bar select:focus, .status-form input:focus, .status-form select:focus { border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,101,52,.1); }
.auth-help { margin-top: 22px; padding: 18px; border-radius: 14px; background: var(--canvas-blue); }
.auth-help strong { display: block; margin-bottom: 4px; }
.auth-help p { margin: 0; font-size: 13px; }
.auth-help a, .card-note a { color: var(--blue); font-weight: 800; text-underline-offset: 3px; }
.auth-back-link { display: inline-block; margin-top: 18px; color: var(--blue); font-size: 13px; font-weight: 750; text-decoration: none; }
.auth-back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.acceptance-lead { margin: -4px 0 24px; font-size: 15px; }
.acceptance-card .field input { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: .34em; }
.demo-credentials { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.demo-credentials span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.demo-credentials code { padding: 7px 9px; border-radius: 8px; background: #f0f3f7; color: var(--ink); font-family: inherit; font-size: 12px; text-align: center; }

.employee-hero, .manager-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 34px;
    overflow: hidden;
    position: relative;
    padding: clamp(34px, 6vw, 64px);
    border-radius: 30px;
    background: linear-gradient(116deg, var(--ink-strong), #254d7b);
    color: #fff;
    box-shadow: var(--shadow);
}
.employee-hero h1, .manager-hero h1 { color: #fff; font-size: clamp(35px, 5vw, 58px); }
.employee-hero p, .manager-hero p { max-width: 640px; margin-bottom: 26px; color: rgba(255,255,255,.72); font-size: 18px; }
.employee-hero .eyebrow, .manager-hero .eyebrow { color: #ff9f80; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions .button--ghost { border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.07); color: #fff; }
.hero-illustration { display: grid; place-items: center; flex: 0 0 280px; }
.receipt-shape { width: 184px; padding: 28px; transform: rotate(4deg); border-radius: 18px 18px 26px 26px; background: #fff; box-shadow: 0 28px 60px rgba(0,0,0,.22); }
.receipt-shape::before { content: "SODST"; display: block; margin-bottom: 24px; color: var(--ink); font-size: 13px; font-weight: 900; letter-spacing: .16em; }
.receipt-shape span { display: block; height: 8px; margin: 10px 0; border-radius: 6px; background: #dce4ee; }
.receipt-shape span:nth-child(2) { width: 72%; }
.receipt-shape strong { display: grid; place-items: center; width: 42px; height: 42px; margin: 25px auto 0; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 22px; }

.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.profile-card, .latest-card, .upload-card, .manager-section, .timeline-section, .access-denied {
    padding: clamp(24px, 4vw, 34px);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.94);
    box-shadow: var(--shadow-soft);
}
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 22px; }
.card-heading h2 { margin: 0; font-size: 27px; }
.readonly-badge, .counter { padding: 6px 9px; border-radius: 999px; background: var(--canvas-blue); color: var(--blue); font-size: 11px; font-weight: 800; white-space: nowrap; }
.profile-list { margin: 0; }
.profile-list div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 12px 0; border-top: 1px solid #e8edf3; }
.profile-list dt { color: var(--muted); font-size: 13px; }
.profile-list dd { margin: 0; font-weight: 750; }
.card-note { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid #e8edf3; font-size: 12px; }
.latest-card { background: linear-gradient(150deg, #fff 45%, #f0f6fc); }
.latest-meta, .submission-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 20px 0; color: var(--muted); font-size: 12px; font-weight: 650; }
.text-link { display: inline-flex; gap: 9px; margin-top: 8px; color: var(--blue); font-weight: 800; text-decoration: none; }
.reason-box { display: grid; gap: 4px; margin: 16px 0; padding: 14px 16px; border-left: 4px solid var(--orange); border-radius: 10px; background: var(--orange-soft); color: #7a3a23; font-size: 14px; }
.reason-box strong { color: var(--ink); }
.timeline-section { margin-top: 20px; }
.timeline-section .section-intro { margin: 0 0 22px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; gap: 14px; padding: 19px; border-radius: 16px; background: var(--canvas); }
.steps li > span { color: var(--orange); font-size: 12px; font-weight: 900; }
.steps strong { display: block; margin-bottom: 5px; }
.steps p { margin: 0; font-size: 13px; }

.page-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 25px; margin-bottom: 30px; }
.page-title h1 { margin-bottom: 8px; }
.page-title p { margin-bottom: 0; }
.receipt-tabs { display: flex; gap: 8px; margin-bottom: 22px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.82); }
.receipt-tabs a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 800; text-decoration: none; }
.receipt-tabs a:hover { background: var(--canvas-blue); color: var(--ink); }
.receipt-tabs a.is-active { background: var(--ink); color: #fff; box-shadow: var(--shadow-soft); }
.receipt-tabs a span { display: grid; place-items: center; min-width: 22px; height: 22px; padding-inline: 6px; border-radius: 999px; background: rgba(102,117,138,.14); font-size: 11px; }
.receipt-tabs a.is-active span { background: rgba(255,255,255,.16); }
.upload-card { padding: clamp(25px, 5vw, 42px); }
.upload-card__intro { display: flex; gap: 18px; margin-bottom: 28px; }
.upload-card__intro h2 { margin-bottom: 6px; }
.upload-card__intro p { margin: 0; }
.upload-icon { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border-radius: 16px; background: var(--orange-soft); color: var(--orange-dark); font-size: 29px; font-weight: 900; }
.dropzone { display: grid; place-items: center; min-height: 220px; padding: 30px; border: 2px dashed #b9c8da; border-radius: 18px; background: #f9fbfd; cursor: pointer; text-align: center; transition: border .15s, background .15s; }
.dropzone:hover { border-color: var(--orange); background: #fffaf8; }
.dropzone:has(input:focus-visible) { outline: 3px solid rgba(255, 101, 52, 0.45); outline-offset: 3px; }
.dropzone input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dropzone__icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 12px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); color: var(--orange); font-size: 29px; }
.dropzone strong { margin-bottom: 5px; font-size: 18px; }
.dropzone > span:last-child { color: var(--muted); font-size: 13px; }
.selected-files { display: grid; gap: 7px; margin: 14px 0 22px; padding: 0; list-style: none; }
.selected-files li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 12px; border-radius: 10px; background: var(--canvas); font-size: 13px; }
.selected-files li strong { color: var(--muted); font-weight: 650; }
.selected-files .muted { justify-content: center; color: var(--muted); }
.selected-file__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-file__actions { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; }
.selected-file__remove { min-height: 32px; padding: 5px 9px; border: 1px solid #efc8c3; border-radius: 8px; background: #fff; color: var(--red); cursor: pointer; font: inherit; font-size: 12px; font-weight: 800; }
.selected-file__remove:hover { border-color: var(--red); background: var(--red-soft); }
.selected-file__remove:focus-visible { outline: 3px solid rgba(196, 57, 52, .25); outline-offset: 2px; }
.upload-actions { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 4px; }
.upload-actions p { max-width: 520px; margin: 0; font-size: 12px; }
.history-section { margin-top: 0; }
.history-section .section-intro { margin: 0 0 20px; }
.counter { display: grid; place-items: center; min-width: 36px; min-height: 36px; font-size: 14px; }
.submission-list, .manager-submission-list { display: grid; gap: 14px; }
.submission-card, .manager-submission-card { padding: 24px; border: 1px solid var(--line); border-radius: 19px; background: #fff; box-shadow: var(--shadow-soft); }
.submission-card__top, .manager-submission-card__summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.submission-date { margin-bottom: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.submission-card h3, .manager-submission-card h3 { margin-bottom: 0; }
.status-description { margin: 12px 0; font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; width: max-content; padding: 7px 10px; border-radius: 999px; font-size: 11px; font-weight: 850; white-space: nowrap; }
.status-pill > span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.status-pill.is-success { background: var(--green-soft); color: var(--green); }
.status-pill.is-info { background: var(--blue-soft); color: var(--blue); }
.status-pill.is-progress { background: #edf0ff; color: #5e62a9; }
.status-pill.is-warning { background: var(--amber-soft); color: var(--amber); }
.status-pill.is-danger { background: var(--red-soft); color: var(--red); }
.status-pill.is-muted { background: #eef1f4; color: #6e7783; }
.file-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.file-chips a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; max-width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; font-size: 12px; }
.file-chips a:hover { border-color: #afc0d3; background: var(--canvas-blue); }
.file-chips a > span { color: var(--orange-dark); font-size: 9px; font-weight: 900; }
.file-chips a > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chips a > small { color: var(--muted); }
.file-chips.compact a { grid-template-columns: auto 1fr; }
.comment-line { padding-top: 14px; border-top: 1px solid #edf0f4; color: var(--muted); font-size: 13px; }
.empty-state { display: grid; place-items: center; min-height: 240px; padding: 32px; border: 1px dashed #bdc9d8; border-radius: 20px; background: rgba(255,255,255,.55); text-align: center; }
.empty-state > div { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 12px; border-radius: 15px; background: var(--canvas-blue); color: var(--blue); font-size: 22px; }
.empty-state p { margin: 0; }

.recovery-shell { display: grid; place-items: center; min-height: 650px; }
.recovery-card { width: min(100%, 570px); }
.recovery-card > p { font-size: 15px; }
.info-box { display: grid; gap: 4px; margin: 20px 0; padding: 16px; border-radius: 13px; background: var(--blue-soft); color: #28557f; font-size: 13px; }
.success-mark, .expired-mark { display: grid; place-items: center; width: 62px; height: 62px; margin: 0 0 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-size: 28px; font-weight: 900; }
.expired-mark { background: var(--red-soft); color: var(--red); }
.copy-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.copy-field input { border-radius: 11px 0 0 11px; background: #f8fafc; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.copy-field button { padding: 8px 12px; border: 1px solid #cad6e4; border-left: 0; border-radius: 0 11px 11px 0; background: var(--canvas-blue); color: var(--blue); cursor: pointer; font-size: 12px; font-weight: 850; }
.copy-field--single { grid-template-columns: minmax(0, 1fr); }
.copy-field--single input { border-radius: 11px; }

.manager-hero { min-height: 240px; }
.manager-hero h1 { margin-bottom: 10px; font-size: clamp(34px, 5vw, 52px); }
.manager-hero p { margin-bottom: 0; }
.manager-badge { display: flex; align-items: center; gap: 13px; min-width: 235px; padding: 16px 18px; border: 1px solid rgba(255,255,255,.18); border-radius: 18px; background: rgba(255,255,255,.09); }
.manager-badge > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.12); font-size: 18px; font-weight: 900; }
.manager-badge small, .manager-badge strong { display: block; }
.manager-badge small { color: rgba(255,255,255,.65); font-size: 11px; }
.manager-badge strong { color: #fff; font-size: 14px; }
.manager-badge.is-denied { border-color: rgba(255,173,178,.4); }
.recovery-link-box { display: grid; grid-template-columns: minmax(220px,.6fr) 1.4fr; gap: 24px; align-items: center; margin: 0 0 24px; padding: 19px; border: 1px solid #a9ddcc; border-radius: 17px; background: var(--green-soft); }
.recovery-link-box strong, .recovery-link-box span { display: block; }
.recovery-link-box span { margin-top: 3px; color: #397260; font-size: 12px; }
.stat-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 20px 0; }
.stat-group { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.5); }
.stat-group > h2 { margin: 0 0 12px; color: var(--ink-strong); font-size: 15px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stat-card { display: block; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-soft); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.stat-card:hover { border-color: #afc0d3; transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-grid span, .stat-grid small, .stat-grid strong { display: block; }
.stat-grid span { color: var(--muted); font-size: 12px; font-weight: 750; }
.stat-grid strong { margin: 4px 0; color: var(--ink-strong); font-size: 34px; letter-spacing: -.04em; }
.stat-grid small { color: var(--muted); font-size: 11px; }
.stat-grid .has-warning { border-color: #ead49c; background: var(--amber-soft); }
.stage-guide { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.stage-guide a { padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 11px; font-weight: 750; text-decoration: none; }
.stage-guide a:hover, .stage-guide a.is-active { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.stage-guide .stage-guide__reset { border-style: dashed; }
.manager-section { margin-top: 20px; }
.manager-section > .section-intro { margin: 0 0 24px; }
.search-bar { margin-bottom: 20px; padding: 17px; border-radius: 15px; background: var(--canvas); }
.search-bar > label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 800; }
.search-bar > div { display: flex; gap: 8px; }
.directory-filter .filter-fields { display: grid; grid-template-columns: minmax(260px, 1.5fr) repeat(4, minmax(150px, 1fr)); gap: 10px; }
.directory-filter .filter-fields label { min-width: 0; }
.directory-filter .filter-fields label > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; }
.directory-filter .filter-fields input, .directory-filter .filter-fields select { width: 100%; min-height: 44px; }
.directory-filter .filter-actions { margin-top: 12px; }
.directory-search-result { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: -7px 0 20px; padding: 13px 16px; border: 1px solid #bdd4ee; border-radius: 14px; background: var(--blue-soft); }
.directory-search-result span, .directory-search-result strong { display: block; }
.directory-search-result span, .directory-search-result small { color: var(--muted); font-size: 11px; }
.directory-search-result strong { margin-top: 3px; color: var(--ink-strong); font-size: 15px; }
.directory-search-result small { text-align: right; overflow-wrap: anywhere; }
.manager-permission-filter select { min-width: 150px; }
.bitrix-placement-setup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px; align-items: center; margin-bottom: 20px; padding: 17px; border: 1px solid #bdd4ee; border-radius: 15px; background: var(--blue-soft); }
.bitrix-placement-setup strong, .bitrix-placement-setup span { display: block; }
.bitrix-placement-setup > div span { margin-top: 4px; color: var(--muted); font-size: 12px; }
.bitrix-placement-setup .placement-status { grid-column: 1 / -1; min-height: 17px; color: var(--blue); font-size: 12px; font-weight: 750; }
.pagination { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.pagination a { display: grid; place-items: center; min-width: 36px; min-height: 36px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: #fff; text-decoration: none; font-size: 12px; font-weight: 800; }
.pagination a.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.employee-admin-list { display: grid; gap: 12px; }
.employee-admin-card { display: grid; grid-template-columns: 1.1fr .7fr 1.2fr; gap: 20px; align-items: center; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: #fff; }
.employee-admin-card.has-warning { border-color: #ead49c; }
.employee-admin-card.is-dismissed { background: #f8fafc; opacity: .86; }
.employee-admin-card__person { display: flex; align-items: center; gap: 13px; min-width: 0; }
.employee-admin-card__person .avatar, .permission-list .avatar { width: 44px; height: 44px; margin: 0; }
.employee-admin-card__person h3 { margin: 0 0 4px; font-size: 16px; }
.employee-admin-card__person p { margin: 0 0 3px; color: var(--ink); font-size: 12px; }
.employee-admin-card__person small, .employee-admin-card__responsible span, .employee-admin-card__responsible small { display: block; color: var(--muted); font-size: 11px; }
.employee-admin-card__person .card-preview-link { display: inline-block; margin-top: 7px; color: var(--blue); font-size: 11px; font-weight: 800; }
.employee-admin-card__person .employment-state { display: inline-block; margin-top: 7px; padding: 3px 7px; border-radius: 999px; background: var(--red-soft); color: var(--red); font-size: 10px; font-weight: 850; }
.employee-admin-card__responsible strong { display: block; margin: 4px 0; font-size: 13px; }
.warning-text { color: var(--amber) !important; font-weight: 750; }
.employee-admin-card__access { min-width: 0; }
.access-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 9px; }
.access-row small { color: var(--muted); font-size: 11px; }
.password-view { display: block; }
.password-view + .password-view { margin-top: 9px; }
.password-view .copy-field input { min-height: 39px; padding-block: 8px; }
.credentials-copy-button { width: 100%; min-height: 38px; margin-top: 9px; }
.inline-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.inline-actions .button { min-height: 36px; padding: 7px 10px; font-size: 11px; }
.permission-list { display: grid; gap: 8px; }
.permission-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 13px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.permission-person strong, .permission-person span { display: block; }
.permission-person span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.toggle-button { display: flex; align-items: center; gap: 9px; border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 11px; }
.toggle-button > span { position: relative; width: 40px; height: 23px; border-radius: 999px; background: #cbd4df; }
.toggle-button > span::after { content: ""; position: absolute; width: 17px; height: 17px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: left .16s; }
.toggle-button.is-on { color: var(--green); }
.toggle-button.is-on > span { background: var(--green); }
.toggle-button.is-on > span::after { left: 20px; }
.manager-submission-card__summary p { margin: 4px 0 0; font-size: 12px; }
.bitrix-task-link { color: var(--blue); font-weight: 800; }
.status-form { display: grid; grid-template-columns: .7fr 1.4fr auto; gap: 10px; align-items: end; padding-top: 14px; border-top: 1px solid #edf0f4; }
.status-form label > span { margin-bottom: 5px; }
.status-form input, .status-form select { min-height: 42px; padding-block: 9px; font-size: 12px; }
.status-form label > small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.status-form .button { min-height: 42px; }
.bitrix-source-note { margin: 14px 0 0; padding-top: 14px; border-top: 1px solid #edf0f4; font-size: 12px; }
.access-denied { display: flex; align-items: center; gap: 24px; margin-top: 20px; }
.access-denied__mark { display: grid; place-items: center; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 20px; background: var(--red-soft); color: var(--red); font-size: 28px; font-weight: 900; }
.access-denied h2 { margin-bottom: 6px; }
.access-denied p { margin: 0; }
.card-tab-hero { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.card-tab-hero h1 { margin: 5px 0; font-size: clamp(26px, 4vw, 38px); }
.card-tab-hero p { margin: 0; color: var(--muted); }
.card-tab-access__panel { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(320px, 1.2fr); gap: 28px; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-soft); }
.card-tab-profile { display: grid; gap: 14px; margin: 0; }
.card-tab-profile div { padding-bottom: 12px; border-bottom: 1px solid #edf0f4; }
.card-tab-profile div:last-child { padding-bottom: 0; border-bottom: 0; }
.card-tab-profile dt { color: var(--muted); font-size: 11px; font-weight: 800; }
.card-tab-profile dd { margin: 4px 0 0; font-weight: 750; }
.card-tab-actions { min-width: 0; }
.card-tab-password { margin-bottom: 10px; }
.card-tab-credentials { display: grid; gap: 9px; }
.card-tab-credentials .password-view + .password-view { margin-top: 0; }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 100; padding: 12px 16px; transform: translateY(120px); border-radius: 12px; background: var(--ink-strong); color: #fff; box-shadow: var(--shadow); opacity: 0; transition: .2s; font-size: 13px; font-weight: 750; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast.is-error { background: var(--red); }

@media (max-width: 1040px) {
    .role-grid { grid-template-columns: repeat(2, 1fr); }
    .employee-admin-card { grid-template-columns: 1fr 1fr; }
    .employee-admin-card__access { grid-column: 1 / -1; padding-top: 14px; border-top: 1px solid #edf0f4; }
    .stat-groups { grid-template-columns: 1fr; }
    .directory-filter .filter-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .preview-ribbon { justify-content: space-between; gap: 8px; padding-inline: 14px; }
    .preview-ribbon strong { display: none; }
    .app-header__inner { width: min(100% - 28px, 1180px); min-height: 65px; }
    .brand img { width: 84px; }
    .brand span { display: none; }
    .app-nav { gap: 1px; overflow-x: auto; }
    .app-nav a, .app-nav button { padding: 9px 8px; font-size: 12px; white-space: nowrap; }
    .page-wrap { width: min(100% - 28px, 1180px); padding-top: 22px; }
    .app-footer { width: min(100% - 28px, 1180px); flex-direction: column; gap: 5px; }
    .auth-layout { grid-template-columns: 1fr; min-height: auto; }
    .auth-story { padding-bottom: 0; }
    .auth-story h1 { font-size: 42px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .employee-hero, .manager-hero { padding: 34px 28px; }
    .hero-illustration { display: none; }
    .manager-hero { align-items: flex-start; flex-direction: column; }
    .manager-badge { min-width: 0; }
    .steps { grid-template-columns: 1fr; }
    .page-title, .section-intro { align-items: flex-start; flex-direction: column; }
    .section-intro > p { text-align: left; }
    .upload-actions { align-items: stretch; flex-direction: column; }
    .recovery-link-box { grid-template-columns: 1fr; }
    .status-form { grid-template-columns: 1fr 1fr; }
    .status-form .status-reason { grid-column: 1 / -1; }
    .status-form .button { grid-column: 2; }
    .card-tab-access__panel { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    body.employee-portal { font-size: 15px; }
    .area-manager .app-header__inner { align-items: stretch; flex-direction: column; gap: 4px; padding: 10px 0; }
    .area-manager .brand { align-self: flex-start; }
    .area-manager .app-nav { justify-content: space-between; overflow-x: visible; }
    .preview-hero { padding: 34px 24px; border-radius: 23px; }
    .preview-hero h1 { font-size: 39px; }
    .preview-hero p { font-size: 16px; }
    .role-grid { grid-template-columns: 1fr; }
    .role-card { min-height: 0; }
    .auth-story h1 { font-size: 35px; }
    .auth-story > p { font-size: 16px; }
    .feature-list { margin-top: 24px; }
    .auth-card { padding: 24px 20px; border-radius: 22px; }
    .employee-hero h1, .manager-hero h1 { font-size: 36px; }
    .employee-hero p, .manager-hero p { font-size: 15px; }
    .hero-actions .button { width: 100%; }
    .profile-list div { grid-template-columns: 1fr; gap: 4px; }
    .card-heading { flex-direction: column; }
    .page-title .button { width: 100%; }
    .receipt-tabs a { flex: 1; padding-inline: 12px; }
    .dropzone { min-height: 190px; padding: 22px 14px; }
    .selected-files li { align-items: flex-start; }
    .selected-file__actions { align-items: flex-end; flex-direction: column; gap: 6px; }
    .submission-card__top, .manager-submission-card__summary { flex-direction: column; }
    .file-chips { flex-direction: column; }
    .file-chips a { width: 100%; }
    .stat-groups { gap: 10px; }
    .stat-group { padding: 13px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .stat-card { padding: 15px; }
    .stat-grid strong { font-size: 29px; }
    .search-bar > div { flex-wrap: wrap; }
    .search-bar input { flex: 1 0 100%; }
    .directory-filter .filter-fields { grid-template-columns: 1fr; }
    .directory-search-result { align-items: flex-start; flex-direction: column; gap: 5px; }
    .directory-search-result small { text-align: left; }
    .manager-permission-filter select { flex: 1 0 100%; }
    .bitrix-placement-setup { grid-template-columns: 1fr; }
    .bitrix-placement-setup .button { width: 100%; }
    .bitrix-placement-setup .placement-status { grid-column: auto; }
    .employee-admin-card { grid-template-columns: 1fr; gap: 14px; }
    .employee-admin-card__responsible { padding-top: 13px; border-top: 1px solid #edf0f4; }
    .employee-admin-card__access { grid-column: auto; }
    .access-row { align-items: flex-start; flex-direction: column; }
    .inline-actions { flex-direction: column; }
    .inline-actions form, .inline-actions .button { width: 100%; }
    .permission-list article { grid-template-columns: auto 1fr; }
    .permission-state { grid-column: 1 / -1; padding-top: 10px; border-top: 1px solid #edf0f4; }
    .status-form { grid-template-columns: 1fr; }
    .status-form .status-reason, .status-form .button { grid-column: auto; }
    .status-form .button { width: 100%; }
    .access-denied { align-items: flex-start; flex-direction: column; }
    .card-tab-hero { align-items: flex-start; flex-direction: column; }
    .card-tab-hero .button { width: 100%; }
    .demo-credentials { grid-template-columns: 1fr; }
    .demo-credentials span { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media (forced-colors: active) {
    .status-pill > span { border: 1px solid CanvasText; }
    .dropzone { border-style: solid; }
}
