/* ==========================================================================
   HR Portal — mobile-first styles
   ========================================================================== */

:root {
    --bg: #f3f6fb;
    --surface: #ffffff;
    --surface-2: #f7f9fd;
    --ink: #0f1e33;
    --muted: #64748b;
    --line: #e2e8f2;

    --brand: #1d4ed8;
    --brand-2: #2563eb;
    --brand-dark: #1e3a8a;
    --brand-soft: #e8f0fe;

    --danger: #d92d20;
    --danger-soft: #fef3f2;
    --warn: #b45309;
    --warn-soft: #fffaeb;
    --success: #15803d;
    --success-soft: #f0fdf4;
    --info: #1d4ed8;
    --info-soft: #eff6ff;

    --radius: 20px;
    --radius-sm: 14px;
    --shadow: 0 10px 30px rgba(15, 30, 51, .06);
    --shadow-lg: 0 26px 70px rgba(7, 26, 53, .22);
    --ring: 0 0 0 4px rgba(29, 78, 216, .16);

    --font: "Segoe UI", -apple-system, BlinkMacSystemFont, "Tahoma", "Helvetica Neue", Arial, sans-serif;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100dvh;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body.auth-body {
    background: #071a35;
}

a {
    color: var(--brand);
    text-decoration: none;
}

h1, h2, h3, p, dl, dd, dt {
    margin: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

button {
    cursor: pointer;
}

svg {
    display: block;
}

.icon {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

.icon-xs {
    width: 14px;
    height: 14px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    inset-inline-start: 12px;
    top: -80px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--ink);
    color: #fff;
    font-weight: 600;
    transition: top .2s ease;
}

.skip-link:focus {
    top: 12px;
}

.container {
    width: 100%;
    max-width: 900px;
    margin-inline: auto;
    padding-inline: 18px;
}

.page {
    padding-block: 22px 122px;
}

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .86);
    border-bottom: 1px solid rgba(226, 232, 242, .9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    min-width: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(145deg, var(--brand-2), var(--brand));
    color: #fff;
    box-shadow: 0 8px 18px rgba(29, 78, 216, .22);
    flex: 0 0 auto;
}

.brand-mark .icon {
    width: 21px;
    height: 21px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.brand-text strong {
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.brand-text small {
    font-size: 10.5px;
    color: var(--muted);
    letter-spacing: .04em;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #475569;
    transition: background .18s ease, color .18s ease;
}

.icon-btn:hover {
    background: var(--surface-2);
    color: var(--brand);
}

.icon-btn .icon {
    width: 20px;
    height: 20px;
}

.lang-btn {
    border: 1px solid var(--line);
    background: #fff;
}

.lang-code {
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .02em;
}

.logout-label {
    display: none;
    font-size: 11.5px;
    font-weight: 700;
}

@media (min-width: 720px) {
    .logout-btn {
        width: auto;
        padding-inline: 12px;
    }

    .logout-label {
        display: inline;
    }
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 11px 4px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    margin-inline-start: 4px;
}

[dir="rtl"] .user-chip {
    padding: 4px 5px 4px 11px;
}

.avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, #3b82f6, var(--brand));
    color: #fff;
    font-size: 12.5px;
    font-weight: 800;
    flex: 0 0 auto;
}

.user-name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12.5px;
    font-weight: 700;
}

.inline-form {
    display: inline-flex;
}

/* --------------------------------------------------------------------------
   Hero + stats
   -------------------------------------------------------------------------- */

.hero {
    position: relative;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    overflow: hidden;
    padding: 26px;
    border-radius: 24px;
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 48%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 18px 40px rgba(29, 78, 216, .22);
}

.hero-body {
    position: relative;
    z-index: 1;
    max-width: 520px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .78);
}

.hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #93c5fd;
    box-shadow: 0 0 0 4px rgba(147, 197, 253, .2);
}

.hero-title {
    font-size: clamp(23px, 4.4vw, 31px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.hero-sub {
    margin-top: 7px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .82);
}

.hero .btn {
    margin-top: 18px;
}

.hero-art {
    position: relative;
    width: 150px;
    flex: 0 0 150px;
    align-self: center;
    height: 132px;
}

.hero-ring {
    position: absolute;
    inset-inline-end: -34px;
    top: -38px;
    width: 170px;
    height: 170px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
}

.hero-ring-2 {
    inset-inline-end: 6px;
    top: 14px;
    width: 118px;
    height: 118px;
    background: rgba(255, 255, 255, .06);
    border-color: rgba(255, 255, 255, .12);
}

.hero-brief {
    position: absolute;
    inset-inline-end: 34px;
    top: 44px;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    backdrop-filter: blur(6px);
    transform: rotate(-6deg);
}

.hero-brief .icon {
    width: 28px;
    height: 28px;
    color: #dbeafe;
}

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

.stat-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: #cfdcf7;
    box-shadow: 0 16px 34px rgba(15, 30, 51, .09);
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    margin-bottom: 7px;
}

.stat-icon .icon {
    width: 18px;
    height: 18px;
}

.stat-warn { background: var(--warn-soft); color: var(--warn); }
.stat-info { background: var(--info-soft); color: var(--info); }
.stat-success { background: #e0f2fe; color: #0369a1; }

.stat-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.stat-label {
    font-size: 11.5px;
    color: var(--muted);
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.block {
    margin-top: 28px;
}

.block-head,
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.block-head-side {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.block-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.015em;
}

.block-sub {
    margin-top: 2px;
    font-size: 12.5px;
    color: var(--muted);
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    padding-block: 5px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--brand);
}

.text-link:hover {
    color: var(--brand-dark);
}

.eyebrow {
    margin-bottom: 4px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--brand);
}

.page-title {
    font-size: clamp(24px, 3.8vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.page-sub {
    margin-top: 4px;
    font-size: 13px;
    color: var(--muted);
}

.count-pill {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.count-pill.is-warn {
    background: var(--warn-soft);
    color: var(--warn);
}

/* --------------------------------------------------------------------------
   Forms list
   -------------------------------------------------------------------------- */

.form-list {
    display: grid;
    gap: 10px;
}

.form-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.form-card:hover {
    transform: translateY(-2px);
    border-color: #cfdcf7;
    box-shadow: 0 16px 34px rgba(15, 30, 51, .09);
}

.form-card.is-child {
    background: #fbfdff;
}

.form-glyph,
.form-group-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.form-glyph .icon,
.form-group-icon .icon {
    width: 21px;
    height: 21px;
}

.form-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.form-copy strong {
    font-size: 14.5px;
    font-weight: 700;
}

.form-copy small {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.45;
}

.form-go,
.request-go {
    color: #8ba0bd;
    flex: 0 0 auto;
}

.form-go .icon,
.request-go .icon {
    width: 18px;
    height: 18px;
}

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

.form-group-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 2px 4px;
}

.form-group-head h2 {
    font-size: 16px;
    font-weight: 800;
}

.form-group-head p {
    font-size: 12.5px;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Requests
   -------------------------------------------------------------------------- */

.request-list {
    display: grid;
    gap: 10px;
}

.request-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.request-row:hover {
    transform: translateY(-2px);
    border-color: #cfdcf7;
    box-shadow: 0 16px 34px rgba(15, 30, 51, .09);
}

.request-glyph {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--surface-2);
    color: #5f7191;
    flex: 0 0 auto;
}

.request-glyph .icon {
    width: 19px;
    height: 19px;
}

.request-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.request-copy strong {
    font-size: 13.5px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.request-copy small {
    font-size: 11.5px;
    color: var(--muted);
}

.request-row .badge {
    flex: 0 0 auto;
}

/* --------------------------------------------------------------------------
   Badges / chips
   -------------------------------------------------------------------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
    white-space: nowrap;
}

.badge-pending { background: var(--warn-soft); color: var(--warn); }
.badge-notset { background: var(--warn-soft); color: var(--warn); }
.badge-approved { background: var(--success-soft); color: var(--success); }
.badge-rejected { background: var(--danger-soft); color: var(--danger); }
.badge-cancelled { background: #eef2f8; color: #52637a; }
.badge-unknown { background: #eef2f8; color: #52637a; }

.filter-chips {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: #52637a;
    font-size: 12px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.chip:hover {
    border-color: #bfd3f5;
    color: var(--brand);
}

.chip.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.chip-count {
    min-width: 18px;
    padding: 1px 5px;
    border-radius: 999px;
    background: rgba(15, 30, 51, .06);
    font-size: 10.5px;
    text-align: center;
}

.chip.is-active .chip-count {
    background: rgba(255, 255, 255, .2);
}

/* --------------------------------------------------------------------------
   Table
   -------------------------------------------------------------------------- */

.table-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

.data-table th {
    padding: 11px 16px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-align: start;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #fbfdff;
}

.request-id {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    font-weight: 800;
    color: #5b6b82;
}

.cell-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.cell-form-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand);
}

.cell-date {
    display: block;
    font-variant-numeric: tabular-nums;
}

.data-table td small {
    display: block;
    color: var(--muted);
    font-size: 10.5px;
}

.cell-action {
    text-align: end;
}

.btn-mini {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 6px 10px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 800;
}

.btn-mini:hover {
    background: #dbe7fb;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 700;
}

.page-btn:hover {
    border-color: #bfd3f5;
    color: var(--brand);
}

.page-btn.is-disabled {
    opacity: .45;
    pointer-events: none;
}

.page-info {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 42px 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    text-align: center;
    box-shadow: var(--shadow);
}

.empty-icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 6px;
    border-radius: 18px;
    background: var(--brand-soft);
    color: var(--brand);
}

.empty-icon .icon {
    width: 26px;
    height: 26px;
}

.empty-state h1,
.empty-state h3 {
    font-size: 17px;
    font-weight: 800;
}

.empty-state p {
    max-width: 360px;
    color: var(--muted);
    font-size: 13px;
}

.empty-state .btn {
    margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 11px 20px;
    border: 1px solid transparent;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    transition: background .18s ease, transform .12s ease, box-shadow .18s ease, border-color .18s ease;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: linear-gradient(145deg, var(--brand-2), var(--brand));
    color: #fff;
    box-shadow: 0 10px 22px rgba(29, 78, 216, .22);
}

.btn-primary:hover {
    background: linear-gradient(145deg, #3b82f6, var(--brand-dark));
    box-shadow: 0 14px 26px rgba(29, 78, 216, .26);
}

.btn-light {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 8px 18px rgba(7, 26, 53, .12);
}

.btn-light:hover {
    background: #eff6ff;
}

.btn-ghost {
    background: var(--surface);
    border-color: var(--line);
    color: var(--ink);
}

.btn-ghost:hover {
    border-color: #bfd3f5;
    color: var(--brand);
}

.btn-block {
    width: 100%;
}

.btn .icon {
    width: 18px;
    height: 18px;
}

.btn-arrow {
    transition: transform .18s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(3px);
}

[dir="rtl"] .btn:hover .btn-arrow {
    transform: translateX(-3px);
}

.btn.is-loading {
    opacity: .75;
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Flash + alerts
   -------------------------------------------------------------------------- */

.flash-stack {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
}

.flash-success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }
.flash-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.flash-info { background: var(--info-soft); color: #1e40af; border-color: #bfdbfe; }

.flash-icon .icon {
    width: 18px;
    height: 18px;
}

.flash-text {
    flex: 1;
}

.flash {
    transition: opacity .2s ease, transform .2s ease;
}

.flash.is-leaving {
    opacity: 0;
    transform: translateY(-4px);
}

.flash-close {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    opacity: .6;
}

.flash-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, .05);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: 12.5px;
    font-weight: 600;
}

.alert p + p {
    margin-top: 4px;
}

.alert-error { background: var(--danger-soft); color: #991b1b; border-color: #fecaca; }
.alert-success { background: var(--success-soft); color: #166534; border-color: #bbf7d0; }

.alert-icon {
    margin-top: 1px;
}

.alert-icon .icon {
    width: 18px;
    height: 18px;
}

.alert-body {
    flex: 1;
}

.notice {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 13px;
    font-size: 12.5px;
    font-weight: 600;
}

.notice-info {
    background: var(--info-soft);
    color: #1e40af;
}

/* --------------------------------------------------------------------------
   Form page
   -------------------------------------------------------------------------- */

.form-head,
.request-head {
    margin-bottom: 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.back-link:hover {
    color: var(--brand);
}

.form-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 10px 13px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 600;
}

.form-section {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.section-head {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.section-index {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
}

.section-copy h2 {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.3;
}

.section-copy p {
    margin-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.field {
    min-width: 0;
}

.field-label {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
}

.req {
    color: var(--danger);
    font-weight: 800;
}

.input,
.field select,
.field textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1.5px solid #d6e1f0;
    border-radius: 12px;
    background: #fff;
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.field textarea {
    min-height: 118px;
    resize: vertical;
    line-height: 1.55;
}

.field select {
    appearance: none;
    -webkit-appearance: none;
    padding-inline-end: 40px;
    cursor: pointer;
}

.input::placeholder,
.field textarea::placeholder {
    color: #9aabc7;
}

.input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand-2);
    box-shadow: var(--ring);
    background: #fff;
}

.input[readonly],
.field textarea[readonly] {
    background: var(--surface-2);
    color: #52637a;
}

.field.has-error .input,
.field.has-error select,
.field.has-error textarea {
    border-color: #f0a7a2;
    background: #fffafa;
}

.field.has-error .input:focus,
.field.has-error select:focus,
.field.has-error textarea:focus {
    box-shadow: 0 0 0 4px rgba(217, 45, 32, .12);
    border-color: var(--danger);
}

.select-wrap {
    position: relative;
}

.select-chevron {
    position: absolute;
    inset-inline-end: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7183a0;
    pointer-events: none;
}

.field-help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.5;
}

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    margin-top: 6px;
    color: var(--danger);
    font-size: 11.5px;
    font-weight: 600;
}

.field-error .icon {
    margin-top: 1px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.option-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 10px 11px;
    border: 1.5px solid #dbe5f3;
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.option-card-single {
    width: fit-content;
    min-width: 180px;
    max-width: 100%;
}

.option-card:hover {
    border-color: #bdd0f5;
    background: #fbfdff;
}

.option-card input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}

.option-mark {
    position: relative;
    width: 20px;
    height: 20px;
    border: 1.5px solid #b9c8e0;
    border-radius: 6px;
    background: #fff;
    flex: 0 0 auto;
    transition: background .15s ease, border-color .15s ease;
}

.option-mark.radio {
    border-radius: 50%;
}

.option-card input:checked + .option-mark {
    background: var(--brand);
    border-color: var(--brand);
}

.option-card input:checked + .option-mark:not(.radio)::after {
    content: "";
    position: absolute;
    inset-inline-start: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.option-card input:checked + .option-mark.radio::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    background: #fff;
}

.option-card input:focus-visible + .option-mark {
    box-shadow: var(--ring);
}

.option-card:has(input:checked) {
    border-color: var(--brand-2);
    background: var(--brand-soft);
}

.option-text {
    min-width: 0;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.static-note {
    padding: 14px;
    border-inline-start: 3px solid #9db8e8;
    border-radius: 10px;
    background: var(--surface-2);
    color: #475569;
    font-size: 12.5px;
    line-height: 1.65;
}

/* File upload */

.file-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1.5px dashed #c3d4f0;
    border-radius: 14px;
    background: #fbfdff;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

.file-drop:hover,
.file-drop.has-file {
    border-color: var(--brand-2);
    background: var(--brand-soft);
}

.file-drop input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.file-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.file-drop.has-file .file-icon {
    background: #fff;
}

.file-icon .icon {
    width: 20px;
    height: 20px;
}

.file-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.file-text strong {
    font-size: 12.5px;
    font-weight: 700;
}

.file-text small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

/* Submit */

.submit-bar {
    margin-top: 6px;
    padding-top: 4px;
}

.submit-note {
    margin-top: 8px;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Request details
   -------------------------------------------------------------------------- */

.request-head-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.request-status {
    padding-top: 14px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.info-item {
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.info-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.info-item strong {
    font-size: 12.5px;
    font-weight: 700;
}

.detail-sections {
    display: grid;
    gap: 14px;
}

.detail-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.detail-title {
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 800;
}

.detail-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed #e8eff8;
}

.detail-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-row dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.detail-row dd {
    font-size: 13.5px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.detail-row dd a {
    font-weight: 600;
}

.prewrap {
    white-space: pre-wrap;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    display: inline-flex;
    padding: 3px 9px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 700;
}

.file-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 9px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 800;
}

.file-link small {
    color: var(--muted);
}

.detail-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */

.auth {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    overflow: hidden;
    padding: 20px 16px 18px;
    background:
        radial-gradient(1100px 600px at 85% -10%, rgba(59, 130, 246, .35), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(37, 99, 235, .28), transparent 60%),
        linear-gradient(160deg, #071a35 0%, #0b2a52 48%, #1d4ed8 100%);
    color: #fff;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(4px);
    pointer-events: none;
}

.auth-orb-1 {
    width: 340px;
    height: 340px;
    top: -140px;
    inset-inline-end: -100px;
    background: radial-gradient(circle, rgba(147, 197, 253, .22), transparent 68%);
}

.auth-orb-2 {
    width: 300px;
    height: 300px;
    bottom: -120px;
    inset-inline-start: -110px;
    background: radial-gradient(circle, rgba(59, 130, 246, .18), transparent 68%);
}

.auth-top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1040px;
}

.brand-light {
    color: #fff;
}

.brand-light .brand-mark {
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: none;
}

.brand-light .brand-text small {
    color: rgba(255, 255, 255, .6);
}

.lang-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    backdrop-filter: blur(8px);
}

.lang-pill:hover {
    background: rgba(255, 255, 255, .16);
}

.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 424px;
    margin-block: auto;
    padding: 30px 26px 26px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 26px;
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    animation: auth-in .5s cubic-bezier(.21, .9, .3, 1) both;
}

@keyframes auth-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.99);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.auth-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: linear-gradient(145deg, #dbeafe, #c7dbfb);
    color: var(--brand);
}

.auth-mark .icon {
    width: 24px;
    height: 24px;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    color: var(--brand);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.auth-title {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
}

.auth-sub {
    margin-top: 6px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.auth-form .field {
    margin-bottom: 14px;
}

.auth-form .field-label {
    font-size: 12px;
}

.input-shell {
    position: relative;
}

.input.has-lead {
    padding-inline-start: 42px;
}

.input.has-trail {
    padding-inline-end: 48px;
}

.input-lead {
    position: absolute;
    inset-inline-start: 13px;
    top: 50%;
    transform: translateY(-50%);
    color: #7c8fae;
    pointer-events: none;
}

.input-lead .icon {
    width: 18px;
    height: 18px;
}

.input-trail {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #7c8fae;
}

.input-trail:hover {
    background: var(--surface-2);
    color: var(--brand);
}

.input-trail.is-visible .icon {
    opacity: .35;
}

.input-trail.is-visible::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transform: rotate(45deg);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 20px;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.check-row input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.check-ui {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid #b9c8e0;
    border-radius: 6px;
    background: #fff;
    color: #fff;
    flex: 0 0 auto;
    transition: background .15s ease, border-color .15s ease;
}

.check-ui .icon {
    opacity: 0;
    transition: opacity .12s ease;
}

.check-row input:checked + .check-ui {
    background: var(--brand);
    border-color: var(--brand);
}

.check-row input:checked + .check-ui .icon {
    opacity: 1;
}

.check-row input:focus-visible + .check-ui {
    box-shadow: var(--ring);
}

.auth-foot {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    color: rgba(255, 255, 255, .58);
    font-size: 10.5px;
    letter-spacing: .03em;
}

/* --------------------------------------------------------------------------
   Bottom navigation + footer
   -------------------------------------------------------------------------- */

.site-foot {
    padding: 24px 16px 12px;
    color: #8ba0bd;
    font-size: 10.5px;
    text-align: center;
}

.bottom-nav {
    position: fixed;
    inset-inline: 0;
    bottom: 12px;
    z-index: 50;
    display: flex;
    justify-content: center;
    padding-inline: 12px;
    pointer-events: none;
}

.bottom-nav-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: min(420px, 100%);
    padding: 6px;
    border: 1px solid rgba(226, 232, 242, .95);
    border-radius: 20px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 16px 40px rgba(15, 30, 51, .14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    pointer-events: auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 4px 6px;
    border-radius: 14px;
    color: #7a8ca8;
    font-size: 10px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease;
}

.nav-item:hover {
    color: var(--brand);
    background: var(--surface-2);
}

.nav-item.is-active {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

.nav-icon .icon {
    width: 20px;
    height: 20px;
}

.nav-label {
    line-height: 1.2;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   RTL / icon direction
   -------------------------------------------------------------------------- */

[dir="rtl"] .flip-rtl,
[dir="rtl"] .form-go .icon,
[dir="rtl"] .request-go .icon,
[dir="rtl"] .text-link .icon,
[dir="rtl"] .cell-action .icon {
    transform: scaleX(-1);
}

[dir="rtl"] .eyebrow,
[dir="rtl"] .hero-eyebrow,
[dir="rtl"] .info-label,
[dir="rtl"] .auth-eyebrow {
    letter-spacing: 0;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 720px) {
    .container {
        padding-inline: 14px;
    }

    .page {
        padding-block: 16px 118px;
    }

    .hero {
        padding: 22px;
        border-radius: 22px;
    }

    .hero-art {
        display: none;
    }

    .stats-grid {
        gap: 8px;
        margin-top: 12px;
    }

    .stat-card {
        padding: 12px;
        border-radius: 16px;
    }

    .stat-value {
        font-size: 21px;
    }

    .stat-label {
        font-size: 10.5px;
    }

    .form-section {
        padding: 17px;
        border-radius: 20px;
    }

    .info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 3px;
        padding: 9px 0;
    }

    .detail-row dt {
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .detail-row dd {
        font-size: 13.5px;
    }

    .filter-chips {
        margin-inline: -14px;
        padding-inline: 14px;
    }

    .request-head-row {
        flex-direction: column;
        gap: 8px;
    }

    .request-status {
        padding-top: 0;
    }
}

@media (max-width: 640px) {
    .form-grid {
        gap: 13px;
    }

    .submit-note {
        text-align: start;
    }

    /* Table becomes a list of cards */
    .table-card {
        border: 0;
        background: transparent;
        box-shadow: none;
        overflow: visible;
    }

    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        margin-bottom: 10px;
        padding: 8px 14px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .data-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 7px 0;
        border: 0;
        border-bottom: 1px dashed #edf2fa;
        text-align: end;
    }

    .data-table td:last-child {
        border-bottom: 0;
        padding-bottom: 4px;
        padding-top: 10px;
        justify-content: flex-end;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
        text-align: start;
    }

    .data-table td small {
        display: block;
    }

    .cell-date {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }

    .cell-action {
        text-align: end;
    }
}

@media (max-width: 520px) {
    .user-name {
        display: none;
    }

    .user-chip {
        padding: 3px;
        border: 0;
        background: transparent;
    }

    .brand-text small {
        display: none;
    }

    .topbar-inner {
        min-height: 60px;
    }

    .brand-mark {
        width: 36px;
        height: 36px;
    }

    .lang-btn {
        padding: 0 7px;
    }

    .page-title {
        font-size: 23px;
    }

    .block-head {
        align-items: flex-start;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }

    .stat-label {
        font-size: 10px;
    }

    .auth {
        padding: 16px 12px;
    }

    .auth-card {
        padding: 24px 20px 22px;
        border-radius: 22px;
    }

    .auth-title {
        font-size: 23px;
    }

    .auth-top .brand-text small {
        display: block;
    }

    .detail-actions {
        flex-direction: column-reverse;
    }

    .detail-actions .btn {
        width: 100%;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .page-info {
        order: 3;
        flex-basis: 100%;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card:last-child {
        grid-column: 1 / -1;
    }
}

/* --------------------------------------------------------------------------
   Print
   -------------------------------------------------------------------------- */

@media print {
    body {
        background: #fff;
    }

    .topbar,
    .bottom-nav,
    .site-foot,
    .detail-actions,
    .back-link,
    .flash-stack,
    .skip-link {
        display: none !important;
    }

    .page {
        max-width: none;
        padding: 0;
    }

    .detail-card,
    .info-grid {
        box-shadow: none;
        border-color: #ddd;
        break-inside: avoid;
    }

    .detail-row {
        grid-template-columns: 150px 1fr;
    }

    .badge {
        border: 1px solid #999;
    }
}

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

/* ==========================================================================
   v2 — compact home, filters, single request page, manager review
   ========================================================================== */

.hero-compact {
    padding: 18px 20px;
    border-radius: 20px;
}

.hero-compact .hero-eyebrow {
    margin-bottom: 5px;
}

.hero-compact .hero-title {
    font-size: clamp(20px, 3.8vw, 26px);
}

.hero-compact .hero-sub {
    margin-top: 3px;
    font-size: 12.5px;
}

.compact-empty {
    padding: 25px 18px;
    gap: 4px;
}

.compact-empty .empty-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.compact-empty .empty-icon .icon {
    width: 21px;
    height: 21px;
}

.compact-empty h3 {
    font-size: 15px;
}

.compact-empty p {
    font-size: 12px;
}

.add-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.add-icon .icon {
    width: 17px;
    height: 17px;
}

.form-card-add:hover .add-icon {
    background: var(--brand);
    color: #fff;
}

.big-action {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.big-action:hover {
    transform: translateY(-2px);
    border-color: #bfd3f5;
    box-shadow: 0 16px 34px rgba(15, 30, 51, .09);
}

.big-action-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.big-action-icon.team-icon {
    background: #e0f2fe;
    color: #0369a1;
}

.big-action-icon .icon {
    width: 22px;
    height: 22px;
}

.big-action-copy {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
    flex: 1;
}

.big-action-copy strong {
    font-size: 14.5px;
    font-weight: 800;
}

.big-action-copy small {
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.45;
}

.big-action-count {
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.big-action-count.is-warn {
    background: var(--warn-soft);
    color: var(--warn);
}

.big-action-go {
    color: #8ba0bd;
    flex: 0 0 auto;
}

.big-action-go .icon {
    width: 18px;
    height: 18px;
}

/* Filters */

.filters-card {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.filters-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 12px;
}

.filters-icon {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-soft);
    color: var(--brand);
}

.filters-icon .icon {
    width: 17px;
    height: 17px;
}

.filters-head h2 {
    font-size: 14px;
    font-weight: 800;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px 12px;
}

.filters-grid .field-label {
    font-size: 11.5px;
    margin-bottom: 5px;
}

.filters-grid .input,
.filters-grid select {
    min-height: 44px;
    font-size: 13px;
    padding-block: 9px;
}

.filters-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 13px;
}

.filters-actions .btn {
    min-height: 43px;
    padding: 9px 16px;
    font-size: 12.5px;
}

.filters-actions .btn-primary {
    flex: 1;
}

/* Employee profile */

.profile-card {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 12px;
}

.profile-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.profile-icon .icon {
    width: 19px;
    height: 19px;
}

.profile-head h2 {
    font-size: 14px;
    font-weight: 800;
}

.profile-head p {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11.5px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.profile-item {
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--surface-2);
}

.profile-item span {
    display: block;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.profile-item strong {
    display: block;
    margin-top: 1px;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* Existing uploaded file on edit */

.existing-file {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 7px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 11px;
}

.existing-file strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.existing-file .icon {
    color: var(--brand);
}

/* Decision + manager review */

.decision-card {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.decision-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.decision-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    flex: 0 0 auto;
}

.decision-icon.is-approved {
    background: var(--success-soft);
    color: var(--success);
}

.decision-icon.is-rejected {
    background: var(--danger-soft);
    color: var(--danger);
}

.decision-icon .icon {
    width: 21px;
    height: 21px;
}

.decision-head .info-label {
    margin-bottom: 1px;
}

.decision-head strong {
    font-size: 14px;
}

.decision-spacer {
    flex: 1;
}

.decision-block {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px solid var(--line);
}

.decision-block p {
    margin-top: 3px;
    font-size: 12.5px;
    line-height: 1.6;
}

.decision-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 10.5px;
}

.decision-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.decision-meta strong {
    color: var(--ink);
    font-weight: 700;
}

.manager-panel {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid #cfdcf7;
    border-radius: 20px;
    background: linear-gradient(180deg, #f7faff, #ffffff);
    box-shadow: var(--shadow);
}

.manager-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
}

.manager-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--brand-soft);
    color: var(--brand);
    flex: 0 0 auto;
}

.manager-icon .icon {
    width: 21px;
    height: 21px;
}

.manager-head h2 {
    font-size: 14.5px;
    font-weight: 800;
}

.manager-head p {
    margin-top: 1px;
    color: var(--muted);
    font-size: 11.5px;
}

.decision-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.decision-options .option-card {
    justify-content: center;
    min-height: 46px;
}

.decision-options .option-text {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.manager-form .field {
    margin: 0 0 12px;
}

.manager-form .btn {
    min-height: 44px;
}

.manager-note {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
}

.manager-cta {
    min-height: 46px;
}

.manager-cancel {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    text-align: center;
}

.cell-avatar {
    width: 26px;
    height: 26px;
    font-size: 11px;
}

.team-request-avatar {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 14px;
}

.team-request-row .request-copy strong {
    font-size: 13.5px;
}

.empty-icon.is-success {
    background: var(--success-soft);
    color: var(--success);
}

/* Mobile adjustments for the new blocks */

@media (max-width: 720px) {
    .hero-compact {
        padding: 16px 17px;
    }

    .filters-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .decision-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .filters-grid,
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .option-grid {
        gap: 6px;
    }

    .option-card {
        padding: 9px 10px;
        gap: 7px;
    }

    .option-text {
        font-size: 12px;
    }

    .filters-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .filters-actions .btn {
        width: 100%;
    }
}
