






/* ============ Palettes (flat colors, no gradients) ============ */
:root[data-palette="ocean"] {
    --primary: #0098d9;
    --accent: #00d8df;
    --deep: #171e3a;
    --tint: #ebfcff;
}

:root[data-palette="sunset"] {
    --primary: #e8734a;
    --accent: #ffb84d;
    --deep: #3a2013;
    --tint: #fff4ea;
}

:root[data-palette="forest"] {
    --primary: #2e8b57;
    --accent: #7bd389;
    --deep: #16291d;
    --tint: #eafbf0;
}

:root[data-palette="grape"] {
    --primary: #7c5cbf;
    --accent: #b98cf0;
    --deep: #241a3a;
    --tint: #f3ecff;
}

:root[data-palette="ruby"] {
    --primary: #d63864;
    --accent: #ff8fab;
    --deep: #3a1520;
    --tint: #ffeef3;
}

:root[data-palette="amber"] {
    --primary: #c98a12;
    --accent: #ffcf5c;
    --deep: #332405;
    --tint: #fff8e6;
}

:root[data-palette="slate"] {
    --primary: #546e7a;
    --accent: #90a4ae;
    --deep: #1c262b;
    --tint: #eef3f5;
}

:root[data-palette="coral"] {
    --primary: #ef6461;
    --accent: #ffa69e;
    --deep: #3a1614;
    --tint: #fff0ee;
}

:root[data-palette="teal"] {
    --primary: #009688;
    --accent: #64d8cb;
    --deep: #0d2b28;
    --tint: #e6fbf8;
}

:root[data-mode="light"] {
    --bg: var(--tint);
    --surface: #ffffff;
    --surface-2: #ffffff;
    --text: var(--deep);
    --text-muted: #5b6b76;
    --border: rgba(23,30,58,0.09);
    --sidebar-bg: var(--deep);
    --sidebar-text: #f4f8fb;
    --sidebar-text-muted: rgba(244,248,251,0.62);
    --shadow: 0 10px 30px rgba(23,30,58,0.08);
    --danger: #e0555f;
    --success: #2e9e6b;
}

:root[data-mode="dark"] {
    --bg: #0c101d;
    --surface: #141a2b;
    --surface-2: #111726;
    --text: #eef3f6;
    --text-muted: #96a3b2;
    --border: rgba(255,255,255,0.08);
    --sidebar-bg: #090c16;
    --sidebar-text: #eef3f6;
    --sidebar-text-muted: rgba(238,243,246,0.55);
    --shadow: 0 10px 30px rgba(0,0,0,0.35);
    --danger: #ef6b73;
    --success: #4cc38a;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    transition: background .25s ease, color .25s ease;
}

button {
    font-family: inherit;
    cursor: pointer;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============ Layout ============ */
.app {
    display: flex;
    min-height: 100vh;
    align-items: stretch;
}

/* ---------- Sidebar ---------- */
.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: width .25s ease, transform .3s ease, background .25s ease;
}

.sidebar-top {
    padding: 15px 16px 8px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    flex-shrink: 0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .brand-mark svg {
        width: 20px;
        height: 20px;
        stroke: #fff;
    }

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
}

    .brand-text strong {
        font-size: 14.5px;
        font-weight: 700;
    }

    .brand-text span {
        font-size: 11.5px;
        color: var(--sidebar-text-muted);
    }

.nav-group-title {
    font-size: 11px;
    color: var(--sidebar-text-muted);
    padding: 14px 12px 6px;
    letter-spacing: .3px;
    white-space: nowrap;
    overflow: hidden;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--sidebar-text-muted);
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background .18s ease, color .18s ease;
    position: relative;
}

    .nav-item svg {
        width: 19px;
        height: 19px;
        flex-shrink: 0;
        stroke: currentColor;
        fill: none;
    }

    .nav-item:hover {
        background: rgba(255,255,255,0.07);
        color: #fff;
    }

    .nav-item.active {
        background: var(--primary);
        color: #fff;
    }

    .nav-item .badge {
        margin-inline-start: auto;
        background: var(--accent);
        color: var(--deep);
        font-size: 10.5px;
        font-weight: 700;
        padding: 1px 7px;
        border-radius: 20px;
    }

.sidebar-bottom {
    padding: 14px 16px 18px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px;
    border-radius: 10px;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--deep);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}

.user-meta {
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.35;
}

    .user-meta strong {
        font-size: 13px;
    }

    .user-meta span {
        font-size: 11px;
        color: var(--sidebar-text-muted);
    }

.logout-btn {
    margin-inline-start: auto;
    background: transparent;
    border: none;
    color: var(--sidebar-text-muted);
    padding: 6px;
    border-radius: 8px;
}

    .logout-btn:hover {
        color: #fff;
        background: rgba(255,255,255,0.08);
    }

    .logout-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
        fill: none;
    }

/* Collapsed (desktop icon rail) */
.sidebar.collapsed {
    width: 78px;
}

    .sidebar.collapsed .brand-text,
    .sidebar.collapsed .nav-group-title,
    .sidebar.collapsed .nav-item span,
    .sidebar.collapsed .nav-item .badge,
    .sidebar.collapsed .user-meta {
        display: none;
    }

    .sidebar.collapsed .brand {
        justify-content: center;
        padding-inline: 0;
    }

    .sidebar.collapsed .nav-item {
        justify-content: center;
    }

    .sidebar.collapsed .user-card {
        justify-content: center;
    }

    .sidebar.collapsed .logout-btn {
        margin-inline-start: 0;
    }

/* ---------- Main ---------- */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    backdrop-filter: saturate(1.1);
}

.topbar-start {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease;
}

    .icon-btn:hover {
        background: var(--bg);
    }

    .icon-btn svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
        fill: none;
    }

.topbar-title {
    font-size: 15.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .topbar-title small {
        display: block;
        font-size: 11.5px;
        font-weight: 400;
        color: var(--text-muted);
        margin-top: 2px;
    }

.topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.theme-toggle svg {
    display: none;
}

[data-mode="light"] .theme-toggle .icon-sun {
    display: block;
}

[data-mode="dark"] .theme-toggle .icon-moon {
    display: block;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 5px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

    .user-chip .avatar-circle {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }

    .user-chip span {
        font-size: 12.5px;
        font-weight: 600;
        white-space: nowrap;
    }

.content {
    padding: 22px 24px 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

/* ---------- Hero row ---------- */
.hero-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
}

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

.welcome-card {
    padding: 26px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    overflow: hidden;
}

.welcome-text {
    flex: 1;
    min-width: 0;
}

    .welcome-text .eyebrow {
        font-size: 12px;
        font-weight: 700;
        color: var(--primary);
        margin-bottom: 8px;
    }

    .welcome-text h1 {
        font-size: 22px;
        font-weight: 800;
        line-height: 1.5;
        margin-bottom: 8px;
    }

    .welcome-text p {
        font-size: 13px;
        color: var(--text-muted);
        line-height: 1.9;
        max-width: 34ch;
    }

.welcome-illustration {
    width: 190px;
    flex-shrink: 0;
}

    .welcome-illustration svg {
        width: 100%;
        height: auto;
        display: block;
    }

.clock-card {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

    .clock-card .cc-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .clock-card .cc-head span {
            font-size: 12.5px;
            color: var(--text-muted);
            font-weight: 600;
        }

.digital-clock {
    font-size: 38px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--primary);
    direction: ltr;
    text-align: center;
}

    .digital-clock small {
        font-size: 14px;
        color: var(--text-muted);
        margin-inline-start: 6px;
    }

.jalali-date {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

    .jalali-date span {
        display: block;
        font-size: 12px;
        font-weight: 400;
        color: var(--text-muted);
        margin-top: 3px;
    }

/* ---------- Stats ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon svg {
        width: 21px;
        height: 21px;
        stroke: #fff;
        fill: none;
    }

    .stat-icon.p1 {
        background: var(--primary);
    }

    .stat-icon.p2 {
        background: var(--accent);
    }

    .stat-icon.p3 {
        background: var(--success);
    }

    .stat-icon.p4 {
        background: var(--deep-icon, var(--text));
    }

.stat-meta {
    min-width: 0;
}

    .stat-meta strong {
        display: block;
        font-size: 20px;
        font-weight: 800;
    }

    .stat-meta span {
        font-size: 12px;
        color: var(--text-muted);
    }

.stat-trend {
    margin-inline-start: auto;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    flex-shrink: 0;
}

    .stat-trend.up {
        color: var(--success);
        background: color-mix(in srgb, var(--success) 15%, transparent);
    }

    .stat-trend.down {
        color: var(--danger);
        background: color-mix(in srgb, var(--danger) 15%, transparent);
    }

/* ---------- Lower grid ---------- */
.lower-grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    align-items: stretch;
}

.mini-cal {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.cal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.mini-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

.mini-cal-nav {
    display: flex;
    gap: 6px;
}

    .mini-cal-nav button {
        width: 26px;
        height: 26px;
        border-radius: 7px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .mini-cal-nav svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        fill: none;
    }

.weekdays, .days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}

    .weekdays span {
        font-size: 10.5px;
        color: var(--text-muted);
        font-weight: 700;
        padding-bottom: 4px;
    }

    .days button {
        aspect-ratio: 1/1;
        border: none;
        background: transparent;
        color: var(--text);
        font-size: 12px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        max-height: 30px;
    }

        .days button.muted {
            color: var(--text-muted);
            opacity: .4;
        }

        .days button.today {
            background: var(--primary);
            color: #fff;
            font-weight: 700;
        }

        .days button.event::after {
            content: '';
            width: 4px;
            height: 4px;
            border-radius: 50%;
            background: var(--accent);
            position: relative;
            top: 9px;
        }

.activity-card {
    padding: 16px 20px;
}

.activity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

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

    .activity-head a {
        font-size: 12px;
        color: var(--primary);
        font-weight: 600;
    }

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
}

    .activity-item:last-child {
        border-bottom: none;
    }

.act-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--bg);
    color: var(--primary);
}

    .act-icon svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        fill: none;
    }

.act-body {
    min-width: 0;
    flex: 1;
}

    .act-body strong {
        font-size: 12.8px;
        font-weight: 600;
        display: block;
    }

    .act-body span {
        font-size: 11.5px;
        color: var(--text-muted);
    }

.act-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    flex-shrink: 0;
}

/* ============ Overlay ============ */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,14,25,0.45);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 45;
}

    .overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

/* ============ Settings panel ============ */
.settings-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-end: 0;
    width: 330px;
    max-width: 88vw;
    background: var(--surface);
    border-inline-start: 1px solid var(--border);
    box-shadow: var(--shadow);
    z-index: 50;
    padding: 22px;
    transform: translateX(100%);
    transition: transform .3s ease;
    overflow-y: auto;
}

[dir="rtl"] .settings-panel {
    transform: translateX(-100%);
}

.settings-panel.open {
    transform: translateX(0);
}

.settings-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

    .settings-head strong {
        font-size: 15.5px;
    }

    .settings-head button {
        width: 30px;
        height: 30px;
        border-radius: 8px;
        border: 1px solid var(--border);
        background: transparent;
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .settings-head svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
    }

.settings-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.8;
}

.settings-section-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    margin: 18px 0 10px;
}

.mode-switch {
    display: flex;
    gap: 8px;
}

    .mode-switch button {
        flex: 1;
        padding: 10px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--bg);
        color: var(--text);
        font-size: 12.5px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

        .mode-switch button svg {
            width: 15px;
            height: 15px;
            stroke: currentColor;
            fill: none;
        }

        .mode-switch button.active {
            background: var(--primary);
            color: #fff;
            border-color: var(--primary);
        }

.palette-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.palette-swatch {
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 10px 8px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

    .palette-swatch.active {
        border-color: var(--primary);
    }

.swatch-dots {
    display: flex;
    gap: 4px;
}

    .swatch-dots i {
        width: 14px;
        height: 14px;
        border-radius: 50%;
        display: block;
    }

.palette-swatch span {
    font-size: 11px;
    font-weight: 600;
}

/* ============ Responsive ============ */
@media (max-width:1180px) {
    .hero-row {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width:900px) {
    .sidebar {
        position: fixed;
        right: 0;
        left: auto;
        top: 0;
        height: 100vh;
        width: 270px;
        transform: translateX(100%);
        z-index: 46;
    }

        .sidebar.open {
            transform: translateX(0);
        }

        .sidebar.collapsed {
            width: 270px;
        }

            .sidebar.collapsed .brand-text, .sidebar.collapsed .nav-group-title, .sidebar.collapsed .nav-item span,
            .sidebar.collapsed .nav-item .badge, .sidebar.collapsed .user-meta {
                display: flex;
            }

            .sidebar.collapsed .nav-item {
                justify-content: flex-start;
            }

    .content {
        padding: 18px 16px 32px;
    }

    .topbar {
        padding: 12px 16px;
    }

    .welcome-illustration {
        display: none;
    }
}

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

    .topbar-title small {
        display: none;
    }

    .user-chip span {
        display: none;
    }

    .digital-clock {
        font-size: 30px;
    }

    .welcome-text h1 {
        font-size: 18px;
    }
}

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

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}



/* ============================================================
   Employee Management Module
   Scoped with hr-emp-* to avoid changing the dashboard styles.
   Keep this block at the end of this file.
   ============================================================ */
.hr-emp-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 4px 0 28px;
}

.hr-emp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

    .hr-emp-head h1 {
        font-size: 24px;
        margin: 3px 0 5px;
        color: var(--text);
    }

    .hr-emp-head p {
        color: var(--text-muted);
        font-size: 12.5px;
        margin: 0;
    }

.hr-emp-eyebrow {
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .3px;
}

.hr-emp-primary-btn, .hr-emp-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    transition: .18s ease;
    white-space: nowrap;
}

.hr-emp-primary-btn {
    background: var(--primary);
    color: #fff;
    border: 1px solid var(--primary);
}

    .hr-emp-primary-btn:hover {
        filter: brightness(.95);
        transform: translateY(-1px);
    }

    .hr-emp-primary-btn span {
        font-size: 19px;
        line-height: 1;
    }

.hr-emp-secondary-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

    .hr-emp-secondary-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

.hr-emp-alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 12.5px;
}

.hr-emp-alert-success {
    background: rgba(46,158,107,.10);
    color: var(--success);
    border: 1px solid rgba(46,158,107,.18);
}

.hr-emp-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.hr-emp-search {
    position: relative;
    flex: 1;
    max-width: 650px;
}

    .hr-emp-search svg {
        position: absolute;
        right: 13px;
        top: 50%;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        stroke: var(--text-muted);
    }

    .hr-emp-search input {
        width: 100%;
        height: 42px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        color: var(--text);
        padding: 0 42px 0 14px;
        font: inherit;
        font-size: 12px;
        outline: none;
    }

        .hr-emp-search input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-emp-count {
    color: var(--text-muted);
    font-size: 12px;
}

    .hr-emp-count strong {
        color: var(--text);
        font-size: 15px;
    }

.hr-emp-table-card, .hr-emp-form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.hr-emp-table-wrap {
    width: 100%;
    overflow: auto;
    border-radius: 14px;
}

.hr-emp-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

    .hr-emp-table th {
        text-align: right;
        background: var(--surface-2);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        padding: 13px 14px;
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
    }

    .hr-emp-table td {
        padding: 13px 14px;
        border-bottom: 1px solid var(--border);
        color: var(--text);
        font-size: 12px;
        vertical-align: middle;
    }

    .hr-emp-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-emp-table tbody tr:hover {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

.hr-emp-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.hr-emp-avatar {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    background: var(--tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
}

.hr-emp-person strong {
    display: block;
    font-size: 12.5px;
    margin-bottom: 3px;
}

.hr-emp-person span {
    display: block;
    color: var(--text-muted);
    font-size: 10.5px;
}

.hr-emp-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 700;
}

    .hr-emp-status.is-active {
        color: var(--success);
        background: rgba(46,158,107,.10);
    }

    .hr-emp-status.is-leave {
        color: #c98a12;
        background: rgba(201,138,18,.12);
    }

    .hr-emp-status.is-ended {
        color: var(--danger);
        background: rgba(224,85,95,.10);
    }

.hr-emp-mini-detail {
    font-size: 10.5px;
    line-height: 1.8;
    white-space: nowrap;
}

    .hr-emp-mini-detail span {
        color: var(--text-muted);
    }

.hr-emp-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .hr-emp-actions form {
        margin: 0;
    }

.hr-emp-action {
    border: 0;
    background: transparent;
    padding: 6px 8px;
    border-radius: 7px;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

    .hr-emp-action.edit {
        color: var(--primary);
        background: var(--tint);
    }

    .hr-emp-action.delete {
        color: var(--danger);
        background: rgba(224,85,95,.08);
    }

.hr-emp-empty {
    padding: 45px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12.5px;
}

.hr-emp-validation {
    color: var(--danger);
    background: rgba(224,85,95,.08);
    border: 1px solid rgba(224,85,95,.15);
    padding: 10px 14px;
    border-radius: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

    .hr-emp-validation:empty {
        display: none;
    }

.hr-emp-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hr-emp-form-card {
    padding: 20px;
}

.hr-emp-form-title {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}

    .hr-emp-form-title > span {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--tint);
        color: var(--primary);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-emp-form-title strong {
        display: block;
        font-size: 14px;
        margin-bottom: 3px;
    }

    .hr-emp-form-title small {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
    }

.hr-emp-form-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
}

.hr-emp-field {
    min-width: 0;
}

    .hr-emp-field.full {
        grid-column: 1/-1;
    }

    .hr-emp-field label {
        display: block;
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        margin: 0 0 7px;
    }

    .hr-emp-field input, .hr-emp-field select, .hr-emp-field textarea {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: var(--surface-2);
        color: var(--text);
        font-family: inherit;
        font-size: 12px;
        padding: 9px 11px;
        outline: none;
        transition: border-color .18s ease,box-shadow .18s ease;
    }

    .hr-emp-field input, .hr-emp-field select {
        height: 40px;
    }

    .hr-emp-field textarea {
        resize: vertical;
        min-height: 82px;
        line-height: 1.8;
    }

        .hr-emp-field input:focus, .hr-emp-field select:focus, .hr-emp-field textarea:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent);
        }

    .hr-emp-field span.field-validation-error {
        display: block;
        color: var(--danger);
        font-size: 10px;
        margin-top: 4px;
    }

.hr-emp-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding-bottom: 10px;
}

.hr-emp-actions-col {
    width: 145px;
}

@media (max-width:900px) {
    .hr-emp-head, .hr-emp-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-emp-search {
        max-width: none;
    }

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

@media (max-width:560px) {
    .hr-emp-page {
        padding-top: 0;
    }

    .hr-emp-head h1 {
        font-size: 20px;
    }

    .hr-emp-form-card {
        padding: 15px;
    }

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

    .hr-emp-field.full {
        grid-column: auto;
    }

    .hr-emp-form-actions {
        flex-direction: column-reverse;
    }

        .hr-emp-form-actions > * {
            width: 100%;
        }
}


/* ================= Employee Documents ================= */
.hr-doc-page {
    padding-bottom: 40px;
}

.hr-doc-progress-card, .hr-doc-upload-card, .hr-doc-list-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.hr-doc-progress-card {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 28px;
    margin-bottom: 16px;
}

    .hr-doc-progress-card > div:first-child {
        min-width: 250px;
    }

.hr-doc-progress-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 5px;
}

.hr-doc-progress-card strong {
    font-size: 28px;
    display: block;
    line-height: 1;
}

.hr-doc-progress-card small {
    color: var(--text-muted);
    font-size: 10px;
}

.hr-doc-progress {
    flex: 1;
    height: 10px;
    background: var(--surface-2);
    border-radius: 999px;
    overflow: hidden;
}

    .hr-doc-progress span {
        display: block;
        height: 100%;
        background: var(--primary);
        border-radius: inherit;
        transition: width .25s ease;
    }

.hr-doc-layout {
    display: grid;
    grid-template-columns: minmax(300px,.8fr) minmax(0,1.5fr);
    gap: 16px;
    align-items: start;
}

.hr-doc-upload-card {
    padding: 20px;
}

    .hr-doc-upload-card .hr-emp-form {
        gap: 12px;
    }

    .hr-doc-upload-card .hr-emp-primary-btn {
        border: 0;
        cursor: pointer;
        justify-content: center;
        width: 100%;
    }

.hr-doc-list-card {
    overflow: hidden;
}

.hr-doc-list-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-list-head strong {
        display: block;
        font-size: 14px;
    }

    .hr-doc-list-head small {
        display: block;
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 10px;
    }

.hr-doc-list {
    display: flex;
    flex-direction: column;
}

.hr-doc-item {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-item:last-child {
        border-bottom: 0;
    }

.hr-doc-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.hr-doc-info {
    min-width: 0;
}

    .hr-doc-info strong, .hr-doc-info span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hr-doc-info strong {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .hr-doc-info span {
        color: var(--text-muted);
        font-size: 9.5px;
        margin-top: 2px;
    }

.hr-doc-status {
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

    .hr-doc-status.verified {
        color: var(--success);
        background: color-mix(in srgb,var(--success) 10%,transparent);
    }

    .hr-doc-status.pending {
        color: var(--warning);
        background: color-mix(in srgb,var(--warning) 12%,transparent);
    }

.hr-doc-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .hr-doc-actions form {
        margin: 0;
    }

.hr-emp-action.docs {
    color: var(--primary);
}

.hr-doc-alert-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 12px;
    color: var(--text);
    background: color-mix(in srgb,var(--danger) 8%,var(--surface));
    border: 1px solid color-mix(in srgb,var(--danger) 26%,transparent);
    box-shadow: var(--shadow-sm);
    font-size: 12.5px;
    line-height: 1.9;
}

    .hr-doc-alert-error::before {
        content: "!";
        flex: none;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 15px;
        font-weight: 800;
        color: #fff;
        background: var(--danger);
    }

@media (max-width:900px) {
    .hr-doc-layout {
        grid-template-columns: 1fr;
    }

    .hr-doc-progress-card {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

        .hr-doc-progress-card > div:first-child {
            min-width: 0;
        }
}

@media (max-width:700px) {
    .hr-doc-item {
        grid-template-columns: 40px minmax(0,1fr);
    }

    .hr-doc-status {
        justify-self: start;
    }

    .hr-doc-actions {
        grid-column: 1/-1;
        flex-wrap: wrap;
    }
}


/* Sequential employee documents */
.hr-doc-sequence {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 20px;
}

.hr-doc-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    background: var(--card, #fff);
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.hr-doc-step-number {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 800;
    background: #fee2e2;
    color: #dc2626;
}

.hr-doc-step.done .hr-doc-step-number {
    background: #dcfce7;
    color: #16a34a;
}

.hr-doc-step.locked {
    opacity: .55;
}

    .hr-doc-step.locked .hr-doc-step-number {
        background: #f1f5f9;
        color: #94a3b8;
    }

.hr-doc-step-content {
    flex: 1;
    min-width: 0;
}

.hr-doc-step-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

    .hr-doc-step-title strong {
        font-size: 16px;
    }

    .hr-doc-step-title span {
        font-size: 12px;
        color: #64748b;
    }

.hr-doc-step.done .hr-doc-step-title span {
    color: #16a34a;
    font-weight: 700;
}

.hr-doc-step-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hr-doc-file {
    flex: 1 1 280px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    padding: 8px 12px;
    background: #f8fafc;
}

.hr-doc-number {
    flex: 0 1 220px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 11px 13px;
}

.hr-doc-step-form .hr-emp-primary-btn {
    border: 0;
    cursor: pointer;
}

.hr-doc-step-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}

.hr-doc-complete-banner {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 16px;
    background: #dcfce7;
    color: #166534;
    font-weight: 800;
    text-align: center;
}

.hr-doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}

    .hr-doc-badge.incomplete {
        background: #fee2e2;
        color: #dc2626;
    }

    .hr-doc-badge.complete {
        background: #dcfce7;
        color: #16a34a;
    }

    .hr-doc-badge small {
        font-weight: 600;
    }

.hr-emp-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 12px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    color: inherit;
}

@media (max-width:700px) {
    .hr-doc-step {
        padding: 14px;
    }

    .hr-doc-step-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-doc-step-form {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-doc-file, .hr-doc-number {
        flex-basis: auto;
        width: 100%;
    }
}

/* ================= Employee Documents - Dashboard UI ================= */
.hr-doc-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 18px 0 48px;
}

.hr-doc-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 18px;
}

.hr-doc-hero-main h1 {
    margin: 5px 0 7px;
    font-size: 24px;
    letter-spacing: -.5px;
}

    .hr-doc-hero-main h1 span {
        color: var(--primary);
    }

.hr-doc-hero-main p {
    margin: 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.9;
}

.hr-doc-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
    color: var(--text);
    background: var(--surface);
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: .2s;
}

    .hr-doc-back-btn:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow);
    }

    .hr-doc-back-btn span {
        font-size: 16px;
    }

.hr-doc-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 15px 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.hr-doc-summary-icon {
    width: 39px;
    height: 39px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb,var(--primary) 11%,transparent);
    color: var(--primary);
    font-weight: 900;
    font-size: 17px;
}

.hr-doc-summary-text {
    min-width: 190px;
}

    .hr-doc-summary-text strong, .hr-doc-summary-text span {
        display: block;
    }

    .hr-doc-summary-text strong {
        font-size: 12px;
        margin-bottom: 3px;
    }

    .hr-doc-summary-text span {
        font-size: 10px;
        color: var(--text-muted);
    }

.hr-doc-summary-progress {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .hr-doc-summary-progress b {
        font-size: 12px;
        color: var(--primary);
        min-width: 34px;
    }

.hr-doc-progress {
    height: 7px;
    flex: 1;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: 999px;
}

    .hr-doc-progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--primary);
        transition: width .3s ease;
    }

.hr-doc-workspace {
    display: grid;
    grid-template-columns: 310px minmax(0,1fr);
    gap: 18px;
    align-items: stretch;
}

.hr-doc-sidebar, .hr-doc-main-card, .hr-doc-registered {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: var(--shadow-sm);
}

.hr-doc-sidebar {
    overflow: hidden;
}

.hr-doc-sidebar-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 17px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-sidebar-head strong, .hr-doc-sidebar-head small {
        display: block;
    }

    .hr-doc-sidebar-head strong {
        font-size: 13px;
    }

    .hr-doc-sidebar-head small {
        color: var(--text-muted);
        font-size: 9.5px;
        margin-top: 3px;
    }

.hr-doc-count-pill {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
}

.hr-doc-timeline {
    padding: 10px 12px 13px;
}

.hr-doc-timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 55px;
    padding: 5px 7px;
    border-radius: 11px;
}

    .hr-doc-timeline-item.active {
        background: color-mix(in srgb,var(--primary) 7%,transparent);
    }

.hr-doc-timeline-dot {
    position: relative;
    z-index: 2;
    width: 31px;
    height: 31px;
    min-width: 31px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
    border: 2px solid var(--border);
}

.hr-doc-timeline-item.done .hr-doc-timeline-dot {
    background: color-mix(in srgb,var(--success) 12%,transparent);
    color: var(--success);
    border-color: color-mix(in srgb,var(--success) 28%,var(--border));
}

.hr-doc-timeline-item.active .hr-doc-timeline-dot {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px color-mix(in srgb,var(--primary) 10%,transparent);
}

.hr-doc-timeline-item.locked {
    opacity: .48;
}

.hr-doc-timeline-line {
    position: absolute;
    right: 21px;
    top: 36px;
    bottom: -11px;
    width: 1px;
    background: var(--border);
}

.hr-doc-timeline-item:last-child .hr-doc-timeline-line {
    display: none;
}

.hr-doc-timeline-info strong, .hr-doc-timeline-info span {
    display: block;
}

.hr-doc-timeline-info strong {
    font-size: 11px;
}

.hr-doc-timeline-info span {
    margin-top: 3px;
    font-size: 9px;
    color: var(--text-muted);
}

.hr-doc-timeline-item.done .hr-doc-timeline-info span {
    color: var(--success);
    font-weight: 800;
}

.hr-doc-timeline-item.active .hr-doc-timeline-info span {
    color: var(--primary);
    font-weight: 800;
}

.hr-doc-main-card {
    min-height: 455px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hr-doc-current-head {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 23px;
}

.hr-doc-current-icon {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    box-shadow: 0 7px 18px color-mix(in srgb,var(--primary) 20%,transparent);
}

.hr-doc-current-head span {
    display: block;
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
    margin-bottom: 4px;
}

.hr-doc-current-head h2 {
    margin: 0 0 5px;
    font-size: 19px;
}

.hr-doc-current-head p {
    margin: 0;
    color: var(--text-muted);
    font-size: 10.5px;
}

.hr-doc-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 185px;
    padding: 24px;
    border: 1.5px dashed color-mix(in srgb,var(--primary) 35%,var(--border));
    border-radius: 15px;
    background: color-mix(in srgb,var(--primary) 2.5%,var(--surface));
    cursor: pointer;
    text-align: center;
    transition: .2s;
}

    .hr-doc-dropzone:hover {
        border-color: var(--primary);
        background: color-mix(in srgb,var(--primary) 5%,var(--surface));
    }

.hr-doc-drop-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    margin-bottom: 9px;
    background: color-mix(in srgb,var(--primary) 10%,transparent);
    color: var(--primary);
    font-size: 21px;
    font-weight: 900;
}

.hr-doc-dropzone strong {
    font-size: 12px;
}

.hr-doc-dropzone span {
    max-width: 450px;
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 9px;
}

.hr-doc-dropzone em {
    margin-top: 12px;
    padding: 7px 12px;
    border-radius: 9px;
    background: var(--primary);
    color: #fff;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
}

.hr-doc-dropzone input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.hr-doc-form-row {
    margin-top: 14px;
}

.hr-doc-field {
    display: block;
}

    .hr-doc-field > span {
        display: flex;
        gap: 6px;
        align-items: center;
        margin-bottom: 6px;
        font-size: 10px;
        font-weight: 800;
    }

    .hr-doc-field small {
        color: var(--text-muted);
        font-weight: 500;
    }

    .hr-doc-field input,
    .hr-doc-field select {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        border-radius: 10px;
        padding: 10px 12px;
        outline: none;
        font: inherit;
        font-size: 10px;
    }

    .hr-doc-field select {
        appearance: none;
        -webkit-appearance: none;
        cursor: pointer;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%235b6b76' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
        background-repeat: no-repeat;
        background-position: left 12px center;
        padding-left: 30px;
    }

        .hr-doc-field input:focus,
        .hr-doc-field select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb,var(--primary) 10%,transparent);
        }

.hr-doc-submit-btn {
    width: 100%;
    margin-top: 15px;
    min-height: 42px;
    border: 0;
    border-radius: 11px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    box-shadow: 0 7px 18px color-mix(in srgb,var(--primary) 17%,transparent);
    transition: .2s;
}

    .hr-doc-submit-btn:hover {
        transform: translateY(-1px);
        filter: brightness(.97);
    }

    .hr-doc-submit-btn span {
        font-size: 16px;
    }

.hr-doc-finished {
    text-align: center;
    max-width: 470px;
    margin: auto;
}

.hr-doc-finished-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    background: color-mix(in srgb,var(--success) 12%,transparent);
    color: var(--success);
    font-size: 28px;
    font-weight: 900;
}

.hr-doc-finished > span {
    color: var(--success);
    font-size: 10px;
    font-weight: 900;
}

.hr-doc-finished h2 {
    margin: 6px 0;
    font-size: 19px;
}

.hr-doc-finished p {
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.9;
}

.hr-doc-finished .hr-doc-submit-btn {
    max-width: 270px;
    margin: 17px auto 0;
}

.hr-doc-registered {
    margin-top: 18px;
    overflow: hidden;
}

.hr-doc-registered-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-registered-head strong, .hr-doc-registered-head small {
        display: block;
    }

    .hr-doc-registered-head strong {
        font-size: 12px;
    }

    .hr-doc-registered-head small {
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 9px;
    }

    .hr-doc-registered-head > span {
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 800;
    }

.hr-doc-registered-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
}

.hr-doc-registered-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-registered-item:nth-child(odd) {
        border-left: 1px solid var(--border);
    }

.hr-doc-registered-icon {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: color-mix(in srgb,var(--success) 10%,transparent);
    color: var(--success);
    font-weight: 900;
}

.hr-doc-registered-item > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.hr-doc-registered-item strong, .hr-doc-registered-item span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-doc-registered-item strong {
    font-size: 10.5px;
}

.hr-doc-registered-item div:nth-child(2) span {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 8.5px;
}

.hr-doc-status {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

    .hr-doc-status.verified {
        color: var(--success);
        background: color-mix(in srgb,var(--success) 10%,transparent);
    }

    .hr-doc-status.pending {
        color: var(--warning);
        background: color-mix(in srgb,var(--warning) 12%,transparent);
    }

.hr-doc-registered-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

    .hr-doc-registered-actions form {
        margin: 0;
    }

.hr-doc-item-action {
    border: 0;
    background: transparent;
    padding: 5px 7px;
    border-radius: 7px;
    font: inherit;
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

    .hr-doc-item-action.edit {
        color: var(--primary);
        background: var(--tint);
    }

    .hr-doc-item-action.delete {
        color: var(--danger);
        background: rgba(224,85,95,.08);
    }

/* ============ Document edit modal ============ */
.hr-doc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10,14,25,0.45);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
    z-index: 60;
}

    .hr-doc-modal-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

.hr-doc-modal {
    width: 100%;
    max-width: 420px;
    max-height: 88vh;
    overflow-y: auto;
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 18px;
}

.hr-doc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

    .hr-doc-modal-head strong {
        font-size: 12px;
    }

.hr-doc-modal-close {
    border: 0;
    background: var(--tint);
    color: var(--text-muted);
    width: 26px;
    height: 26px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
}

.hr-doc-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hr-doc-modal-row {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px;
}

@media (max-width:900px) {
    .hr-doc-workspace {
        grid-template-columns: 1fr
    }

    .hr-doc-sidebar {
        order: 2
    }

    .hr-doc-main-card {
        order: 1
    }

    .hr-doc-timeline {
        display: grid;
        grid-template-columns: repeat(2,1fr);
        gap: 5px
    }

    .hr-doc-timeline-line {
        display: none !important
    }

    .hr-doc-timeline-item {
        min-height: 48px
    }

    .hr-doc-registered-grid {
        grid-template-columns: 1fr
    }

    .hr-doc-registered-item:nth-child(odd) {
        border-left: 0
    }

    .hr-doc-summary-progress {
        min-width: 160px
    }
}

@media (max-width:650px) {
    .hr-doc-page {
        padding: 10px 0 30px
    }

    .hr-doc-hero {
        align-items: flex-start;
        flex-direction: column
    }

    .hr-doc-hero-main h1 {
        font-size: 20px
    }

    .hr-doc-back-btn {
        width: 100%;
        box-sizing: border-box;
        justify-content: center
    }

    .hr-doc-summary {
        flex-wrap: wrap
    }

    .hr-doc-summary-progress {
        flex-basis: 100%
    }

    .hr-doc-main-card {
        padding: 18px;
        min-height: 0
    }

    .hr-doc-timeline {
        grid-template-columns: 1fr
    }

    .hr-doc-current-head h2 {
        font-size: 17px
    }
}

/* =========================================================
   HR refinements ? employee actions, Persian date picker,
   dynamic contract lookups and document delete dialogs
   ========================================================= */
.hr-emp-actions {
    justify-content: center;
    gap: 6px;
}

.hr-emp-action {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    box-shadow: 0 3px 10px rgba(23,30,58,.04);
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

    .hr-emp-action:hover {
        transform: translateY(-1px);
        border-color: color-mix(in srgb,var(--primary) 25%,var(--border));
    }

    .hr-emp-action svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .hr-emp-action.edit {
        color: var(--primary);
        background: var(--tint);
    }

    .hr-emp-action.docs {
        color: #6b5cc5;
        background: color-mix(in srgb,#6b5cc5 8%,var(--surface));
    }

    .hr-emp-action.payroll {
        color: var(--success);
        background: color-mix(in srgb,var(--success) 8%,var(--surface));
    }

    .hr-emp-action.delete {
        color: var(--danger);
        background: color-mix(in srgb,var(--danger) 7%,var(--surface));
    }

.hr-jalali-input {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
}

/*.hr-jalali-picker {
    position: absolute;
    z-index: 1000;
    width: 286px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(23,30,58,.16);
    direction: rtl;
}*/
.hr-jalali-picker {
    position: fixed;
    z-index: 99999;
    width: 286px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 18px 45px rgba(23,30,58,.16);
    direction: rtl;
}

    .hr-jalali-picker[hidden] {
        display: none;
    }

.hr-jp-head {
    display: grid;
    grid-template-columns: 34px 1fr 34px;
    align-items: center;
    gap: 8px;
    margin-bottom: 9px;
}

    .hr-jp-head strong {
        text-align: center;
        font-size: 12px;
        color: var(--text);
    }

    .hr-jp-head button {
        width: 34px;
        height: 30px;
        border: 0;
        border-radius: 8px;
        background: var(--tint);
        color: var(--primary);
        font-size: 20px;
        line-height: 1;
    }

.hr-jp-week, .hr-jp-days {
    display: grid;
    grid-template-columns: repeat(7,1fr);
    gap: 4px;
}

.hr-jp-week {
    color: var(--text-muted);
    font-size: 8px;
    text-align: center;
    margin-bottom: 4px;
}

.hr-jp-days button, .hr-jp-days span {
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 10px;
}

    .hr-jp-days button:hover {
        background: var(--tint);
        color: var(--primary);
    }

.hr-doc-other-card {
    margin-top: 16px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.hr-doc-other-head {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 16px;
}

.hr-doc-other-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: var(--tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

.hr-doc-other-head strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.hr-doc-other-head small {
    display: block;
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.hr-doc-other-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1.25fr;
    gap: 12px;
    align-items: end;
}

    .hr-doc-other-fields .hr-doc-field {
        min-width: 0;
    }

        .hr-doc-other-fields .hr-doc-field > span, .hr-doc-other-file > span {
            display: block;
            margin-bottom: 7px;
            color: var(--text-muted);
            font-size: 10.5px;
            font-weight: 700;
        }

    .hr-doc-other-fields input {
        width: 100%;
        height: 40px;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: var(--surface-2);
        color: var(--text);
        font: inherit;
        font-size: 11px;
        padding: 9px 11px;
        outline: none;
    }

.hr-doc-other-file {
    position: relative;
    display: block;
}

    .hr-doc-other-file input {
        opacity: 0;
        position: absolute;
        inset: 22px 0 0;
        height: 40px;
        cursor: pointer;
        z-index: 2;
    }

    .hr-doc-other-file em {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 40px;
        border: 1px dashed color-mix(in srgb,var(--primary) 38%,var(--border));
        border-radius: 9px;
        color: var(--primary);
        background: var(--tint);
        font-size: 10px;
        font-style: normal;
        font-weight: 700;
    }

.hr-doc-other-form > .hr-doc-submit-btn {
    margin-top: 12px;
}

.hr-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

    .hr-confirm-modal.open {
        opacity: 1;
        pointer-events: auto;
    }

.hr-confirm-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10,14,25,.48);
    backdrop-filter: blur(3px);
}

.hr-confirm-dialog {
    position: relative;
    width: min(440px,100%);
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

.hr-confirm-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    background: color-mix(in srgb,var(--danger) 9%,var(--surface));
    margin-bottom: 14px;
}

    .hr-confirm-icon svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.hr-confirm-kicker {
    display: block;
    color: var(--danger);
    font-size: 9px;
    font-weight: 800;
    margin-bottom: 5px;
}

.hr-confirm-content h3 {
    color: var(--text);
    font-size: 16px;
    margin-bottom: 7px;
}

.hr-confirm-content p {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.9;
}

.hr-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

    .hr-confirm-actions form {
        margin: 0;
    }

.hr-confirm-cancel, .hr-confirm-danger {
    height: 38px;
    padding: 0 15px;
    border-radius: 9px;
    border: 1px solid var(--border);
    font: inherit;
    font-size: 10.5px;
    font-weight: 700;
}

.hr-confirm-cancel {
    color: var(--text-muted);
    background: var(--surface-2);
}

.hr-confirm-danger {
    border-color: transparent;
    color: #fff;
    background: var(--danger);
}

@media (max-width:800px) {
    .hr-doc-other-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width:520px) {
    .hr-jalali-picker {
        position: fixed;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%,-50%);
        width: min(286px,calc(100vw - 30px));
    }

    .hr-confirm-dialog {
        padding: 18px;
    }

    .hr-confirm-actions {
        flex-direction: column-reverse;
    }

        .hr-confirm-actions > *, .hr-confirm-actions form, .hr-confirm-actions button {
            width: 100%;
        }
}

/* =========================================================
   Dynamic employee family & scalable personnel documents
   ========================================================= */
.hr-family-card {
    margin: 0 0 18px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow)
}

.hr-family-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px
}

    .hr-family-head strong {
        display: block;
        font-size: 13px;
        color: var(--text)
    }

    .hr-family-head small {
        display: block;
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 10px
    }

.hr-family-form {
    display: flex;
    flex-direction: column;
    gap: 18px
}

.hr-family-form-hidden {
    display: none !important
}

.hr-family-count {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 15px;
    align-items: end
}

.hr-family-count-note {
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--tint);
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.9
}

.hr-family-section {
    padding-top: 16px;
    border-top: 1px solid var(--border)
}

.hr-family-section-title {
    font-size: 11px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px
}

.hr-family-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text);
    margin-bottom: 12px
}

    .hr-family-check input {
        accent-color: var(--primary)
    }

.hr-family-person-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px
}

    .hr-family-person-grid.hr-family-hidden {
        display: none
    }

.hr-family-address-note {
    grid-column: 1 / -1;
    font-size: 10px;
    color: var(--text-2, #7a8699);
    background: var(--tint);
    border-radius: 9px;
    padding: 8px 10px
}

.hr-child-row {
    display: grid;
    grid-template-columns: 72px repeat(3,minmax(0,1fr));
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    border-radius: 12px;
    margin-bottom: 9px
}

.hr-child-number {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: var(--tint);
    color: var(--primary);
    font-size: 10px;
    font-weight: 800
}

@media(max-width:800px) {
    .hr-family-count, .hr-family-person-grid, .hr-child-row {
        grid-template-columns: 1fr
    }

    .hr-child-number {
        height: 34px
    }

    .hr-family-count-note {
        margin-top: -5px
    }
}

/* ================= Employee documents UX v2 ================= */
.hr-doc-section-nav {
    position: sticky;
    top: 10px;
    z-index: 25;
    display: flex;
    gap: 8px;
    margin: 0 0 18px;
    padding: 8px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(12px);
}

    .hr-doc-section-nav a {
        flex: 1;
        padding: 9px 12px;
        border-radius: 9px;
        text-align: center;
        font-size: 10px;
        font-weight: 800;
        color: var(--text-muted);
    }

        .hr-doc-section-nav a:hover {
            background: var(--tint);
            color: var(--primary);
        }

.hr-doc-documents-section, .hr-doc-other-section {
    scroll-margin-top: 78px;
}

.hr-doc-documents-section {
    margin-top: 18px;
}

.hr-doc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 13px;
}

    .hr-doc-section-head h2 {
        margin: 3px 0;
        font-size: 18px;
    }

    .hr-doc-section-head p {
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.8;
    }

.hr-doc-summary-compact {
    min-width: 190px;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .hr-doc-summary-compact strong {
        font-size: 20px;
        white-space: nowrap;
    }

.hr-doc-required-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 11px;
}

.hr-doc-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

    .hr-doc-card:hover {
        transform: translateY(-1px);
        border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
    }

    .hr-doc-card.is-done {
        border-color: color-mix(in srgb, var(--success) 20%, var(--border));
    }

    .hr-doc-card.is-skipped {
        border-color: color-mix(in srgb, var(--warning) 28%, var(--border));
        background: color-mix(in srgb, var(--warning) 2.5%, var(--surface));
    }

.hr-doc-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hr-doc-card-icon {
    min-width: 38px;
    height: 30px;
    padding: 0 7px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tint);
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
}

.hr-doc-card.is-done .hr-doc-card-icon {
    background: color-mix(in srgb, var(--success) 10%, transparent);
    color: var(--success);
}

.hr-doc-card.is-skipped .hr-doc-card-icon {
    background: color-mix(in srgb, var(--warning) 11%, transparent);
    color: var(--warning);
}

.hr-doc-card-status {
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
}

    .hr-doc-card-status.pending {
        color: var(--danger);
        background: color-mix(in srgb, var(--danger) 8%, transparent);
    }

    .hr-doc-card-status.done {
        color: var(--success);
        background: color-mix(in srgb, var(--success) 9%, transparent);
    }

    .hr-doc-card-status.skipped {
        color: var(--warning);
        background: color-mix(in srgb, var(--warning) 10%, transparent);
    }

.hr-doc-card h3 {
    margin: 12px 0 5px;
    min-height: 31px;
    font-size: 11px;
    line-height: 1.55;
}

.hr-doc-card-file, .hr-doc-card-note {
    margin: 0;
    min-height: 31px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.75;
}

.hr-doc-card-file {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-doc-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

    .hr-doc-card-actions .hr-doc-item-action {
        flex: 1;
        min-width: 82px;
        text-align: center;
    }

.hr-doc-other-section {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
}

.hr-doc-other-add {
    border: 0;
    padding: 9px 13px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
    box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 16%, transparent);
}

.hr-doc-empty {
    padding: 24px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    background: var(--surface);
    text-align: center;
    font-size: 10px;
}

.hr-doc-modal-info {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--tint);
    color: var(--text-muted);
    font-size: 9.5px;
    line-height: 1.9;
}

.hr-doc-field textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 82px;
    resize: vertical;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    font: inherit;
    font-size: 10px;
}

    .hr-doc-field textarea:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
    }

.hr-jp-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

    .hr-jp-week span {
        display: grid;
        min-height: 26px;
        place-items: center;
        font-size: 8px;
    }

.hr-jp-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

    .hr-jp-days .empty {
        min-height: 32px;
    }

    .hr-jp-days button {
        min-height: 32px;
        cursor: pointer;
        transition: background .12s ease, color .12s ease, transform .12s ease;
    }

        .hr-jp-days button:hover {
            background: var(--tint);
            color: var(--primary);
            transform: translateY(-1px);
        }

        .hr-jp-days button.selected {
            background: var(--primary);
            color: #fff;
            font-weight: 900;
        }

@media (max-width: 1050px) {
    .hr-doc-required-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hr-doc-section-nav {
        position: static;
        overflow-x: auto;
    }

        .hr-doc-section-nav a {
            flex: 0 0 auto;
            min-width: 110px;
        }

    .hr-doc-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-doc-summary-compact {
        min-width: 0;
    }

    .hr-doc-required-grid {
        grid-template-columns: 1fr;
    }

    .hr-doc-modal-row {
        grid-template-columns: 1fr;
    }
}

.hr-doc-inline-form {
    margin: 0;
    display: flex;
    flex: 1;
    min-width: 82px;
}

    .hr-doc-inline-form .hr-doc-item-action {
        width: 100%;
    }

.hr-doc-item-action.verify {
    color: var(--primary);
    background: var(--tint);
}

    .hr-doc-item-action.verify.verified {
        color: var(--success);
        background: color-mix(in srgb, var(--success) 9%, var(--surface));
    }

/* ================= Employee Documents - Final polish ================= */
.hr-doc-page {
    width: min(100% - 28px, 1500px);
    max-width: 1500px;
    margin-inline: auto;
}

.hr-doc-required-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hr-family-saved-section,
.hr-doc-notes-section {
    margin-top: 24px;
    scroll-margin-top: 78px;
}

.hr-family-saved-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-family-saved-card {
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.hr-family-saved-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hr-family-member-badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--tint);
    color: var(--primary);
    font-size: 9px;
    font-weight: 900;
}

.hr-family-member-id {
    color: var(--text-muted);
    font-size: 8px;
}

.hr-family-saved-card h3 {
    margin: 13px 0 8px;
    font-size: 12px;
}

.hr-family-saved-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.7;
}

.hr-family-saved-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

    .hr-family-saved-actions form,
    .hr-family-saved-actions .hr-doc-item-action {
        flex: 1;
        margin: 0;
    }

.hr-family-edit-btn {
    cursor: pointer;
    border: 0;
}

.hr-doc-status-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
}

.hr-doc-status-summary-item {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

    .hr-doc-status-summary-item strong {
        font-size: 18px;
    }

    .hr-doc-status-summary-item span {
        color: var(--text-muted);
        font-size: 9px;
        font-weight: 800;
    }

    .hr-doc-status-summary-item.done strong {
        color: var(--success);
    }

    .hr-doc-status-summary-item.pending strong {
        color: var(--danger);
    }

    .hr-doc-status-summary-item.total strong {
        color: var(--primary);
    }

.hr-doc-pending-count {
    color: var(--danger);
    font-weight: 800;
}

.hr-doc-notes-section {
    padding: 22px 0 10px;
    border-top: 1px solid var(--border);
}

.hr-doc-notes-form {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

    .hr-doc-notes-form .hr-doc-field textarea {
        min-height: 130px;
    }

@media (max-width: 1150px) {
    .hr-doc-required-grid,
    .hr-family-saved-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .hr-doc-required-grid,
    .hr-family-saved-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-doc-status-summary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .hr-doc-page {
        width: min(100% - 18px, 1500px);
    }

    .hr-doc-required-grid,
    .hr-family-saved-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Support menu + lookup CRUD + military fields
   Added at the end intentionally to keep the existing dashboard styles intact.
   ========================================================= */
.nav-support-group {
    margin: 0;
}

.nav-support-title {
    cursor: pointer;
    user-select: none;
}

    .nav-support-title .nav-chevron {
        margin-inline-start: auto;
        font-size: 18px;
        line-height: 1;
        transition: transform .18s ease;
    }

.nav-support-group.open .nav-support-title .nav-chevron {
    transform: rotate(180deg);
}

.nav-submenu {
    display: none;
    padding: 2px 0 4px;
}

.nav-support-group.open .nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-subitem {
    /* display: block;*/
    margin-inline: 31px 4px;
    padding: 8px 2px;
    border-radius: 8px;
    color: var(--sidebar-text-muted);
    font-size: 12.5px;
    transition: background .18s ease,color .18s ease;
}

    .nav-subitem:hover {
        background: rgba(255,255,255,.07);
        color: #fff;
    }

    .nav-subitem.active {
        background: rgba(0,216,223,.16);
        color: #fff;
        font-weight: 700;
    }

.sidebar.collapsed .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-support-title .nav-chevron {
    display: none;
}

.hr-support-page {
    max-width: 1200px;
}

.hr-support-table th, .hr-support-table td {
    vertical-align: middle;
}

.hr-support-form {
    max-width: 760px;
}

.hr-support-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 18px;
}

.hr-support-check {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
}

    .hr-support-check input {
        width: 17px;
        height: 17px;
        accent-color: var(--primary);
    }

.hr-support-page .hr-emp-field span.field-validation-error {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 11px;
}

.hr-military-section {
    display: none;
}

    .hr-military-section.is-visible {
        display: block;
    }

.hr-military-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--tint);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 12px;
}

@media (max-width: 700px) {
    .hr-support-card {
        grid-template-columns: 1fr;
    }

    .hr-support-check {
        grid-column: auto;
    }
}



/* =========================================================
   Employee Documents ? Employee Profile Header
   ========================================================= */
.hr-doc-employee-profile {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin: 0 0 22px;
    padding: 18px 20px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(77,252,245,.055) 100%);
    box-shadow: 0 14px 38px rgba(23,30,58,.08);
    direction: rtl;
    overflow: hidden;
    position: relative;
}

    .hr-doc-employee-profile::after {
        content: "";
        position: absolute;
        width: 150px;
        height: 150px;
        left: -70px;
        bottom: -95px;
        border-radius: 50%;
        background: rgba(77,252,245,.10);
        pointer-events: none;
    }

.hr-doc-employee-photo-wrap {
    width: 96px;
    height: 128px;
    flex: 0 0 96px;
    border-radius: 16px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 10px 24px rgba(23,30,58,.12);
    overflow: hidden;
}

.hr-doc-employee-photo,
.hr-doc-employee-photo-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.hr-doc-employee-photo {
    object-fit: cover;
    object-position: center top;
}

.hr-doc-employee-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(77,252,245,.18), rgba(77,252,245,.045));
    color: var(--text);
    font-size: 34px;
    font-weight: 800;
}

.hr-doc-employee-profile-info {
    min-width: 0;
}

    .hr-doc-employee-profile-info h2 {
        margin: 3px 0 12px;
        color: var(--text);
        font-size: clamp(21px, 2.2vw, 30px);
        line-height: 1.2;
        font-weight: 850;
    }

.hr-doc-employee-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
}

    .hr-doc-employee-meta > div {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 170px;
    }

    .hr-doc-employee-meta span {
        color: var(--muted);
        font-size: 12px;
    }

    .hr-doc-employee-meta strong {
        color: var(--text);
        font-size: 14px;
        font-weight: 750;
        direction: ltr;
        unicode-bidi: plaintext;
    }

.hr-doc-employee-profile-badge {
    min-width: 118px;
    padding: 12px 16px;
    border: 1px solid rgba(77,252,245,.24);
    border-radius: 16px;
    background: rgba(77,252,245,.075);
    text-align: center;
    position: relative;
    z-index: 1;
}

    .hr-doc-employee-profile-badge span,
    .hr-doc-employee-profile-badge small {
        display: block;
        color: var(--muted);
        font-size: 11px;
    }

    .hr-doc-employee-profile-badge strong {
        display: block;
        margin: 2px 0;
        color: var(--text);
        font-size: 25px;
        line-height: 1.1;
        font-weight: 850;
    }

@media (max-width: 700px) {
    .hr-doc-employee-profile {
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
        padding: 14px;
    }

    .hr-doc-employee-photo-wrap {
        width: 78px;
        height: 104px;
        flex-basis: 78px;
    }

    .hr-doc-employee-profile-badge {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        gap: 8px;
        min-width: 0;
        text-align: right;
    }

        .hr-doc-employee-profile-badge strong {
            margin: 0;
        }

    .hr-doc-employee-meta {
        gap: 7px 16px;
    }

        .hr-doc-employee-meta > div {
            min-width: 0;
        }
}

/* ================================================================
   ???? ?????? ???????
   ??? ??? ????? ?? ?????? ???? ?????? ??? ?? ?????????? ???? ?????????? ??????.
   ================================================================ */

.hr-insurance-inline-section,
.hr-insurance-page,
.hr-insurance-report-page {
    width: min(1500px, calc(100vw - 40px));
    margin: 28px auto;
}

.hr-insurance-inline-section {
    padding: 26px;
    border: 1px solid var(--border, rgba(0, 0, 0, .08));
    border-radius: 24px;
    background: var(--card, #fff);
    box-shadow: 0 18px 50px rgba(20, 35, 60, .06);
}

    .hr-insurance-inline-section .hr-doc-section-head {
        margin-bottom: 20px;
    }

.hr-insurance-inline-btn,
.hr-insurance-report-btn,
.hr-insurance-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(0, 152, 217, .22);
    border-radius: 14px;
    background: rgba(0, 152, 217, .08);
    color: var(--text, #172033);
    text-decoration: none;
    font-weight: 800;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
}

    .hr-insurance-inline-btn:hover,
    .hr-insurance-report-btn:hover,
    .hr-insurance-export-btn:hover {
        transform: translateY(-1px);
        background: rgba(0, 152, 217, .13);
        border-color: rgba(0, 152, 217, .35);
        color: var(--text, #172033);
    }

.hr-insurance-inline-summary,
.hr-insurance-summary,
.hr-insurance-report-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

    .hr-insurance-inline-stat,
    .hr-insurance-summary > div,
    .hr-insurance-report-summary > div {
        padding: 16px 18px;
        border: 1px solid rgba(0, 0, 0, .07);
        border-radius: 16px;
        background: rgba(0, 0, 0, .018);
    }

        .hr-insurance-inline-stat span,
        .hr-insurance-summary span,
        .hr-insurance-report-summary span {
            display: block;
            margin-bottom: 5px;
            color: var(--muted, #778095);
            font-size: 12px;
        }

        .hr-insurance-inline-stat strong,
        .hr-insurance-summary strong,
        .hr-insurance-report-summary strong {
            display: block;
            color: var(--text, #172033);
            font-size: 24px;
            line-height: 1;
            font-weight: 900;
        }

.hr-insurance-inline-people {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-insurance-inline-person {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(0, 152, 217, .14);
    border-radius: 16px;
    background: rgba(0, 152, 217, .045);
}

    .hr-insurance-inline-person span,
    .hr-insurance-inline-person small {
        display: block;
        color: var(--muted, #778095);
        font-size: 11px;
    }

    .hr-insurance-inline-person strong {
        display: block;
        margin: 6px 0;
        color: var(--text, #172033);
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.hr-insurance-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
    padding: 28px;
    border: 1px solid rgba(0, 152, 217, .14);
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(0, 152, 217, .10), rgba(0, 216, 223, .045));
}

    .hr-insurance-hero h1 {
        margin: 6px 0 9px;
        color: var(--text, #172033);
        font-size: clamp(24px, 3vw, 38px);
        font-weight: 900;
    }

        .hr-insurance-hero h1 span {
            color: var(--primary, #0098d9);
        }

    .hr-insurance-hero p {
        max-width: 850px;
        margin: 0;
        color: var(--muted, #778095);
        line-height: 1.9;
    }

.hr-insurance-row-edit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s ease;
}

    .hr-insurance-row-edit-btn:hover {
        background: color-mix(in srgb, var(--primary) 22%, transparent);
    }

.hr-insurance-form {
    position: relative;
}

.hr-insurance-list {
    display: grid;
    gap: 18px;
}

.hr-insurance-card {
    padding: 22px;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 22px;
    background: var(--card, #fff);
    box-shadow: 0 15px 40px rgba(20, 35, 60, .045);
    transition: border-color .2s ease, box-shadow .2s ease;
}

    .hr-insurance-card.is-selected {
        border-color: rgba(0, 152, 217, .28);
        box-shadow: 0 18px 48px rgba(0, 152, 217, .08);
    }

.hr-insurance-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.hr-insurance-person-title {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

    .hr-insurance-person-title h2 {
        margin: 4px 0 0;
        color: var(--text, #172033);
        font-size: 18px;
        font-weight: 850;
    }

.hr-insurance-relation {
    color: var(--primary, #0098d9);
    font-size: 11px;
    font-weight: 800;
}

.hr-insurance-status {
    flex: 0 0 auto;
    padding: 7px 11px;
    border-radius: 999px;
    background: rgba(0, 152, 217, .08);
    color: var(--primary, #0098d9);
    font-size: 11px;
    font-weight: 800;
}

.hr-insurance-toggle {
    position: relative;
    display: block;
    width: 46px;
    height: 28px;
    flex: 0 0 46px;
    cursor: pointer;
}

    .hr-insurance-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

.hr-insurance-toggle-ui {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d7dce5;
    transition: background .2s ease;
}

    .hr-insurance-toggle-ui::after {
        content: "";
        position: absolute;
        top: 4px;
        right: 4px;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 7px rgba(0, 0, 0, .16);
        transition: transform .2s ease;
    }

.hr-insurance-toggle input:checked + .hr-insurance-toggle-ui {
    background: var(--primary, #0098d9);
}

    .hr-insurance-toggle input:checked + .hr-insurance-toggle-ui::after {
        transform: translateX(-18px);
    }

.hr-insurance-basic-grid,
.hr-insurance-extra-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hr-insurance-extra-grid {
    margin-top: 14px;
}

.hr-insurance-wide {
    grid-column: span 2;
}

.hr-insurance-save-bar {
    position: sticky;
    bottom: 18px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 16px 18px;
    border: 1px solid rgba(0, 152, 217, .18);
    border-radius: 20px;
    background: color-mix(in srgb, var(--card, #fff) 94%, transparent);
    box-shadow: 0 16px 45px rgba(20, 35, 60, .12);
    backdrop-filter: blur(14px);
}

    .hr-insurance-save-bar strong,
    .hr-insurance-save-bar span {
        display: block;
    }

    .hr-insurance-save-bar strong {
        margin-bottom: 4px;
        color: var(--text, #172033);
    }

    .hr-insurance-save-bar span {
        color: var(--muted, #778095);
        font-size: 11px;
    }

.hr-insurance-filter-card {
    display: grid;
    grid-template-columns: minmax(250px, 1.8fr) repeat(2, minmax(160px, .7fr)) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, .07);
    border-radius: 22px;
    background: var(--card, #fff);
}

.hr-insurance-filter-btn,
.hr-insurance-export-btn {
    min-height: 48px;
    border: 0;
    cursor: pointer;
}

.hr-insurance-filter-btn {
    padding: 0 20px;
    border-radius: 14px;
    background: var(--primary, #0098d9);
    color: #fff;
    font-weight: 850;
}

.hr-insurance-report-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-insurance-report-table-wrap {
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .075);
    border-radius: 22px;
    background: var(--card, #fff);
}

.hr-insurance-table-scroll {
    width: 100%;
    overflow-x: auto;
}

.hr-insurance-report-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: collapse;
    direction: rtl;
}

    .hr-insurance-report-table th,
    .hr-insurance-report-table td {
        padding: 14px 12px;
        border-bottom: 1px solid rgba(0, 0, 0, .055);
        text-align: right;
        white-space: nowrap;
        font-size: 12px;
    }

    .hr-insurance-report-table th {
        background: rgba(0, 152, 217, .055);
        color: var(--muted, #778095);
        font-weight: 850;
    }

    .hr-insurance-report-table td {
        color: var(--text, #172033);
    }

    .hr-insurance-report-table tbody tr:last-child td {
        border-bottom: 0;
    }

.hr-insurance-report-status {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(0, 152, 217, .08);
    color: var(--primary, #0098d9);
    font-size: 10px;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .hr-insurance-basic-grid,
    .hr-insurance-extra-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-insurance-inline-people {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-insurance-filter-card {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-insurance-filter-btn {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .hr-insurance-inline-section,
    .hr-insurance-page,
    .hr-insurance-report-page {
        width: min(100% - 24px, 1500px);
        margin: 18px auto;
    }

    .hr-insurance-inline-section,
    .hr-insurance-card,
    .hr-insurance-hero {
        padding: 16px;
        border-radius: 18px;
    }

    .hr-insurance-hero,
    .hr-insurance-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-insurance-inline-summary,
    .hr-insurance-summary,
    .hr-insurance-report-summary,
    .hr-insurance-basic-grid,
    .hr-insurance-extra-grid,
    .hr-insurance-filter-card {
        grid-template-columns: 1fr;
    }

    .hr-insurance-wide {
        grid-column: auto;
    }

    .hr-insurance-inline-people {
        grid-template-columns: 1fr;
    }

    .hr-insurance-card-head {
        align-items: flex-start;
    }
}

/* =========================================================
   Employee Documents + Supplementary Insurance - Responsive Polish
   Scoped additions; existing dashboard styles remain untouched.
   ========================================================= */

.hr-doc-page,
.hr-insurance-page,
.hr-insurance-inline-section,
.hr-insurance-report-page {
    width: 100%;
    max-width: 1500px;
    box-sizing: border-box;
    margin-inline: auto;
    min-width: 0;
}

    .hr-doc-page *,
    .hr-insurance-page *,
    .hr-insurance-inline-section *,
    .hr-insurance-report-page * {
        box-sizing: border-box;
    }

    .hr-doc-hero,
    .hr-doc-section-head,
    .hr-family-head,
    .hr-insurance-inline-section .hr-doc-section-head {
        min-width: 0;
    }

        .hr-doc-hero-main,
        .hr-doc-section-head > div,
        .hr-family-head > div {
            min-width: 0;
        }

            .hr-doc-hero-main p,
            .hr-doc-section-head p,
            .hr-family-head small {
                overflow-wrap: anywhere;
            }

.hr-doc-section-nav {
    overflow-x: auto;
    scrollbar-width: thin;
}

    .hr-doc-section-nav a {
        flex: 1 1 130px;
        min-width: 110px;
        white-space: nowrap;
    }

.hr-insurance-inline-section {
    overflow: hidden;
}

.hr-insurance-inline-summary,
.hr-insurance-report-summary {
    min-width: 0;
}

    .hr-insurance-inline-stat,
    .hr-insurance-summary > div,
    .hr-insurance-report-summary > div {
        min-width: 0;
    }

.hr-insurance-inline-person {
    min-width: 0;
}

    .hr-insurance-inline-person strong,
    .hr-insurance-inline-person small,
    .hr-insurance-inline-person span {
        overflow-wrap: anywhere;
    }

.hr-insurance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: 16px;
}

.hr-insurance-group {
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(0, 0, 0, .065);
    border-radius: 17px;
    background: rgba(0, 152, 217, .018);
}

.hr-insurance-group-full {
    grid-column: 1 / -1;
}

.hr-insurance-group-title {
    margin-bottom: 12px;
    color: var(--text, #172033);
    font-size: 12px;
    font-weight: 900;
}

.hr-insurance-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.hr-insurance-field-wide {
    grid-column: span 2;
}

.hr-insurance-fields .hr-doc-field {
    min-width: 0;
}

.hr-insurance-fields input,
.hr-insurance-fields select,
.hr-insurance-fields textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.hr-insurance-fields textarea {
    resize: vertical;
}

.hr-insurance-fields input[readonly] {
    background: rgba(0, 152, 217, .045);
    color: var(--muted, #778095);
    cursor: not-allowed;
}

.hr-insurance-rule-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 18px;
    padding: 12px 15px;
    border: 1px solid rgba(0, 152, 217, .15);
    border-radius: 15px;
    background: rgba(0, 152, 217, .045);
    color: var(--muted, #778095);
    font-size: 11px;
    line-height: 1.9;
}

    .hr-insurance-rule-note strong {
        flex: 0 0 auto;
        color: var(--primary, #0098d9);
        font-weight: 900;
    }

.hr-insurance-other-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px dashed rgba(0, 152, 217, .25);
    border-radius: 17px;
    background: rgba(0, 152, 217, .025);
}

    .hr-insurance-other-bar strong,
    .hr-insurance-other-bar span {
        display: block;
    }

    .hr-insurance-other-bar strong {
        margin-bottom: 3px;
        color: var(--text, #172033);
        font-size: 13px;
    }

    .hr-insurance-other-bar span {
        color: var(--muted, #778095);
        font-size: 11px;
    }

.hr-insurance-add-other,
.hr-insurance-remove-other {
    border: 0;
    cursor: pointer;
    font-family: inherit;
    font-weight: 850;
}

.hr-insurance-add-other {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    background: var(--primary, #0098d9);
    color: #fff;
}

.hr-insurance-remove-other {
    padding: 7px 10px;
    border-radius: 9px;
    background: rgba(220, 53, 69, .08);
    color: var(--danger, #dc3545);
}

.hr-insurance-card.is-other {
    border-style: dashed;
}

@media (max-width: 1150px) {
    .hr-insurance-grid {
        grid-template-columns: 1fr;
    }

    .hr-insurance-group-full {
        grid-column: auto;
    }

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

    .hr-insurance-inline-people {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .hr-doc-page,
    .hr-insurance-page,
    .hr-insurance-inline-section,
    .hr-insurance-report-page {
        max-width: none;
    }

        .hr-doc-hero,
        .hr-doc-section-head,
        .hr-family-head,
        .hr-insurance-inline-section .hr-doc-section-head {
            align-items: stretch;
            flex-direction: column;
        }

    .hr-doc-back-btn,
    .hr-insurance-inline-btn,
    .hr-insurance-report-btn,
    .hr-insurance-export-btn {
        width: 100%;
    }

    .hr-insurance-fields {
        grid-template-columns: 1fr;
    }

    .hr-insurance-field-wide {
        grid-column: auto;
    }

    .hr-insurance-other-bar {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-insurance-add-other {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .hr-doc-page,
    .hr-insurance-page,
    .hr-insurance-inline-section,
    .hr-insurance-report-page {
        width: 100%;
        margin-top: 12px;
        margin-bottom: 12px;
    }

    .hr-doc-section-nav {
        position: sticky;
        top: 4px;
        padding: 6px;
        gap: 5px;
    }

        .hr-doc-section-nav a {
            min-width: 100px;
            padding: 8px 9px;
            font-size: 9px;
        }

    .hr-insurance-inline-section,
    .hr-insurance-card,
    .hr-insurance-hero {
        padding: 13px;
        border-radius: 16px;
    }

    .hr-insurance-grid {
        gap: 10px;
    }

    .hr-insurance-group {
        padding: 12px;
        border-radius: 14px;
    }

    .hr-insurance-card-head {
        gap: 10px;
        flex-wrap: wrap;
    }

    .hr-insurance-person-title h2 {
        font-size: 16px;
    }

    .hr-insurance-status {
        margin-inline-start: 60px;
    }

    .hr-insurance-summary,
    .hr-insurance-report-summary,
    .hr-insurance-inline-summary {
        gap: 8px;
    }

    .hr-insurance-save-bar {
        bottom: 6px;
        padding: 12px;
        border-radius: 15px;
    }

        .hr-insurance-save-bar .hr-doc-submit-btn {
            width: 100%;
        }
}


/* ================================================================
   ???? ?????? - ????? ????????? ? ??????? ?? ??????? HR
   ??? ??? ????? ?? site.css ???? ????? ?? ?????????? ???? ?? ?? ???? ????
   ???? ??????? ???? ? ?? ??????? ???? ??????? ?????? ?????.
   ================================================================ */
.hr-insurance-page,
.hr-insurance-report-page,
.hr-insurance-support-page,
.hr-insurance-plan-form-page {
    box-sizing: border-box;
}

.hr-insurance-plan-selector {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
    gap: 24px;
    align-items: center;
    margin: 20px 0;
    padding: 22px;
    border: 1px solid rgba(0, 152, 217, .16);
    border-radius: 22px;
    background: var(--card, #fff);
    box-shadow: 0 14px 40px rgba(20, 35, 60, .05);
}

    .hr-insurance-plan-selector h2 {
        margin: 5px 0 7px;
        font-size: 20px;
        font-weight: 900;
    }

    .hr-insurance-plan-selector p {
        margin: 0;
        color: var(--muted, #778095);
        line-height: 1.9;
        font-size: 12px;
    }

.hr-insurance-plan-select-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: end;
}

    .hr-insurance-plan-select-wrap select {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--text);
        border-radius: 12px;
        padding: 11px 34px 11px 14px;
        outline: none;
        font: inherit;
        font-size: 11.5px;
        font-weight: 700;
        cursor: pointer;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path d='M1 1l4 4 4-4' fill='none' stroke='%235b6b76' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/></svg>");
        background-repeat: no-repeat;
        background-position: left 14px center;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-insurance-plan-select-wrap select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 11%, transparent);
        }

.hr-insurance-plan-price {
    min-height: 54px;
    padding: 9px 13px;
    border: 1px solid rgba(0, 152, 217, .15);
    border-radius: 14px;
    background: rgba(0, 152, 217, .055);
}

    .hr-insurance-plan-price span {
        display: block;
        color: var(--muted,#778095);
        font-size: 11px;
        margin-bottom: 4px;
    }

    .hr-insurance-plan-price strong {
        display: block;
        color: var(--text,#172033);
        font-size: 14px;
        font-weight: 900;
    }

.hr-insurance-summary-highlight {
    background: rgba(0, 152, 217, .065) !important;
    border-color: rgba(0, 152, 217, .16) !important;
}

    .hr-insurance-summary-highlight strong {
        color: var(--primary, #0098d9) !important;
    }

.hr-insurance-no-plan {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin: 20px 0;
    padding: 20px;
    border: 1px solid rgba(221, 53, 69, .16);
    border-radius: 20px;
    background: rgba(221,53,69,.045);
}

    .hr-insurance-no-plan strong {
        color: var(--text,#172033);
    }

    .hr-insurance-no-plan span {
        color: var(--muted,#778095);
        font-size: 12px;
    }

    .hr-insurance-no-plan .hr-insurance-inline-btn {
        margin-inline-start: auto;
    }

.hr-insurance-notice {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 0 0 18px;
    padding: 15px 17px;
    border: 1px solid rgba(0,152,217,.13);
    border-radius: 17px;
    background: rgba(0,152,217,.045);
}

    .hr-insurance-notice > span {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        border-radius: 50%;
        background: rgba(0,152,217,.12);
        color: var(--primary,#0098d9);
        font-weight: 900;
    }

    .hr-insurance-notice strong {
        display: block;
        margin-bottom: 3px;
        font-size: 13px;
    }

    .hr-insurance-notice p {
        margin: 0;
        color: var(--muted,#778095);
        line-height: 1.9;
        font-size: 11px;
    }

.hr-insurance-section-label {
    margin: 16px 0 10px;
    color: var(--text,#172033);
    font-size: 12px;
    font-weight: 900;
}

.hr-insurance-card-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.hr-insurance-remove-other {
    border: 1px solid rgba(220,53,69,.18);
    border-radius: 10px;
    padding: 7px 10px;
    background: rgba(220,53,69,.055);
    color: #b42335;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

    .hr-insurance-remove-other:hover {
        background: rgba(220,53,69,.10);
    }

.hr-insurance-shared-note {
    grid-column: span 2;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(0,152,217,.045);
    color: var(--muted,#778095);
    font-size: 11px;
}

    .hr-insurance-shared-note span {
        color: var(--primary,#0098d9);
        font-weight: 900;
    }

    .hr-insurance-shared-note p {
        margin: 0;
    }

.hr-insurance-add-other-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 4px;
    padding: 14px 0;
}

.hr-insurance-add-other {
    min-height: 42px;
    padding: 0 16px;
    border: 1px dashed rgba(0,152,217,.38);
    border-radius: 12px;
    background: rgba(0,152,217,.045);
    color: var(--primary,#0098d9);
    font-weight: 900;
    cursor: pointer;
}

.hr-insurance-add-other-row > span {
    color: var(--muted,#778095);
    font-size: 11px;
}

.hr-insurance-card input[readonly] {
    background: rgba(0,0,0,.025);
    color: var(--muted,#778095);
    cursor: not-allowed;
}

.hr-insurance-plan-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 14px;
    padding: 22px;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 22px;
    background: var(--card,#fff);
    box-shadow: 0 15px 40px rgba(20,35,60,.045);
}

.hr-insurance-plan-wide {
    grid-column: span 2;
}

.hr-insurance-plan-check {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 0 13px;
    border: 1px solid rgba(0,0,0,.07);
    border-radius: 12px;
    background: rgba(0,0,0,.018);
    font-size: 12px;
    font-weight: 800;
}

    .hr-insurance-plan-check input {
        width: 18px;
        height: 18px;
        accent-color: var(--primary,#0098d9);
    }

.hr-insurance-table-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-insurance-report-table {
    min-width: 1450px;
}

    .hr-insurance-report-table th, .hr-insurance-report-table td {
        white-space: nowrap;
        vertical-align: middle;
    }

.hr-insurance-report-status {
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .hr-insurance-basic-grid, .hr-insurance-extra-grid {
        grid-template-columns: repeat(3,minmax(0,1fr));
    }

    .hr-insurance-wide {
        grid-column: span 2;
    }

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

@media (max-width: 900px) {
    .hr-insurance-plan-selector {
        grid-template-columns: 1fr;
    }

    .hr-insurance-plan-select-wrap {
        grid-template-columns: 1fr 160px;
    }

    .hr-insurance-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-insurance-export-btn, .hr-insurance-report-btn {
        align-self: stretch;
    }
}

@media (max-width: 700px) {
    .hr-insurance-page, .hr-insurance-report-page {
        width: min(100% - 20px, 1500px);
        margin: 16px auto;
    }

    .hr-insurance-inline-section {
        width: calc(100% - 20px);
        margin: 16px auto;
        padding: 16px;
    }

    .hr-insurance-card {
        padding: 15px;
        border-radius: 18px;
    }

    .hr-insurance-card-head {
        align-items: flex-start;
    }

    .hr-insurance-basic-grid, .hr-insurance-extra-grid, .hr-insurance-plan-grid {
        grid-template-columns: 1fr;
    }

    .hr-insurance-wide, .hr-insurance-plan-wide, .hr-insurance-shared-note {
        grid-column: span 1;
    }

    .hr-insurance-plan-select-wrap {
        grid-template-columns: 1fr;
    }

    .hr-insurance-summary, .hr-insurance-inline-summary, .hr-insurance-report-summary {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

        .hr-insurance-summary > div:last-child, .hr-insurance-report-summary > div:last-child {
            grid-column: 1/-1;
        }

    .hr-insurance-save-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }

        .hr-insurance-save-bar .hr-doc-submit-btn {
            width: 100%;
        }

    .hr-insurance-add-other-row {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-insurance-add-other {
        width: 100%;
    }

    .hr-insurance-no-plan {
        align-items: stretch;
    }

        .hr-insurance-no-plan .hr-insurance-inline-btn {
            margin-inline-start: 0;
            width: 100%;
        }
}

@media (max-width: 430px) {
    .hr-insurance-summary, .hr-insurance-inline-summary, .hr-insurance-report-summary {
        grid-template-columns: 1fr;
    }

        .hr-insurance-summary > div, .hr-insurance-report-summary > div {
            grid-column: auto !important;
        }

    .hr-insurance-person-title {
        gap: 9px;
    }

        .hr-insurance-person-title h2 {
            font-size: 15px;
        }

    .hr-insurance-card-head {
        gap: 10px;
        flex-direction: column;
    }

    .hr-insurance-card-head-actions {
        justify-content: flex-start;
    }
}

/* ??? ???? ???? ???? ????? ????? */
.hr-insurance-inline-section {
    box-sizing: border-box;
    overflow: hidden;
}

.hr-insurance-inline-people {
    grid-template-columns: repeat(4,minmax(0,1fr));
}

.hr-insurance-inline-person {
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 1050px) {
    .hr-insurance-inline-people {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
}

@media (max-width: 650px) {
    .hr-insurance-inline-section {
        padding: 14px;
        border-radius: 18px;
    }

    .hr-insurance-inline-people {
        grid-template-columns: 1fr;
    }

    .hr-insurance-inline-section .hr-doc-section-head {
        align-items: stretch;
    }

    .hr-insurance-inline-section .hr-insurance-inline-btn {
        width: 100%;
    }
}

/* Supplementary insurance - employee profile / bank accounts */
.hr-insurance-employee-card, .hr-insurance-bank-section {
    background: var(--card,#fff);
    border: 1px solid rgba(15,35,65,.08);
    border-radius: 22px;
    padding: 24px;
    margin: 18px 0;
    box-shadow: 0 10px 30px rgba(20,45,80,.06)
}

.hr-insurance-section-title {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 18px
}

    .hr-insurance-section-title > div > span {
        font-size: 12px;
        color: #718096
    }

    .hr-insurance-section-title h2 {
        margin: 4px 0 0;
        font-size: 20px
    }

    .hr-insurance-section-title > strong, .hr-insurance-section-title > span {
        font-size: 13px;
        color: #607086
    }

.hr-insurance-readonly-grid {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px
}

    .hr-insurance-readonly-grid > div {
        padding: 13px 14px;
        border: 1px solid #e8edf4;
        border-radius: 14px;
        background: #f9fbfd;
        min-width: 0
    }

        .hr-insurance-readonly-grid > div.wide {
            grid-column: span 2
        }

    .hr-insurance-readonly-grid span, .hr-insurance-contract-note span {
        display: block;
        font-size: 11px;
        color: #77869a;
        margin-bottom: 5px
    }

    .hr-insurance-readonly-grid b {
        font-size: 14px;
        overflow-wrap: anywhere
    }

.hr-insurance-contract-note {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 15px;
    background: #f3f7fc
}

    .hr-insurance-contract-note small {
        flex: 1 1 280px;
        color: #63748b
    }

.hr-insurance-bank-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 16px
}

.hr-insurance-bank-card {
    border: 1px solid #e2e9f2;
    border-radius: 18px;
    padding: 17px;
    background: #fbfcfe
}

.hr-insurance-bank-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px
}

    .hr-insurance-bank-card-head span {
        font-size: 11px;
        color: #7a8798;
        background: #eef2f7;
        border-radius: 20px;
        padding: 4px 9px
    }

.hr-insurance-bank-card .hr-doc-field {
    display: block;
    margin-bottom: 10px
}

.hr-insurance-date-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
    align-items: end;
    margin-top: 14px
}

.hr-insurance-date-help {
    padding: 13px 15px;
    border-radius: 13px;
    background: #fff8e7;
    color: #80652a;
    font-size: 12px;
    line-height: 1.8
}

.hr-insurance-dependent-meta {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px
}

    .hr-insurance-dependent-meta > div {
        padding: 12px;
        border-radius: 12px;
        background: #f7f9fc;
        border: 1px solid #e7ecf3
    }

    .hr-insurance-dependent-meta span {
        display: block;
        font-size: 11px;
        color: #7b8798;
        margin-bottom: 4px
    }

    .hr-insurance-dependent-meta b {
        font-size: 13px
    }

@media(max-width:1100px) {
    .hr-insurance-readonly-grid {
        grid-template-columns: repeat(3,minmax(0,1fr))
    }

    .hr-insurance-bank-grid {
        grid-template-columns: 1fr
    }

    .hr-insurance-readonly-grid > div.wide {
        grid-column: span 2
    }
}

@media(max-width:760px) {
    .hr-insurance-readonly-grid, .hr-insurance-date-grid, .hr-insurance-dependent-meta {
        grid-template-columns: 1fr
    }

        .hr-insurance-readonly-grid > div.wide {
            grid-column: auto
        }

    .hr-insurance-section-title {
        flex-direction: column
    }

    .hr-insurance-employee-card, .hr-insurance-bank-section {
        padding: 16px
    }
}

.hr-support-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px
}

.hr-insurance-table-wrap {
    background: #fff;
    border: 1px solid rgba(15,35,65,.08);
    border-radius: 20px;
    overflow: auto;
    box-shadow: 0 10px 30px rgba(20,45,80,.06)
}

.hr-insurance-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px
}

    .hr-insurance-table th, .hr-insurance-table td {
        padding: 14px 16px;
        text-align: right;
        border-bottom: 1px solid #edf1f5
    }

    .hr-insurance-table th {
        font-size: 12px;
        color: #748197;
        background: #f8fafc
    }

    .hr-insurance-table td {
        font-size: 13px
    }

    .hr-insurance-table tr:last-child td {
        border-bottom: 0
    }

/* ============ Organization structure / Job titles ============ */
.hr-job-page, .hr-job-form-page {
    max-width: 1380px;
    margin: 0 auto;
    padding: 26px
}

.hr-job-hero {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 28px 30px;
    border: 1px solid rgba(15,35,65,.08);
    border-radius: 24px;
    background: #f7fbfe;
    box-shadow: 0 14px 35px rgba(20,45,80,.07);
    margin-bottom: 18px
}

    .hr-job-hero h1, .hr-job-form-head h1 {
        margin: 5px 0 8px;
        color: #17233d;
        font-size: 28px
    }

    .hr-job-hero p, .hr-job-form-head p {
        margin: 0;
        color: #718096;
        line-height: 1.9
    }

.hr-job-hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    white-space: nowrap
}

.hr-job-primary-btn, .hr-job-secondary-btn, .hr-job-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 12px;
    padding: 11px 17px;
    font-weight: 700;
    border: 0;
    cursor: pointer;
    font-family: inherit
}

.hr-job-primary-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 8px 18px rgba(0,152,217,.2)
}

.hr-job-secondary-btn, .hr-job-back-btn {
    background: #fff;
    color: #334155;
    border: 1px solid #dfe7ef
}

.hr-job-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5ebf2;
    border-radius: 18px;
    padding: 16px 20px;
    margin-bottom: 14px
}

    .hr-job-toolbar strong {
        display: block;
        color: #26344e
    }

    .hr-job-toolbar span {
        display: block;
        color: #8290a3;
        font-size: 12px;
        margin-top: 5px
    }

.hr-job-year-form select, .hr-job-form select, .hr-job-form input {
    font: inherit;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #dbe3ec;
    border-radius: 11px;
    background: #fff;
    padding: 11px 12px;
    color: #26344e;
    outline: none
}

.hr-job-year-form select {
    min-width: 150px
}

.hr-job-stats {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    margin-bottom: 14px
}

    .hr-job-stats > div {
        background: #fff;
        border: 1px solid #e6edf4;
        border-radius: 17px;
        padding: 16px 18px
    }

    .hr-job-stats span {
        display: block;
        color: #7c8a9d;
        font-size: 12px
    }

    .hr-job-stats strong {
        display: block;
        font-size: 23px;
        color: #182640;
        margin-top: 6px
    }

.hr-job-grid {
    display: grid;
    grid-template-columns: .85fr 1.5fr;
    gap: 16px;
    align-items: start
}

.hr-job-card {
    background: #fff;
    border: 1px solid #e3eaf2;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(20,45,80,.05);
    overflow: hidden
}

.hr-job-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f5
}

    .hr-job-card-head small {
        color: var(--primary);
        font-weight: 700
    }

    .hr-job-card-head h2 {
        font-size: 18px;
        margin: 5px 0 0;
        color: #1e2c46
    }

    .hr-job-card-head > span {
        font-size: 12px;
        color: #8490a1;
        background: #f6f8fb;
        border-radius: 20px;
        padding: 6px 10px
    }

.hr-job-unit-list {
    padding: 8px
}

.hr-job-unit-row {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 11px;
    align-items: center;
    padding: 13px 10px;
    border-bottom: 1px solid #f0f3f7
}

    .hr-job-unit-row:last-child {
        border-bottom: 0
    }

.hr-job-unit-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #eefaff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800
}

.hr-job-unit-main strong {
    display: block;
    color: #27354e
}

.hr-job-unit-main span {
    display: block;
    color: #8a96a7;
    font-size: 11px;
    margin-top: 4px
}

.hr-job-active, .hr-job-inactive {
    font-size: 11px;
    border-radius: 20px;
    padding: 5px 9px;
    white-space: nowrap
}

.hr-job-active {
    background: #eaf9f0;
    color: #16834a
}

.hr-job-inactive {
    background: #f3f4f6;
    color: #7b8491
}

.hr-job-table-wrap {
    overflow: auto
}

.hr-job-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px
}

    .hr-job-table th, .hr-job-table td {
        padding: 14px 15px;
        text-align: right;
        border-bottom: 1px solid #edf1f5
    }

    .hr-job-table th {
        background: #f8fafc;
        color: #78869a;
        font-size: 11px
    }

    .hr-job-table td {
        font-size: 13px;
        color: #39465b
    }

    .hr-job-table tbody tr:hover {
        background: #fbfdff
    }

.hr-job-grade {
    display: inline-flex;
    min-width: 32px;
    justify-content: center;
    background: #eefaff;
    color: #087fb3;
    border-radius: 8px;
    padding: 5px 8px;
    font-weight: 800
}

.hr-job-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    white-space: nowrap
}

    .hr-job-actions a, .hr-job-actions button {
        font: inherit;
        font-size: 11px;
        border: 0;
        background: none;
        color: #147da9;
        text-decoration: none;
        cursor: pointer;
        padding: 4px
    }

    .hr-job-actions button {
        color: #c44d59
    }

    .hr-job-actions form {
        margin: 0
    }

.hr-job-empty {
    text-align: center !important;
    color: #8793a4 !important;
    padding: 35px !important
}

.hr-job-form-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px
}

.hr-job-form {
    background: #fff;
    border: 1px solid #e2e9f1;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 12px 30px rgba(20,45,80,.06)
}

.hr-job-form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 17px
}

.hr-job-form label {
    display: block
}

    .hr-job-form label > span {
        display: block;
        font-size: 12px;
        color: #64748b;
        font-weight: 700;
        margin-bottom: 7px
    }

.hr-job-form input:focus, .hr-job-form select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,152,217,.08)
}

.hr-job-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5
}

    .hr-job-form-footer > span {
        font-size: 12px;
        color: #8793a4
    }

@media(max-width:950px) {
    .hr-job-grid {
        grid-template-columns: 1fr
    }

    .hr-job-stats {
        grid-template-columns: repeat(2,1fr)
    }

    .hr-job-hero {
        align-items: flex-start;
        flex-direction: column
    }

    .hr-job-hero-actions {
        width: 100%
    }
}

@media(max-width:600px) {
    .hr-job-page, .hr-job-form-page {
        padding: 15px
    }

    .hr-job-form-grid, .hr-job-stats {
        grid-template-columns: 1fr
    }

    .hr-job-toolbar, .hr-job-form-footer {
        align-items: stretch;
        flex-direction: column
    }

    .hr-job-year-form select {
        width: 100%
    }

    .hr-job-form-head {
        align-items: flex-start;
        flex-direction: column
    }

    .hr-job-primary-btn, .hr-job-secondary-btn, .hr-job-back-btn {
        width: 100%
    }

    .hr-job-unit-row {
        grid-template-columns: 42px 1fr
    }

        .hr-job-unit-row > .hr-job-active, .hr-job-unit-row > .hr-job-inactive {
            display: none
        }
}


/* Organization / annual base salary */
.hr-job-salary-card {
    grid-column: 1 / -1;
}

.hr-job-salary {
    font-weight: 700;
    white-space: nowrap;
}

.hr-job-salary-card .hr-job-table th, .hr-job-salary-card .hr-job-table td {
    white-space: nowrap;
}

@media (max-width: 900px) {
    .hr-job-salary-card {
        grid-column: auto;
    }

        .hr-job-salary-card .hr-job-table-wrap {
            overflow-x: auto;
        }
}


/* =========================================================
   Work Calendar / Monthly Required Hours
   ??? ??? ?? ?????? ???? hr-dashboard.css ????? ??? ???.
   ========================================================= */

.hr-work-calendar-page {
    min-height: 100%;
}

.hr-wc-container {
    width: min(100% - 40px, 1500px);
    margin: 0 auto;
    padding: 26px 0 50px;
}

.hr-wc-alert {
    border-radius: 15px;
    padding: 13px 17px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-size: 13px;
    line-height: 1.8;
}

.hr-wc-alert-success {
    background: #eefbf4;
    border-color: #cceedd;
    color: #147747;
}

.hr-wc-alert-error {
    background: #fff2f3;
    border-color: #f2d0d4;
    color: #a13c49;
}

.hr-wc-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: stretch;
    margin-bottom: 18px;
}

    .hr-wc-hero > div:first-child {
        background: linear-gradient(135deg, #f7fbff, #eef9ff);
        border: 1px solid #dcebf5;
        border-radius: 24px;
        padding: 30px 32px;
    }

.hr-wc-eyebrow {
    display: inline-flex;
    padding: 6px 11px;
    border-radius: 30px;
    background: #e6f6fd;
    color: #087da9;
    font-size: 11px;
    font-weight: 800;
}

.hr-wc-hero h1 {
    margin: 12px 0 8px;
    color: #16243d;
    font-size: 29px;
}

.hr-wc-hero p {
    margin: 0;
    max-width: 850px;
    color: #6e7d91;
    line-height: 2;
    font-size: 13px;
}

.hr-wc-result-card {
    background: #172b49;
    color: #fff;
    border-radius: 24px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 18px 38px rgba(18, 43, 73, .13);
}

    .hr-wc-result-card span {
        color: #b9cbe0;
        font-size: 12px;
    }

    .hr-wc-result-card strong {
        font-size: 30px;
        margin: 8px 0 5px;
    }

    .hr-wc-result-card small {
        color: #d4e0ed;
        font-size: 11px;
    }

.hr-wc-card {
    background: #fff;
    border: 1px solid #e3eaf2;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(20, 45, 80, .055);
    overflow: hidden;
    margin-bottom: 18px;
}

.hr-wc-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 22px 24px;
    border-bottom: 1px solid #edf1f5;
}

    .hr-wc-card-head > div:first-child > span {
        color: #1682ad;
        font-size: 11px;
        font-weight: 800;
    }

    .hr-wc-card-head h2 {
        margin: 5px 0 5px;
        color: #1e2c46;
        font-size: 18px;
    }

    .hr-wc-card-head p {
        margin: 0;
        color: #7c8a9c;
        font-size: 12px;
        line-height: 1.9;
    }

.hr-wc-card-head-inline {
    align-items: center;
}

.hr-wc-week-summary {
    min-width: 125px;
    text-align: center;
    background: #f6faff;
    border: 1px solid #e3eef7;
    border-radius: 15px;
    padding: 11px 14px;
}

    .hr-wc-week-summary strong,
    .hr-wc-week-summary span {
        display: block;
    }

    .hr-wc-week-summary strong {
        color: #087fa9;
        font-size: 16px;
    }

    .hr-wc-week-summary span {
        margin-top: 3px;
        color: #8794a5;
        font-size: 10px;
    }

.hr-wc-form {
    padding: 22px 24px 24px;
}

.hr-wc-week-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.hr-wc-day-card {
    min-width: 0;
    border: 1px solid #e4ebf2;
    border-radius: 17px;
    padding: 13px;
    background: #fbfcfe;
    transition: .18s ease;
}

    .hr-wc-day-card.is-working {
        background: #f8fcff;
        border-color: #cfe8f4;
    }

    .hr-wc-day-card.is-off {
        background: #f7f8fa;
    }

.hr-wc-day-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    margin-bottom: 13px;
}

    .hr-wc-day-title strong {
        color: #26364f;
        font-size: 13px;
    }

.hr-wc-switch {
    display: inline-flex;
    cursor: pointer;
}

    .hr-wc-switch input {
        display: none;
    }

    .hr-wc-switch span {
        position: relative;
        display: block;
        width: 34px;
        height: 19px;
        border-radius: 30px;
        background: #cbd4de;
        transition: .18s ease;
    }

        .hr-wc-switch span::after {
            content: "";
            position: absolute;
            top: 3px;
            right: 3px;
            width: 13px;
            height: 13px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
            transition: .18s ease;
        }

    .hr-wc-switch input:checked + span {
        background: #1595c3;
    }

        .hr-wc-switch input:checked + span::after {
            right: 18px;
        }

.hr-wc-time-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

    .hr-wc-time-fields label,
    .hr-wc-period-form label,
    .hr-wc-inline-form label,
    .hr-wc-exception-form label {
        display: block;
    }

        .hr-wc-time-fields label > span,
        .hr-wc-period-form label > span,
        .hr-wc-inline-form label > span,
        .hr-wc-exception-form label > span {
            display: block;
            margin-bottom: 5px;
            color: #78869a;
            font-size: 10px;
            font-weight: 700;
        }

    .hr-wc-time-fields input,
    .hr-wc-period-form input,
    .hr-wc-period-form select,
    .hr-wc-inline-form input,
    .hr-wc-exception-form input,
    .hr-wc-exception-form select {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        border: 1px solid #dbe4ed;
        border-radius: 10px;
        background: #fff;
        color: #28374e;
        padding: 9px 9px;
        font: inherit;
        font-size: 12px;
        outline: none;
    }

        .hr-wc-time-fields input:focus,
        .hr-wc-period-form input:focus,
        .hr-wc-period-form select:focus,
        .hr-wc-inline-form input:focus,
        .hr-wc-exception-form input:focus,
        .hr-wc-exception-form select:focus {
            border-color: #42a9ce;
            box-shadow: 0 0 0 3px rgba(30, 156, 199, .08);
        }

.hr-wc-day-card.is-off .hr-wc-time-fields input {
    background: #f0f2f5;
    color: #a1aab5;
}

.hr-wc-day-foot {
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px solid #edf1f5;
    color: #8491a2;
    font-size: 10px;
    text-align: center;
}

.hr-wc-day-card.is-working .hr-wc-day-foot {
    color: #1380aa;
    font-weight: 700;
}

.hr-wc-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}

    .hr-wc-form-footer > span {
        color: #8794a5;
        font-size: 11px;
        line-height: 1.8;
    }

.hr-wc-primary-btn,
.hr-wc-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 11px;
    padding: 11px 17px;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.hr-wc-primary-btn {
    color: #fff;
    background: #128ebc;
    box-shadow: 0 8px 18px rgba(18, 142, 188, .18);
}

    .hr-wc-primary-btn:hover {
        background: #0e7da7;
    }

.hr-wc-secondary-btn {
    color: #176b89;
    background: #eef8fc;
    border: 1px solid #d1ebf5;
}

    .hr-wc-secondary-btn:hover {
        background: #e3f4fa;
    }

.hr-wc-period-form {
    display: flex;
    align-items: end;
    gap: 9px;
    min-width: 430px;
}

    .hr-wc-period-form label {
        min-width: 120px;
    }

    .hr-wc-period-form button {
        height: 42px;
    }

.hr-wc-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) 280px;
    gap: 18px;
    padding: 20px 24px 24px;
}

.hr-wc-calendar {
    min-width: 0;
}

.hr-wc-calendar-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
}

    .hr-wc-calendar-title strong,
    .hr-wc-calendar-title span {
        display: block;
    }

    .hr-wc-calendar-title strong {
        color: #1d2c46;
        font-size: 17px;
    }

    .hr-wc-calendar-title span {
        margin-top: 4px;
        color: #8794a5;
        font-size: 11px;
    }

.hr-wc-calendar-weekdays,
.hr-wc-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 7px;
}

.hr-wc-calendar-weekdays {
    margin-bottom: 7px;
}

    .hr-wc-calendar-weekdays > div {
        padding: 8px 4px;
        border-radius: 9px;
        background: #f7f9fb;
        color: #7a8799;
        text-align: center;
        font-size: 10px;
        font-weight: 800;
    }

.hr-wc-calendar-day,
.hr-wc-calendar-empty {
    min-height: 98px;
    border-radius: 13px;
}

.hr-wc-calendar-empty {
    background: transparent;
}

.hr-wc-calendar-day {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 9px;
    border: 1px solid #e5ebf1;
    background: #fff;
    overflow: hidden;
}

.hr-wc-calendar-day-number {
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #f1f5f8;
    color: #34435a;
    font-size: 11px;
    font-weight: 800;
}

.hr-wc-calendar-day-name {
    margin-top: 5px;
    color: #94a0af;
    font-size: 9px;
}

.hr-wc-calendar-day strong {
    margin-top: auto;
    color: #34445b;
    font-size: 10px;
}

.hr-wc-calendar-day small {
    display: block;
    width: 100%;
    margin-top: 3px;
    color: #8290a1;
    font-size: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-wc-calendar-day.working-day {
    border-color: #d5eaf3;
    background: #f9fdff;
}

    .hr-wc-calendar-day.working-day .hr-wc-calendar-day-number {
        background: #e6f6fb;
        color: #087da7;
    }

.hr-wc-calendar-day.official-holiday {
    border-color: #f3d2d7;
    background: #fff7f8;
}

    .hr-wc-calendar-day.official-holiday .hr-wc-calendar-day-number {
        background: #f9e2e5;
        color: #b33d4d;
    }

.hr-wc-calendar-day.exception-day {
    border-color: #e8d9ad;
    background: #fffaf0;
}

    .hr-wc-calendar-day.exception-day .hr-wc-calendar-day-number {
        background: #f7ebc9;
        color: #927126;
    }

.hr-wc-calendar-day.weekly-off {
    background: #f7f8fa;
}

.hr-wc-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 13px;
    color: #7e8b9b;
    font-size: 10px;
}

    .hr-wc-legend span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }

    .hr-wc-legend i {
        width: 9px;
        height: 9px;
        display: inline-block;
        border-radius: 50%;
    }

        .hr-wc-legend i.working {
            background: #4caaca;
        }

        .hr-wc-legend i.official {
            background: #d26b78;
        }

        .hr-wc-legend i.exception {
            background: #c5a34e;
        }

        .hr-wc-legend i.off {
            background: #b7bec7;
        }

.hr-wc-month-summary {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.hr-wc-summary-main {
    padding: 20px;
    border-radius: 17px;
    background: #172b49;
    color: #fff;
}

    .hr-wc-summary-main span,
    .hr-wc-summary-main strong,
    .hr-wc-summary-main small {
        display: block;
    }

    .hr-wc-summary-main span {
        color: #c1d0df;
        font-size: 11px;
    }

    .hr-wc-summary-main strong {
        margin: 8px 0 2px;
        font-size: 26px;
    }

    .hr-wc-summary-main small {
        color: #aebfd1;
        font-size: 10px;
    }

.hr-wc-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid #e6ecf2;
    border-radius: 13px;
    background: #fbfcfe;
}

    .hr-wc-summary-row span {
        color: #7c8a9b;
        font-size: 11px;
    }

    .hr-wc-summary-row strong {
        color: #293950;
        font-size: 14px;
    }

.hr-wc-wide-btn {
    width: 100%;
}

.hr-wc-saved-box {
    margin-top: 5px;
    padding: 12px 14px;
    border-radius: 13px;
    background: #eefaf4;
    border: 1px solid #d2efdf;
}

    .hr-wc-saved-box span,
    .hr-wc-saved-box strong,
    .hr-wc-saved-box small {
        display: block;
    }

    .hr-wc-saved-box span {
        color: #60826f;
        font-size: 10px;
    }

    .hr-wc-saved-box strong {
        margin-top: 4px;
        color: #18734b;
        font-size: 14px;
    }

    .hr-wc-saved-box small {
        margin-top: 3px;
        color: #769383;
        font-size: 9px;
    }

.hr-wc-management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

    .hr-wc-management-grid .hr-wc-card {
        margin-bottom: 0;
    }

.hr-wc-inline-form,
.hr-wc-exception-form {
    display: flex;
    align-items: end;
    gap: 9px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf1f5;
}

    .hr-wc-inline-form label:not(.hr-wc-grow) {
        width: 110px;
    }

    .hr-wc-exception-form label:not(.hr-wc-grow) {
        width: 105px;
    }

.hr-wc-grow {
    flex: 1 1 auto;
    min-width: 130px;
}

/* =========================================================
   Work Calendar - Exception Form
   ??? UI ??? ????????
========================================================= */




.hr-wc-list {
    padding: 7px 20px 14px;
}

.hr-wc-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #edf1f5;
}

    .hr-wc-list-row:last-child {
        border-bottom: 0;
    }

    .hr-wc-list-row > div:first-child {
        min-width: 0;
    }

    .hr-wc-list-row strong,
    .hr-wc-list-row span,
    .hr-wc-list-row small {
        display: block;
    }

    .hr-wc-list-row strong {
        color: #27374f;
        font-size: 12px;
    }

    .hr-wc-list-row span {
        margin-top: 3px;
        color: #788699;
        font-size: 11px;
    }

    .hr-wc-list-row small {
        margin-top: 4px;
        color: #98a2ae;
        font-size: 9px;
    }

.hr-wc-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.hr-wc-badge {
    display: inline-flex !important;
    border-radius: 20px;
    padding: 5px 8px;
    font-size: 9px !important;
    margin: 0 !important;
}

    .hr-wc-badge.official {
        background: #fff0f2;
        color: #b44553 !important;
    }

    .hr-wc-badge.company {
        background: #eef8fc;
        color: #117b9e !important;
    }

.hr-wc-delete-btn {
    border: 0;
    background: transparent;
    color: #b44a56;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    padding: 4px;
}

.hr-wc-empty {
    padding: 18px 0;
    color: #8b97a5;
    font-size: 11px;
    text-align: center;
}

.hr-wc-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid #dcecf4;
    border-radius: 17px;
    background: #f5fbfe;
}

.hr-wc-info-icon {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff2f9;
    color: #087da5;
    font-weight: 800;
}

.hr-wc-info-box strong {
    color: #294057;
    font-size: 12px;
}

.hr-wc-info-box p {
    margin: 5px 0 0;
    color: #708094;
    font-size: 11px;
    line-height: 1.9;
}

@media (max-width: 1200px) {
    .hr-wc-week-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hr-wc-calendar-layout {
        grid-template-columns: 1fr;
    }

    .hr-wc-month-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-wc-summary-main,
    .hr-wc-calculate-form,
    .hr-wc-saved-box {
        grid-column: 1 / -1;
    }

    .hr-wc-management-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 850px) {
    .hr-wc-container {
        width: min(100% - 24px, 1500px);
        padding-top: 15px;
    }

    .hr-wc-hero {
        grid-template-columns: 1fr;
    }

    .hr-wc-card-head,
    .hr-wc-card-head-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-wc-period-form {
        min-width: 0;
        width: 100%;
    }

        .hr-wc-period-form label {
            flex: 1;
        }

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

    .hr-wc-inline-form,
    .hr-wc-exception-form {
        flex-wrap: wrap;
    }

        .hr-wc-inline-form label:not(.hr-wc-grow),
        .hr-wc-exception-form label:not(.hr-wc-grow) {
            width: calc(50% - 5px);
        }

    .hr-wc-grow {
        flex-basis: 100%;
    }
}

@media (max-width: 650px) {
    .hr-wc-hero > div:first-child,
    .hr-wc-result-card {
        padding: 20px;
    }

    .hr-wc-hero h1 {
        font-size: 23px;
    }

    .hr-wc-form,
    .hr-wc-calendar-layout {
        padding: 16px;
    }

    .hr-wc-week-grid {
        grid-template-columns: 1fr;
    }

    .hr-wc-form-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-wc-primary-btn,
    .hr-wc-secondary-btn {
        width: 100%;
    }

    .hr-wc-period-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .hr-wc-period-form button {
            grid-column: 1 / -1;
        }

    .hr-wc-calendar-weekdays,
    .hr-wc-calendar-days {
        gap: 4px;
    }

    .hr-wc-calendar-day,
    .hr-wc-calendar-empty {
        min-height: 76px;
    }

    .hr-wc-calendar-day {
        padding: 6px;
    }

    .hr-wc-calendar-day-name {
        display: none;
    }

    .hr-wc-calendar-day strong {
        font-size: 8px;
    }

    .hr-wc-calendar-day small {
        font-size: 7px;
    }

    .hr-wc-month-summary {
        grid-template-columns: 1fr;
    }

    .hr-wc-summary-main,
    .hr-wc-calculate-form,
    .hr-wc-saved-box {
        grid-column: auto;
    }

    .hr-wc-inline-form,
    .hr-wc-exception-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .hr-wc-inline-form label:not(.hr-wc-grow),
        .hr-wc-exception-form label:not(.hr-wc-grow) {
            width: auto;
        }

        .hr-wc-inline-form .hr-wc-grow,
        .hr-wc-exception-form .hr-wc-grow,
        .hr-wc-inline-form button,
        .hr-wc-exception-form button {
            grid-column: 1 / -1;
        }
}

/* Work Calendar - exception validation and partial closure */
.hr-wc-duration-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .hr-wc-duration-input input {
        flex: 1;
        min-width: 0;
    }

    .hr-wc-duration-input small {
        white-space: nowrap;
        color: #64748b;
    }

.exception-closed-minutes-field {
    min-width: 150px;
}



/* =========================================================
   Payroll module (???? ? ??????) ? ????????? ?? hr-job-* / hr-emp-*
   ???? ??????? ?? ?????? + ???????? ???? ????? ? ?????? ?????
   ========================================================= */

.hr-pay-page {
    padding: 22px 26px 40px;
}

.hr-pay-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 16px 18px;
    box-shadow: 0 10px 26px rgba(20,45,80,.05);
}

.hr-pay-employee-chip {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .hr-pay-employee-chip strong {
        display: block;
        color: var(--text);
        font-size: 14.5px;
    }

    .hr-pay-employee-chip span {
        display: block;
        color: var(--text-muted);
        font-size: 11.5px;
        margin-top: 4px;
    }

.hr-pay-period-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

    .hr-pay-period-form label {
        display: flex;
        flex-direction: column;
        gap: 6px;
        font-size: 11.5px;
        color: var(--text-muted);
        font-weight: 700;
    }

    .hr-pay-period-form select {
        font: inherit;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
        color: var(--text);
        padding: 10px 12px;
        min-width: 130px;
        outline: none;
    }

.hr-pay-grid-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.hr-pay-result-card {
    grid-column: 1 / -1;
}

.hr-pay-card-body {
    padding: 20px;
}

.hr-pay-current-job {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
    background: var(--tint);
    border-radius: 14px;
    padding: 12px 14px;
}

    .hr-pay-current-job strong {
        color: var(--text);
        font-size: 13.5px;
    }

.hr-pay-empty-note {
    color: var(--text-muted);
    font-size: 12px;
    background: color-mix(in srgb, var(--danger) 6%, var(--surface));
    border: 1px dashed color-mix(in srgb, var(--danger) 25%, var(--border));
    border-radius: 12px;
    padding: 12px 14px;
    margin: 8px 0 14px;
}

.hr-pay-inline-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

    .hr-pay-inline-form select {
        flex: 1;
        min-width: 220px;
        font: inherit;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
        color: var(--text);
        padding: 11px 12px;
        outline: none;
    }

.hr-pay-attendance-form {
    margin: 0;
    border: 0;
    box-shadow: none;
    padding: 20px;
    border-radius: 0;
}

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

.hr-pay-notes {
    display: block;
    margin-top: 16px;
}

    .hr-pay-notes > span {
        display: block;
        font-size: 12px;
        color: var(--text-muted);
        font-weight: 700;
        margin-bottom: 7px;
    }

    .hr-pay-notes textarea {
        width: 100%;
        box-sizing: border-box;
        font: inherit;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
        color: var(--text);
        padding: 11px 12px;
        outline: none;
        resize: vertical;
    }

.hr-pay-warnings {
    margin: 20px;
    background: color-mix(in srgb, var(--danger) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--danger) 20%, var(--border));
    border-radius: 14px;
    padding: 14px 18px;
    color: var(--danger);
    font-size: 12.5px;
}

    .hr-pay-warnings ul {
        margin: 8px 0 0;
        padding-inline-start: 18px;
    }

    .hr-pay-warnings li {
        margin-bottom: 4px;
    }

.hr-pay-summary-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 12px;
    padding: 20px 20px 0;
}

.hr-pay-stat {
    background: var(--tint);
    border-radius: 16px;
    padding: 14px 16px;
}

    .hr-pay-stat span {
        display: block;
        color: var(--text-muted);
        font-size: 11.5px;
    }

    .hr-pay-stat strong {
        display: block;
        color: var(--text);
        font-size: 18px;
        margin-top: 6px;
    }

.hr-pay-breakdown {
    padding: 20px;
}

.hr-pay-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text);
}

    .hr-pay-row:last-child {
        border-bottom: 0;
    }

    .hr-pay-row small {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
        font-weight: 400;
        margin-top: 3px;
    }

    .hr-pay-row strong {
        white-space: nowrap;
        font-size: 14px;
    }

.hr-pay-total {
    margin-top: 6px;
    border-top: 2px solid var(--primary);
    border-bottom: 0;
    padding-top: 16px;
}

    .hr-pay-total span {
        font-weight: 800;
        color: var(--text);
    }

    .hr-pay-total strong {
        font-size: 19px;
        color: var(--primary);
    }

/* Support page: seniority rates + leave settings */
.hr-pay-settings-grid, .hr-pay-grid {
    grid-template-columns: 1.3fr .9fr;
}

.hr-pay-copy-bar, .hr-pay-copy-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: var(--tint);
    border-radius: 14px;
    padding: 12px 16px;
    margin: 0 20px 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.hr-pay-copy-form {
    margin: 14px 20px 0;
}

    .hr-pay-copy-bar select, .hr-pay-copy-form select {
        font: inherit;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        color: var(--text);
        padding: 8px 10px;
    }

.hr-pay-settings-card .hr-job-form, .hr-pay-leave-card .hr-job-form {
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

@media (max-width: 1150px) {
    .hr-pay-grid-main, .hr-pay-settings-grid, .hr-pay-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-result-card {
        grid-column: auto;
    }
}

@media (max-width: 900px) {
    .hr-pay-summary-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .hr-pay-attendance-grid {
        grid-template-columns: repeat(2,1fr);
    }
}

@media (max-width: 640px) {
    .hr-pay-page {
        padding: 16px;
    }

    .hr-pay-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-pay-period-form {
        justify-content: space-between;
    }

        .hr-pay-period-form select {
            min-width: 0;
            flex: 1;
        }

    .hr-pay-summary-grid, .hr-pay-attendance-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-pay-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

        .hr-pay-row strong {
            align-self: flex-end;
        }

    .hr-pay-copy-bar, .hr-pay-copy-form {
        flex-direction: column;
        align-items: stretch;
        margin-left: 15px;
        margin-right: 15px;
    }
}

@media (max-width: 420px) {
    .hr-pay-current-job {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   ???? ? ?????? - ??????? ????? ???
========================================================= */
.hr-pay-page,
.hr-pay-settings-page {
    width: min(1500px, calc(100% - 32px));
    margin: 28px auto 60px;
}

.hr-pay-step-card {
    margin-bottom: 20px;
}

.hr-pay-period-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

    .hr-pay-period-form label {
        min-width: 220px;
        display: flex;
        flex-direction: column;
        gap: 7px;
        font-weight: 700;
    }

        .hr-pay-period-form label span {
            font-size: 12px;
            color: var(--hr-muted,#778);
        }

    .hr-pay-period-form select,
    .hr-pay-inline-form select,
    .hr-pay-settings-page input,
    .hr-pay-settings-page select {
        min-height: 46px;
        border-radius: 12px;
        border: 1px solid var(--hr-border,#dfe4ea);
        background: var(--hr-surface,#fff);
        padding: 0 13px;
        font: inherit;
        width: 100%;
        box-sizing: border-box;
    }

.hr-pay-inline-form {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    margin-top: 16px;
}

.hr-pay-current-job {
    min-height: 58px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid var(--hr-border,#e6e9ef);
    border-radius: 14px;
    background: var(--hr-surface-soft,#f8fafc);
}

.hr-job-grade {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(20,184,166,.1);
    font-size: 12px;
}

.hr-pay-empty-note {
    color: var(--hr-muted,#7b8492);
}

.hr-pay-attendance-grid {
    grid-template-columns: repeat(3,minmax(180px,1fr));
}

    .hr-pay-attendance-grid input,
    .hr-pay-attendance-grid select {
        min-height: 48px;
    }

.hr-pay-notes {
    display: block;
    margin-top: 15px;
}

    .hr-pay-notes span {
        display: block;
        margin-bottom: 7px;
        font-weight: 700;
    }

    .hr-pay-notes textarea {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--hr-border,#dfe4ea);
        border-radius: 12px;
        padding: 11px 13px;
        font: inherit;
        resize: vertical;
    }

.hr-pay-leave-summary {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
    margin-bottom: 18px;
}

    .hr-pay-leave-summary > div {
        padding: 16px;
        border: 1px solid var(--hr-border,#e6e9ef);
        border-radius: 14px;
        background: var(--hr-surface-soft,#f8fafc);
    }

    .hr-pay-leave-summary span {
        display: block;
        color: var(--hr-muted,#778);
        font-size: 12px;
        margin-bottom: 7px;
    }

    .hr-pay-leave-summary strong {
        font-size: 20px;
    }

.hr-pay-annual-table {
    min-width: 980px;
}

    .hr-pay-annual-table td, .hr-pay-annual-table th {
        white-space: nowrap;
        text-align: center;
    }

.hr-pay-empty-month {
    opacity: .58;
}

.hr-pay-report-note {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(59,130,246,.07);
    color: var(--hr-muted,#697386);
    font-size: 13px;
}

.hr-pay-warnings {
    margin: 14px 0;
    padding: 15px 18px;
    border-radius: 14px;
    background: rgba(245,158,11,.09);
    border: 1px solid rgba(245,158,11,.2);
}

    .hr-pay-warnings ul {
        margin: 8px 0 0;
        padding-right: 20px;
    }

.hr-pay-bulk-help {
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    background: rgba(20,184,166,.08);
    color: var(--hr-muted,#667085);
}

.hr-pay-bulk-table-wrap {
    max-height: 620px;
    overflow: auto;
    border: 1px solid var(--hr-border,#e6e9ef);
    border-radius: 14px;
}

.hr-pay-bulk-table {
    min-width: 600px;
}

    .hr-pay-bulk-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--hr-surface,#fff);
    }

    .hr-pay-bulk-table td {
        vertical-align: middle;
    }

    .hr-pay-bulk-table input[type=number] {
        min-height: 42px;
    }

    .hr-pay-bulk-table input[type=checkbox] {
        width: 20px;
        height: 20px;
        accent-color: #14b8a6;
        vertical-align: middle;
    }

.hr-pay-settings-grid {
    align-items: start;
}

    .hr-pay-settings-grid .hr-job-card {
        min-width: 0;
    }

@media (max-width: 900px) {
    .hr-pay-page, .hr-pay-settings-page {
        width: min(100% - 20px, 1500px);
    }

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

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

    .hr-pay-period-form {
        width: 100%;
    }

        .hr-pay-period-form label {
            min-width: 0;
            width: 100%;
        }
}

@media (max-width: 640px) {
    .hr-pay-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .hr-pay-attendance-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-leave-summary {
        grid-template-columns: 1fr;
    }

    .hr-pay-current-job {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-pay-bulk-table-wrap {
        max-height: 55vh;
    }
}

/* Payroll - daily work calendar */
.hr-pay-toolbar {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.hr-pay-period-form {
    display: flex;
    align-items: end;
    gap: 12px;
    min-width: 330px;
    padding: 16px;
    border: 1px solid rgba(24, 86, 150, .10);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(30, 75, 120, .07);
}

    .hr-pay-period-form label,
    .hr-pay-job-select,
    .hr-pay-attendance-extra label,
    .hr-pay-day-card label {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

        .hr-pay-period-form label span,
        .hr-pay-job-select span,
        .hr-pay-attendance-extra span,
        .hr-pay-day-card label span,
        .hr-pay-notes span {
            font-size: 12px;
            font-weight: 700;
            color: #60758a;
        }

    .hr-pay-period-form select,
    .hr-pay-job-form select,
    .hr-pay-attendance-extra select,
    .hr-pay-attendance-extra input,
    .hr-pay-day-card select,
    .hr-pay-notes textarea {
        border: 1px solid #dce6ef;
        border-radius: 12px;
        background: #fbfdff;
        color: #183247;
        min-height: 43px;
        padding: 9px 12px;
        outline: none;
        transition: .2s ease;
    }

        .hr-pay-period-form select:focus,
        .hr-pay-job-form select:focus,
        .hr-pay-attendance-extra select:focus,
        .hr-pay-attendance-extra input:focus,
        .hr-pay-day-card select:focus,
        .hr-pay-notes textarea:focus {
            border-color: #5ca4df;
            box-shadow: 0 0 0 3px rgba(62, 151, 220, .10);
        }

.hr-pay-job-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(230px, 290px);
    gap: 16px;
    margin: 0 0 18px;
}

.hr-pay-current-job {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 104px;
    padding: 20px;
    border: 1px solid #e2eaf1;
    border-radius: 16px;
    background: #f9fbfd;
}

    .hr-pay-current-job strong {
        color: #173a55;
        font-size: 16px;
    }

.hr-pay-base-salary-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 104px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f0f8ff, #f8fcff);
    border: 1px solid #d9eafa;
    text-align: center;
}

    .hr-pay-base-salary-card span {
        font-size: 12px;
        color: #678096;
    }

    .hr-pay-base-salary-card strong {
        margin-top: 5px;
        font-size: 21px;
        color: #1468a5;
        direction: ltr;
    }

    .hr-pay-base-salary-card small {
        color: #6f8394;
    }

.hr-pay-job-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid #e7edf3;
}

    .hr-pay-job-form .hr-job-secondary-btn {
        min-height: 43px;
        white-space: nowrap;
    }

.hr-pay-attendance-info,
.hr-pay-day-summary,
.hr-pay-leave-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

    .hr-pay-attendance-info > div,
    .hr-pay-day-summary > div,
    .hr-pay-leave-summary > div {
        padding: 14px 16px;
        border: 1px solid #e3ebf2;
        border-radius: 14px;
        background: #fbfdff;
    }

    .hr-pay-attendance-info span,
    .hr-pay-day-summary span,
    .hr-pay-leave-summary span {
        display: block;
        color: #71869a;
        font-size: 12px;
        margin-bottom: 5px;
    }

    .hr-pay-attendance-info strong,
    .hr-pay-day-summary strong,
    .hr-pay-leave-summary strong {
        color: #183b57;
        font-size: 17px;
    }

.hr-pay-calendar-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-pay-day-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid #e1e9f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(26, 70, 110, .04);
}

    .hr-pay-day-card.is-working {
        border-top: 3px solid #4b9bd4;
    }

    .hr-pay-day-card.is-off {
        background: #f5f7f9;
        border-style: dashed;
        opacity: .88;
    }

.hr-pay-day-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 13px;
}

.hr-pay-day-number {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: #edf6fd;
    color: #196da7;
    font-size: 16px;
    font-weight: 800;
}

.hr-pay-day-head strong,
.hr-pay-day-head small {
    display: block;
}

.hr-pay-day-head strong {
    color: #24445d;
    font-size: 13px;
}

.hr-pay-day-head small {
    margin-top: 3px;
    color: #8294a3;
    font-size: 11px;
}

.hr-pay-day-hours {
    margin-top: 9px;
    font-size: 11px;
    color: #74899b;
}

    .hr-pay-day-hours strong {
        color: #3979a9;
    }

.hr-pay-off-label {
    min-height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #edf0f3;
    color: #788997;
    font-size: 12px;
    font-weight: 700;
}

.hr-pay-day-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 16px;
}

.hr-pay-attendance-extra {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    margin-top: 12px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid #e5edf4;
}

.hr-pay-notes {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 14px;
}

    .hr-pay-notes textarea {
        resize: vertical;
        min-height: 76px;
    }

.hr-pay-day-form .hr-job-form-footer {
    margin-top: 15px;
}

.hr-pay-leave-summary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hr-pay-annual-table th,
.hr-pay-annual-table td {
    white-space: nowrap;
}

.hr-pay-annual-table td {
    vertical-align: middle;
}

.hr-pay-report-note {
    margin-top: 12px;
    color: #71879a;
    font-size: 12px;
    line-height: 1.9;
}

.hr-pay-result-card .hr-pay-summary-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.hr-pay-stat strong {
    direction: rtl;
}

@media (max-width: 1200px) {
    .hr-pay-calendar-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-pay-result-card .hr-pay-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hr-pay-leave-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-pay-toolbar,
    .hr-pay-job-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .hr-pay-period-form {
        min-width: 0;
        width: 100%;
    }

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

    .hr-pay-attendance-info,
    .hr-pay-day-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hr-pay-period-form,
    .hr-pay-job-form,
    .hr-pay-attendance-extra {
        grid-template-columns: 1fr;
        display: grid;
    }

    .hr-pay-calendar-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-attendance-info,
    .hr-pay-day-summary,
    .hr-pay-leave-summary,
    .hr-pay-result-card .hr-pay-summary-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hr-pay-employee-chip {
        width: 100%;
    }

    .hr-pay-annual-table {
        min-width: 760px;
    }
}


/* =========================================================
   Payroll leave rules + annual attendance report
   Family style with hr-dashboard
   ========================================================= */

.hr-pay-rules-intro {
    margin: 0 0 16px;
    padding: 15px 17px;
    border: 1px solid #dcebf5;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fcff 0%, #f1f8fc 100%);
}

    .hr-pay-rules-intro strong {
        display: block;
        margin-bottom: 5px;
        color: #183b57;
        font-size: 14px;
    }

    .hr-pay-rules-intro p,
    .hr-pay-rules-note p {
        margin: 0;
        color: #6d8293;
        font-size: 12px;
        line-height: 2;
    }

.hr-pay-rule-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #eaf7f0;
    border: 1px solid #cfead9;
    color: #28764d;
    font-size: 11px;
    font-weight: 800;
}

.hr-pay-rules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hr-pay-rule-item {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e2ebf2;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(26, 70, 110, .035);
}

    .hr-pay-rule-item span,
    .hr-pay-rule-item small {
        display: block;
    }

    .hr-pay-rule-item span {
        color: #6f8394;
        font-size: 12px;
        line-height: 1.8;
    }

    .hr-pay-rule-item strong {
        display: block;
        margin: 7px 0 2px;
        color: #196da7;
        font-size: 22px;
        line-height: 1.25;
    }

    .hr-pay-rule-item small {
        color: #8497a7;
        font-size: 10px;
        line-height: 1.8;
    }

.hr-pay-rules-note {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fffaf1;
    border: 1px solid #f2e3bf;
}

.hr-pay-rule-icon {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #f4e2b7;
    color: #735516;
    font-size: 12px;
    font-weight: 900;
}

.hr-pay-rules-note strong {
    display: block;
    margin-bottom: 3px;
    color: #604c20;
    font-size: 12px;
}

.hr-pay-rules-save-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #f7fafc;
    border: 1px solid #e2eaf0;
}

    .hr-pay-rules-save-form > div {
        min-width: 0;
    }

    .hr-pay-rules-save-form strong,
    .hr-pay-rules-save-form span {
        display: block;
    }

    .hr-pay-rules-save-form strong {
        color: #24445d;
        font-size: 12px;
    }

    .hr-pay-rules-save-form span {
        margin-top: 4px;
        color: #7b8f9f;
        font-size: 11px;
        line-height: 1.8;
    }

    .hr-pay-rules-save-form .hr-job-primary-btn {
        flex: 0 0 auto;
        white-space: nowrap;
    }

.hr-pay-leave-summary-main {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hr-pay-leave-summary-secondary {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: -6px;
}

    .hr-pay-leave-summary-secondary > div {
        background: #f8fbfd;
    }

.hr-pay-annual-table {
    min-width: 1240px;
}

    .hr-pay-annual-table th,
    .hr-pay-annual-table td {
        text-align: center;
    }

        .hr-pay-annual-table th:first-child,
        .hr-pay-annual-table td:first-child {
            position: sticky;
            right: 0;
            z-index: 2;
            background: #fff;
        }

    .hr-pay-annual-table thead th:first-child {
        background: #f5f9fc;
    }

.hr-pay-empty-month td {
    opacity: .65;
}

.hr-pay-report-note {
    padding: 12px 14px;
    border-radius: 13px;
    background: #f7fafc;
    border: 1px solid #e3ebf1;
}

    .hr-pay-report-note strong {
        color: #24445d;
    }

.hr-pay-result-card .hr-pay-summary-grid {
    align-items: stretch;
}

.hr-pay-result-card .hr-pay-stat {
    min-width: 0;
}

@media (max-width: 1200px) {
    .hr-pay-rules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-leave-summary-main,
    .hr-pay-leave-summary-secondary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-pay-rules-save-form {
        align-items: stretch;
        flex-direction: column;
    }

        .hr-pay-rules-save-form .hr-job-primary-btn {
            width: 100%;
        }

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

@media (max-width: 600px) {
    .hr-pay-rules-grid,
    .hr-pay-leave-summary-main,
    .hr-pay-leave-summary-secondary {
        grid-template-columns: 1fr 1fr;
    }

    .hr-pay-rule-item {
        padding: 13px;
    }

        .hr-pay-rule-item strong {
            font-size: 19px;
        }

    .hr-pay-rules-note {
        padding: 12px;
    }

    .hr-pay-rules-save-form {
        padding: 13px;
    }

    .hr-pay-annual-table {
        min-width: 1240px;
    }
}

@media (max-width: 390px) {
    .hr-pay-rules-grid,
    .hr-pay-leave-summary-main,
    .hr-pay-leave-summary-secondary {
        grid-template-columns: 1fr;
    }
}


.hr-pay-monthly-rule-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0;
}

    .hr-pay-monthly-rule-summary > div {
        min-width: 0;
        padding: 12px 14px;
        border: 1px solid #e1eaf1;
        border-radius: 14px;
        background: #fbfdff;
    }

    .hr-pay-monthly-rule-summary span,
    .hr-pay-monthly-rule-summary strong {
        display: block;
    }

    .hr-pay-monthly-rule-summary span {
        color: #72879a;
        font-size: 11px;
        line-height: 1.7;
    }

    .hr-pay-monthly-rule-summary strong {
        margin-top: 4px;
        color: #244b68;
        font-size: 15px;
    }

@media (max-width: 900px) {
    .hr-pay-monthly-rule-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hr-pay-monthly-rule-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 390px) {
    .hr-pay-monthly-rule-summary {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   Payroll page - final UI polish
   ?????? ??????? ?????? ? ???????? ???? ???? ? ??????
   ??? ??? ????? ?? ?????? ???? ???? ????? ???.
   ========================================================= */

.hr-pay-page {
    width: min(1480px, calc(100% - 48px));
    margin: 24px auto 60px;
    padding: 0 0 36px;
    box-sizing: border-box;
}

    .hr-pay-page .hr-pay-toolbar,
    .hr-pay-page .hr-pay-step-card,
    .hr-pay-page .hr-pay-leave-report-card,
    .hr-pay-page .hr-pay-result-card {
        box-sizing: border-box;
        margin-left: 0;
        margin-right: 0;
    }

    .hr-pay-page .hr-pay-toolbar {
        margin-bottom: 22px;
        padding: 20px;
        gap: 20px;
        border: 1px solid #dfe8f0;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(24, 58, 87, 0.06);
    }

    .hr-pay-page .hr-pay-step-card,
    .hr-pay-page .hr-pay-leave-report-card,
    .hr-pay-page .hr-pay-result-card {
        overflow: hidden;
        margin-bottom: 22px;
        border: 1px solid #dfe8f0;
        border-radius: 20px;
        background: #ffffff;
        box-shadow: 0 8px 26px rgba(24, 58, 87, 0.055);
    }

    .hr-pay-page .hr-job-card-head {
        padding: 22px 24px;
        border-bottom: 1px solid #e8eef3;
        background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    }

        .hr-pay-page .hr-job-card-head h2 {
            margin: 4px 0 0;
            color: #173a55;
            font-size: 18px;
        }

        .hr-pay-page .hr-job-card-head > span {
            color: #75899a;
            line-height: 1.9;
        }

    .hr-pay-page .hr-pay-employee-chip {
        min-width: 0;
        padding: 2px 0;
    }

        .hr-pay-page .hr-pay-employee-chip > div:last-child {
            min-width: 0;
        }

    .hr-pay-page .hr-pay-period-form {
        min-width: 0;
        margin: 0;
        padding: 14px;
        gap: 12px;
        border: 1px solid #e0e8ef;
        border-radius: 16px;
        background: #f9fbfd;
        box-shadow: none;
    }

        .hr-pay-page .hr-pay-period-form label {
            min-width: 150px;
        }

        .hr-pay-page .hr-pay-period-form select,
        .hr-pay-page .hr-pay-job-form select,
        .hr-pay-page .hr-pay-attendance-extra select,
        .hr-pay-page .hr-pay-attendance-extra input,
        .hr-pay-page .hr-pay-day-card select,
        .hr-pay-page .hr-pay-notes textarea {
            width: 100%;
            box-sizing: border-box;
            min-height: 46px;
            border: 1px solid #d7e2eb;
            border-radius: 11px;
            background: #ffffff;
            color: #183247;
            box-shadow: inset 0 1px 2px rgba(24, 58, 87, 0.025);
        }

        .hr-pay-page .hr-pay-period-form select,
        .hr-pay-page .hr-pay-job-form select,
        .hr-pay-page .hr-pay-attendance-extra select,
        .hr-pay-page .hr-pay-attendance-extra input,
        .hr-pay-page .hr-pay-day-card select {
            padding: 0 13px;
        }

            .hr-pay-page .hr-pay-period-form select:hover,
            .hr-pay-page .hr-pay-job-form select:hover,
            .hr-pay-page .hr-pay-attendance-extra select:hover,
            .hr-pay-page .hr-pay-attendance-extra input:hover,
            .hr-pay-page .hr-pay-day-card select:hover {
                border-color: #c4d4e0;
            }

            .hr-pay-page .hr-pay-period-form select:focus,
            .hr-pay-page .hr-pay-job-form select:focus,
            .hr-pay-page .hr-pay-attendance-extra select:focus,
            .hr-pay-page .hr-pay-attendance-extra input:focus,
            .hr-pay-page .hr-pay-day-card select:focus,
            .hr-pay-page .hr-pay-notes textarea:focus {
                border-color: #4b9bd4;
                box-shadow: 0 0 0 3px rgba(75, 155, 212, 0.11);
                outline: none;
            }

    /* ????? 2 */
    .hr-pay-page .hr-pay-job-panel {
        margin: 20px 24px 0;
        gap: 16px;
    }

    .hr-pay-page .hr-pay-current-job,
    .hr-pay-page .hr-pay-base-salary-card {
        min-height: 108px;
        box-sizing: border-box;
    }

    .hr-pay-page .hr-pay-current-job {
        margin: 0;
        padding: 20px;
        border: 1px solid #e0e8ef;
        border-radius: 16px;
        background: #f8fbfd;
    }

    .hr-pay-page .hr-pay-base-salary-card {
        padding: 18px;
    }

    .hr-pay-page .hr-pay-job-form {
        margin: 18px 24px 24px;
        padding: 18px;
        gap: 14px;
        border: 1px solid #e0e8ef;
        border-radius: 16px;
        background: #f8fbfd;
    }

        .hr-pay-page .hr-pay-job-form .hr-pay-job-select {
            min-width: 0;
        }

    /* ????? 3 - ????? ????? */
    .hr-pay-page .hr-pay-attendance-info,
    .hr-pay-page .hr-pay-day-summary {
        margin: 20px 24px;
        gap: 12px;
    }

        .hr-pay-page .hr-pay-attendance-info > div,
        .hr-pay-page .hr-pay-day-summary > div {
            min-width: 0;
            padding: 15px 17px;
            border: 1px solid #e0e8ef;
            border-radius: 14px;
            background: #f9fbfd;
        }

    /* ????? ?????: ????? ???? ?? ?????? ? ??? ??????? */
    .hr-pay-page .hr-pay-calendar-grid {
        margin: 0 24px;
        padding: 4px 0;
        gap: 14px;
    }

    .hr-pay-page .hr-pay-day-card {
        min-width: 0;
        box-sizing: border-box;
        padding: 16px;
        border: 1px solid #dfe8ef;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 4px 14px rgba(24, 58, 87, 0.035);
    }

        .hr-pay-page .hr-pay-day-card.is-working {
            border-top: 3px solid #4b9bd4;
        }

        .hr-pay-page .hr-pay-day-card.is-off {
            border-color: #e1e6eb;
            background: #f6f8fa;
        }

    .hr-pay-page .hr-pay-day-head {
        margin-bottom: 14px;
    }

    .hr-pay-page .hr-pay-day-card label {
        min-width: 0;
        width: 100%;
    }

    .hr-pay-page .hr-pay-day-card select {
        margin-top: 1px;
    }

    .hr-pay-page .hr-pay-day-hours {
        margin-top: 11px;
        padding-top: 10px;
        border-top: 1px solid #edf1f4;
    }

    /* ??????? ????? ????? 3 */
    .hr-pay-page .hr-pay-attendance-extra {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
        margin: 0 24px 18px;
        padding: 18px;
        border: 1px solid #dfe8ef;
        border-radius: 16px;
        background: #f8fbfd;
        box-sizing: border-box;
    }

        .hr-pay-page .hr-pay-attendance-extra label {
            min-width: 0;
        }

    .hr-pay-page .hr-pay-notes {
        margin: 0 24px 18px;
    }

        .hr-pay-page .hr-pay-notes textarea {
            min-height: 86px;
            padding: 12px 13px;
        }

    .hr-pay-page .hr-job-form-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
        margin: 0 24px 24px;
        padding: 16px 18px;
        border: 1px solid #e1e9ef;
        border-radius: 15px;
        background: #f8fbfd;
        box-sizing: border-box;
    }

        .hr-pay-page .hr-job-form-footer > span {
            color: #708598;
            font-size: 12px;
            line-height: 1.9;
        }

        .hr-pay-page .hr-job-form-footer .hr-job-primary-btn {
            flex: 0 0 auto;
            min-height: 44px;
            padding: 0 24px;
            white-space: nowrap;
        }

    /* ????? 4 - ???????? ????? */
    .hr-pay-page .hr-pay-summary-grid {
        margin: 20px 24px 0;
        padding: 0;
        gap: 12px;
    }

    .hr-pay-page .hr-pay-stat {
        min-width: 0;
        box-sizing: border-box;
        padding: 16px;
        border: 1px solid #e0e8ef;
        border-radius: 15px;
        background: #f9fbfd;
    }

        .hr-pay-page .hr-pay-stat strong {
            overflow-wrap: anywhere;
        }

    /* ????? 4 - ???? ??????? */
    .hr-pay-page .hr-pay-breakdown {
        margin: 20px 24px 24px;
        padding: 0;
        overflow: hidden;
        border: 1px solid #dfe8ef;
        border-radius: 16px;
        background: #ffffff;
    }

    .hr-pay-page .hr-pay-row {
        min-height: 66px;
        box-sizing: border-box;
        padding: 15px 18px;
        border-bottom: 1px solid #e8eef3;
    }

        .hr-pay-page .hr-pay-row:nth-child(even) {
            background: #fbfdff;
        }

        .hr-pay-page .hr-pay-row strong {
            min-width: 150px;
            text-align: left;
            color: #173a55;
        }

    .hr-pay-page .hr-pay-row-title {
        min-width: 0;
    }

        .hr-pay-page .hr-pay-row-title span {
            font-weight: 700;
        }

        .hr-pay-page .hr-pay-row-title small {
            line-height: 1.8;
        }

    .hr-pay-page .hr-pay-total {
        margin: 0;
        border-top: 2px solid #4b9bd4;
        background: #f1f8fd !important;
    }

        .hr-pay-page .hr-pay-total strong {
            color: #12679f;
            font-size: 20px;
        }

    .hr-pay-page .hr-pay-warnings {
        margin: 20px 24px 0;
    }

    /* ????? ?????? */
    .hr-pay-page .hr-pay-leave-summary {
        margin: 20px 24px;
        gap: 12px;
    }

        .hr-pay-page .hr-pay-leave-summary > div {
            min-width: 0;
            box-sizing: border-box;
            padding: 15px 17px;
            border: 1px solid #e0e8ef;
            border-radius: 14px;
            background: #f9fbfd;
        }

    .hr-pay-page .hr-job-table-wrap {
        margin: 0 24px;
        border: 1px solid #dfe8ef;
        border-radius: 15px;
        overflow: auto;
    }

    .hr-pay-page .hr-pay-report-note {
        margin: 14px 24px 24px;
    }

/* ??????? ?? ?????? ?????? ???? ?? ?????? ?? ??????? ????? */
@media (max-width: 1100px) {
    .hr-pay-page {
        width: min(100% - 32px, 1100px);
    }

        .hr-pay-page .hr-pay-calendar-grid {
            grid-template-columns: repeat(3, minmax(0, 1fr));
        }
}

@media (max-width: 800px) {
    .hr-pay-page {
        width: calc(100% - 24px);
        margin-top: 16px;
    }

        .hr-pay-page .hr-pay-toolbar {
            padding: 16px;
        }

        .hr-pay-page .hr-pay-job-panel {
            grid-template-columns: 1fr;
            margin-left: 16px;
            margin-right: 16px;
        }

        .hr-pay-page .hr-pay-job-form,
        .hr-pay-page .hr-pay-attendance-extra,
        .hr-pay-page .hr-job-form-footer,
        .hr-pay-page .hr-pay-notes {
            margin-left: 16px;
            margin-right: 16px;
        }

        .hr-pay-page .hr-pay-calendar-grid,
        .hr-pay-page .hr-pay-attendance-info,
        .hr-pay-page .hr-pay-day-summary,
        .hr-pay-page .hr-pay-summary-grid,
        .hr-pay-page .hr-pay-leave-summary {
            margin-left: 16px;
            margin-right: 16px;
        }

        .hr-pay-page .hr-job-form-footer {
            align-items: stretch;
            flex-direction: column;
        }

            .hr-pay-page .hr-job-form-footer .hr-job-primary-btn {
                width: 100%;
            }

        .hr-pay-page .hr-pay-calendar-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .hr-pay-page .hr-pay-attendance-info,
        .hr-pay-page .hr-pay-day-summary,
        .hr-pay-page .hr-pay-summary-grid,
        .hr-pay-page .hr-pay-leave-summary {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
}

@media (max-width: 560px) {
    .hr-pay-page {
        width: calc(100% - 16px);
    }

        .hr-pay-page .hr-job-card-head {
            padding: 18px 16px;
        }

        .hr-pay-page .hr-pay-period-form {
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
        }

            .hr-pay-page .hr-pay-period-form label {
                min-width: 0;
            }

        .hr-pay-page .hr-pay-calendar-grid,
        .hr-pay-page .hr-pay-attendance-info,
        .hr-pay-page .hr-pay-day-summary,
        .hr-pay-page .hr-pay-summary-grid,
        .hr-pay-page .hr-pay-leave-summary,
        .hr-pay-page .hr-pay-attendance-extra {
            grid-template-columns: 1fr;
        }

        .hr-pay-page .hr-pay-calendar-grid,
        .hr-pay-page .hr-pay-attendance-info,
        .hr-pay-page .hr-pay-day-summary,
        .hr-pay-page .hr-pay-summary-grid,
        .hr-pay-page .hr-pay-leave-summary,
        .hr-pay-page .hr-pay-attendance-extra,
        .hr-pay-page .hr-pay-notes,
        .hr-pay-page .hr-job-form-footer,
        .hr-pay-page .hr-pay-job-form,
        .hr-pay-page .hr-pay-job-panel,
        .hr-pay-page .hr-job-table-wrap,
        .hr-pay-page .hr-pay-report-note,
        .hr-pay-page .hr-pay-warnings {
            margin-left: 12px;
            margin-right: 12px;
        }

        .hr-pay-page .hr-pay-breakdown {
            margin-left: 12px;
            margin-right: 12px;
        }

        .hr-pay-page .hr-pay-row {
            align-items: flex-start;
            flex-direction: column;
            gap: 7px;
        }

            .hr-pay-page .hr-pay-row strong {
                min-width: 0;
                width: 100%;
                text-align: right;
            }
}


/* ===== ????? ????? ??????? ?????? ??? ???? ?? ???? Payroll ===== */
.hr-pay-page .hr-pay-calculation-note {
    display: block;
    width: calc(100% - 32px);
    max-width: 100%;
    margin: 14px 16px 18px;
    padding: 8px 12px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.8;
    font-weight: 400;
    text-align: right;
    box-sizing: border-box;
}

    .hr-pay-page .hr-pay-calculation-note strong {
        font-size: 12px;
        font-weight: 600;
    }

@media (max-width: 800px) {
    .hr-pay-page .hr-pay-calculation-note {
        width: calc(100% - 24px);
        margin: 12px 12px 16px;
        padding: 7px 10px;
        font-size: 11px;
        line-height: 1.75;
    }

        .hr-pay-page .hr-pay-calculation-note strong {
            font-size: 11px;
        }
}
/* ==========================================================
   Payroll annual benefits support
   Appended to keep the existing dashboard styles untouched.
   ========================================================== */
.hr-benefits-page {
    direction: rtl;
}

.hr-benefits-hero {
    align-items: center;
}

.hr-benefits-year-badge {
    min-width: 150px;
    padding: 18px 22px;
    border: 1px solid rgba(100, 116, 139, 0.18);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    text-align: center;
}

    .hr-benefits-year-badge span {
        display: block;
        margin-bottom: 5px;
        color: #64748b;
        font-size: 12px;
    }

    .hr-benefits-year-badge strong {
        color: #334155;
        font-size: 25px;
        line-height: 1;
    }

.hr-benefits-toolbar .hr-job-year-form {
    display: flex;
    align-items: center;
    gap: 9px;
}

    .hr-benefits-toolbar .hr-job-year-form input {
        width: 115px;
        min-height: 42px;
        padding: 8px 12px;
        border: 1px solid #d9e0e8;
        border-radius: 12px;
        background: #fff;
        color: #334155;
        font: inherit;
        text-align: center;
        outline: none;
    }

        .hr-benefits-toolbar .hr-job-year-form input:focus {
            border-color: #94a3b8;
            box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.14);
        }

.hr-benefits-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 18px 0;
}

.hr-benefit-info-card {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    min-height: 92px;
    padding: 18px 20px;
    border: 1px solid rgba(100, 116, 139, 0.15);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.8);
}

.hr-benefit-info-global {
    border-right: 4px solid #7c8ca5;
}

.hr-benefit-info-specific {
    border-right: 4px solid #8b7aa8;
}

.hr-benefit-info-icon {
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
}

.hr-benefit-info-card strong {
    display: block;
    margin-bottom: 5px;
    color: #334155;
    font-size: 15px;
}

.hr-benefit-info-card p {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.9;
}

.hr-benefit-entry-card {
    margin-top: 18px;
}

.hr-benefit-form {
    padding-top: 8px;
}

.hr-benefit-form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 16px;
}

.hr-benefit-field {
    grid-column: span 4;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.hr-benefit-job-field {
    grid-column: span 5;
}

.hr-benefit-status-field {
    grid-column: span 3;
}

.hr-benefit-custom-field {
    display: none;
}

    .hr-benefit-custom-field.is-visible {
        display: flex;
        grid-column: span 4;
    }

.hr-benefit-field > span {
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.hr-benefit-field small {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.7;
}

.hr-benefit-field select,
.hr-benefit-field input {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 9px 12px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    background: #fff;
    color: #334155;
    font: inherit;
    outline: none;
}

    .hr-benefit-field select:focus,
    .hr-benefit-field input:focus {
        border-color: #94a3b8;
        box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.12);
    }

.hr-benefit-field.is-hidden {
    display: none;
}

.hr-benefit-amount-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .hr-benefit-amount-wrap input {
        padding-left: 52px;
    }

    .hr-benefit-amount-wrap span {
        position: absolute;
        left: 12px;
        color: #94a3b8;
        font-size: 11px;
        pointer-events: none;
    }

.hr-benefit-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #edf1f5;
}

    .hr-benefit-form-footer > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hr-benefit-form-footer strong {
        color: #334155;
        font-size: 13px;
    }

    .hr-benefit-form-footer span {
        color: #94a3b8;
        font-size: 11px;
    }

.hr-benefit-sections {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 18px;
    margin-top: 18px;
}

.hr-benefit-list-card,
.hr-benefit-specific-card {
    min-width: 0;
}

.hr-benefit-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 14px;
}

.hr-benefit-table {
    min-width: 650px;
}

.hr-benefit-specific-card .hr-benefit-table {
    min-width: 900px;
}

.hr-benefit-amount {
    direction: ltr;
    display: inline-block;
    white-space: nowrap;
    color: #475569;
    font-weight: 700;
}

.hr-benefit-edit-card {
    max-width: 1100px;
    margin-right: auto;
    margin-left: auto;
}

@media (max-width: 1100px) {
    .hr-benefits-hero {
        align-items: flex-start;
    }

    .hr-benefits-year-badge {
        min-width: 120px;
    }

    .hr-benefit-sections {
        grid-template-columns: 1fr;
    }

    .hr-benefit-field,
    .hr-benefit-job-field,
    .hr-benefit-status-field,
    .hr-benefit-custom-field.is-visible {
        grid-column: span 6;
    }
}

@media (max-width: 720px) {
    .hr-benefits-info-grid {
        grid-template-columns: 1fr;
    }

    .hr-benefits-hero {
        flex-direction: column;
    }

    .hr-benefits-year-badge {
        width: 100%;
        box-sizing: border-box;
    }

    .hr-benefits-toolbar,
    .hr-benefits-toolbar .hr-job-year-form {
        flex-direction: column;
        align-items: stretch;
    }

        .hr-benefits-toolbar .hr-job-year-form input {
            width: 100%;
            box-sizing: border-box;
        }

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

    .hr-benefit-field,
    .hr-benefit-job-field,
    .hr-benefit-status-field,
    .hr-benefit-custom-field.is-visible {
        grid-column: 1;
    }

    .hr-benefit-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

        .hr-benefit-form-footer .hr-job-primary-btn {
            width: 100%;
        }
}

/* ==========================================================
   Payroll benefits page refinement
   Keeps the existing dashboard family while improving spacing,
   table readability and responsive behavior.
   ========================================================== */
.hr-benefits-page {
    max-width: 1440px;
    margin: 0 auto;
    padding: 30px 32px 42px;
}

    .hr-benefits-page .hr-benefits-hero {
        margin-bottom: 22px;
        padding: 30px 32px;
    }

.hr-benefits-toolbar {
    margin-top: 20px;
    padding: 18px 22px;
    border-radius: 18px;
}

.hr-benefits-info-grid {
    margin: 20px 0;
    gap: 18px;
}

.hr-benefit-info-card {
    min-height: 96px;
    padding: 20px 22px;
}

.hr-benefit-entry-card {
    margin-top: 20px;
}

    .hr-benefit-entry-card .hr-job-card-head,
    .hr-benefit-list-card .hr-job-card-head,
    .hr-benefit-specific-card .hr-job-card-head {
        padding: 20px 24px;
    }

    .hr-benefit-entry-card .hr-benefit-form {
        padding: 22px 24px 24px;
    }

.hr-benefit-form-grid {
    gap: 18px 20px;
}

.hr-benefit-field select,
.hr-benefit-field input {
    min-height: 46px;
    padding: 10px 13px;
    border-radius: 13px;
}

.hr-benefit-form-footer {
    margin-top: 24px;
    padding-top: 20px;
}

.hr-benefit-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 20px;
}

.hr-benefit-list-card,
.hr-benefit-specific-card {
    overflow: hidden;
}

.hr-benefit-table-wrap {
    width: auto;
    margin: 16px 18px 20px;
    overflow-x: auto;
    border: 1px solid #edf1f5;
    border-radius: 14px;
    background: #fff;
}

.hr-benefit-table,
.hr-benefit-specific-card .hr-benefit-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
}

    .hr-benefit-table th,
    .hr-benefit-table td {
        padding: 13px 14px;
        vertical-align: middle;
    }

    .hr-benefit-table th {
        white-space: nowrap;
    }

    .hr-benefit-table td {
        line-height: 1.8;
    }

        .hr-benefit-table td:first-child {
            min-width: 150px;
        }

    .hr-benefit-specific-card .hr-benefit-table td:nth-child(2),
    .hr-benefit-specific-card .hr-benefit-table td:nth-child(3) {
        min-width: 150px;
    }

    .hr-benefit-specific-card .hr-benefit-table td:nth-child(4) {
        min-width: 90px;
    }

    .hr-benefit-specific-card .hr-benefit-table td:nth-child(5) {
        min-width: 145px;
    }

    .hr-benefit-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-benefit-table .hr-job-actions {
        justify-content: flex-start;
        gap: 8px;
        flex-wrap: wrap;
    }

        .hr-benefit-table .hr-job-actions a,
        .hr-benefit-table .hr-job-actions button {
            white-space: nowrap;
        }

.hr-benefit-edit-card .hr-benefit-form {
    padding: 22px 24px 24px;
}

@media (max-width: 1100px) {
    .hr-benefits-page {
        padding: 24px 22px 36px;
    }

        .hr-benefits-page .hr-benefits-hero {
            padding: 26px 24px;
        }

    .hr-benefit-table-wrap {
        margin-right: 14px;
        margin-left: 14px;
    }

    .hr-benefit-table th,
    .hr-benefit-table td {
        padding: 12px 11px;
    }
}

@media (max-width: 720px) {
    .hr-benefits-page {
        padding: 16px 12px 28px;
    }

        .hr-benefits-page .hr-benefits-hero {
            padding: 22px 18px;
            border-radius: 20px;
        }

    .hr-benefits-toolbar {
        padding: 16px;
    }

    .hr-benefit-info-card {
        padding: 17px 16px;
    }

    .hr-benefit-entry-card .hr-job-card-head,
    .hr-benefit-list-card .hr-job-card-head,
    .hr-benefit-specific-card .hr-job-card-head {
        padding: 17px 16px;
    }

    .hr-benefit-entry-card .hr-benefit-form,
    .hr-benefit-edit-card .hr-benefit-form {
        padding: 18px 16px 20px;
    }

    .hr-benefit-table-wrap {
        margin: 12px 10px 14px;
        border-radius: 12px;
    }

    .hr-benefit-table,
    .hr-benefit-specific-card .hr-benefit-table {
        min-width: 760px;
    }

        .hr-benefit-table th,
        .hr-benefit-table td {
            padding: 11px 10px;
            font-size: 11px;
        }
}

/* =========================================================
   Payroll - Step 4: Employee Benefits
   Added at the end of hr-dashboard.css
   ========================================================= */

.hr-pay-benefits-card {
    overflow: hidden;
}

.hr-pay-benefits-head {
    align-items: flex-start;
}

    .hr-pay-benefits-head > span {
        max-width: 560px;
        line-height: 1.9;
    }

.hr-pay-benefits-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 22px 0;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.72);
}

    .hr-pay-benefits-guide > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
        min-width: 0;
    }

    .hr-pay-benefits-guide strong {
        color: #172033;
        font-size: 14px;
    }

    .hr-pay-benefits-guide span {
        color: #667085;
        font-size: 12px;
        line-height: 1.8;
    }

.hr-pay-benefits-groups {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hr-pay-benefit-group {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: #ffffff;
    overflow: hidden;
}

.hr-pay-benefit-group-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(248, 250, 252, 0.82);
}

    .hr-pay-benefit-group-title > div {
        display: flex;
        align-items: center;
        gap: 11px;
        flex-wrap: wrap;
    }

    .hr-pay-benefit-group-title h3 {
        margin: 0;
        color: #172033;
        font-size: 16px;
    }

    .hr-pay-benefit-group-title > span {
        color: #667085;
        font-size: 12px;
        white-space: nowrap;
    }

.hr-pay-benefit-group-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.09);
    color: #4f46e5;
    font-size: 11px;
    font-weight: 800;
}

.hr-pay-benefit-list {
    display: flex;
    flex-direction: column;
}

.hr-pay-benefit-item {
    display: grid;
    grid-template-columns: minmax(220px, 1.65fr) minmax(145px, 0.75fr) minmax(175px, 0.9fr) minmax(160px, 0.85fr);
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.13);
}

    .hr-pay-benefit-item:last-child {
        border-bottom: 0;
    }

.hr-pay-benefit-title,
.hr-pay-benefit-unit,
.hr-pay-benefit-quantity,
.hr-pay-benefit-total {
    min-width: 0;
}

.hr-pay-benefit-title {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.hr-pay-benefit-title-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

    .hr-pay-benefit-title-main strong {
        color: #172033;
        font-size: 14px;
    }

.hr-pay-benefit-title > small {
    color: #7a8496;
    font-size: 11px;
    line-height: 1.75;
}

.hr-pay-benefit-source {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

    .hr-pay-benefit-source.global {
        background: rgba(16, 185, 129, 0.1);
        color: #047857;
    }

    .hr-pay-benefit-source.job {
        background: rgba(245, 158, 11, 0.11);
        color: #b45309;
    }

.hr-pay-benefit-unit,
.hr-pay-benefit-quantity,
.hr-pay-benefit-total {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .hr-pay-benefit-unit > span,
    .hr-pay-benefit-quantity > span,
    .hr-pay-benefit-total > span {
        color: #7a8496;
        font-size: 11px;
        font-weight: 700;
    }

    .hr-pay-benefit-unit strong,
    .hr-pay-benefit-total strong {
        color: #172033;
        font-size: 15px;
        direction: ltr;
        text-align: right;
    }

    .hr-pay-benefit-unit small,
    .hr-pay-benefit-total small {
        color: #98a2b3;
        font-size: 10px;
    }

.hr-pay-benefit-quantity-input {
    width: 100%;
    min-height: 43px;
    border: 1px solid #d9dee8;
    border-radius: 11px;
    padding: 8px 11px;
    background: #ffffff;
    color: #172033;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

    .hr-pay-benefit-quantity-input:focus {
        border-color: #6366f1;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    }

.hr-pay-benefit-fixed-quantity {
    min-height: 43px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 11px;
    background: #f8fafc;
    color: #344054;
    font-size: 13px;
}

.hr-pay-benefits-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 18px 20px;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 18px;
    background: rgba(99, 102, 241, 0.045);
}

.hr-pay-benefits-total {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
}

    .hr-pay-benefits-total span {
        color: #344054;
        font-size: 13px;
        font-weight: 800;
    }

    .hr-pay-benefits-total strong {
        color: #4338ca;
        font-size: 21px;
        direction: ltr;
    }

    .hr-pay-benefits-total small {
        color: #667085;
        font-size: 10px;
    }

.hr-pay-benefits-save-area {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.hr-pay-benefits-saved,
.hr-pay-benefits-unsaved {
    font-size: 11px;
    line-height: 1.7;
}

.hr-pay-benefits-saved {
    color: #047857;
    font-weight: 700;
}

.hr-pay-benefits-unsaved {
    color: #b45309;
}

.hr-pay-benefits-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    background: #4f46e5;
    color: #ffffff;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .hr-pay-benefits-save-btn:hover {
        transform: translateY(-1px);
        box-shadow: 0 11px 24px rgba(79, 70, 229, 0.24);
    }

    .hr-pay-benefits-save-btn span {
        font-size: 17px;
    }

.hr-pay-benefits-empty {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: 16px;
    background: #f8fafc;
}

.hr-pay-benefits-empty-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    font-weight: 900;
}

.hr-pay-benefits-empty div:last-child {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hr-pay-benefits-empty strong {
    color: #344054;
    font-size: 13px;
}

.hr-pay-benefits-empty span {
    color: #7a8496;
    font-size: 11px;
    line-height: 1.8;
}

.hr-pay-benefit-summary-row {
    background: rgba(99, 102, 241, 0.035);
}

    .hr-pay-benefit-summary-row strong {
        color: #4338ca !important;
    }

@media (max-width: 1100px) {
    .hr-pay-benefits-guide {
        grid-template-columns: 1fr;
    }

    .hr-pay-benefit-item {
        grid-template-columns: 1fr 1fr;
    }

    .hr-pay-benefit-title {
        grid-column: 1 / -1;
    }

    .hr-pay-benefits-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-pay-benefits-save-area {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 700px) {
    .hr-pay-benefit-item {
        grid-template-columns: 1fr;
    }

    .hr-pay-benefit-title {
        grid-column: auto;
    }

    .hr-pay-benefit-group-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-pay-benefits-save-area {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-pay-benefits-save-btn {
        width: 100%;
    }
}

/* =========================================================
   Payroll - Step 4 collapsed month header
   Added at the end of hr-dashboard.css
   ========================================================= */

.hr-pay-benefits-card {
    padding: 0;
}

.hr-pay-benefits-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 24px;
    margin: 0;
    min-height: 88px;
    background: #ffffff;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

    .hr-pay-benefits-summary::-webkit-details-marker {
        display: none;
    }

    .hr-pay-benefits-summary::marker {
        display: none;
    }

    .hr-pay-benefits-summary:hover {
        background: #fafbff;
    }

.hr-pay-benefits-summary-main {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.hr-pay-benefits-step {
    width: 64px;
    min-width: 64px;
    height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 15px;
    background: rgba(99, 102, 241, 0.08);
    color: #4338ca;
}

    .hr-pay-benefits-step small {
        font-size: 11px;
        font-weight: 800;
    }

.hr-pay-benefits-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.hr-pay-benefits-card[open] .hr-pay-benefits-chevron {
    transform: rotate(180deg);
}

.hr-pay-benefits-summary-main h2 {
    margin: 0;
    color: #172033;
    font-size: 17px;
    font-weight: 900;
}

.hr-pay-benefits-summary-main p {
    margin: 6px 0 0;
    color: #667085;
    font-size: 11px;
    line-height: 1.8;
}

.hr-pay-benefits-summary-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.hr-pay-benefits-summary-total {
    color: #667085;
    font-size: 11px;
    white-space: nowrap;
}

    .hr-pay-benefits-summary-total strong {
        color: #4338ca;
        font-size: 15px;
        direction: ltr;
        display: inline-block;
    }

.hr-pay-benefits-summary-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

    .hr-pay-benefits-summary-status.saved {
        color: #047857;
        background: rgba(16, 185, 129, 0.1);
    }

    .hr-pay-benefits-summary-status.pending {
        color: #b45309;
        background: rgba(245, 158, 11, 0.11);
    }

.hr-pay-benefits-detail {
    padding: 0 24px 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hr-pay-benefits-detail-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin: 18px 0 20px;
    padding: 11px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #667085;
    font-size: 11px;
}

    .hr-pay-benefits-detail-note strong {
        color: #344054;
    }

@media (max-width: 900px) {
    .hr-pay-benefits-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-pay-benefits-summary-meta {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .hr-pay-benefits-summary {
        padding: 16px;
    }

    .hr-pay-benefits-summary-main {
        align-items: flex-start;
        gap: 12px;
    }

    .hr-pay-benefits-step {
        width: 56px;
        min-width: 56px;
        height: 54px;
    }

    .hr-pay-benefits-summary-main h2 {
        font-size: 15px;
    }

    .hr-pay-benefits-detail {
        padding: 0 16px 18px;
    }

    .hr-pay-benefits-detail-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   Dynamic overtime / night / Friday / shift payroll rules
   Appended family-safe responsive styles
   ========================================================= */
.hr-pay-overtime-editor {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #dfeaf2;
    border-radius: 18px;
    background: linear-gradient(135deg,#fbfdff,#f5f9fc);
    box-shadow: 0 8px 24px rgba(30,75,120,.045)
}

.hr-pay-overtime-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px
}

    .hr-pay-overtime-editor-head small, .hr-pay-rule-admin-item .hr-pay-rule-code {
        font-size: 11px;
        font-weight: 800;
        color: #4f83a8
    }

    .hr-pay-overtime-editor-head h3 {
        margin: 4px 0 5px;
        color: #183b57;
        font-size: 16px
    }

    .hr-pay-overtime-editor-head p {
        margin: 0;
        color: #71869a;
        font-size: 12px;
        line-height: 1.9
    }

    .hr-pay-overtime-editor-head > span {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid #d4e5ef;
        border-radius: 999px;
        background: #fff;
        color: #27658b;
        font-size: 11px;
        font-weight: 800;
        white-space: nowrap
    }

.hr-pay-overtime-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px
}

    .hr-pay-overtime-grid label {
        display: flex;
        flex-direction: column;
        gap: 7px;
        min-width: 0;
        padding: 13px;
        border: 1px solid #e2ebf2;
        border-radius: 14px;
        background: #fff
    }

        .hr-pay-overtime-grid label > span {
            font-size: 12px;
            font-weight: 800;
            color: #38566d
        }

    .hr-pay-overtime-grid input, .hr-pay-overtime-grid select {
        width: 100%;
        box-sizing: border-box;
        min-height: 44px;
        padding: 9px 11px;
        border: 1px solid #d7e3ec;
        border-radius: 11px;
        background: #fbfdff;
        color: #183247;
        outline: none;
        font-size: 13px
    }

        .hr-pay-overtime-grid input:focus, .hr-pay-overtime-grid select:focus {
            border-color: #69a9d1;
            box-shadow: 0 0 0 3px rgba(72,151,207,.1)
        }

    .hr-pay-overtime-grid small {
        color: #7890a1;
        font-size: 10px;
        line-height: 1.7
    }

.hr-pay-overtime-editor-note {
    display: flex;
    gap: 7px;
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: 12px;
    background: #f0f7fb;
    color: #617b8e;
    font-size: 11px;
    line-height: 1.9
}

    .hr-pay-overtime-editor-note strong {
        color: #2c5873;
        white-space: nowrap
    }

.hr-pay-overtime-total-row {
    background: #f7fbfe
}

.hr-pay-rules-admin-card, .hr-pay-rule-guide {
    margin-top: 18px
}

.hr-pay-rule-cards {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 13px
}

.hr-pay-rule-admin-item {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 12px;
    padding: 16px;
    border: 1px solid #e1eaf1;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(26,70,110,.035)
}

.hr-pay-rule-admin-main {
    position: relative;
    min-width: 0
}

    .hr-pay-rule-admin-main h3 {
        margin: 4px 0;
        color: #183b57;
        font-size: 14px
    }

    .hr-pay-rule-admin-main strong {
        position: absolute;
        left: 0;
        top: 0;
        font-size: 19px;
        color: #1468a5;
        direction: rtl
    }

.hr-pay-rule-admin-meta {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #edf2f6
}

    .hr-pay-rule-admin-meta span {
        font-size: 11px;
        font-weight: 800;
        color: #58788f
    }

    .hr-pay-rule-admin-meta p {
        margin: 5px 0 0;
        color: #71869a;
        font-size: 11px;
        line-height: 1.9
    }

.hr-pay-rule-admin-item .hr-job-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px
}

    .hr-pay-rule-admin-item .hr-job-actions form {
        margin: 0
    }

.hr-pay-rule-guide-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px
}

    .hr-pay-rule-guide-grid > div {
        padding: 14px;
        border: 1px solid #e4edf3;
        border-radius: 14px;
        background: #fbfdff
    }

    .hr-pay-rule-guide-grid b {
        display: block;
        color: #24485f;
        font-size: 12px;
        margin-bottom: 5px
    }

    .hr-pay-rule-guide-grid span {
        display: block;
        color: #74899a;
        font-size: 11px;
        line-height: 1.9
    }

.hr-pay-rule-full-field {
    grid-column: 1 / -1
}

    .hr-pay-rule-full-field textarea {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #dce6ef;
        border-radius: 12px;
        padding: 10px 12px;
        resize: vertical;
        min-height: 100px;
        background: #fbfdff;
        color: #183247
    }

@media(max-width:1100px) {
    .hr-pay-overtime-grid, .hr-pay-rule-guide-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .hr-pay-rule-cards {
        grid-template-columns: 1fr
    }
}

@media(max-width:700px) {
    .hr-pay-overtime-editor-head {
        flex-direction: column
    }

        .hr-pay-overtime-editor-head > span {
            width: 100%;
            justify-content: center
        }

    .hr-pay-overtime-grid, .hr-pay-rule-guide-grid {
        grid-template-columns: 1fr
    }

    .hr-pay-rule-admin-item {
        grid-template-columns: 1fr
    }

    .hr-pay-rule-admin-main strong {
        position: static;
        display: block;
        margin-top: 7px
    }

    .hr-pay-rule-full-field {
        grid-column: auto
    }
}

/* Payroll insurance transparency */
.hr-pay-insurance-panel {
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #dfe5ec;
    border-radius: 16px;
    background: #fbfcfe
}

.hr-pay-insurance-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px
}

    .hr-pay-insurance-head small {
        display: block;
        color: #667085;
        font-size: .78rem
    }

    .hr-pay-insurance-head h3 {
        margin: 4px 0 0;
        font-size: 1.08rem
    }

    .hr-pay-insurance-head > span {
        font-size: .78rem;
        padding: 7px 10px;
        border-radius: 999px;
        background: #fff4e5
    }

.hr-pay-insurance-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px
}

    .hr-pay-insurance-grid > div {
        padding: 13px;
        border: 1px solid #e5e9ef;
        border-radius: 12px;
        background: #fff;
        min-width: 0
    }

    .hr-pay-insurance-grid span, .hr-pay-insurance-grid small {
        display: block;
        color: #667085
    }

    .hr-pay-insurance-grid span {
        font-size: .82rem
    }

    .hr-pay-insurance-grid strong {
        display: block;
        margin: 6px 0;
        font-size: 1rem
    }

    .hr-pay-insurance-grid small {
        font-size: .72rem
    }

@media(max-width:900px) {
    .hr-pay-insurance-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .hr-pay-insurance-head {
        align-items: flex-start;
        flex-direction: column
    }
}

@media(max-width:560px) {
    .hr-pay-insurance-grid {
        grid-template-columns: 1fr
    }
}

/* =========================================================
   Payroll Insurance Settings
   ========================================================= */
.hr-pay-insurance-settings-page {
    max-width: 1240px;
    margin: 0 auto;
    padding-bottom: 48px;
}

.hr-pay-insurance-settings-head {
    align-items: flex-end;
    gap: 24px;
}

.hr-pay-insurance-year-form {
    min-width: 190px;
}

    .hr-pay-insurance-year-form label,
    .hr-pay-insurance-settings-form label {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

        .hr-pay-insurance-year-form label > span,
        .hr-pay-insurance-settings-form label > span {
            font-weight: 700;
        }

    .hr-pay-insurance-year-form select,
    .hr-pay-insurance-settings-form input,
    .hr-pay-insurance-settings-form select {
        min-height: 46px;
        border: 1px solid rgba(100, 116, 139, .25);
        border-radius: 12px;
        padding: 0 14px;
        background: #fff;
    }

.hr-pay-insurance-settings-card {
    margin-top: 20px;
}

.hr-pay-insurance-rate-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    padding: 22px;
}

    .hr-pay-insurance-rate-grid label,
    .hr-pay-insurance-ceiling-grid label {
        min-width: 0;
    }

    .hr-pay-insurance-rate-grid small,
    .hr-pay-insurance-ceiling-grid small {
        color: #64748b;
        line-height: 1.8;
    }

.hr-pay-percent-input,
.hr-pay-money-input {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
}

    .hr-pay-percent-input input,
    .hr-pay-money-input input {
        border-radius: 12px 0 0 12px !important;
        width: 100%;
    }

    .hr-pay-percent-input b,
    .hr-pay-money-input b {
        display: flex;
        align-items: center;
        padding: 0 14px;
        border: 1px solid rgba(100, 116, 139, .25);
        border-right: 0;
        border-radius: 0 12px 12px 0;
        background: #f8fafc;
        color: #475569;
    }

.hr-pay-insurance-total-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 18px;
    border: 1px dashed rgba(100, 116, 139, .35);
    border-radius: 16px;
    background: #f8fafc;
}

    .hr-pay-insurance-total-box strong {
        font-size: 28px;
    }

    .hr-pay-insurance-total-box small {
        color: #64748b;
    }

    .hr-pay-insurance-total-box strong.is-valid {
        color: #15803d;
    }

.hr-pay-insurance-ceiling-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
    gap: 22px;
    padding: 22px;
}

.hr-pay-insurance-active {
    align-self: start;
}

.hr-pay-insurance-settings-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 20px 22px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

    .hr-pay-insurance-settings-footer > div {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .hr-pay-insurance-settings-footer span {
        color: #64748b;
    }

@media (max-width: 900px) {
    .hr-pay-insurance-rate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-insurance-ceiling-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .hr-pay-insurance-rate-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-insurance-settings-footer {
        flex-direction: column;
        align-items: stretch;
    }

        .hr-pay-insurance-settings-footer .hr-job-primary-btn {
            width: 100%;
        }
}



/* =========================================================
   ?????? ???? - ?????? ????
   ??? ??? ?? ?????? ???? ???? ????? ?? ?? ?????????? ????
   ????? ????? ????.
   ========================================================= */

.hr-pay-tax-settings-page {
    max-width: 1380px;
    margin: 0 auto;
    padding-bottom: 48px;
}

.hr-pay-tax-settings-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 28px;
    margin-bottom: 24px;
}

    .hr-pay-tax-settings-head p {
        max-width: 900px;
        margin: 8px 0 0;
        color: #64748b;
        line-height: 1.9;
    }

.hr-pay-tax-year-form {
    min-width: 190px;
}

    .hr-pay-tax-year-form label,
    .hr-pay-tax-exemption-box label {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

        .hr-pay-tax-year-form span,
        .hr-pay-tax-exemption-box label > span,
        .hr-pay-tax-active > span {
            font-weight: 700;
            color: #334155;
        }

    .hr-pay-tax-year-form select,
    .hr-pay-tax-exemption-box input,
    .hr-pay-tax-active select,
    .hr-pay-tax-table input {
        min-height: 44px;
        border: 1px solid #dbe3ef;
        border-radius: 12px;
        background: #fff;
        padding: 8px 12px;
        font: inherit;
        color: #1e293b;
    }

.hr-pay-tax-settings-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.hr-pay-tax-settings-card {
    overflow: hidden;
}

.hr-pay-tax-exemption-box {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr);
    gap: 22px;
    padding: 4px 2px;
}

    .hr-pay-tax-exemption-box small,
    .hr-pay-tax-active small {
        color: #64748b;
        line-height: 1.8;
    }

.hr-pay-tax-active {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hr-pay-tax-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #e5eaf2;
    border-radius: 16px;
    background: #fff;
}

.hr-pay-tax-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
}

    .hr-pay-tax-table th,
    .hr-pay-tax-table td {
        padding: 12px 10px;
        text-align: right;
        border-bottom: 1px solid #edf1f6;
        vertical-align: middle;
    }

    .hr-pay-tax-table th {
        background: #f8fafc;
        color: #475569;
        font-size: 13px;
        white-space: nowrap;
    }

    .hr-pay-tax-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-pay-tax-table tbody tr:hover {
        background: #fbfdff;
    }

    .hr-pay-tax-table input[type="number"] {
        width: 145px;
    }

    .hr-pay-tax-table .hr-pay-tax-order {
        width: 70px;
    }

    .hr-pay-tax-table input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: #334155;
    }

.hr-pay-tax-rate-input {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .hr-pay-tax-rate-input input {
        width: 90px !important;
    }

    .hr-pay-tax-rate-input b {
        color: #475569;
    }

.hr-pay-tax-annual-note,
.hr-pay-tax-legal-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f8fafc;
    color: #475569;
    line-height: 1.9;
}

    .hr-pay-tax-annual-note strong,
    .hr-pay-tax-legal-note strong {
        color: #1e293b;
        white-space: nowrap;
    }

.hr-pay-tax-benefit-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-pay-tax-benefit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 12px 14px;
    border: 1px solid #e5eaf2;
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

    .hr-pay-tax-benefit-item:hover {
        border-color: #cbd5e1;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .06);
        transform: translateY(-1px);
    }

    .hr-pay-tax-benefit-item input {
        width: 19px;
        height: 19px;
        accent-color: #334155;
    }

    .hr-pay-tax-benefit-item span {
        color: #334155;
        font-weight: 650;
    }

.hr-pay-tax-settings-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid #e5eaf2;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .06);
}

    .hr-pay-tax-settings-footer > div {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }

    .hr-pay-tax-settings-footer span {
        color: #64748b;
    }

.hr-pay-tax-panel {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid #e3e9f2;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, .06);
}

.hr-pay-tax-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 18px;
}

    .hr-pay-tax-panel-head small {
        color: #64748b;
    }

    .hr-pay-tax-panel-head h3 {
        margin: 5px 0 0;
        color: #1e293b;
    }

    .hr-pay-tax-panel-head > span {
        max-width: 460px;
        padding: 9px 12px;
        border-radius: 11px;
        background: #f8fafc;
        color: #64748b;
        line-height: 1.7;
        text-align: right;
    }

.hr-pay-tax-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

    .hr-pay-tax-summary-grid > div {
        min-height: 116px;
        padding: 15px;
        border: 1px solid #e8edf4;
        border-radius: 15px;
        background: #fbfcfe;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 7px;
    }

    .hr-pay-tax-summary-grid span {
        color: #64748b;
        font-size: 13px;
    }

    .hr-pay-tax-summary-grid strong {
        color: #1e293b;
        font-size: 18px;
    }

    .hr-pay-tax-summary-grid small {
        color: #94a3b8;
        line-height: 1.6;
    }

    .hr-pay-tax-summary-grid .hr-pay-tax-highlight {
        background: #f8fafc;
        border-color: #dbe4ef;
    }

    .hr-pay-tax-summary-grid .hr-pay-tax-result {
        background: #fff7fb;
        border-color: #f0d5e2;
    }

.hr-pay-tax-result strong {
    color: #9f1239;
}

.hr-pay-tax-breakdown {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    background: #f8fafc;
}

.hr-pay-tax-breakdown-head {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 10px;
}

    .hr-pay-tax-breakdown-head strong {
        color: #334155;
    }

    .hr-pay-tax-breakdown-head span {
        color: #64748b;
        font-size: 13px;
    }

.hr-pay-tax-bracket-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hr-pay-tax-bracket-row {
    display: grid;
    grid-template-columns: 1.25fr .65fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #e5eaf2;
    border-radius: 13px;
    background: #fff;
}

    .hr-pay-tax-bracket-row > div {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hr-pay-tax-bracket-row span {
        color: #64748b;
        font-size: 12px;
    }

    .hr-pay-tax-bracket-row strong {
        color: #1e293b;
    }

.hr-pay-tax-panel .hr-pay-calculation-note {
    margin-top: 16px;
}

@media (max-width: 1100px) {
    .hr-pay-tax-benefit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-pay-tax-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-tax-bracket-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .hr-pay-tax-settings-head,
    .hr-pay-tax-panel-head,
    .hr-pay-tax-settings-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-pay-tax-exemption-box {
        grid-template-columns: 1fr;
    }

    .hr-pay-tax-benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-tax-panel-head > span {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .hr-pay-tax-summary-grid,
    .hr-pay-tax-benefit-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-tax-panel {
        padding: 15px;
    }

    .hr-pay-tax-bracket-row {
        grid-template-columns: 1fr;
    }

    .hr-pay-tax-settings-footer .hr-job-primary-btn {
        width: 100%;
    }
}

/* =========================
   Payroll tax deduction flow
   Added at the end intentionally.
   ========================= */
.hr-pay-tax-deduction-row {
    background: #fff7fb;
    border-color: #f0d5e2;
}

    .hr-pay-tax-deduction-row strong {
        color: #9f1239;
    }

.hr-pay-deduction-total-row {
    background: #f8fafc;
    border-color: #d9e2ec;
}

    .hr-pay-deduction-total-row strong {
        color: #334155;
    }

.hr-pay-tax-bracket-row {
    grid-template-columns: 1.1fr .55fr 1fr 1.15fr .9fr;
}

.hr-pay-tax-bracket-tax {
    padding: 9px 11px;
    border-radius: 10px;
    background: #fff7fb;
}

    .hr-pay-tax-bracket-tax strong {
        color: #9f1239;
    }

.hr-pay-tax-formula-note {
    border-right: 4px solid #cbd5e1;
}

@media (max-width: 1100px) {
    .hr-pay-tax-bracket-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .hr-pay-tax-bracket-row {
        grid-template-columns: 1fr;
    }
}



/* =========================
   Payroll insurance ceiling (daily x 7 x actual work days)
   Added at the end intentionally.
   ========================= */
.hr-pay-insurance-grid > .hr-pay-insurance-base-capped {
    background: #fff7ed;
    border-color: #fed7aa;
    border-right: 4px solid #f97316;
}

    .hr-pay-insurance-grid > .hr-pay-insurance-base-capped strong {
        color: #c2410c;
    }

.hr-pay-insurance-grid > .hr-pay-insurance-base-free {
    background: #f0fdf4;
    border-color: #bbf7d0;
    border-right: 4px solid #22c55e;
}

    .hr-pay-insurance-grid > .hr-pay-insurance-base-free strong {
        color: #15803d;
    }

/* =========================
   Always-exempt tax benefits & insurance ceiling preview
   Added at the end intentionally.
   ========================= */
.hr-pay-tax-benefit-locked {
    opacity: .85;
    background: #f8fafc;
}

    .hr-pay-tax-benefit-locked small {
        color: #64748b;
        margin-right: 4px;
    }

.hr-pay-ceiling-preview {
    display: block;
    margin-top: 6px;
    font-weight: 700;
    color: #0f766e;
}

/* =========================
   Payroll insurance & tax as independent collapsible cards
   (separated from step 5). Added at the end intentionally.
   ========================= */
.hr-pay-calc-card > summary {
    cursor: pointer;
    list-style: none;
}

    .hr-pay-calc-card > summary::-webkit-details-marker {
        display: none;
    }

.hr-pay-calc-card:not([open]) > summary {
    border-bottom: 0;
}

/* The old panel frame is no longer needed: the card itself is the frame. */
.hr-pay-calc-card .hr-pay-insurance-panel,
.hr-pay-calc-card .hr-pay-tax-panel {
    margin: 0;
    padding: 22px 24px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

@media (max-width: 720px) {
    .hr-pay-calc-card .hr-pay-insurance-panel,
    .hr-pay-calc-card .hr-pay-tax-panel {
        padding: 16px;
    }
}

/* =========================
   ???? ????????? ? ??????? ?????? (?????/?????/??????/???)
   Added at the end intentionally.
   ========================= */

.hr-emp-action.ledger {
    color: #e0555f;
    background: color-mix(in srgb,#e0555f 8%,var(--surface));
}

/* --- Step 5 payroll page: new ledger rows + link card --- */
.hr-pay-ledger-row .hr-pay-row-title small {
    max-width: 520px;
}

.hr-pay-ledger-addition-row strong {
    color: var(--success);
}

.hr-pay-ledger-deduction-row strong {
    color: var(--danger);
}

.hr-pay-final-total-row {
    border-top: 2px solid var(--success);
}

    .hr-pay-final-total-row strong {
        color: var(--success);
    }

.hr-pay-ledger-link-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin: 18px 20px 20px;
    padding: 16px 18px;
    border-radius: 14px;
    background: color-mix(in srgb,#e0555f 6%,var(--surface));
    border: 1px solid color-mix(in srgb,#e0555f 20%,var(--border));
}

    .hr-pay-ledger-link-card strong {
        display: block;
        color: var(--text);
        font-size: 14px;
    }

    .hr-pay-ledger-link-card span {
        display: block;
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 12px;
    }

.hr-fin-link-btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 10px;
    background: #e0555f;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: opacity .15s ease;
}

    .hr-fin-link-btn:hover {
        opacity: .88;
    }

/* --- Ledger page shell --- */
.hr-fin-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-fin-step-card {
    overflow: visible;
}

    .hr-fin-step-card > summary {
        cursor: pointer;
        list-style: none;
    }

        .hr-fin-step-card > summary::-webkit-details-marker {
            display: none;
        }

.hr-fin-empty {
    padding: 22px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* --- Summary cards --- */
.hr-fin-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.hr-fin-summary-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

    .hr-fin-summary-card span {
        font-size: 12px;
        color: var(--text-muted);
        font-weight: 600;
    }

    .hr-fin-summary-card strong {
        font-size: 18px;
        color: var(--danger);
    }

    .hr-fin-summary-card small {
        font-size: 11px;
        color: var(--text-muted);
    }

    .hr-fin-summary-card.is-credit strong {
        color: var(--success);
    }

.hr-fin-summary-highlight {
    grid-column: span 2;
    background: var(--tint);
}

    .hr-fin-summary-highlight strong {
        font-size: 21px;
    }

    .hr-fin-summary-highlight.is-debtor strong {
        color: var(--danger);
    }

    .hr-fin-summary-highlight.is-creditor strong {
        color: var(--success);
    }

/* --- Create transaction form --- */
.hr-fin-form-card .hr-job-card-head {
    align-items: flex-start;
}

.hr-fin-form {
    padding: 20px;
}

.hr-fin-form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.hr-fin-form-desc {
    grid-column: span 3;
}

    .hr-fin-form-desc textarea {
        resize: vertical;
    }

.hr-fin-submit-btn {
    margin-top: 16px;
    padding: 12px 26px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity .15s ease;
}

    .hr-fin-submit-btn:hover {
        opacity: .9;
    }

/* --- Transaction tables --- */
.hr-fin-table-wrap {
    overflow-x: auto;
    padding: 0 20px 20px;
}

.hr-fin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 760px;
}

    .hr-fin-table thead th {
        text-align: right;
        padding: 10px 8px;
        color: var(--text-muted);
        font-weight: 600;
        border-bottom: 1px solid var(--border);
        white-space: nowrap;
    }

    .hr-fin-table tbody td {
        padding: 10px 8px;
        border-bottom: 1px solid var(--border);
        vertical-align: top;
        color: var(--text);
    }

    .hr-fin-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-fin-table small {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
        margin-top: 2px;
    }

.hr-fin-desc {
    max-width: 220px;
}

.hr-fin-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--tint);
    color: var(--text-muted);
}

    .hr-fin-badge.is-active {
        background: color-mix(in srgb,#e0555f 12%,var(--surface));
        color: #e0555f;
    }

    .hr-fin-badge.is-completed {
        background: color-mix(in srgb,var(--success) 12%,var(--surface));
        color: var(--success);
    }

    .hr-fin-badge.is-cancelled {
        background: color-mix(in srgb,var(--danger) 10%,var(--surface));
        color: var(--danger);
    }

    .hr-fin-badge.is-credit {
        background: color-mix(in srgb,var(--success) 12%,var(--surface));
        color: var(--success);
    }

    .hr-fin-badge.is-debit {
        background: color-mix(in srgb,var(--danger) 10%,var(--surface));
        color: var(--danger);
    }

.hr-fin-row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.hr-fin-mini-btn {
    border: 0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    background: var(--tint);
    color: var(--text);
    white-space: nowrap;
}

    .hr-fin-mini-btn.is-warn {
        background: color-mix(in srgb,#e0555f 12%,var(--surface));
        color: #e0555f;
    }

    .hr-fin-mini-btn.is-danger {
        background: color-mix(in srgb,var(--danger) 10%,var(--surface));
        color: var(--danger);
    }

    .hr-fin-mini-btn:hover {
        opacity: .85;
    }

.hr-fin-schedule-toggle {
    font-size: 11.5px;
}

    .hr-fin-schedule-toggle > summary {
        cursor: pointer;
        color: var(--primary);
        font-weight: 700;
        list-style: none;
    }

        .hr-fin-schedule-toggle > summary::-webkit-details-marker {
            display: none;
        }

.hr-fin-schedule-table {
    margin-top: 8px;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 220px;
}

    .hr-fin-schedule-table th,
    .hr-fin-schedule-table td {
        padding: 5px 8px;
        border-bottom: 1px dashed var(--border);
        white-space: nowrap;
        text-align: right;
    }

/* --- Report page --- */
.hr-fin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb,#e0555f 10%,var(--surface)), var(--surface));
    border: 1px solid var(--border);
}

    .hr-fin-hero h1 {
        margin: 6px 0;
        font-size: 20px;
    }

    .hr-fin-hero p {
        margin: 0;
        color: var(--text-muted);
        font-size: 12.5px;
        max-width: 620px;
    }

.hr-fin-filter-card {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
}

.hr-fin-report-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

    .hr-fin-report-summary > div {
        padding: 14px 16px;
        border-radius: 14px;
        background: var(--surface);
        border: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hr-fin-report-summary span {
        font-size: 11.5px;
        color: var(--text-muted);
        font-weight: 600;
    }

    .hr-fin-report-summary strong {
        font-size: 17px;
    }

    .hr-fin-report-summary .hr-fin-summary-highlight.is-debtor strong {
        color: var(--danger);
    }

    .hr-fin-report-summary .hr-fin-summary-highlight.is-creditor strong {
        color: var(--success);
    }

.hr-fin-report-table {
    min-width: 980px;
}

/* --- Responsive: tablet --- */
@media (max-width: 1100px) {
    .hr-fin-summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hr-fin-summary-highlight {
        grid-column: span 2;
    }

    .hr-fin-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hr-fin-form-desc {
        grid-column: span 2;
    }

    .hr-fin-report-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Responsive: mobile --- */
@media (max-width: 720px) {
    .hr-fin-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-fin-summary-highlight {
        grid-column: span 1;
    }

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

    .hr-fin-form-desc {
        grid-column: span 1;
    }

    .hr-pay-ledger-link-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .hr-fin-link-btn {
        width: 100%;
        justify-content: center;
    }

    .hr-fin-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hr-fin-filter-card {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-fin-report-summary {
        grid-template-columns: 1fr;
    }

    .hr-fin-row-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}


/* =========================================================
   ??? ????? ??????
   ??? ??? ????? ?? ?????? ???? ????? ??? ???.
   ========================================================= */

.hr-pay-slip-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    max-width: 1500px;
    margin: 0 auto;
    padding-bottom: 32px;
}

.hr-pay-slip-selector {
    padding: 22px 24px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}

.hr-pay-slip-selector-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

    .hr-pay-slip-selector-head small {
        color: var(--primary);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-pay-slip-selector-head h1 {
        margin: 5px 0 7px;
        color: var(--text);
        font-size: 22px;
    }

    .hr-pay-slip-selector-head p {
        margin: 0;
        color: var(--text-muted);
        font-size: 12.5px;
        line-height: 1.9;
    }

.hr-pay-slip-filter {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(150px, .8fr) minmax(150px, .8fr) auto;
    align-items: end;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--tint);
}

    .hr-pay-slip-filter label {
        display: flex;
        flex-direction: column;
        gap: 7px;
    }

        .hr-pay-slip-filter label > span {
            color: var(--text-muted);
            font-size: 11.5px;
            font-weight: 700;
        }

    .hr-pay-slip-filter select {
        width: 100%;
        min-height: 43px;
        padding: 8px 12px;
        border: 1px solid var(--border);
        border-radius: 10px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 12.5px;
    }

        .hr-pay-slip-filter select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-pay-slip-generate-btn,
.hr-pay-slip-print-btn {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 9px 17px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

.hr-pay-slip-generate-btn {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 18%, transparent);
}

.hr-pay-slip-print-btn {
    flex-shrink: 0;
    background: var(--text);
    color: #fff;
}

    .hr-pay-slip-generate-btn svg,
    .hr-pay-slip-print-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
    }

    .hr-pay-slip-generate-btn:hover,
    .hr-pay-slip-print-btn:hover {
        opacity: .92;
        transform: translateY(-1px);
    }

.hr-pay-slip-empty {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    background: var(--surface);
    text-align: center;
}

.hr-pay-slip-empty-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin-bottom: 12px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
}

    .hr-pay-slip-empty-icon svg {
        width: 32px;
        height: 32px;
        stroke: currentColor;
    }

.hr-pay-slip-empty h2 {
    margin: 0 0 7px;
    color: var(--text);
    font-size: 18px;
}

.hr-pay-slip-empty p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
}

.hr-pay-slip-document {
    overflow: hidden;
    border: 1px solid #d6d9df;
    border-radius: 4px;
    background: #fff;
    color: #17191d;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .08);
}

.hr-pay-slip-header {
    display: grid;
    grid-template-columns: 1fr 1.35fr 1fr;
    align-items: center;
    min-height: 92px;
    border-bottom: 1px solid #222;
    background: #fff;
}

.hr-pay-slip-company,
.hr-pay-slip-title,
.hr-pay-slip-document-mark {
    min-height: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
}

.hr-pay-slip-company {
    align-items: flex-start;
    border-left: 1px solid #d6d9df;
}

.hr-pay-slip-document-mark {
    align-items: flex-end;
    border-right: 1px solid #d6d9df;
}

.hr-pay-slip-company strong {
    font-size: 16px;
    font-weight: 900;
}

.hr-pay-slip-company span,
.hr-pay-slip-document-mark small {
    margin-top: 4px;
    color: #656b75;
    font-size: 10.5px;
}

.hr-pay-slip-title {
    text-align: center;
}

    .hr-pay-slip-title span {
        color: #4d535d;
        font-size: 11px;
        font-weight: 700;
    }

    .hr-pay-slip-title strong {
        margin-top: 5px;
        font-size: 18px;
        font-weight: 900;
    }

.hr-pay-slip-document-mark span {
    padding: 5px 11px;
    border: 1px solid #20242b;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 900;
}

.hr-pay-slip-identity {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 1px solid #222;
}

    .hr-pay-slip-identity > div {
        min-height: 58px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        padding: 9px 13px;
        border-left: 1px solid #d6d9df;
        border-bottom: 1px solid #d6d9df;
    }

        .hr-pay-slip-identity > div:nth-child(4n) {
            border-left: 0;
        }

    .hr-pay-slip-identity span {
        color: #69707a;
        font-size: 10.5px;
    }

    .hr-pay-slip-identity strong {
        color: #181b20;
        font-size: 11.5px;
        font-weight: 800;
    }

.hr-pay-slip-warning {
    margin: 12px;
    padding: 11px 14px;
    border: 1px solid #e7b6c2;
    border-radius: 8px;
    background: #fff5f7;
    color: #7b2738;
    font-size: 10.5px;
}

    .hr-pay-slip-warning strong {
        font-size: 11.5px;
    }

    .hr-pay-slip-warning ul {
        margin: 7px 0 0;
        padding-right: 18px;
    }

    .hr-pay-slip-warning li {
        margin-bottom: 3px;
    }

    .hr-pay-slip-warning p {
        margin: 7px 0 0;
    }

.hr-pay-slip-summary {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    border-bottom: 1px solid #222;
}

    .hr-pay-slip-summary > div {
        min-height: 74px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 10px 14px;
        border-left: 1px solid #d6d9df;
        background: #fafafa;
    }

        .hr-pay-slip-summary > div:first-child {
            background: #f5f7f9;
        }

        .hr-pay-slip-summary > div:last-child {
            border-left: 0;
        }

    .hr-pay-slip-summary span {
        color: #555c66;
        font-size: 10.5px;
        font-weight: 700;
    }

    .hr-pay-slip-summary strong {
        font-size: 17px;
        font-weight: 900;
    }

    .hr-pay-slip-summary small {
        color: #737984;
        font-size: 9.5px;
    }

.hr-pay-slip-columns {
    display: grid;
    grid-template-columns: .9fr 1.3fr .95fr;
    align-items: stretch;
}

.hr-pay-slip-column {
    min-width: 0;
    border-left: 1px solid #222;
}

    .hr-pay-slip-column:last-child {
        border-left: 0;
    }

.hr-pay-slip-column-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 9px 13px;
    border-bottom: 1px solid #222;
    background: #f1f3f5;
}

    .hr-pay-slip-column-title span {
        font-size: 13px;
        font-weight: 900;
    }

    .hr-pay-slip-column-title small {
        color: #737984;
        font-size: 9.5px;
    }

.hr-pay-slip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 39px;
    padding: 7px 12px;
    border-bottom: 1px solid #e2e5e9;
}

    .hr-pay-slip-row:last-of-type {
        border-bottom: 0;
    }

    .hr-pay-slip-row > span {
        min-width: 0;
        color: #30353c;
        font-size: 10.5px;
        line-height: 1.7;
    }

        .hr-pay-slip-row > span small {
            display: block;
            margin-top: 1px;
            color: #858b94;
            font-size: 8.5px;
            line-height: 1.5;
        }

    .hr-pay-slip-row > strong {
        flex-shrink: 0;
        color: #171a1f;
        font-size: 10.5px;
        font-weight: 800;
        white-space: nowrap;
    }

.hr-pay-slip-row-danger {
    background: #fff6f8;
}

    .hr-pay-slip-row-danger > strong {
        color: #b03a50;
    }

.hr-pay-slip-row-benefit {
    background: #fbfcfd;
}

.hr-pay-slip-row-ledger {
    background: #fff8f8;
}

    .hr-pay-slip-row-ledger > strong {
        color: #b03a50;
    }

.hr-pay-slip-row-credit {
    background: #f4fbf7;
}

    .hr-pay-slip-row-credit > strong {
        color: #27724b;
    }

.hr-pay-slip-subhead {
    padding: 7px 12px;
    border-top: 1px solid #d6d9df;
    border-bottom: 1px solid #d6d9df;
    background: #f8f9fa;
    color: #5d6470;
    font-size: 9.5px;
    font-weight: 900;
}

    .hr-pay-slip-subhead.is-positive {
        color: #27724b;
        background: #f4fbf7;
    }

.hr-pay-slip-total-row,
.hr-pay-slip-net-row,
.hr-pay-slip-final-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid #222;
}

.hr-pay-slip-total-row {
    background: #f1f3f5;
}

    .hr-pay-slip-total-row span,
    .hr-pay-slip-net-row span,
    .hr-pay-slip-final-row span {
        font-size: 10px;
        font-weight: 900;
    }

    .hr-pay-slip-total-row strong,
    .hr-pay-slip-net-row strong,
    .hr-pay-slip-final-row strong {
        font-size: 12px;
        font-weight: 900;
    }

.hr-pay-slip-net-row {
    background: #fff;
}

.hr-pay-slip-final-row {
    background: #f5faf7;
    border-top: 2px solid #27724b;
}

    .hr-pay-slip-final-row strong {
        color: #27724b;
        font-size: 14px;
    }

.hr-pay-slip-calculation {
    padding: 20px;
    border-top: 1px solid #222;
    background: #fafbfc;
}

.hr-pay-slip-section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

    .hr-pay-slip-section-heading small {
        color: var(--primary);
        font-size: 10px;
        font-weight: 800;
    }

    .hr-pay-slip-section-heading h2 {
        margin: 4px 0 0;
        color: #1b1f24;
        font-size: 16px;
    }

    .hr-pay-slip-section-heading > span {
        color: #727984;
        font-size: 9.5px;
    }

.hr-pay-slip-formulas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.hr-pay-slip-formula-card {
    padding: 14px;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    background: #fff;
}

    .hr-pay-slip-formula-card > strong {
        display: block;
        margin-bottom: 7px;
        color: #252a31;
        font-size: 11.5px;
    }

    .hr-pay-slip-formula-card p {
        margin: 0 0 7px;
        color: #616873;
        font-size: 9.5px;
        line-height: 1.9;
    }

    .hr-pay-slip-formula-card code {
        display: block;
        overflow-x: auto;
        padding: 9px 10px;
        border: 1px solid #e0e3e7;
        border-radius: 7px;
        background: #f7f8fa;
        color: #343a42;
        direction: rtl;
        font-family: "Vazirmatn", Tahoma, sans-serif;
        font-size: 9.5px;
        line-height: 1.9;
        white-space: normal;
    }

    .hr-pay-slip-formula-card ul {
        margin: 9px 0 0;
        padding-right: 17px;
        color: #69707a;
        font-size: 9px;
        line-height: 1.8;
    }

.hr-pay-slip-tax-table-wrap {
    overflow-x: auto;
    margin-top: 10px;
}

.hr-pay-slip-tax-table {
    width: 100%;
    min-width: 450px;
    border-collapse: collapse;
    font-size: 9px;
}

    .hr-pay-slip-tax-table th,
    .hr-pay-slip-tax-table td {
        padding: 7px 8px;
        border-bottom: 1px solid #e0e3e7;
        text-align: right;
    }

    .hr-pay-slip-tax-table th {
        background: #f1f3f5;
        color: #555c66;
        font-weight: 800;
    }

    .hr-pay-slip-tax-table td {
        color: #30353c;
    }

.hr-pay-slip-footer {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    min-height: 100px;
    padding: 18px;
    border-top: 1px solid #222;
    background: #fff;
}

    .hr-pay-slip-footer > div {
        display: flex;
        flex-direction: column;
        gap: 9px;
    }

    .hr-pay-slip-footer span {
        color: #6b727c;
        font-size: 9.5px;
    }

    .hr-pay-slip-footer strong {
        color: #252a31;
        font-size: 10.5px;
    }

    .hr-pay-slip-footer i {
        display: block;
        width: 80%;
        height: 36px;
        border-bottom: 1px dashed #9ba1aa;
    }

@media (max-width: 1180px) {
    .hr-pay-slip-filter {
        grid-template-columns: repeat(2, 1fr);
    }

    .hr-pay-slip-generate-btn {
        width: 100%;
    }

    .hr-pay-slip-columns {
        grid-template-columns: 1fr;
    }

    .hr-pay-slip-column {
        border-left: 0;
        border-bottom: 1px solid #222;
    }

        .hr-pay-slip-column:last-child {
            border-bottom: 0;
        }
}

@media (max-width: 800px) {
    .hr-pay-slip-selector {
        padding: 16px;
    }

    .hr-pay-slip-selector-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-pay-slip-print-btn {
        width: 100%;
    }

    .hr-pay-slip-filter {
        grid-template-columns: 1fr;
    }

    .hr-pay-slip-header {
        grid-template-columns: 1fr;
    }

    .hr-pay-slip-company,
    .hr-pay-slip-title,
    .hr-pay-slip-document-mark {
        min-height: auto;
        align-items: center;
        border: 0;
        border-bottom: 1px solid #d6d9df;
    }

    .hr-pay-slip-document-mark {
        border-bottom: 0;
    }

    .hr-pay-slip-identity {
        grid-template-columns: repeat(2, 1fr);
    }

        .hr-pay-slip-identity > div:nth-child(4n) {
            border-left: 1px solid #d6d9df;
        }

        .hr-pay-slip-identity > div:nth-child(2n) {
            border-left: 0;
        }

    .hr-pay-slip-summary {
        grid-template-columns: 1fr;
    }

        .hr-pay-slip-summary > div {
            border-left: 0;
            border-bottom: 1px solid #d6d9df;
        }

            .hr-pay-slip-summary > div:last-child {
                border-bottom: 0;
            }

    .hr-pay-slip-formulas {
        grid-template-columns: 1fr;
    }

    .hr-pay-slip-footer {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 520px) {
    .hr-pay-slip-page {
        gap: 12px;
    }

    .hr-pay-slip-header {
        min-height: auto;
    }

    .hr-pay-slip-identity {
        grid-template-columns: 1fr;
    }

        .hr-pay-slip-identity > div,
        .hr-pay-slip-identity > div:nth-child(2n),
        .hr-pay-slip-identity > div:nth-child(4n) {
            border-left: 0;
        }

    .hr-pay-slip-summary strong {
        font-size: 15px;
    }

    .hr-pay-slip-footer {
        grid-template-columns: 1fr;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    html,
    body {
        background: #fff !important;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .sidebar,
    .topbar,
    .settings-panel,
    .hr-pay-slip-selector,
    .no-print {
        display: none !important;
    }

    .content {
        width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .app {
        display: block !important;
        min-height: 0 !important;
    }

    .hr-pay-slip-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }

    .hr-pay-slip-document {
        width: 100% !important;
        border: 1px solid #222 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .hr-pay-slip-warning {
        break-inside: avoid;
    }

    .hr-pay-slip-columns,
    .hr-pay-slip-formulas,
    .hr-pay-slip-footer {
        break-inside: avoid;
    }

    .hr-pay-slip-calculation {
        break-inside: auto;
    }

    .hr-pay-slip-formula-card {
        break-inside: avoid;
    }

    .hr-pay-slip-column {
        break-inside: auto;
    }

    .hr-pay-slip-footer {
        min-height: 80px;
    }
}


/* --- ???? ???? ??? ?? ???? ????? ???? ???? --- */
.hr-pay-slip-open-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface));
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
}

    .hr-pay-slip-open-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
    }

    .hr-pay-slip-open-btn:hover {
        opacity: .9;
        transform: translateY(-1px);
        box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 12%, transparent);
    }

@media (max-width: 720px) {
    .hr-pay-slip-open-btn {
        width: 100%;
    }
}


/* ????? ???? ? ??? ????? */
.hr-pay-slip-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

    .hr-pay-slip-actions .hr-pay-slip-open-btn,
    .hr-pay-slip-actions .hr-pay-slip-print-btn {
        min-height: 43px;
    }

.hr-pay-slip-compact-document .hr-pay-slip-identity > div {
    min-height: 52px;
}

.hr-pay-slip-compact-document .hr-pay-slip-row {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.hr-pay-slip-compact-document .hr-pay-slip-footer {
    min-height: 82px;
}

@media (max-width: 800px) {
    .hr-pay-slip-actions {
        width: 100%;
        flex-direction: column;
    }

        .hr-pay-slip-actions .hr-pay-slip-open-btn,
        .hr-pay-slip-actions .hr-pay-slip-print-btn {
            width: 100%;
        }
}

/*
 * ???/PDF ????? ????:
 * ?? ???? ???? ????? ???? ????? ???????? ??? ?? ?? ?? ???? ????? ???.
 * ??? ??? ????? ?? ?????? ???? ???? ?? ?? @media ??? ????????? ?????? ????? ????.
 */
@media print {
    .hr-pay-slip-page .hr-pay-slip-header {
        grid-template-columns: 1fr 1.35fr 1fr !important;
    }

    .hr-pay-slip-page .hr-pay-slip-identity {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .hr-pay-slip-page .hr-pay-slip-summary {
        grid-template-columns: 1.2fr 1fr 1fr !important;
    }

    .hr-pay-slip-page .hr-pay-slip-columns {
        grid-template-columns: .9fr 1.3fr .95fr !important;
    }

    .hr-pay-slip-page .hr-pay-slip-column {
        border-left: 1px solid #222 !important;
        border-bottom: 0 !important;
    }

        .hr-pay-slip-page .hr-pay-slip-column:last-child {
            border-left: 0 !important;
        }

    .hr-pay-slip-summary-page .hr-pay-slip-document {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-columns {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-footer {
        page-break-inside: avoid;
        break-inside: avoid;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-document {
        font-size: 10px;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-row {
        min-height: 32px;
        padding: 5px 10px;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-column-title {
        min-height: 42px;
        padding: 7px 10px;
    }

    .hr-pay-slip-summary-page .hr-pay-slip-footer {
        min-height: 65px;
        padding: 11px 14px;
    }
}

/* =========================================================
   Employee Financial Ledger - final visual overrides
   These rules intentionally live at the end of the dashboard
   stylesheet so the ledger stays visually consistent with
   the rest of the HR dashboard without changing shared rules.
   ========================================================= */

.hr-fin-page {
    width: 100%;
    max-width: 1600px;
    margin-inline: auto;
    padding-inline: 2px;
}

    .hr-fin-page .hr-job-card,
    .hr-fin-page .hr-pay-toolbar,
    .hr-fin-page .hr-fin-summary-grid {
        width: 100%;
    }

    .hr-fin-page .hr-fin-table-wrap {
        width: 100%;
        overflow-x: auto;
    }

.hr-fin-table {
    min-width: 1120px;
    table-layout: auto;
}

    .hr-fin-table th:nth-child(1) {
        min-width: 180px;
    }

    .hr-fin-table th:nth-child(2) {
        min-width: 105px;
    }

    .hr-fin-table th:nth-child(3),
    .hr-fin-table th:nth-child(5),
    .hr-fin-table th:nth-child(6) {
        min-width: 125px;
    }

    .hr-fin-table th:nth-child(4) {
        min-width: 135px;
    }

    .hr-fin-table th:nth-child(7) {
        min-width: 125px;
    }

    .hr-fin-table th:last-child {
        min-width: 250px;
    }

    .hr-fin-table td:last-child {
        min-width: 250px;
    }

.hr-fin-row-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

    .hr-fin-row-actions > form {
        display: inline-flex;
        margin: 0;
    }

.hr-fin-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
}

.hr-fin-attachments-block {
    min-width: 0;
}

.hr-fin-attachment-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 7px;
    direction: rtl;
    white-space: nowrap;
}

.hr-fin-icon-btn {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

    .hr-fin-icon-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .hr-fin-icon-btn:hover {
        background: var(--tint);
        border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
        color: var(--primary);
        transform: translateY(-1px);
    }

    .hr-fin-icon-btn.is-danger {
        color: var(--danger);
    }

        .hr-fin-icon-btn.is-danger:hover {
            background: color-mix(in srgb, var(--danger) 9%, var(--surface));
            border-color: color-mix(in srgb, var(--danger) 30%, var(--border));
            color: var(--danger);
        }

.hr-fin-installments-panel {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--bg);
}

.hr-fin-installments-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

    .hr-fin-installments-head > div {
        min-width: 0;
    }

    .hr-fin-installments-head strong {
        display: block;
        font-size: 14px;
        font-weight: 800;
        color: var(--text);
    }

    .hr-fin-installments-head span {
        display: block;
        margin-top: 5px;
        color: var(--text-muted);
        font-size: 11.5px;
        line-height: 1.9;
    }

.hr-fin-installments-reset {
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 8px 13px;
    background: var(--surface);
    color: var(--primary);
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
}

    .hr-fin-installments-reset:hover {
        background: var(--tint);
    }

.hr-fin-installments-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

    .hr-fin-installments-summary > div {
        min-width: 0;
        padding: 11px 13px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
    }

    .hr-fin-installments-summary span {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
        font-weight: 600;
    }

    .hr-fin-installments-summary strong {
        display: block;
        margin-top: 4px;
        color: var(--text);
        font-size: 14px;
        font-weight: 800;
    }

    .hr-fin-installments-summary > div.is-ok strong {
        color: var(--success);
    }

    .hr-fin-installments-summary > div.is-error strong {
        color: var(--danger);
    }

.hr-fin-installments-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.hr-fin-installment-item {
    min-width: 0;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 8px;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface);
    cursor: text;
}

.hr-fin-installment-number {
    color: var(--text);
    font-size: 11.5px;
    font-weight: 800;
}

.hr-fin-installment-period {
    color: var(--text-muted);
    font-size: 10.5px;
    text-align: left;
}

.hr-fin-installment-input-wrap {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    align-items: center;
}

.hr-fin-installment-input {
    width: 100%;
    min-width: 0;
    height: 39px;
    padding: 7px 48px 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    direction: ltr;
    text-align: right;
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    outline: none;
}

    .hr-fin-installment-input:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
    }

.hr-fin-installment-input-wrap small {
    position: absolute;
    right: 9px;
    color: var(--text-muted);
    font-size: 9.5px;
    pointer-events: none;
}

.hr-fin-installments-message {
    margin-top: 11px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.8;
}

    .hr-fin-installments-message.is-ok {
        color: var(--success);
        background: color-mix(in srgb, var(--success) 9%, var(--surface));
        border: 1px solid color-mix(in srgb, var(--success) 18%, var(--border));
    }

    .hr-fin-installments-message.is-error {
        color: var(--danger);
        background: color-mix(in srgb, var(--danger) 9%, var(--surface));
        border: 1px solid color-mix(in srgb, var(--danger) 18%, var(--border));
    }

.hr-fin-submit-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 1280px) {
    .hr-fin-installments-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-fin-table {
        min-width: 1050px;
    }
}

@media (max-width: 1000px) {
    .hr-fin-installments-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-fin-installments-summary {
        grid-template-columns: 1fr;
    }

    .hr-fin-attachment-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .hr-fin-page {
        padding-inline: 0;
    }

    .hr-fin-installments-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-fin-installments-reset {
        width: 100%;
    }

    .hr-fin-installments-grid {
        grid-template-columns: 1fr;
    }

    .hr-fin-table {
        min-width: 980px;
    }

        .hr-fin-table th:last-child,
        .hr-fin-table td:last-child {
            min-width: 210px;
        }
}


/* Give the financial ledger more horizontal room without changing other dashboard pages. */
.content:has(.hr-fin-page) {
    max-width: 1660px;
}

.hr-job-page.hr-fin-page {
    max-width: 1600px;
}

/* Employee Financial Ledger - search and compact collapsible transaction sections */
.hr-fin-search-card {
    margin-top: 18px;
}

.hr-fin-search-head {
    align-items: center;
}

    .hr-fin-search-head > span {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
    }

.hr-fin-search-box {
    padding: 0 18px 18px;
}

.hr-fin-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    transition: border-color .18s ease, box-shadow .18s ease;
}

    .hr-fin-search-input-wrap:focus-within {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
    }

    .hr-fin-search-input-wrap > svg {
        width: 19px;
        height: 19px;
        margin-inline: 14px 9px;
        fill: none;
        stroke: var(--text-muted);
        stroke-width: 1.8;
        flex: 0 0 auto;
    }

    .hr-fin-search-input-wrap input {
        width: 100%;
        min-width: 0;
        height: 46px;
        border: 0;
        outline: 0;
        background: transparent;
        color: var(--text);
        font-family: inherit;
        font-size: 12px;
        font-weight: 600;
    }

        .hr-fin-search-input-wrap input::placeholder {
            color: var(--text-muted);
            opacity: .78;
        }

.hr-fin-search-clear {
    width: 30px;
    height: 30px;
    margin-inline: 7px 9px;
    border: 0;
    border-radius: 8px;
    background: var(--surface-soft, #f5f6f8);
    color: var(--text-muted);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex: 0 0 auto;
}

    .hr-fin-search-clear:hover {
        color: var(--danger);
    }

.hr-fin-transaction-section {
    margin-top: 16px;
}

    .hr-fin-transaction-section > summary {
        cursor: pointer;
        user-select: none;
    }

        .hr-fin-transaction-section > summary::marker {
            color: var(--primary);
        }

    .hr-fin-transaction-section[open] > summary {
        border-bottom: 1px solid var(--border);
    }

    .hr-fin-transaction-section:not([open]) {
        overflow: hidden;
    }

    .hr-fin-transaction-row[hidden],
    .hr-fin-transaction-section[hidden] {
        display: none !important;
    }

.hr-fin-search-empty {
    margin-top: 18px;
    padding: 22px 20px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--surface);
    text-align: center;
}

    .hr-fin-search-empty strong,
    .hr-fin-search-empty span {
        display: block;
    }

    .hr-fin-search-empty strong {
        margin-bottom: 5px;
        color: var(--text);
        font-size: 13px;
    }

    .hr-fin-search-empty span {
        color: var(--text-muted);
        font-size: 11px;
    }

@media (max-width: 720px) {
    .hr-fin-search-head > span {
        white-space: normal;
    }

    .hr-fin-search-box {
        padding-inline: 12px;
    }

    .hr-fin-search-input-wrap input {
        font-size: 11px;
    }
}


/* ==========================================================================
   Consultant contract payroll
   Contract type: ?????
   Added at the end of hr-dashboard.css
   ========================================================================== */
.hr-pay-consultant-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 18px;
    border: 1px solid rgba(91, 111, 255, 0.18);
    border-radius: 16px;
    background: rgba(91, 111, 255, 0.06);
    color: #334155;
}

    .hr-pay-consultant-notice strong {
        color: #334155;
    }

.hr-pay-consultant-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(91, 111, 255, 0.12);
    color: #4f46e5;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hr-pay-consultant-notice {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   Company management + company profile
   Added at the end intentionally. Existing dashboard styles
   above this section are not modified.
   ========================================================= */

.nav-management-group {
    margin: 0;
}

.nav-management-title {
    cursor: pointer;
    user-select: none;
}

    .nav-management-title .nav-chevron {
        margin-inline-start: auto;
        font-size: 18px;
        line-height: 1;
        transition: transform .18s ease;
    }

.nav-management-group.open .nav-management-title .nav-chevron {
    transform: rotate(180deg);
}

.nav-management-group .nav-submenu {
    display: none;
    padding: 2px 0 4px;
}

.nav-management-group.open .nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-management-group .nav-subitem {
    margin-inline: 31px 4px;
    padding: 8px 2px;
    border-radius: 8px;
    color: var(--sidebar-text-muted);
    font-size: 12.5px;
    transition: background .18s ease, color .18s ease;
}

    .nav-management-group .nav-subitem:hover {
        background: rgba(255, 255, 255, .07);
        color: #fff;
    }

    .nav-management-group .nav-subitem.active {
        background: rgba(0, 216, 223, .16);
        color: #fff;
        font-weight: 700;
    }

.sidebar.collapsed .nav-management-group .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-management-title .nav-chevron {
    display: none;
}

.hr-company-page {
    width: min(100%, 1180px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-company-hero {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 26px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.hr-company-eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 7px;
}

.hr-company-hero h1 {
    font-size: 24px;
    line-height: 1.5;
    font-weight: 800;
    margin: 0 0 7px;
}

.hr-company-hero p {
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.9;
    max-width: 720px;
}

.hr-company-hero-icon {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    flex: 0 0 76px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

    .hr-company-hero-icon svg {
        width: 38px;
        height: 38px;
    }

.hr-company-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 14px;
    padding: 13px 16px;
    font-size: 13px;
    line-height: 1.7;
}

    .hr-company-alert svg {
        width: 20px;
        height: 20px;
        flex: 0 0 20px;
    }

.hr-company-alert-success {
    color: var(--success);
    background: color-mix(in srgb, var(--success) 11%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--success) 20%, var(--border));
}

.hr-company-form {
    width: 100%;
}

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

.hr-company-card-head {
    padding: 22px 26px;
    border-bottom: 1px solid var(--border);
}

.hr-company-card-title {
    display: flex;
    align-items: center;
    gap: 13px;
}

.hr-company-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 11%, transparent);
}

    .hr-company-card-icon svg {
        width: 23px;
        height: 23px;
    }

.hr-company-card-title h2 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 3px;
}

.hr-company-card-title p {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.hr-company-fields {
    padding: 26px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.hr-company-field {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hr-company-field-wide {
    grid-column: 1 / -1;
}

.hr-company-field > span {
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
}

.hr-company-field input,
.hr-company-field textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    padding: 11px 13px;
    min-height: 44px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.hr-company-field textarea {
    min-height: 105px;
    resize: vertical;
    line-height: 1.9;
}

    .hr-company-field input::placeholder,
    .hr-company-field textarea::placeholder {
        color: var(--text-muted);
        opacity: .75;
    }

    .hr-company-field input:focus,
    .hr-company-field textarea:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
    }

.hr-company-field small {
    min-height: 17px;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.5;
}

.hr-company-validation {
    margin: 18px 26px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--danger) 8%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--danger) 18%, var(--border));
    color: var(--danger);
    font-size: 12px;
}

    .hr-company-validation:empty {
        display: none;
    }

.hr-company-save-bar {
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 45%, var(--surface));
    padding: 18px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .hr-company-save-bar > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .hr-company-save-bar strong {
        font-size: 13px;
        font-weight: 800;
    }

    .hr-company-save-bar span {
        color: var(--text-muted);
        font-size: 11.5px;
        line-height: 1.7;
    }

.hr-company-save-btn {
    min-height: 44px;
    border: 0;
    border-radius: 11px;
    padding: 0 20px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 18%, transparent);
    transition: transform .18s ease, opacity .18s ease;
}

    .hr-company-save-btn:hover {
        opacity: .92;
        transform: translateY(-1px);
    }

    .hr-company-save-btn svg {
        width: 18px;
        height: 18px;
    }

@media (max-width: 850px) {
    .hr-company-page {
        width: min(100%, 100%);
    }

    .hr-company-hero {
        padding: 22px;
    }

    .hr-company-fields {
        padding: 22px;
        gap: 17px;
    }

    .hr-company-save-bar {
        padding: 17px 22px;
    }
}

@media (max-width: 650px) {
    .hr-company-hero {
        align-items: flex-start;
        padding: 20px;
    }

        .hr-company-hero h1 {
            font-size: 20px;
        }

    .hr-company-hero-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 16px;
    }

        .hr-company-hero-icon svg {
            width: 29px;
            height: 29px;
        }

    .hr-company-card-head {
        padding: 19px;
    }

    .hr-company-fields {
        grid-template-columns: 1fr;
        padding: 19px;
    }

    .hr-company-field-wide {
        grid-column: auto;
    }

    .hr-company-save-bar {
        align-items: stretch;
        flex-direction: column;
        padding: 17px 19px;
    }

    .hr-company-save-btn {
        width: 100%;
    }
}

@media (max-width: 430px) {
    .hr-company-hero {
        gap: 14px;
    }

    .hr-company-hero-icon {
        display: none;
    }

    .hr-company-card-title {
        align-items: flex-start;
    }

    .hr-company-card-icon {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

        .hr-company-card-icon svg {
            width: 21px;
            height: 21px;
        }
}

/* =========================================================
   Company Profile Management - New Styles
   These styles are intentionally appended to preserve all
   existing dashboard styles.
   ========================================================= */

.hr-company-alert-error {
    border-color: rgba(220, 38, 38, 0.16);
    background: rgba(220, 38, 38, 0.06);
    color: #b42318;
}

.hr-company-profile-card {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.07);
    padding: 28px;
    margin-top: 24px;
}

.hr-company-profile-top {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-company-logo-wrap {
    width: 112px;
    height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 22px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-company-logo {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 10px;
}

.hr-company-logo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #94a3b8;
    text-align: center;
}

    .hr-company-logo-placeholder svg {
        width: 34px;
        height: 34px;
    }

    .hr-company-logo-placeholder span {
        font-size: 12px;
        font-weight: 700;
    }

.hr-company-profile-heading {
    min-width: 0;
}

.hr-company-status {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.09);
    color: #047857;
    font-size: 12px;
    font-weight: 800;
}

.hr-company-profile-heading h2 {
    margin: 10px 0 7px;
    color: #0f172a;
    font-size: clamp(21px, 2vw, 29px);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.hr-company-profile-heading p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.9;
}

.hr-company-profile-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .hr-company-profile-actions form {
        margin: 0;
    }

.hr-company-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .hr-company-action:hover {
        transform: translateY(-1px);
    }

    .hr-company-action svg {
        width: 18px;
        height: 18px;
        flex: 0 0 18px;
    }

.hr-company-action-primary {
    background: #0f172a;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

    .hr-company-action-primary:hover {
        background: #1e293b;
    }

.hr-company-action-danger {
    background: #ffffff;
    color: #b42318;
    border-color: rgba(220, 38, 38, 0.18);
}

    .hr-company-action-danger:hover {
        background: rgba(220, 38, 38, 0.05);
    }

.hr-company-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.hr-company-detail-item {
    min-width: 0;
    padding: 17px 18px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.06);
}

    .hr-company-detail-item span {
        display: block;
        margin-bottom: 8px;
        color: #64748b;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-company-detail-item strong {
        display: block;
        color: #1e293b;
        font-size: 14px;
        line-height: 1.9;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

.hr-company-detail-address {
    grid-column: 1 / -1;
}

.hr-company-logo-management {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 16px 18px;
    border-radius: 16px;
    background: #fff7f7;
    border: 1px solid rgba(220, 38, 38, 0.1);
}

    .hr-company-logo-management strong,
    .hr-company-logo-management span {
        display: block;
    }

    .hr-company-logo-management strong {
        margin-bottom: 5px;
        color: #334155;
        font-size: 13px;
    }

    .hr-company-logo-management span {
        color: #64748b;
        font-size: 12px;
        line-height: 1.8;
    }

.hr-company-remove-logo {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(220, 38, 38, 0.18);
    border-radius: 10px;
    background: #ffffff;
    color: #b42318;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;
}

.hr-company-logo-upload {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 22px;
    margin-bottom: 26px;
    padding: 18px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.07);
}

.hr-company-logo-upload-preview {
    width: 112px;
    height: 112px;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hr-company-logo-upload-content {
    min-width: 0;
}

    .hr-company-logo-upload-content strong {
        display: block;
        margin-bottom: 5px;
        color: #1e293b;
        font-size: 15px;
    }

    .hr-company-logo-upload-content p {
        margin: 0 0 14px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.8;
    }

.hr-company-file-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    background: #0f172a;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    overflow: hidden;
}

    .hr-company-file-button input[type="file"] {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.hr-company-logo-upload-content small {
    display: block;
    margin-top: 9px;
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.8;
}

.hr-company-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.hr-company-cancel-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #ffffff;
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .hr-company-profile-top {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .hr-company-logo-wrap {
        width: 96px;
        height: 96px;
    }

    .hr-company-profile-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .hr-company-profile-card {
        padding: 20px;
        border-radius: 20px;
    }

    .hr-company-profile-top {
        grid-template-columns: 84px minmax(0, 1fr);
        gap: 16px;
    }

    .hr-company-logo-wrap {
        width: 84px;
        height: 84px;
        border-radius: 17px;
    }

    .hr-company-details-grid {
        grid-template-columns: 1fr;
    }

    .hr-company-detail-address {
        grid-column: auto;
    }

    .hr-company-logo-upload {
        grid-template-columns: 86px minmax(0, 1fr);
        gap: 16px;
        padding: 14px;
    }

    .hr-company-logo-upload-preview {
        width: 86px;
        height: 86px;
        border-radius: 16px;
    }

    .hr-company-logo-management {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-company-remove-logo {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .hr-company-profile-card {
        padding: 15px;
        margin-top: 16px;
    }

    .hr-company-profile-top {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hr-company-logo-wrap {
        width: 92px;
        height: 92px;
        margin: 0 auto;
    }

    .hr-company-profile-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

        .hr-company-profile-actions form,
        .hr-company-action {
            width: 100%;
        }

    .hr-company-logo-upload {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hr-company-logo-upload-preview {
        width: 96px;
        height: 96px;
        margin: 0 auto;
    }

    .hr-company-file-button {
        width: 100%;
    }

    .hr-company-save-bar {
        align-items: stretch;
        gap: 15px;
    }

    .hr-company-form-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .hr-company-cancel-btn,
    .hr-company-save-btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .hr-company-profile-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   Annual Payroll Report
   New styles for ????? ?????? ????
   ========================================================= */

.nav-reports-group {
    margin: 0;
}

.nav-reports-title {
    cursor: pointer;
    user-select: none;
}

    .nav-reports-title .nav-chevron {
        margin-inline-start: auto;
        font-size: 18px;
        line-height: 1;
        transition: transform .18s ease;
    }

.nav-reports-group.open .nav-reports-title .nav-chevron {
    transform: rotate(180deg);
}

.nav-reports-group .nav-submenu {
    display: none;
    padding: 2px 0 4px;
}

.nav-reports-group.open .nav-submenu {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-reports-group .nav-subitem {
    margin-inline: 31px 4px;
    padding: 8px 2px;
    border-radius: 8px;
    color: var(--sidebar-text-muted);
    font-size: 12.5px;
    transition: background .18s ease, color .18s ease;
}

    .nav-reports-group .nav-subitem:hover {
        background: rgba(255, 255, 255, .07);
        color: #fff;
    }

    .nav-reports-group .nav-subitem.active {
        background: rgba(0, 216, 223, .16);
        color: #fff;
        font-weight: 700;
    }

.sidebar.collapsed .nav-reports-group .nav-submenu {
    display: none;
}

.sidebar.collapsed .nav-reports-title .nav-chevron {
    display: none;
}

.hr-annual-report-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 22px 24px 44px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-annual-report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hr-annual-report-hero-content {
    min-width: 0;
}

.hr-annual-report-eyebrow,
.hr-annual-report-table-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.hr-annual-report-hero h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(16px, 1.9vw, 24px);
    line-height: 1.45;
    font-weight: 800;
}

.hr-annual-report-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}

.hr-annual-report-hero-icon {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

    .hr-annual-report-hero-icon svg {
        width: 38px;
        height: 38px;
    }

.hr-annual-report-filter-card,
.hr-annual-report-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.hr-annual-report-filter-card {
    padding: 18px;
}

.hr-annual-report-filter-form {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(260px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.hr-annual-report-filter-field {
    min-width: 0;
}

    .hr-annual-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-annual-report-filter-field select,
    .hr-annual-report-filter-field input {
        width: 100%;
        min-height: 46px;
        padding: 0 13px;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-annual-report-filter-field select:focus,
        .hr-annual-report-filter-field input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-annual-report-search-wrap {
    position: relative;
}

    .hr-annual-report-search-wrap svg {
        position: absolute;
        inset-inline-end: 13px;
        top: 50%;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }

    .hr-annual-report-search-wrap input {
        padding-inline-end: 40px;
    }

.hr-annual-report-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hr-annual-report-search-button,
.hr-annual-report-clear-button {
    min-height: 46px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

.hr-annual-report-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 17px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

    .hr-annual-report-search-button:hover {
        filter: brightness(.96);
        transform: translateY(-1px);
    }

    .hr-annual-report-search-button svg {
        width: 17px;
        height: 17px;
    }

.hr-annual-report-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
}

    .hr-annual-report-clear-button:hover {
        color: var(--text);
        background: var(--bg);
    }

.hr-annual-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hr-annual-report-summary-card {
    min-width: 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

    .hr-annual-report-summary-card span,
    .hr-annual-report-summary-card small {
        display: block;
    }

    .hr-annual-report-summary-card span {
        margin-bottom: 8px;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .hr-annual-report-summary-card strong {
        display: block;
        overflow: hidden;
        color: var(--text);
        font-size: clamp(16px, 1.7vw, 20px);
        font-weight: 800;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hr-annual-report-summary-card small {
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 10.5px;
    }

    .hr-annual-report-summary-card:nth-child(n+2) strong {
        font-size: clamp(16px, 1.7vw, 20px);
    }

.hr-annual-report-summary-card-primary {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

    .hr-annual-report-summary-card-primary strong {
        color: var(--primary);
    }

.hr-annual-report-table-card {
    overflow: hidden;
}

.hr-annual-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-annual-report-table-head h2 {
        margin: 0;
        color: var(--text);
        font-size: 18px;
        font-weight: 800;
    }

.hr-annual-report-table-note {
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.8;
    text-align: end;
}

.hr-annual-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-annual-report-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 12px;
}

    .hr-annual-report-table th,
    .hr-annual-report-table td {
        padding: 13px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        text-align: right;
        white-space: nowrap;
    }

    .hr-annual-report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-annual-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

    .hr-annual-report-table tbody tr:last-child td {
        border-bottom: 1px solid var(--border);
    }

    .hr-annual-report-table tfoot th,
    .hr-annual-report-table tfoot td {
        background: color-mix(in srgb, var(--primary) 5%, var(--surface));
        border-bottom: 0;
        font-weight: 800;
    }

    .hr-annual-report-table tfoot th {
        color: var(--text);
    }

.hr-annual-report-index {
    width: 48px;
    color: var(--text-muted);
    text-align: center !important;
}

.hr-annual-report-employee-cell {
    min-width: 150px;
}

    .hr-annual-report-employee-cell strong {
        display: block;
        color: var(--text);
        font-size: 12.5px;
        font-weight: 800;
    }

    .hr-annual-report-employee-cell small {
        display: block;
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 10px;
    }

.hr-annual-report-code {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hr-annual-report-grade {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 800;
}

.hr-annual-report-money {
    direction: ltr;
    text-align: right !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.hr-annual-report-deduction {
    color: #b45309;
}

.hr-annual-report-net {
    color: var(--success);
}

.hr-annual-report-empty {
    min-height: 260px;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.hr-annual-report-empty-icon {
    width: 54px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    color: var(--primary);
}

    .hr-annual-report-empty-icon svg {
        width: 25px;
        height: 25px;
    }

.hr-annual-report-empty strong {
    color: var(--text);
    font-size: 14px;
}

.hr-annual-report-empty span {
    color: var(--text-muted);
    font-size: 12px;
}

@media (max-width: 1100px) {
    .hr-annual-report-filter-form {
        grid-template-columns: 190px minmax(220px, 1fr);
    }

    .hr-annual-report-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .hr-annual-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hr-annual-report-page {
        padding: 16px 15px 32px;
        gap: 14px;
    }

    .hr-annual-report-hero {
        padding: 20px;
        align-items: flex-start;
    }

    .hr-annual-report-hero-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 16px;
    }

        .hr-annual-report-hero-icon svg {
            width: 30px;
            height: 30px;
        }

    .hr-annual-report-filter-form {
        grid-template-columns: 1fr;
    }

    .hr-annual-report-filter-actions {
        width: 100%;
    }

    .hr-annual-report-search-button,
    .hr-annual-report-clear-button {
        flex: 1;
    }

    .hr-annual-report-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hr-annual-report-summary-card {
        padding: 15px;
    }

    .hr-annual-report-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 16px 14px;
    }

    .hr-annual-report-table-note {
        text-align: start;
    }

    .hr-annual-report-table th,
    .hr-annual-report-table td {
        padding: 11px 10px;
    }
}

@media (max-width: 520px) {
    .hr-annual-report-hero {
        padding: 17px;
    }

    .hr-annual-report-hero-icon {
        display: none;
    }

    .hr-annual-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-annual-report-filter-card {
        padding: 14px;
    }

    .hr-annual-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hr-annual-report-search-button,
    .hr-annual-report-clear-button {
        width: 100%;
    }

    .hr-annual-report-table {
        min-width: 1180px;
    }
}

@media (max-width: 380px) {
    .hr-annual-report-filter-actions {
        grid-template-columns: 1fr;
    }
}

/* =====================================================================
   ????? ?????? ????? ????? (hr-doc-report-*)
   ?????????? ??? ?????? ???? ????? ? ?? ?????????? ????? ?? ???? ???
   ????????. ????? ????????? ??????? ? ???????? ????? ?????? ?? ???
   ?????? ?????? ????? (hr-annual-report-*) ????? ??? ?? ???? ??????
   ?? ?? ??? ??????? ???? ????? ????.
   ===================================================================== */

.hr-doc-report-page {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: 22px 24px 44px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-doc-report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.hr-doc-report-hero-content {
    min-width: 0;
}

.hr-doc-report-eyebrow,
.hr-doc-report-table-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.hr-doc-report-hero h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(21px, 2.2vw, 28px);
    line-height: 1.45;
    font-weight: 800;
}

.hr-doc-report-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}

.hr-doc-report-hero-icon {
    width: 74px;
    height: 74px;
    flex: 0 0 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 12%, transparent);
}

    .hr-doc-report-hero-icon svg {
        width: 38px;
        height: 38px;
    }

.hr-doc-report-filter-card,
.hr-doc-report-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.hr-doc-report-filter-card {
    padding: 18px;
}

.hr-doc-report-filter-form {
    display: grid;
    grid-template-columns: minmax(170px, 230px) minmax(260px, 1fr) auto;
    align-items: end;
    gap: 14px;
}

.hr-doc-report-filter-field {
    min-width: 0;
}

    .hr-doc-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-doc-report-filter-field select,
    .hr-doc-report-filter-field input {
        width: 100%;
        min-height: 46px;
        padding: 0 13px;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-doc-report-filter-field select:focus,
        .hr-doc-report-filter-field input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-doc-report-search-wrap {
    position: relative;
}

    .hr-doc-report-search-wrap svg {
        position: absolute;
        inset-inline-end: 13px;
        top: 50%;
        width: 18px;
        height: 18px;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }

    .hr-doc-report-search-wrap input {
        padding-inline-end: 40px;
    }

.hr-doc-report-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hr-doc-report-search-button,
.hr-doc-report-clear-button {
    min-height: 46px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
}

.hr-doc-report-search-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 17px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

    .hr-doc-report-search-button:hover {
        filter: brightness(.96);
        transform: translateY(-1px);
    }

    .hr-doc-report-search-button svg {
        width: 17px;
        height: 17px;
    }

.hr-doc-report-clear-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    text-decoration: none;
}

    .hr-doc-report-clear-button:hover {
        color: var(--text);
        background: var(--bg);
    }

.hr-doc-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hr-doc-report-summary-card {
    min-width: 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

    .hr-doc-report-summary-card span,
    .hr-doc-report-summary-card small {
        display: block;
    }

    .hr-doc-report-summary-card span {
        margin-bottom: 8px;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .hr-doc-report-summary-card strong {
        display: block;
        overflow: hidden;
        color: var(--text);
        font-size: clamp(18px, 2vw, 23px);
        font-weight: 800;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hr-doc-report-summary-card small {
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 10.5px;
    }

.hr-doc-report-summary-card-primary {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
}

    .hr-doc-report-summary-card-primary strong {
        color: var(--primary);
    }

.hr-doc-report-table-card {
    overflow: hidden;
}

.hr-doc-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-doc-report-table-head h2 {
        margin: 0;
        color: var(--text);
        font-size: 18px;
        font-weight: 800;
    }

.hr-doc-report-table-note {
    max-width: 420px;
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.8;
    text-align: end;
}

.hr-doc-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-doc-report-table {
    width: 100%;
    min-width: 1320px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 12px;
}

    .hr-doc-report-table th,
    .hr-doc-report-table td {
        padding: 13px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        text-align: right;
        white-space: nowrap;
    }

    .hr-doc-report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-doc-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

    .hr-doc-report-table tbody tr:last-child td {
        border-bottom: 1px solid var(--border);
    }

.hr-doc-report-index {
    width: 44px;
    color: var(--text-muted);
    font-weight: 700;
}

.hr-doc-report-employee-cell strong {
    display: block;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 800;
}

.hr-doc-report-code {
    direction: ltr;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.hr-doc-report-date {
    direction: ltr;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.hr-doc-report-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 3px 9px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
}

.hr-doc-report-children {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.hr-doc-report-progress-cell {
    min-width: 200px;
    white-space: normal;
}

.hr-doc-report-progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 180px;
}

.hr-doc-report-progress-track {
    position: relative;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: color-mix(in srgb, var(--text-muted) 18%, transparent);
}

.hr-doc-report-progress-fill {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    height: 100%;
    min-width: 3%;
    border-radius: 999px;
    transition: width .25s ease;
}

.hr-doc-report-bar-fill-full {
    background: var(--success);
}

.hr-doc-report-bar-fill-mid {
    /* ??? --warning ?? ???????? ????? ????? ????? ???? ??????? ?? ????? ??????? ??????? ????? ????? ??? */
    background: var(--warning, #f0a92e);
}

.hr-doc-report-bar-fill-low {
    background: var(--danger);
}

.hr-doc-report-progress-label {
    color: var(--text-muted);
    font-size: 10.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.hr-doc-report-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 60px 20px;
    text-align: center;
}

.hr-doc-report-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    color: var(--text-muted);
    background: color-mix(in srgb, var(--text-muted) 10%, transparent);
}

    .hr-doc-report-empty-icon svg {
        width: 26px;
        height: 26px;
    }

.hr-doc-report-empty strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
}

.hr-doc-report-empty span {
    color: var(--text-muted);
    font-size: 12px;
}

/* ---------- ?????????: ???? ---------- */
@media (max-width: 1024px) {
    .hr-doc-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-doc-report-filter-form {
        grid-template-columns: minmax(150px, 200px) minmax(220px, 1fr) auto;
    }
}

/* ---------- ?????????: ?????? ???? / ???? ????? ---------- */
@media (max-width: 768px) {
    .hr-doc-report-page {
        padding: 16px 15px 32px;
        gap: 14px;
    }

    .hr-doc-report-hero {
        padding: 20px;
        align-items: flex-start;
    }

    .hr-doc-report-hero-icon {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 16px;
    }

        .hr-doc-report-hero-icon svg {
            width: 30px;
            height: 30px;
        }

    .hr-doc-report-filter-form {
        grid-template-columns: 1fr;
    }

    .hr-doc-report-filter-actions {
        width: 100%;
    }

    .hr-doc-report-search-button,
    .hr-doc-report-clear-button {
        flex: 1;
    }

    .hr-doc-report-summary-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .hr-doc-report-summary-card {
        padding: 15px;
    }

    .hr-doc-report-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 16px 14px;
    }

    .hr-doc-report-table-note {
        max-width: none;
        text-align: start;
    }

    .hr-doc-report-table th,
    .hr-doc-report-table td {
        padding: 11px 10px;
    }
}

/* ---------- ?????????: ?????? ---------- */
@media (max-width: 520px) {
    .hr-doc-report-hero {
        padding: 17px;
    }

    .hr-doc-report-hero-icon {
        display: none;
    }

    .hr-doc-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-doc-report-filter-card {
        padding: 14px;
    }

    .hr-doc-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hr-doc-report-search-button,
    .hr-doc-report-clear-button {
        width: 100%;
    }

    .hr-doc-report-table {
        min-width: 1220px;
    }

    .hr-doc-report-progress-cell {
        min-width: 160px;
    }
}

/* ---------- ?????????: ?????? ????? ???? ---------- */
@media (max-width: 380px) {
    .hr-doc-report-filter-actions {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   ????? ?????? ???? - ?????????? ??????
   ??? ??? ????? ?? ?????? ???? ???? ????? ??? ? ??????????
   ???? hr-dashboard.css ?? ????? ???????.
   ========================================================= */

.hr-monthly-report-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 28px;
}

.hr-monthly-report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    margin-bottom: 18px;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(239,246,255,0.82));
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.hr-monthly-report-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 800;
}

.hr-monthly-report-hero h1 {
    margin: 0;
    color: #172033;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 800;
}

.hr-monthly-report-hero p {
    max-width: 820px;
    margin: 9px 0 0;
    color: #667085;
    line-height: 1.9;
}

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

.hr-monthly-report-export {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

    .hr-monthly-report-export:hover {
        transform: translateY(-1px);
    }

.hr-monthly-report-export-excel {
    color: #ffffff;
    background: #16835b;
    box-shadow: 0 8px 18px rgba(22, 131, 91, 0.18);
}

.hr-monthly-report-export-pdf {
    color: #ffffff;
    background: #dc4c4c;
    box-shadow: 0 8px 18px rgba(220, 76, 76, 0.18);
}

.hr-monthly-report-filters {
    display: grid;
    grid-template-columns: minmax(150px, 190px) minmax(150px, 190px) minmax(240px, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 18px;
    margin-bottom: 18px;
    border: 1px solid #e6eaf0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.hr-monthly-report-filter {
    min-width: 0;
}

    .hr-monthly-report-filter label {
        display: block;
        margin-bottom: 7px;
        color: #475467;
        font-size: 12px;
        font-weight: 800;
    }

    .hr-monthly-report-filter select,
    .hr-monthly-report-filter input {
        width: 100%;
        min-height: 45px;
        padding: 0 13px;
        border: 1px solid #d9dee8;
        border-radius: 11px;
        outline: none;
        background: #ffffff;
        color: #172033;
        font: inherit;
    }

        .hr-monthly-report-filter select:focus,
        .hr-monthly-report-filter input:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.11);
        }

.hr-monthly-report-filter-button {
    min-height: 45px;
    padding: 0 20px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    color: #ffffff;
    background: #3b82f6;
    font: inherit;
    font-weight: 800;
    white-space: nowrap;
}

.hr-monthly-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

    .hr-monthly-report-summary > div {
        min-width: 0;
        padding: 18px;
        border: 1px solid #e7ebf1;
        border-radius: 18px;
        background: #ffffff;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
    }

    .hr-monthly-report-summary span,
    .hr-monthly-report-summary small {
        display: block;
        color: #7a8495;
    }

    .hr-monthly-report-summary span {
        margin-bottom: 8px;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-monthly-report-summary strong {
        display: block;
        color: #172033;
        font-size: clamp(18px, 1.8vw, 25px);
        line-height: 1.3;
    }

    .hr-monthly-report-summary small {
        margin-top: 5px;
        font-size: 11px;
    }

.hr-monthly-report-summary-net {
    border-color: rgba(59, 130, 246, 0.22) !important;
    background: linear-gradient(135deg, #eff6ff, #ffffff) !important;
}

.hr-monthly-report-table-card {
    overflow: hidden;
    border: 1px solid #e6eaf0;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hr-monthly-report-table-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 21px 22px;
    border-bottom: 1px solid #edf0f4;
}

    .hr-monthly-report-table-head > div > span {
        color: #3b82f6;
        font-size: 12px;
        font-weight: 800;
    }

    .hr-monthly-report-table-head h2 {
        margin: 5px 0 0;
        color: #172033;
        font-size: 20px;
    }

    .hr-monthly-report-table-head p {
        margin: 0;
        color: #7a8495;
        font-size: 12px;
        line-height: 1.8;
    }

.hr-monthly-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-monthly-report-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
    white-space: nowrap;
}

    .hr-monthly-report-table th,
    .hr-monthly-report-table td {
        padding: 13px 10px;
        border-bottom: 1px solid #edf0f4;
        text-align: center;
        vertical-align: middle;
    }

    .hr-monthly-report-table thead th {
        position: sticky;
        top: 0;
        z-index: 1;
        color: #536074;
        background: #f8fafc;
        font-size: 11px;
        font-weight: 800;
    }

    .hr-monthly-report-table tbody tr:hover {
        background: #f8fbff;
    }

    .hr-monthly-report-table tbody td {
        color: #3f4b5e;
        font-size: 12px;
    }

        .hr-monthly-report-table tbody td:first-child {
            color: #98a2b3;
            font-weight: 700;
        }

.hr-monthly-report-code {
    direction: ltr;
    font-family: "Space Mono", Consolas, monospace;
    letter-spacing: 0.02em;
}

.hr-monthly-report-grade {
    display: inline-flex;
    min-width: 42px;
    min-height: 28px;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-radius: 8px;
    color: #2563eb;
    background: #eff6ff;
    font-weight: 800;
}

.hr-monthly-report-money {
    direction: ltr;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.hr-monthly-report-deduction {
    color: #c24141 !important;
}

.hr-monthly-report-net {
    color: #0f766e !important;
}

.hr-monthly-report-table tfoot th {
    padding: 15px 10px;
    color: #172033;
    background: #f4f7fb;
    font-weight: 900;
}

.hr-monthly-report-empty {
    display: flex;
    min-height: 220px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px;
    text-align: center;
}

    .hr-monthly-report-empty strong {
        color: #344054;
        font-size: 16px;
    }

    .hr-monthly-report-empty span {
        color: #8a94a6;
        font-size: 12px;
    }

@media (max-width: 1100px) {
    .hr-monthly-report-page {
        padding: 20px;
    }

    .hr-monthly-report-hero {
        flex-direction: column;
    }

    .hr-monthly-report-actions {
        width: 100%;
    }

    .hr-monthly-report-export {
        flex: 1 1 180px;
    }

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

    .hr-monthly-report-search {
        grid-column: 1 / -1;
    }

    .hr-monthly-report-filter-button {
        width: 100%;
    }

    .hr-monthly-report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hr-monthly-report-page {
        padding: 12px;
    }

    .hr-monthly-report-hero {
        padding: 18px;
        border-radius: 18px;
    }

        .hr-monthly-report-hero h1 {
            font-size: 22px;
        }

    .hr-monthly-report-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hr-monthly-report-export {
        width: 100%;
    }

    .hr-monthly-report-filters {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 16px;
    }

    .hr-monthly-report-search {
        grid-column: auto;
    }

    .hr-monthly-report-summary {
        grid-template-columns: 1fr;
    }

        .hr-monthly-report-summary > div {
            padding: 15px;
        }

    .hr-monthly-report-table-card {
        border-radius: 17px;
    }

    .hr-monthly-report-table-head {
        flex-direction: column;
        padding: 17px;
    }

    .hr-monthly-report-table th,
    .hr-monthly-report-table td {
        padding: 11px 8px;
    }
}

@media (max-width: 420px) {
    .hr-monthly-report-page {
        padding: 8px;
    }

    .hr-monthly-report-hero h1 {
        font-size: 20px;
    }

    .hr-monthly-report-hero p {
        font-size: 12px;
    }

    .hr-monthly-report-summary strong {
        font-size: 20px;
    }
}


/* ===== Monthly Payroll Report - Main Account Columns (new styles) ===== */
.hr-monthly-report-bank-number {
    direction: ltr;
    unicode-bidi: plaintext;
    white-space: nowrap;
    font-family: "Consolas", "Courier New", monospace;
    letter-spacing: 0.15px;
    min-width: 170px;
}

@media (max-width: 1100px) {
    .hr-monthly-report-bank-number {
        min-width: 160px;
    }
}

@media (max-width: 700px) {
    .hr-monthly-report-bank-number {
        min-width: 165px;
    }
}


/* =========================================================
   ??? ????? ?????? ????? ?? ???? ? ???????? ?????
   ??? ????????? ????? ?? ?????? ???? ???? ?????????.
   ========================================================= */

.hr-extra-payments-card,
.hr-extra-ledger-card {
    overflow: hidden;
}

.hr-extra-payments-head {
    align-items: flex-start;
}

    .hr-extra-payments-head > span {
        max-width: 620px;
        line-height: 1.9;
    }

.hr-extra-balance-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    padding: 0 22px 20px;
}

.hr-extra-balance-card {
    min-width: 0;
    padding: 17px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface-2);
}

    .hr-extra-balance-card span {
        display: block;
        color: var(--text-muted);
        font-size: 12px;
        margin-bottom: 7px;
    }

    .hr-extra-balance-card strong {
        display: block;
        color: var(--text);
        font-size: 18px;
        line-height: 1.7;
        overflow-wrap: anywhere;
    }

    .hr-extra-balance-card small {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
        line-height: 1.8;
        margin-top: 4px;
    }

    .hr-extra-balance-card.is-credit {
        border-color: color-mix(in srgb, var(--success) 28%, var(--border));
        background: color-mix(in srgb, var(--success) 6%, var(--surface));
    }

        .hr-extra-balance-card.is-credit strong {
            color: var(--success);
        }

    .hr-extra-balance-card.is-available {
        border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
        background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    }

        .hr-extra-balance-card.is-available strong {
            color: var(--primary);
        }

    .hr-extra-balance-card.is-debtor {
        border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
        background: color-mix(in srgb, var(--danger) 5%, var(--surface));
    }

        .hr-extra-balance-card.is-debtor strong {
            color: var(--danger);
        }

.hr-extra-payment-form-wrap {
    padding: 0 22px 22px;
}

.hr-extra-payment-form,
.hr-extra-ledger-form-box {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.hr-extra-payment-form {
    padding: 20px;
}

.hr-extra-form-title,
.hr-extra-history-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hr-extra-form-title {
    margin-bottom: 18px;
}

    .hr-extra-form-title strong,
    .hr-extra-history-head strong {
        display: block;
        color: var(--text);
        font-size: 14px;
        margin-bottom: 5px;
    }

    .hr-extra-form-title span,
    .hr-extra-history-head span {
        display: block;
        color: var(--text-muted);
        font-size: 11.5px;
        line-height: 1.9;
    }

.hr-extra-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hr-extra-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.hr-extra-field-wide {
    grid-column: span 2;
}

.hr-extra-field > span {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.hr-extra-field > small {
    color: var(--text-muted);
    font-size: 10px;
    line-height: 1.7;
}

.hr-extra-field input,
.hr-extra-field select {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit;
    font-size: 12.5px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

    .hr-extra-field input:focus,
    .hr-extra-field select:focus {
        border-color: var(--primary);
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
        outline: none;
    }

.hr-extra-calculation-box {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
    padding: 13px;
    border-radius: 13px;
    background: var(--bg);
    border: 1px solid var(--border);
}

    .hr-extra-calculation-box > div {
        min-width: 0;
        padding: 8px 10px;
    }

    .hr-extra-calculation-box span {
        display: block;
        color: var(--text-muted);
        font-size: 10.5px;
        margin-bottom: 5px;
    }

    .hr-extra-calculation-box strong {
        display: block;
        color: var(--text);
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .hr-extra-calculation-box .is-credit strong {
        color: var(--success);
    }

.hr-extra-form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.hr-extra-primary-btn,
.hr-extra-secondary-btn,
.hr-extra-icon-btn {
    min-height: 38px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 700;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.hr-extra-primary-btn {
    padding: 9px 17px;
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
}

    .hr-extra-primary-btn:hover:not(:disabled) {
        transform: translateY(-1px);
    }

    .hr-extra-primary-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

.hr-extra-secondary-btn {
    padding: 8px 13px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

.hr-extra-validation {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.8;
}

    .hr-extra-validation.is-ok {
        color: var(--success);
    }

    .hr-extra-validation.is-error {
        color: var(--danger);
    }

.hr-extra-history,
.hr-extra-ledger-history {
    padding: 0 22px 22px;
}

.hr-extra-history-head {
    padding: 15px 0;
    border-top: 1px solid var(--border);
}

.hr-extra-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 13px;
}

.hr-extra-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
    text-align: right;
}

    .hr-extra-table th,
    .hr-extra-table td {
        padding: 11px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        font-size: 11.5px;
    }

    .hr-extra-table th {
        background: var(--bg);
        color: var(--text-muted);
        font-weight: 700;
        white-space: nowrap;
    }

    .hr-extra-table td {
        color: var(--text);
    }

    .hr-extra-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-extra-table td.is-credit {
        color: var(--success);
        font-weight: 800;
    }

    .hr-extra-table td small {
        display: block;
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.7;
        margin-top: 3px;
    }

.hr-extra-method-badge,
.hr-extra-account-badge,
.hr-extra-auto-entry {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 3px 9px;
    border-radius: 20px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 10.5px;
    white-space: nowrap;
}

    .hr-extra-account-badge.is-credit {
        color: var(--success);
        border-color: color-mix(in srgb, var(--success) 28%, var(--border));
        background: color-mix(in srgb, var(--success) 6%, var(--surface));
    }

    .hr-extra-account-badge.is-debtor {
        color: var(--danger);
        border-color: color-mix(in srgb, var(--danger) 25%, var(--border));
        background: color-mix(in srgb, var(--danger) 5%, var(--surface));
    }

.hr-extra-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

    .hr-extra-row-actions form {
        margin: 0;
    }

.hr-extra-icon-btn {
    padding: 7px 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}

    .hr-extra-icon-btn:hover {
        border-color: var(--primary);
        color: var(--primary);
    }

    .hr-extra-icon-btn.is-danger {
        color: var(--danger);
    }

        .hr-extra-icon-btn.is-danger:hover {
            border-color: var(--danger);
        }

.hr-extra-empty {
    padding: 20px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-muted);
    text-align: center;
    font-size: 11.5px;
}

.hr-extra-isolation-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 22px 22px;
    padding: 13px 15px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.9;
}

    .hr-extra-isolation-note strong {
        color: var(--primary);
        white-space: nowrap;
    }

.hr-extra-ledger-actions-grid {
    padding: 0 22px 22px;
}

.hr-extra-ledger-form-box {
    padding: 20px;
}

.hr-extra-ledger-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

    .hr-extra-ledger-form .hr-extra-primary-btn {
        align-self: end;
    }

.hr-extra-ledger-history {
    padding-bottom: 22px;
}

.hr-extra-auto-entry {
    color: var(--text-muted);
}

@media (max-width: 1200px) {
    .hr-extra-balance-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .hr-extra-field-wide {
        grid-column: span 2;
    }

    .hr-extra-calculation-box {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-extra-ledger-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hr-extra-payments-head,
    .hr-extra-form-title,
    .hr-extra-history-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-extra-balance-grid {
        grid-template-columns: 1fr;
        padding-inline: 14px;
    }

    .hr-extra-payment-form-wrap,
    .hr-extra-history,
    .hr-extra-ledger-actions-grid,
    .hr-extra-ledger-history {
        padding-inline: 14px;
    }

    .hr-extra-payment-form,
    .hr-extra-ledger-form-box {
        padding: 14px;
    }

    .hr-extra-form-grid,
    .hr-extra-ledger-form {
        grid-template-columns: 1fr;
    }

    .hr-extra-field-wide {
        grid-column: auto;
    }

    .hr-extra-calculation-box {
        grid-template-columns: 1fr;
        gap: 3px;
    }

        .hr-extra-calculation-box > div {
            padding: 8px 5px;
            border-bottom: 1px solid var(--border);
        }

            .hr-extra-calculation-box > div:last-child {
                border-bottom: 0;
            }

    .hr-extra-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-extra-primary-btn,
    .hr-extra-secondary-btn {
        width: 100%;
    }

    .hr-extra-isolation-note {
        margin-inline: 14px;
        flex-direction: column;
    }

        .hr-extra-isolation-note strong {
            white-space: normal;
        }
}

@media (max-width: 420px) {
    .hr-extra-balance-card strong {
        font-size: 16px;
    }

    .hr-extra-form-title strong,
    .hr-extra-history-head strong {
        font-size: 13px;
    }

    .hr-extra-field input,
    .hr-extra-field select {
        min-height: 45px;
    }
}


/* ===== ?????? ????? ?? ???? - ??????? ???? ???? ? ???? ===== */
.hr-extra-card-destination[hidden],
#additionalManualBankAccountWrap[hidden] {
    display: none !important;
}

.hr-extra-receipt-field {
    grid-column: 1 / -1;
}

    .hr-extra-receipt-field input[type="file"] {
        width: 100%;
        min-height: 46px;
        padding: 10px 12px;
        border: 1px dashed rgba(90, 80, 130, 0.25);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.72);
        font: inherit;
    }

.hr-extra-receipt-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border-radius: 9px;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .hr-extra-receipt-field {
        grid-column: auto;
    }
}

@media (max-width: 640px) {
    .hr-extra-receipt-field input[type="file"] {
        font-size: 13px;
    }

    .hr-extra-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}





/* =========================================================
   ???? ????? ? ?????? ????? ? ??????
   ??? ??? ????? ??? ?? ?????? ???? ????? ??? ???.
   ========================================================= */

.hr-extra-payments-card {
    overflow: hidden;
}

.hr-extra-payments-head {
    align-items: flex-start;
}

    .hr-extra-payments-head > span {
        max-width: 620px;
        line-height: 1.9;
    }

.hr-extra-balance-card.is-bank {
    border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}

.hr-extra-fixed-value,
.hr-extra-calculated-value {
    min-width: 0;
    min-height: 108px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

    .hr-extra-fixed-value span,
    .hr-extra-calculated-value span {
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 600;
    }

    .hr-extra-fixed-value strong,
    .hr-extra-calculated-value strong {
        color: var(--text);
        font-size: 20px;
        line-height: 1.5;
        font-weight: 800;
    }

    .hr-extra-fixed-value small,
    .hr-extra-calculated-value small {
        color: var(--text-muted);
        font-size: 11px;
        line-height: 1.7;
    }

.hr-extra-fixed-value {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
}

    .hr-extra-fixed-value strong {
        color: var(--primary);
    }

.hr-extra-calculated-value.is-available {
    border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
}

.hr-extra-calculated-value.is-credit {
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}

    .hr-extra-calculated-value.is-credit strong {
        color: var(--success);
    }

.hr-extra-calculated-value.is-dollar strong {
    color: var(--primary);
}

.hr-extra-method-fieldset {
    min-width: 0;
    grid-column: 1 / -1;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 15px;
    background: var(--surface);
}

    .hr-extra-method-fieldset legend {
        padding: 0 8px;
        color: var(--text);
        font-size: 12.5px;
        font-weight: 700;
    }

.hr-extra-method-options {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.hr-extra-method-option {
    position: relative;
    min-width: 0;
}

    .hr-extra-method-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .hr-extra-method-option span {
        min-height: 48px;
        padding: 10px 12px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--bg);
        color: var(--text);
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: border-color .15s ease, background .15s ease, color .15s ease;
    }

    .hr-extra-method-option input:checked + span {
        background: var(--primary);
        border-color: var(--primary);
        color: #fff;
    }

    .hr-extra-method-option input:focus-visible + span {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

.hr-extra-destination {
    min-width: 0;
}

    .hr-extra-destination[hidden],
    #additionalManualBankAccountWrap[hidden],
    #additionalDollarRateWrap[hidden],
    #additionalDollarPreviewWrap[hidden] {
        display: none !important;
    }

.hr-extra-receipt-link {
    color: var(--primary);
    font-weight: 700;
}

.hr-extra-destination-cell {
    min-width: 180px;
    max-width: 260px;
    overflow-wrap: anywhere;
    direction: rtl;
}

.hr-extra-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

    .hr-extra-actions form {
        margin: 0;
    }

    .hr-extra-actions button {
        white-space: nowrap;
    }

.hr-extra-history {
    min-width: 0;
}

.hr-extra-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-extra-table {
    min-width: 1180px;
}

    .hr-extra-table th,
    .hr-extra-table td {
        white-space: nowrap;
    }

        .hr-extra-table td small {
            display: block;
            margin-top: 3px;
            color: var(--text-muted);
            font-size: 10px;
        }

.hr-extra-disclaimer {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.9;
}

    .hr-extra-disclaimer strong {
        color: var(--text);
    }

.hr-extra-payment-form input[type="file"] {
    width: 100%;
    min-height: 44px;
    padding: 9px;
}

.hr-extra-validation.is-ok {
    color: var(--success);
}

.hr-extra-validation.is-error {
    color: var(--danger);
}

/* ????? ?????? ???? ????? */

.hr-real-salary-report-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 22px 24px 42px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-real-salary-report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hr-real-salary-report-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.hr-real-salary-report-hero h1 {
    margin: 0 0 8px;
    font-size: 23px;
    line-height: 1.5;
}

.hr-real-salary-report-hero p {
    max-width: 820px;
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 1.9;
}

.hr-real-salary-report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.hr-real-salary-report-export {
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.hr-real-salary-report-filters {
    display: grid;
    grid-template-columns: 170px 170px minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.hr-real-salary-report-filter {
    min-width: 0;
}

    .hr-real-salary-report-filter label {
        display: block;
        margin-bottom: 6px;
        color: var(--text-muted);
        font-size: 11.5px;
        font-weight: 700;
    }

    .hr-real-salary-report-filter select,
    .hr-real-salary-report-filter input {
        width: 100%;
        min-height: 42px;
        padding: 9px 11px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        color: var(--text);
        font: inherit;
        font-size: 12px;
    }

.hr-real-salary-report-filter-button {
    min-height: 42px;
    padding: 9px 18px;
    border: 1px solid var(--primary);
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.hr-real-salary-report-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

    .hr-real-salary-report-summary > div {
        min-width: 0;
        padding: 16px 18px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        box-shadow: var(--shadow);
    }

    .hr-real-salary-report-summary span,
    .hr-real-salary-report-summary small {
        display: block;
        color: var(--text-muted);
    }

    .hr-real-salary-report-summary span {
        font-size: 11.5px;
        font-weight: 700;
    }

    .hr-real-salary-report-summary strong {
        display: block;
        margin: 5px 0;
        color: var(--text);
        font-size: 18px;
        line-height: 1.5;
        font-weight: 800;
    }

    .hr-real-salary-report-summary small {
        font-size: 10.5px;
    }

.hr-real-salary-report-table-card {
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hr-real-salary-report-table-head {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
}

    .hr-real-salary-report-table-head span {
        color: var(--primary);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-real-salary-report-table-head h2 {
        margin-top: 3px;
        font-size: 16px;
    }

    .hr-real-salary-report-table-head p {
        margin: 0;
        max-width: 560px;
        color: var(--text-muted);
        font-size: 11.5px;
        line-height: 1.8;
    }

.hr-real-salary-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-real-salary-report-table {
    width: 100%;
    min-width: 1450px;
    border-collapse: collapse;
}

    .hr-real-salary-report-table th,
    .hr-real-salary-report-table td {
        padding: 10px 8px;
        border-bottom: 1px solid var(--border);
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
        font-size: 11px;
    }

    .hr-real-salary-report-table th {
        background: var(--bg);
        color: var(--text-muted);
        font-weight: 800;
        line-height: 1.7;
    }

    .hr-real-salary-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 4%, var(--surface));
    }

    .hr-real-salary-report-table td strong {
        display: block;
        font-weight: 800;
    }

    .hr-real-salary-report-table td small {
        display: block;
        margin-top: 3px;
        color: var(--text-muted);
        font-size: 9.5px;
    }

.hr-real-salary-money {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.hr-real-salary-bonus {
    color: var(--primary);
    font-weight: 800;
}

.hr-real-salary-real {
    font-weight: 800;
}

.hr-real-salary-credit {
    color: var(--success);
    font-weight: 800;
}

.hr-real-salary-code {
    direction: ltr;
    unicode-bidi: plaintext;
    font-family: Consolas, "Courier New", monospace;
}

.hr-real-salary-destination {
    max-width: 230px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    direction: ltr;
    unicode-bidi: plaintext;
    font-family: Consolas, "Courier New", monospace;
}

.hr-real-salary-method {
    display: inline-flex;
    min-width: 82px;
    min-height: 28px;
    padding: 5px 8px;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--bg);
    color: var(--text);
    font-size: 10.5px;
    font-weight: 700;
}

.hr-real-salary-report-table tfoot th {
    background: var(--bg);
}

.hr-real-salary-report-empty {
    padding: 44px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--text-muted);
    text-align: center;
}

    .hr-real-salary-report-empty strong {
        color: var(--text);
        font-size: 13px;
    }

    .hr-real-salary-report-empty span {
        font-size: 11.5px;
    }

@media (max-width: 1180px) {
    .hr-extra-method-options {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-real-salary-report-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-real-salary-report-filters {
        grid-template-columns: 1fr 1fr;
    }

    .hr-real-salary-report-search {
        grid-column: 1 / -1;
    }

    .hr-real-salary-report-filter-button {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .hr-real-salary-report-page {
        padding: 18px 16px 32px;
    }

    .hr-real-salary-report-hero {
        flex-direction: column;
    }

    .hr-real-salary-report-actions {
        width: 100%;
    }

    .hr-real-salary-report-export {
        width: 100%;
    }

    .hr-real-salary-report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-extra-method-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hr-real-salary-report-page {
        padding: 14px 10px 28px;
        gap: 12px;
    }

    .hr-real-salary-report-hero {
        padding: 18px;
        border-radius: 14px;
    }

        .hr-real-salary-report-hero h1 {
            font-size: 19px;
        }

    .hr-real-salary-report-filters {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .hr-real-salary-report-search {
        grid-column: auto;
    }

    .hr-real-salary-report-summary {
        grid-template-columns: 1fr;
    }

    .hr-real-salary-report-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .hr-extra-method-options {
        grid-template-columns: 1fr;
    }

    .hr-extra-method-fieldset {
        padding: 12px;
    }

    .hr-extra-fixed-value strong,
    .hr-extra-calculated-value strong {
        font-size: 17px;
    }

    .hr-extra-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 420px) {
    .hr-real-salary-report-page {
        padding-inline: 8px;
    }

    .hr-real-salary-report-hero p,
    .hr-real-salary-report-table-head p {
        font-size: 11px;
    }
}








/* ==========================================================================
   Auth / Login (glass modal) + Change/Forgot password
   Added at the end of hr-dashboard.css ? does not modify any rule above.
   Reuses existing tokens (--primary/--accent/--deep/--surface/--border/--shadow)
   and existing form classes (.hr-emp-field, .hr-emp-primary-btn, .hr-emp-secondary-btn,
   .hr-emp-alert) so it stays visually "??????????" ?? ?????? ??????.
   ========================================================================== */

/* ???? ViewData["HideAppShell"]=true ???? (????? ????/??????? ???)? ??????? ?
   ?????? app.* ???? ???????? ? ??? hr-auth-shell ??? ???? ???. */
body.hr-auth-body {
    min-height: 100vh;
    overflow-x: hidden;
}

.hr-auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: radial-gradient(1200px 600px at 15% 10%, color-mix(in srgb, var(--primary) 20%, transparent), transparent 60%), radial-gradient(1000px 700px at 85% 90%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%), var(--deep);
    overflow: hidden;
}

    .hr-auth-shell::before,
    .hr-auth-shell::after {
        content: "";
        position: absolute;
        border-radius: 50%;
        filter: blur(60px);
        opacity: .55;
        pointer-events: none;
        z-index: 0;
    }

    .hr-auth-shell::before {
        width: 380px;
        height: 380px;
        background: var(--primary);
        top: -120px;
        inset-inline-start: -100px;
    }

    .hr-auth-shell::after {
        width: 320px;
        height: 320px;
        background: var(--accent);
        bottom: -110px;
        inset-inline-end: -80px;
    }

.hr-auth-modal {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    background: color-mix(in srgb, var(--surface) 70%, transparent);
    border: 1px solid color-mix(in srgb, #ffffff 22%, transparent);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    padding: 30px 28px 26px;
    animation: hrAuthModalIn .35s ease;
}

@keyframes hrAuthModalIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.hr-auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

    .hr-auth-brand .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        background: #fff;
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

        .hr-auth-brand .brand-mark svg {
            width: 20px;
            height: 20px;
        }

    .hr-auth-brand strong {
        display: block;
        font-size: 13.5px;
        color: var(--text);
    }

    .hr-auth-brand span {
        display: block;
        font-size: 10.5px;
        color: var(--text-muted);
    }

.hr-auth-modal-head {
    margin-bottom: 20px;
}

    .hr-auth-modal-head h1 {
        font-size: 16.5px;
        font-weight: 800;
        color: var(--text);
        margin: 0 0 6px;
    }

    .hr-auth-modal-head p {
        font-size: 11.5px;
        color: var(--text-muted);
        line-height: 1.9;
        margin: 0;
    }

.hr-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hr-auth-password-wrap {
    position: relative;
}

    .hr-auth-password-wrap input {
        padding-inline-end: 40px !important;
    }

.hr-auth-toggle-pass {
    position: absolute;
    inset-inline-end: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .hr-auth-toggle-pass:hover {
        background: var(--tint);
        color: var(--primary);
    }

    .hr-auth-toggle-pass svg {
        width: 17px;
        height: 17px;
    }

.hr-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    gap: 10px;
}

    .hr-auth-row a {
        color: var(--primary);
        font-weight: 700;
    }

        .hr-auth-row a:hover {
            text-decoration: underline;
        }

.hr-auth-remember {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    cursor: pointer;
}

    .hr-auth-remember input {
        width: 15px;
        height: 15px;
        accent-color: var(--primary);
    }

.hr-auth-submit {
    width: 100%;
    justify-content: center;
    height: 44px;
    font-size: 13px;
}

.hr-auth-foot {
    margin-top: 18px;
    text-align: center;
    font-size: 10.5px;
    color: var(--text-muted);
}

.hr-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 16px;
    font-size: 11px;
    color: var(--text-muted);
}

    .hr-auth-back-link:hover {
        color: var(--primary);
    }

/* --- Alerts (???/??????) --- */
.hr-emp-alert-error {
    background: rgba(224,85,95,.10);
    color: var(--danger);
    border: 1px solid rgba(224,85,95,.20);
}

/* --- Recovery code display box --- */
.hr-auth-code-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--tint);
    border: 1px dashed color-mix(in srgb, var(--primary) 45%, transparent);
    border-radius: 12px;
    padding: 14px 12px;
    margin: 6px 0 4px;
    font-family: 'Courier New', monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--deep);
    direction: ltr;
    word-break: break-all;
    text-align: center;
}

.hr-auth-code-hint {
    font-size: 10.5px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.9;
    margin-bottom: 18px;
}

.hr-auth-code-copy {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 10.5px;
    font-weight: 700;
    white-space: nowrap;
}

    .hr-auth-code-copy:hover {
        color: var(--primary);
        border-color: var(--primary);
    }

/* --- Change-password card, rendered *inside* the normal app shell (not a modal) --- */
.hr-auth-card-inline {
    max-width: 460px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 26px 24px;
}

    .hr-auth-card-inline .hr-auth-modal-head {
        margin-bottom: 18px;
    }

.hr-auth-forced-banner {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(200,138,18,.10);
    border: 1px solid rgba(200,138,18,.22);
    color: #9a6a00;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 11.5px;
    line-height: 1.9;
    margin-bottom: 18px;
}

:root[data-mode="dark"] .hr-auth-forced-banner {
    color: #ffcf5c;
}

.hr-auth-forced-banner svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

@media (max-width: 480px) {
    .hr-auth-modal, .hr-auth-card-inline {
        padding: 24px 18px 20px;
        border-radius: 18px;
    }

    .hr-auth-shell {
        padding: 14px;
    }
}

/* .logout-btn ?? ?? <form> ?? Views/Shared/_Layout.cshtml ?????? ???????
   display:contents ???? ??? ??? ??????? ????? ? ???? ????? ?????? ??? ???
   ???????? ????? ???? .user-card ????? ?????? (?????? ???? ?????????? ???????). */
.logout-form {
    display: contents;
}

/* ========================================================================
   Additional payment / dollar conversion responsive refinements
   Added at the end intentionally; existing dashboard styles are untouched.
   ======================================================================== */

.hr-extra-payment-form #additionalDollarRateWrap small {
    display: block;
    margin-top: 6px;
    line-height: 1.8;
    color: var(--text-muted);
}

.hr-extra-payment-form #additionalDollarExchangeRate {
    direction: ltr;
    text-align: right;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.hr-extra-payment-form #additionalDollarPreviewWrap {
    min-width: 0;
    overflow: hidden;
}

.hr-extra-payment-form #additionalDollarPreview {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .hr-extra-payment-form #additionalDollarRateWrap,
    .hr-extra-payment-form #additionalDollarPreviewWrap {
        width: 100%;
    }

        .hr-extra-payment-form #additionalDollarRateWrap small {
            font-size: 10.5px;
        }

    .hr-extra-payment-form #additionalDollarExchangeRate {
        min-height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hr-extra-payment-form #additionalDollarRateWrap small {
        line-height: 1.9;
    }

    .hr-extra-payment-form #additionalDollarPreview {
        font-size: 16px;
    }
}


/* =========================
   Configurable payroll-tax benefits
   Added at the end intentionally.
   ========================= */
.hr-pay-tax-benefit-configurable {
    align-items: flex-start;
}

    .hr-pay-tax-benefit-configurable > span {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        line-height: 1.8;
    }

        .hr-pay-tax-benefit-configurable > span small {
            color: #64748b;
            font-size: 11px;
            font-weight: 500;
        }

.hr-pay-tax-config-note {
    align-items: flex-start;
}

@media (max-width: 820px) {
    .hr-pay-tax-config-note {
        flex-direction: column;
        gap: 6px;
    }

    .hr-pay-tax-benefit-configurable {
        min-height: 58px;
    }
}

@media (max-width: 560px) {
    .hr-pay-tax-benefit-configurable {
        padding: 11px 12px;
    }

        .hr-pay-tax-benefit-configurable > span {
            font-size: 13px;
        }

    .hr-pay-tax-config-note {
        padding: 12px 13px;
    }
}



/* ==========================================================================
   User registration flow (Register / VerifyEmail / RegisterPending) and the
   admin "Pending Users" screen.
   Added at the end of hr-dashboard.css -- does not modify any rule above.
   Reuses existing tokens (--primary/--accent/--deep/--surface/--border/--shadow/
   --success/--danger/--text/--text-muted) and existing classes
   (.hr-auth-shell, .hr-auth-modal, .hr-emp-field, .hr-emp-form-grid,
   .hr-emp-primary-btn, .hr-emp-alert, .hr-emp-action, .hr-emp-table) so it
   stays visually consistent with the rest of the dashboard.
   ========================================================================== */

/* --- Wider auth modal, used by the Register page (more fields than Login) --- */
.hr-auth-modal-wide {
    max-width: 620px;
}

    .hr-auth-modal-wide .hr-auth-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
        gap: 14px;
    }

        .hr-auth-modal-wide .hr-auth-grid .hr-emp-field.full {
            grid-column: 1/-1;
        }

@media (max-width: 640px) {
    .hr-auth-modal-wide {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hr-auth-modal-wide .hr-auth-grid {
        grid-template-columns: 1fr;
    }

        .hr-auth-modal-wide .hr-auth-grid .hr-emp-field.full {
            grid-column: auto;
        }
}

/* --- Link back to Login, placed right under the Register form's submit button --- */
.hr-auth-register-link {
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- Resend verification-code form/button, on the VerifyEmail page --- */
.hr-auth-resend-form {
    display: flex;
    justify-content: center;
    margin-top: 4px;
}

.hr-auth-resend-btn {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    border-radius: 9px;
    padding: 9px 16px;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: color .15s ease,border-color .15s ease,opacity .15s ease;
}

    .hr-auth-resend-btn:hover:not(:disabled) {
        color: var(--primary);
        border-color: var(--primary);
    }

    .hr-auth-resend-btn:disabled {
        opacity: .55;
        cursor: not-allowed;
    }

/* --- Big centered icon on the RegisterPending ("awaiting admin approval") page --- */
.hr-auth-pending-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 16px;
    border-radius: 50%;
    background: var(--tint);
    color: var(--primary);
}

    .hr-auth-pending-icon svg {
        width: 30px;
        height: 30px;
    }

/* --- "Approve" action button on the admin Users (pending list) page,
   styled like the existing .hr-emp-action.edit/.delete variants --- */
.hr-emp-action.approve {
    color: var(--success);
    background: rgba(46,158,107,.10);
}

:root[data-mode="dark"] .hr-emp-action.approve {
    background: rgba(76,195,138,.14);
}

/* --- Pending-users table: keep long emails/usernames from breaking layout --- */
.hr-users-table td {
    max-width: 220px;
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .hr-users-table th:nth-child(5),
    .hr-users-table td:nth-child(5),
    .hr-users-table th:nth-child(6),
    .hr-users-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 640px) {
    .hr-emp-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

        .hr-emp-actions form,
        .hr-emp-actions .hr-emp-action {
            width: 100%;
        }

    .hr-users-table th:nth-child(7),
    .hr-users-table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 480px) {
    .hr-auth-resend-btn {
        padding: 10px 14px;
        font-size: 11px;
    }

    .hr-auth-pending-icon {
        width: 54px;
        height: 54px;
    }

        .hr-auth-pending-icon svg {
            width: 26px;
            height: 26px;
        }
}



/* =========================================================
   ???????? ???????? ? ??????? ??????
   ??? ?????? ????? ?????????? ???? ?? ??? ???? ??????? ????????.
   ========================================================= */


/* ================================================================
   Employee reports - appended only; existing dashboard styles remain untouched.
   Responsive: desktop / tablet / mobile.
   ================================================================ */
.hr-report-page {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.hr-report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

    .hr-report-hero h1 {
        margin: 6px 0 8px;
        font-size: 28px;
    }

    .hr-report-hero p {
        margin: 0;
        color: var(--muted, #64748b);
        line-height: 1.9;
    }

.hr-report-year-badge {
    flex: 0 0 auto;
    padding: 12px 16px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 14px;
    background: var(--surface, #fff);
    white-space: nowrap;
}

.hr-report-filter-card,
.hr-report-table-card {
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}

.hr-report-filter-card {
    padding: 18px;
    margin-bottom: 18px;
}

.hr-report-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(170px, .8fr) minmax(170px, .8fr) minmax(260px, 1.6fr);
    gap: 14px;
}

.hr-report-search-field {
    min-width: 0;
}

.hr-report-filter-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}

.hr-report-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid var(--border, #e2e8f0);
    color: var(--text, #334155);
    background: var(--surface, #fff);
    text-decoration: none;
}

.hr-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.hr-report-summary-card {
    padding: 18px;
    border-radius: 16px;
    border: 1px solid var(--border, #e2e8f0);
    background: var(--surface, #fff);
}

    .hr-report-summary-card span,
    .hr-report-summary-card small {
        display: block;
        color: var(--muted, #64748b);
    }

    .hr-report-summary-card strong {
        display: block;
        margin: 8px 0 4px;
        font-size: 24px;
    }

    .hr-report-summary-card.is-total strong {
        font-size: 22px;
    }

.hr-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}

    .hr-report-table-head h2 {
        margin: 0 0 5px;
        font-size: 18px;
    }

    .hr-report-table-head p {
        margin: 0;
        color: var(--muted, #64748b);
        font-size: 13px;
    }

.hr-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-report-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    text-align: right;
}

    .hr-report-table th,
    .hr-report-table td {
        padding: 13px 12px;
        border-bottom: 1px solid var(--border, #e2e8f0);
        white-space: nowrap;
        vertical-align: middle;
    }

    .hr-report-table th {
        background: #f8fafc;
        color: #475569;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-report-table tbody tr:hover {
        background: #fafafa;
    }

    .hr-report-table tfoot td {
        font-weight: 800;
        background: #f8fafc;
    }

.hr-report-employee-name {
    font-weight: 700;
}

.hr-report-status,
.hr-report-period {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 9px;
    border-radius: 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
}

.hr-report-period {
    background: #eef2ff;
    color: #4338ca;
    direction: ltr;
}

.hr-report-amount {
    font-weight: 800;
    direction: ltr;
    text-align: right;
}

@media (max-width: 1100px) {
    .hr-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hr-report-page {
        padding: 14px;
    }

    .hr-report-hero {
        flex-direction: column;
    }

        .hr-report-hero h1 {
            font-size: 22px;
        }

    .hr-report-year-badge {
        width: 100%;
        text-align: center;
    }

    .hr-report-filter-grid,
    .hr-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .hr-report-filter-actions button,
        .hr-report-reset-btn {
            width: 100%;
        }

    .hr-report-table-head {
        padding: 15px;
    }
}

@media (max-width: 420px) {
    .hr-report-page {
        padding: 10px;
    }

    .hr-report-filter-card,
    .hr-report-table-card {
        border-radius: 14px;
    }

    .hr-report-summary-card {
        padding: 14px;
    }

        .hr-report-summary-card strong {
            font-size: 20px;
        }
}



/* Reports responsive filters and organization summaries */
.hr-report-date-picker-wrap {
    position: relative;
    width: 100%;
}

    .hr-report-date-picker-wrap .hr-jalali-input {
        width: 100%;
        cursor: pointer;
    }

.hr-report-org-summary-card {
    margin: 18px 0;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(20, 35, 55, 0.08);
    border-radius: 18px;
    box-shadow: 0 8px 26px rgba(20, 35, 55, 0.06);
}

.hr-report-org-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

    .hr-report-org-summary-head h2 {
        margin: 0 0 5px;
        font-size: 17px;
    }

    .hr-report-org-summary-head p {
        margin: 0;
        color: #718096;
        font-size: 13px;
    }

.hr-report-org-summary-total {
    min-width: 170px;
    padding: 12px 16px;
    border-radius: 14px;
    background: #f7f9fc;
    text-align: center;
}

    .hr-report-org-summary-total span, .hr-report-org-summary-total small {
        display: block;
        color: #718096;
        font-size: 12px;
    }

    .hr-report-org-summary-total strong {
        display: block;
        margin: 3px 0;
        font-size: 18px;
    }

.hr-report-org-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hr-report-org-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 14px;
    border: 1px solid #edf0f5;
    border-radius: 14px;
    background: #fbfcfe;
}

    .hr-report-org-item strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hr-report-org-item span {
        color: #667085;
        font-size: 13px;
    }

@media (max-width: 900px) {
    .hr-report-org-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .hr-report-org-summary-card {
        padding: 14px;
        border-radius: 14px;
    }

    .hr-report-org-grid {
        grid-template-columns: 1fr;
    }

    .hr-report-org-summary-total {
        width: 100%;
    }
}

/* ============================================================
   Attendance & Leave Reports
   Responsive styles are intentionally kept at the end of this file.
   ============================================================ */

.hr-attendance-report-page {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 24px;
}

.hr-attendance-report-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 24px;
    border: 1px solid rgba(20, 35, 55, 0.08);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(20, 35, 55, 0.07);
}

.hr-attendance-report-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.hr-attendance-report-hero h1 {
    margin: 0 0 8px;
    color: #162033;
    font-size: 25px;
    line-height: 1.5;
}

.hr-attendance-report-hero p {
    max-width: 850px;
    margin: 0;
    color: #667085;
    font-size: 13px;
    line-height: 2;
}

.hr-attendance-report-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 9px;
    flex-wrap: wrap;
}

.hr-attendance-report-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 11px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    .hr-attendance-report-export:hover {
        color: #ffffff;
        transform: translateY(-1px);
        opacity: 0.92;
    }

.hr-attendance-report-export-excel {
    background: #087443;
}

.hr-attendance-report-export-pdf {
    background: #9f1d35;
}

.hr-attendance-report-filter-card {
    margin-bottom: 18px;
    padding: 20px;
    border: 1px solid rgba(20, 35, 55, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(20, 35, 55, 0.05);
}

.hr-attendance-report-filter-grid {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(240px, 1.5fr) auto;
    align-items: end;
    gap: 13px;
}

.hr-attendance-report-field {
    min-width: 0;
}

    .hr-attendance-report-field label {
        display: block;
        margin-bottom: 7px;
        color: #475467;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-attendance-report-field input {
        width: 100%;
        min-height: 43px;
        padding: 9px 12px;
        border: 1px solid #d7dce5;
        border-radius: 11px;
        outline: none;
        background: #ffffff;
        color: #172033;
        font: inherit;
        font-size: 13px;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
    }

        .hr-attendance-report-field input:focus {
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
        }

.hr-attendance-report-filter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hr-attendance-report-primary-button,
.hr-attendance-report-reset-button {
    min-height: 43px;
    padding: 0 15px;
    border-radius: 11px;
    border: 0;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.hr-attendance-report-primary-button {
    background: #2563eb;
    color: #ffffff;
}

.hr-attendance-report-reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f2f4f7;
    color: #344054;
}

.hr-attendance-report-filter-help {
    margin-top: 11px;
    color: #667085;
    font-size: 11px;
    line-height: 1.9;
}

.hr-attendance-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.hr-attendance-report-summary-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid #edf0f5;
    border-radius: 15px;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(20, 35, 55, 0.04);
}

    .hr-attendance-report-summary-card span {
        display: block;
        margin-bottom: 5px;
        color: #667085;
        font-size: 11px;
    }

    .hr-attendance-report-summary-card strong {
        display: block;
        color: #172033;
        font-size: 17px;
        line-height: 1.4;
    }

.hr-attendance-report-danger-number {
    color: #b42318 !important;
}

.hr-attendance-report-table-card {
    overflow: hidden;
    border: 1px solid rgba(20, 35, 55, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 26px rgba(20, 35, 55, 0.05);
}

.hr-attendance-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid #edf0f5;
}

    .hr-attendance-report-table-head span:first-child {
        color: #667085;
        font-size: 11px;
    }

    .hr-attendance-report-table-head h2 {
        margin: 4px 0 0;
        color: #172033;
        font-size: 17px;
    }

.hr-attendance-report-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #667085;
    font-size: 11px;
}

.hr-attendance-report-legend-danger {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d92d20;
}

.hr-attendance-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-attendance-report-table {
    width: 100%;
    min-width: 1450px;
    border-collapse: collapse;
    font-size: 11px;
}

    .hr-attendance-report-table th,
    .hr-attendance-report-table td {
        padding: 10px 8px;
        border-bottom: 1px solid #edf0f5;
        text-align: center;
        vertical-align: middle;
        white-space: nowrap;
    }

    .hr-attendance-report-table th {
        position: sticky;
        top: 0;
        z-index: 1;
        background: #f8fafc;
        color: #475467;
        font-weight: 800;
    }

    .hr-attendance-report-table td {
        color: #344054;
    }

        .hr-attendance-report-table td:first-child,
        .hr-attendance-report-table th:first-child {
            width: 52px;
        }

.hr-attendance-report-code {
    direction: ltr;
    unicode-bidi: plaintext;
}

.hr-attendance-report-grade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #344054;
    font-weight: 700;
}

.hr-attendance-report-row-danger td {
    background: #fff1f1;
    color: #9f1d20;
}

    .hr-attendance-report-row-danger td:first-child {
        border-right: 3px solid #d92d20;
    }

.hr-attendance-report-row-danger .hr-attendance-report-grade {
    background: #fee4e2;
    color: #b42318;
}

.hr-attendance-report-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.hr-attendance-report-status-ok {
    background: #ecfdf3;
    color: #067647;
}

.hr-attendance-report-status-danger {
    background: #fee4e2;
    color: #b42318;
}

.hr-attendance-report-violation-detail-row td {
    padding: 9px 14px;
    background: #fff8f8;
    color: #b42318;
    text-align: right;
    white-space: normal;
    line-height: 1.8;
}

.hr-attendance-report-empty {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    padding: 24px;
    text-align: center;
}

    .hr-attendance-report-empty strong {
        color: #344054;
        font-size: 14px;
    }

    .hr-attendance-report-empty span {
        color: #667085;
        font-size: 12px;
    }

.hr-pay-annual-leave-warning {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 0 20px 15px;
    padding: 13px 15px;
    border: 1px solid #f2b8b5;
    border-right: 4px solid #d92d20;
    border-radius: 12px;
    background: #fff4f4;
    color: #9f1d20;
}

    .hr-pay-annual-leave-warning strong {
        font-size: 13px;
    }

    .hr-pay-annual-leave-warning span {
        font-size: 11px;
        line-height: 1.9;
    }

.hr-pay-annual-table .hr-pay-leave-violation td {
    background: #fff1f1;
    color: #9f1d20;
    font-weight: 700;
}

.hr-pay-leave-violation-detail td {
    padding: 8px 12px !important;
    background: #fff8f8;
    color: #b42318;
    text-align: right !important;
    font-size: 11px;
    line-height: 1.8;
}

@media (max-width: 1250px) {
    .hr-attendance-report-summary-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hr-attendance-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-attendance-report-field-search,
    .hr-attendance-report-filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 900px) {
    .hr-attendance-report-page {
        padding: 16px;
    }

    .hr-attendance-report-hero {
        flex-direction: column;
        padding: 19px;
        border-radius: 18px;
    }

    .hr-attendance-report-actions {
        width: 100%;
    }

    .hr-attendance-report-export {
        flex: 1 1 180px;
    }

    .hr-attendance-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-attendance-report-table-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 600px) {
    .hr-attendance-report-page {
        padding: 10px;
    }

    .hr-attendance-report-hero,
    .hr-attendance-report-filter-card,
    .hr-attendance-report-table-card {
        border-radius: 14px;
    }

    .hr-attendance-report-hero {
        padding: 15px;
        gap: 15px;
    }

        .hr-attendance-report-hero h1 {
            font-size: 20px;
        }

    .hr-attendance-report-actions,
    .hr-attendance-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .hr-attendance-report-export,
    .hr-attendance-report-primary-button,
    .hr-attendance-report-reset-button {
        width: 100%;
    }

    .hr-attendance-report-filter-card {
        padding: 14px;
    }

    .hr-attendance-report-filter-grid {
        grid-template-columns: 1fr;
    }

    .hr-attendance-report-field-search,
    .hr-attendance-report-filter-actions {
        grid-column: auto;
    }

    .hr-attendance-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-attendance-report-summary-card {
        padding: 13px;
    }

    .hr-attendance-report-table-head {
        padding: 15px;
    }
}

@media print {
    .hr-attendance-report-page {
        padding: 0;
    }

    .hr-attendance-report-hero,
    .hr-attendance-report-filter-card,
    .hr-attendance-report-summary-grid {
        box-shadow: none;
    }
}

.hr-attendance-report-status-empty {
    background: #f2f4f7;
    color: #667085;
}
/* =========================================================
   Attendance Leave Annual Report - Print
   ========================================================= */

.attendance-leave-print-page {
    margin: 0;
    padding: 24px;
    background: #ffffff;
    color: #172033;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 10px;
}

    .attendance-leave-print-page .print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 18px;
    }

    .attendance-leave-print-page .print-table-wrap {
        width: 100%;
        overflow: visible;
    }

    .attendance-leave-print-page table {
        width: 100%;
        border-collapse: collapse;
    }

    .attendance-leave-print-page th,
    .attendance-leave-print-page td {
        border: 1px solid #cfd5df;
        padding: 5px 4px;
        text-align: center;
        vertical-align: middle;
    }

@media print {
    .attendance-leave-print-page {
        padding: 0;
        font-size: 7px;
    }

        .attendance-leave-print-page .no-print {
            display: none;
        }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }
}


/* =========================================================
   Attendance Leave Annual Report - Print
   ========================================================= */

.attendance-leave-print-page {
    margin: 0;
    padding: 24px;
    background: #ffffff;
    color: #172033;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 10px;
    box-sizing: border-box;
}

    .attendance-leave-print-page *,
    .attendance-leave-print-page *::before,
    .attendance-leave-print-page *::after {
        box-sizing: border-box;
    }

    .attendance-leave-print-page .print-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 18px;
    }

    .attendance-leave-print-page h1 {
        margin: 0 0 8px;
        font-size: 20px;
    }

    .attendance-leave-print-page p {
        margin: 0;
        line-height: 1.8;
    }

    .attendance-leave-print-page .print-meta {
        min-width: 190px;
        padding: 10px 14px;
        border: 1px solid #d9dee8;
        border-radius: 10px;
    }

    .attendance-leave-print-page .print-table-wrap {
        width: 100%;
        overflow: visible;
    }

    .attendance-leave-print-page table {
        width: 100%;
        border-collapse: collapse;
    }

    .attendance-leave-print-page th,
    .attendance-leave-print-page td {
        border: 1px solid #cfd5df;
        padding: 5px 4px;
        text-align: center;
        vertical-align: middle;
    }

    .attendance-leave-print-page th {
        background: #f1f4f8;
        font-weight: 700;
    }

    .attendance-leave-print-page .danger {
        background: #fde2e2;
        color: #a61b1b;
        font-weight: 700;
    }

    .attendance-leave-print-page .violation-detail td {
        text-align: right;
        color: #a61b1b;
        background: #fff3f3;
    }

    .attendance-leave-print-page .no-print {
        margin-bottom: 14px;
        padding: 9px 14px;
        border: 0;
        border-radius: 8px;
        cursor: pointer;
        background: #172033;
        color: #ffffff;
    }

@media print {

    .attendance-leave-print-page {
        padding: 0;
        font-size: 7px;
    }

        .attendance-leave-print-page .no-print {
            display: none;
        }

        .attendance-leave-print-page h1 {
            font-size: 15px;
        }

        .attendance-leave-print-page th,
        .attendance-leave-print-page td {
            padding: 3px 2px;
        }

    @page {
        size: A4 landscape;
        margin: 8mm;
    }
}

/* =========================================================
   Global Jalali Date Picker v2
   ?????? ?????? ??? ? ??? ???? ??? ????????? ???? ?????
   ========================================================= */

.hr-jalali-picker {
    width: min(340px, calc(100vw - 20px));
    padding: 14px;
    border-radius: 16px;
}

.hr-jp-head {
    grid-template-columns: 34px minmax(0, 1fr) 34px;
    gap: 7px;
    margin-bottom: 8px;
}

.hr-jp-selectors {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(92px, 0.9fr);
    gap: 7px;
    min-width: 0;
}

    .hr-jp-selectors select {
        width: 100%;
        min-width: 0;
        height: 34px;
        border: 1px solid var(--border);
        border-radius: 9px;
        background: var(--surface);
        color: var(--text);
        padding: 0 9px;
        font: inherit;
        font-size: 10px;
        font-weight: 700;
        outline: none;
        cursor: pointer;
    }

        .hr-jp-selectors select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
        }

.hr-jp-selected-label {
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2px 0 8px;
    padding: 5px 8px;
    border-radius: 8px;
    background: var(--tint);
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    text-align: center;
}

.hr-jp-nav {
    cursor: pointer;
}

    .hr-jp-nav:hover {
        background: var(--tint);
    }

.hr-jp-days button.selected {
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 18%, transparent);
}

/* =========================================================
   Employee Documents - Children Form v2
   ????? ?? ????? ?? ?? ???? ????? ? ?????? ?????????
   ========================================================= */

.hr-child-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    padding: 14px;
}

.hr-child-number {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 36px;
    height: 36px;
    justify-content: flex-start;
    padding: 0 12px;
    box-sizing: border-box;
    background: var(--tint);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
    font-size: 11px;
}

.hr-child-row .hr-doc-field {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    .hr-child-row .hr-doc-field > span {
        min-height: 24px;
        margin-bottom: 5px;
        line-height: 1.5;
    }

    .hr-child-row .hr-doc-field input,
    .hr-child-row .hr-doc-field select {
        width: 100%;
        min-height: 40px;
        height: 40px;
        box-sizing: border-box;
    }

    .hr-child-row .hr-doc-field small {
        min-height: 32px;
        margin-top: 5px;
        line-height: 1.7;
    }

@media (max-width: 1050px) {
    .hr-child-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-child-number {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .hr-child-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .hr-child-number {
        grid-column: 1;
    }

    .hr-child-row .hr-doc-field > span {
        min-height: 0;
    }

    .hr-child-row .hr-doc-field small {
        min-height: 0;
    }
}

@media (max-width: 520px) {
    .hr-jalali-picker {
        width: min(340px, calc(100vw - 20px)) !important;
    }

    .hr-jp-selectors {
        grid-template-columns: minmax(0, 1.25fr) minmax(86px, 0.9fr);
        gap: 5px;
    }

        .hr-jp-selectors select {
            height: 32px;
            padding-inline: 6px;
            font-size: 9px;
        }

    .hr-jp-nav {
        width: 32px !important;
        height: 32px !important;
    }
}


/* ================================================================
   ???? ?????? - ?????? ???? ????? ??????
   ??? ??? ????? ??? ?? ?????? ???? ????? ??? ??? ?? ?????????? ???? ????? ????? ?????.
   ================================================================ */
.hr-insurance-bank-selection {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 18px;
    align-items: end;
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(0, 152, 217, .14);
    border-radius: 16px;
    background: #f8fbfe;
}

.hr-insurance-bank-selection-copy {
    min-width: 0;
}

    .hr-insurance-bank-selection-copy strong {
        display: block;
        margin-bottom: 5px;
        font-size: 14px;
        font-weight: 900;
    }

    .hr-insurance-bank-selection-copy span {
        display: block;
        color: #68788d;
        font-size: 12px;
        line-height: 1.9;
    }

.hr-insurance-bank-selection .hr-doc-field {
    margin: 0;
    min-width: 0;
}

.hr-insurance-bank-selection select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

@media (max-width: 900px) {
    .hr-insurance-bank-selection {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
}

@media (max-width: 600px) {
    .hr-insurance-bank-selection {
        gap: 12px;
        margin-top: 12px;
        padding: 14px;
        border-radius: 14px;
    }

    .hr-insurance-bank-selection-copy strong {
        font-size: 13px;
    }

    .hr-insurance-bank-selection-copy span {
        font-size: 11px;
    }
}



/* ========================================================================== */
/* Payroll tax reports                                                       */
/* ========================================================================== */
.hr-tax-report-page {
    width: min(100%, 1680px);
    margin: 0 auto;
    padding: 28px clamp(14px, 2.5vw, 34px) 50px;
}

.hr-tax-report-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
    padding: clamp(20px, 3vw, 34px);
    border: 1px solid rgba(35, 54, 78, 0.08);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    box-shadow: 0 12px 30px rgba(30, 55, 90, 0.07);
}

.hr-tax-report-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #66758a;
    font-size: 0.84rem;
    font-weight: 700;
}

.hr-tax-report-hero h1 {
    margin: 0 0 9px;
    color: #1d2b3d;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 800;
}

.hr-tax-report-hero p {
    max-width: 900px;
    margin: 0;
    color: #687789;
    line-height: 1.9;
}

.hr-tax-report-badge {
    min-width: 230px;
    align-self: center;
    padding: 15px 18px;
    border-radius: 16px;
    background: #f0f5fb;
    text-align: center;
}

    .hr-tax-report-badge span,
    .hr-tax-report-badge strong {
        display: block;
    }

    .hr-tax-report-badge span {
        margin-bottom: 6px;
        color: #718096;
        font-size: 0.8rem;
    }

    .hr-tax-report-badge strong {
        color: #26384f;
        font-size: 0.96rem;
    }

.hr-tax-report-filter-card,
.hr-tax-report-card {
    margin-bottom: 20px;
    padding: 20px;
    border: 1px solid rgba(35, 54, 78, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(30, 55, 90, 0.055);
}

.hr-tax-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 15px;
}

.hr-tax-report-filter-field {
    min-width: 0;
}

    .hr-tax-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: #455468;
        font-size: 0.84rem;
        font-weight: 700;
    }

    .hr-tax-report-filter-field input,
    .hr-tax-report-filter-field select {
        width: 100%;
        min-height: 45px;
        padding: 9px 12px;
        border: 1px solid #d7dee8;
        border-radius: 11px;
        background: #fff;
        color: #26384f;
        outline: none;
        font-family: inherit;
        font-size: 0.9rem;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-tax-report-filter-field input:focus,
        .hr-tax-report-filter-field select:focus {
            border-color: #8ea9c5;
            box-shadow: 0 0 0 3px rgba(105, 139, 173, 0.12);
        }

.hr-tax-report-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 16px;
}

.hr-tax-report-primary-button,
.hr-tax-report-reset-button {
    min-height: 43px;
    padding: 9px 18px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.hr-tax-report-primary-button {
    border: 0;
    background: #2f5f8f;
    color: #fff;
}

.hr-tax-report-reset-button {
    border: 1px solid #d7dee8;
    background: #fff;
    color: #556579;
}

.hr-tax-report-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.hr-tax-report-summary-card {
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(35, 54, 78, 0.08);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(30, 55, 90, 0.05);
}

    .hr-tax-report-summary-card span,
    .hr-tax-report-summary-card strong,
    .hr-tax-report-summary-card small {
        display: block;
    }

    .hr-tax-report-summary-card span {
        color: #687789;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .hr-tax-report-summary-card strong {
        margin: 8px 0 3px;
        color: #26384f;
        font-size: clamp(1.02rem, 1.55vw, 1.35rem);
        line-height: 1.35;
        overflow-wrap: anywhere;
    }

    .hr-tax-report-summary-card small {
        color: #8a96a5;
        font-size: 0.75rem;
    }

.hr-tax-report-summary-highlight {
    background: #f5f9fd;
}

.hr-tax-report-summary-tax {
    background: #fff8f8;
}

    .hr-tax-report-summary-tax strong {
        color: #9b3f48;
    }

.hr-tax-report-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

    .hr-tax-report-card-head span:first-child {
        color: #738095;
        font-size: 0.78rem;
        font-weight: 700;
    }

    .hr-tax-report-card-head h2 {
        margin: 4px 0 0;
        color: #26384f;
        font-size: 1.05rem;
    }

.hr-tax-report-record-count {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f2f5f8;
    color: #66758a;
    font-size: 0.76rem;
    font-weight: 700;
}

.hr-tax-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e4e9ef;
    border-radius: 14px;
}

.hr-tax-report-table {
    width: 100%;
    min-width: 1280px;
    border-collapse: separate;
    border-spacing: 0;
    color: #3d4b5f;
    font-size: 0.8rem;
}

    .hr-tax-report-table th,
    .hr-tax-report-table td {
        padding: 12px 11px;
        border-bottom: 1px solid #edf0f4;
        text-align: right;
        vertical-align: middle;
        white-space: nowrap;
    }

    .hr-tax-report-table thead th {
        background: #f7f9fb;
        color: #556579;
        font-size: 0.76rem;
        font-weight: 800;
    }

    .hr-tax-report-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-tax-report-table tbody tr:hover td {
        background: #fbfcfe;
    }

    .hr-tax-report-table tfoot th,
    .hr-tax-report-table tfoot td {
        border-top: 2px solid #dbe2ea;
        border-bottom: 0;
        background: #f4f7fa;
        color: #26384f;
        font-weight: 800;
    }

.hr-tax-report-code {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.hr-tax-report-taxable-cell {
    background: #f8fbff;
    font-weight: 700;
}

.hr-tax-report-tax-cell {
    background: #fff8f8;
    color: #9b3f48;
    font-weight: 800;
}

.hr-tax-report-empty {
    padding: 32px 18px;
    border: 1px dashed #d7dee8;
    border-radius: 13px;
    color: #718096;
    text-align: center;
}

.hr-jalali-picker {
    z-index: 10000;
}

@media (max-width: 1200px) {
    .hr-tax-report-filter-grid {
        grid-template-columns: repeat(3, minmax(170px, 1fr));
    }

    .hr-tax-report-summary-grid {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }
}

@media (max-width: 800px) {
    .hr-tax-report-page {
        padding: 18px 12px 36px;
    }

    .hr-tax-report-hero {
        flex-direction: column;
        gap: 16px;
        border-radius: 17px;
    }

    .hr-tax-report-badge {
        width: 100%;
        min-width: 0;
    }

    .hr-tax-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-tax-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-tax-report-card,
    .hr-tax-report-filter-card {
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-width: 540px) {
    .hr-tax-report-filter-grid,
    .hr-tax-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-tax-report-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-tax-report-primary-button,
    .hr-tax-report-reset-button {
        width: 100%;
        text-align: center;
    }

    .hr-tax-report-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-tax-report-record-count {
        align-self: flex-start;
    }

    .hr-tax-report-table th,
    .hr-tax-report-table td {
        padding: 10px 9px;
    }
}

/* ================================================================
   ????? ????? ????? - ?????????? ??????
   ??? ??? ????? ?? ?????? ???? ???? ????? ???.
   ================================================================ */

.hr-personnel-report-page {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.hr-personnel-hero {
    align-items: center;
}

.hr-personnel-filter-card {
    position: relative;
}

.hr-personnel-filter-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 5px;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.9);
}

.hr-personnel-mode-btn {
    min-height: 42px;
    padding: 8px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

    .hr-personnel-mode-btn:hover {
        background: #ffffff;
        color: #334155;
    }

    .hr-personnel-mode-btn.active {
        border-color: rgba(59, 130, 246, 0.16);
        background: #ffffff;
        color: #2563eb;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    }

.hr-personnel-filter-grid {
    display: grid;
    grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(190px, 1fr) minmax(260px, 1.4fr);
    gap: 14px;
    align-items: end;
}

    .hr-personnel-filter-grid .hr-doc-field {
        min-width: 0;
    }

    .hr-personnel-filter-grid .hr-personnel-search-field {
        min-width: 0;
    }

    .hr-personnel-filter-grid .is-disabled {
        opacity: 0.48;
    }

        .hr-personnel-filter-grid .is-disabled input,
        .hr-personnel-filter-grid .is-disabled select {
            pointer-events: none;
        }

.hr-personnel-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

    .hr-personnel-summary-grid .hr-report-summary-card {
        min-height: 145px;
    }

.hr-personnel-org-summary-card {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hr-personnel-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

    .hr-personnel-section-head h2 {
        margin: 0 0 6px;
        color: #0f172a;
        font-size: 18px;
        font-weight: 800;
    }

    .hr-personnel-section-head p {
        margin: 0;
        color: #64748b;
        font-size: 12px;
        line-height: 1.9;
    }

.hr-personnel-total-pill,
.hr-personnel-table-total {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 1px solid rgba(59, 130, 246, 0.14);
    border-radius: 12px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

    .hr-personnel-total-pill strong {
        margin: 0 4px;
        font-size: 15px;
    }

.hr-personnel-org-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-personnel-org-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

.hr-personnel-org-name {
    min-width: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.hr-personnel-org-count {
    display: flex;
    flex: 0 0 auto;
    align-items: baseline;
    gap: 4px;
    color: #0f172a;
}

    .hr-personnel-org-count strong {
        font-size: 20px;
        font-weight: 800;
    }

    .hr-personnel-org-count span {
        color: #64748b;
        font-size: 11px;
    }

.hr-personnel-table-card {
    overflow: hidden;
}

    .hr-personnel-table-card .hr-report-table-head {
        align-items: center;
    }

.hr-personnel-table-scroll {
    max-height: 70vh;
}

.hr-personnel-report-table {
    min-width: 1250px;
}

    .hr-personnel-report-table th,
    .hr-personnel-report-table td {
        vertical-align: middle;
        white-space: nowrap;
    }

    .hr-personnel-report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .hr-personnel-report-table tfoot td {
        position: sticky;
        bottom: 0;
        z-index: 2;
    }

.hr-personnel-org-tag {
    display: inline-flex;
    max-width: 220px;
    padding: 5px 9px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    white-space: normal;
    line-height: 1.7;
}

.hr-personnel-date {
    direction: ltr;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 1280px) {
    .hr-personnel-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-personnel-search-field {
        grid-column: span 2;
    }

    .hr-personnel-org-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .hr-personnel-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

        .hr-personnel-summary-grid .hr-report-summary-card:last-child {
            grid-column: span 2;
        }

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

    .hr-personnel-section-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 760px) {
    .hr-personnel-filter-mode {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .hr-personnel-mode-btn {
        padding-inline: 8px;
        font-size: 11px;
    }

    .hr-personnel-filter-grid {
        grid-template-columns: 1fr;
    }

    .hr-personnel-search-field {
        grid-column: auto;
    }

    .hr-personnel-summary-grid {
        grid-template-columns: 1fr;
    }

        .hr-personnel-summary-grid .hr-report-summary-card:last-child {
            grid-column: auto;
        }

    .hr-personnel-org-grid {
        grid-template-columns: 1fr;
    }

    .hr-personnel-org-summary-card {
        padding: 16px;
        border-radius: 16px;
    }

    .hr-personnel-section-head h2 {
        font-size: 16px;
    }

    .hr-personnel-table-total,
    .hr-personnel-total-pill {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hr-personnel-mode-btn {
        min-height: 40px;
        font-size: 10px;
    }

    .hr-personnel-org-item {
        min-height: 66px;
    }

    .hr-personnel-org-count strong {
        font-size: 18px;
    }
}



/* =========================================================================================
   ??? ?????????? ???????????? ??????? ? ??????? ??????
   ??? ?? ??? (???? + ?????????? ????? ????/?????) ???? ??? ?????? ?? ???? hr-dashboard.css
   ???? ????? ????. ??? ??? ???? ?? ?? ??? ?? ???? ????????? ?? ?? ????? ???? ?? ??? ????
   ? ???? ?? ???? ?? (?????? ??????? ?? ?????? ????) ???????? ????.
   ========================================================================================= */

.hrq-page,
.hrq-builder,
.hr-profile-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.hrq-head,
.hrq-builder-head,
.hr-profile-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

    .hrq-head h1,
    .hrq-builder-head h1,
    .hr-profile-head h1 {
        margin: 5px 0 8px;
        font-size: clamp(20px, 2vw, 28px);
    }

    .hrq-head p,
    .hrq-builder-head p,
    .hr-profile-head p {
        color: var(--text-muted);
        line-height: 1.9;
    }

.hrq-primary,
.hrq-secondary,
.hrq-actions a,
.hrq-actions button,
.hrq-add-section,
.hrq-add-question,
.hrq-options-head button {
    border: 0;
    border-radius: 11px;
    padding: 10px 16px;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.hrq-primary {
    background: var(--primary);
    color: #fff;
}

.hrq-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.hrq-list {
    display: grid;
    gap: 14px;
}

.hrq-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .hrq-card h2 {
        margin: 8px 0 5px;
        font-size: 18px;
    }

    .hrq-card p,
    .hrq-card small {
        color: var(--text-muted);
        line-height: 1.8;
    }

.hrq-badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
}

    .hrq-badge.active {
        background: color-mix(in srgb, var(--success) 15%, transparent);
        color: var(--success);
    }

.hrq-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

    .hrq-actions a {
        background: var(--bg);
        color: var(--text);
    }

    .hrq-actions form {
        margin: 0;
    }

    .hrq-actions button {
        background: color-mix(in srgb, var(--danger) 12%, transparent);
        color: var(--danger);
    }

.hrq-empty {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 35px 20px;
    text-align: center;
    color: var(--text-muted);
}

.hrq-builder-meta,
.hrq-builder-section,
.hr-profile-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
}

.hrq-builder-meta {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    gap: 14px;
    padding: 18px;
    margin-bottom: 16px;
}

    .hrq-builder-meta label {
        display: flex;
        flex-direction: column;
        gap: 7px;
        color: var(--text-muted);
        font-size: 12px;
    }

.hrq-builder input,
.hrq-builder textarea,
.hrq-builder select,
.hr-profile-form input,
.hr-profile-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

.hrq-check {
    flex-direction: row !important;
    align-items: center;
    align-self: end;
    white-space: nowrap;
}

    .hrq-check input,
    .hrq-inline-check input {
        width: auto;
    }

.hrq-builder-section {
    padding: 18px;
    margin-bottom: 16px;
}

.hrq-section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.hrq-section-desc {
    margin-top: 10px;
}

.hrq-remove {
    border: 0;
    border-radius: 9px;
    padding: 8px 11px;
    background: color-mix(in srgb, var(--danger) 11%, transparent);
    color: var(--danger);
    font: inherit;
    cursor: pointer;
}

.hrq-questions {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.hrq-question {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: var(--bg);
}

.hrq-question-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px auto;
    gap: 8px;
}

.hrq-question > input:not([type="hidden"]) {
    margin-top: 8px;
}

.hrq-inline-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 10px 14px 0 0;
    color: var(--text-muted);
    font-size: 12px;
}

.hrq-options {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface);
}

.hrq-options-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

    .hrq-options-head button {
        padding: 6px 10px;
        background: var(--bg);
        color: var(--primary);
    }

.hrq-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-top: 8px;
}

    .hrq-option button {
        border: 0;
        width: 38px;
        border-radius: 9px;
        background: color-mix(in srgb, var(--danger) 10%, transparent);
        color: var(--danger);
        font-size: 20px;
    }

.hrq-add-question,
.hrq-add-section {
    background: var(--bg);
    color: var(--primary);
    margin-top: 12px;
    border: 1px dashed var(--primary);
}

.hrq-add-section {
    width: 100%;
    padding: 14px;
}

.hr-profile-form {
    display: grid;
    gap: 16px;
}

.hr-profile-section {
    padding: 20px;
}

.hr-profile-section-head {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

    .hr-profile-section-head h2 {
        font-size: 18px;
        margin-bottom: 5px;
    }

    .hr-profile-section-head p {
        color: var(--text-muted);
        line-height: 1.8;
    }

.hr-profile-question {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

    .hr-profile-question:last-child {
        border-bottom: 0;
    }

.hr-profile-label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
}

.hr-profile-question small {
    display: block;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hr-profile-choice {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .hr-profile-choice label,
    .hr-profile-checkbox {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        border: 1px solid var(--border);
        border-radius: 10px;
        padding: 9px 12px;
        background: var(--surface-2);
    }

        .hr-profile-choice input,
        .hr-profile-checkbox input {
            width: auto;
        }

.hr-profile-choice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.hr-profile-submit {
    justify-self: start;
    border: 0;
    cursor: pointer;
}

.hrq-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

    .hrq-quick-links a {
        padding: 8px 12px;
        border-radius: 10px;
        border: 1px solid var(--border);
        background: var(--surface);
        color: var(--primary);
        font-size: 12px;
    }

/* --- ???? ?????? ???? ????? ?? ???????????? --- */
.hrq-error-list {
    margin: 0;
    padding-right: 18px;
    line-height: 1.9;
}

.hrq-condition {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px dashed var(--border);
}

.hrq-condition-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hrq-condition-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

    .hrq-condition-row select {
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface-2);
        color: var(--text);
        padding: 10px 12px;
        font: inherit;
    }

.hrq-condition-hint {
    margin: 8px 0 0;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* --- ???? ??? ????? ????? ??????? --- */
.hrq-response-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

.hrq-response-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: 16px;
    text-align: center;
}

    .hrq-response-stat strong {
        display: block;
        font-size: 26px;
        margin-bottom: 4px;
    }

    .hrq-response-stat span {
        color: var(--text-muted);
        font-size: 12px;
    }

.hrq-response-stat-complete strong {
    color: var(--success);
}

.hrq-response-stat-incomplete strong {
    color: var(--danger);
}

/* --- ???? ?????? ?? ?????? --- */
.hrq-resume-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    margin-bottom: 14px;
    overflow: hidden;
}

.hrq-resume-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    cursor: pointer;
    flex-wrap: wrap;
}

.hrq-resume-person {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .hrq-resume-person strong {
        font-size: 16px;
    }

    .hrq-resume-person span {
        color: var(--text-muted);
        font-size: 12px;
    }

.hrq-resume-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.hrq-resume-date {
    color: var(--text-muted);
    font-size: 12px;
    white-space: nowrap;
}

.hrq-resume-caret {
    color: var(--text-muted);
    transition: transform 0.15s ease;
}

.hrq-resume-card.is-open .hrq-resume-caret {
    transform: rotate(180deg);
}

.hrq-completion-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 11px;
    white-space: nowrap;
}

    .hrq-completion-badge.is-complete {
        background: color-mix(in srgb, var(--success) 15%, transparent);
        color: var(--success);
    }

    .hrq-completion-badge.is-incomplete {
        background: color-mix(in srgb, var(--danger) 12%, transparent);
        color: var(--danger);
    }

.hrq-completion-bar {
    height: 5px;
    background: var(--bg);
    margin: 0 20px;
}

.hrq-completion-bar-fill {
    height: 100%;
    background: var(--success);
    border-radius: 999px;
    transition: width 0.2s ease;
}

.hrq-resume-body {
    display: none;
    padding: 4px 20px 20px;
}

    .hrq-resume-body.is-open {
        display: block;
    }

.hrq-resume-section {
    margin-top: 16px;
}

    .hrq-resume-section h3 {
        font-size: 14px;
        margin-bottom: 10px;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--border);
        color: var(--text-muted);
    }

.hrq-resume-answers {
    display: grid;
    gap: 10px;
}

.hrq-response-answer {
    background: var(--bg);
    border-radius: 12px;
    padding: 10px 14px;
}

    .hrq-response-answer.is-missing {
        background: color-mix(in srgb, var(--danger) 6%, transparent);
        border: 1px dashed color-mix(in srgb, var(--danger) 35%, transparent);
    }

.hrq-response-question {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.hrq-required-mark {
    color: var(--danger);
    margin-right: 3px;
}

.hrq-response-value {
    font-size: 14px;
    word-break: break-word;
}

.hrq-response-answer.is-missing .hrq-response-value {
    color: var(--danger);
}

/* --- ?????????: ?????? ????/???? ???? --- */
@media (max-width: 900px) {
    .hrq-builder-meta {
        grid-template-columns: 1fr;
    }

    .hrq-question-top {
        grid-template-columns: 1fr;
    }

    .hrq-check {
        align-self: start;
    }

    .hrq-response-stats {
        grid-template-columns: 1fr 1fr;
    }

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

/* --- ?????????: ?????? --- */
@media (max-width: 700px) {
    .hrq-head,
    .hrq-builder-head,
    .hr-profile-head {
        flex-direction: column;
    }

        .hrq-head .hrq-primary,
        .hrq-builder-actions,
        .hr-profile-submit {
            width: 100%;
        }

    .hrq-builder-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hrq-card {
        align-items: stretch;
        flex-direction: column;
    }

    .hrq-actions {
        width: 100%;
    }

        .hrq-actions > *,
        .hrq-actions a,
        .hrq-actions button {
            flex: 1;
        }

    .hr-profile-section {
        padding: 14px;
    }

    .hrq-response-stats {
        grid-template-columns: 1fr;
    }

    .hrq-resume-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hrq-resume-meta {
        width: 100%;
        justify-content: space-between;
    }

    .hrq-completion-bar {
        margin: 0 16px;
    }

    .hrq-resume-body {
        padding: 4px 16px 16px;
    }
}

/* --- ?????????: ?????? ???? --- */
@media (max-width: 420px) {
    .hrq-builder-actions {
        grid-template-columns: 1fr;
    }

    .hrq-section-head {
        grid-template-columns: 1fr;
    }

    .hr-profile-choice-grid {
        grid-template-columns: 1fr;
    }

    .hrq-resume-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}


/* =========================================================
   Employee contracts and employment history
   Appended intentionally so existing dashboard styles remain untouched.
   ========================================================= */

.hr-contract-page {
    width: min(1500px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 60px;
}

.hr-contract-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

    .hr-contract-head > div:first-child {
        min-width: 0;
    }

.hr-contract-eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
    color: var(--hr-muted, #64748b);
}

.hr-contract-head h1 {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.25;
}

.hr-contract-head p {
    max-width: 900px;
    margin: 10px 0 0;
    color: var(--hr-muted, #64748b);
    line-height: 1.9;
}

.hr-contract-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.hr-contract-primary-btn,
.hr-contract-secondary-btn,
.hr-contract-mini-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 17px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.hr-contract-primary-btn {
    color: #fff;
    background: var(--primary, #0f766e);
    box-shadow: 0 8px 22px rgba(15, 118, 110, .18);
    border: 0;
}

.hr-contract-secondary-btn {
    color: var(--hr-text, #1e293b);
    background: var(--hr-surface, #fff);
    border: 1px solid var(--hr-border, #e2e8f0);
}

    .hr-contract-primary-btn:hover,
    .hr-contract-secondary-btn:hover,
    .hr-contract-mini-btn:hover {
        transform: translateY(-1px);
    }

.hr-contract-summary {
    display: grid;
    grid-template-columns: minmax(220px, .85fr) minmax(300px, 1.15fr) minmax(300px, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}

.hr-contract-summary-main,
.hr-contract-service-box,
.hr-contract-rule-box {
    min-width: 0;
    border: 1px solid var(--hr-border, #e2e8f0);
    border-radius: 18px;
    padding: 20px;
    background: var(--hr-surface, #fff);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}

    .hr-contract-summary-label,
    .hr-contract-service-box > span,
    .hr-contract-rule-box > span {
        display: block;
        margin-bottom: 8px;
        font-size: 12px;
        font-weight: 800;
        color: var(--hr-muted, #64748b);
    }

.hr-contract-summary-title {
    margin-bottom: 12px;
}

.hr-contract-summary-main p,
.hr-contract-service-box small,
.hr-contract-rule-box small {
    margin: 0;
    color: var(--hr-muted, #64748b);
    line-height: 1.85;
    font-size: 12px;
}

.hr-contract-service-box strong,
.hr-contract-rule-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.6;
}

.hr-contract-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

    .hr-contract-status.is-active {
        color: #047857;
        background: #ecfdf5;
    }

    .hr-contract-status.is-new {
        color: #1d4ed8;
        background: #eff6ff;
    }

    .hr-contract-status.is-retired {
        color: #7c3aed;
        background: #f5f3ff;
    }

    .hr-contract-status.is-ended,
    .hr-contract-status.is-expired {
        color: #b45309;
        background: #fffbeb;
    }

.hr-contract-info-banner,
.hr-contract-retirement-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding: 15px 18px;
    border-radius: 15px;
    border: 1px solid;
    line-height: 1.8;
    font-size: 13px;
}

.hr-contract-info-banner {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.hr-contract-retirement-banner {
    color: #6d28d9;
    background: #f5f3ff;
    border-color: #ddd6fe;
}

.hr-contract-card {
    margin-top: 16px;
    padding: 22px;
    border: 1px solid var(--hr-border, #e2e8f0);
    border-radius: 20px;
    background: var(--hr-surface, #fff);
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}

.hr-contract-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

    .hr-contract-card-head > div {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        column-gap: 12px;
    }

        .hr-contract-card-head > div > span:first-child {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            border-radius: 12px;
            color: var(--hr-primary, #0f766e);
            background: rgba(15, 118, 110, .09);
            font-weight: 900;
        }

    .hr-contract-card-head strong {
        display: block;
        padding-top: 3px;
        font-size: 16px;
    }

    .hr-contract-card-head small {
        display: block;
        margin-top: 5px;
        color: var(--hr-muted, #64748b);
        line-height: 1.7;
    }

.hr-contract-count,
.hr-contract-mode-badge,
.hr-contract-probation-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.hr-contract-count,
.hr-contract-mode-badge {
    color: var(--hr-primary, #0f766e);
    background: rgba(15, 118, 110, .08);
}

.hr-contract-timeline {
    display: grid;
    gap: 14px;
}

.hr-contract-item {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 14px;
    padding: 2px 0 12px;
}

.hr-contract-item-marker {
    position: relative;
    display: flex;
    justify-content: center;
}

    .hr-contract-item-marker::after {
        content: "";
        position: absolute;
        top: 20px;
        bottom: -18px;
        width: 1px;
        background: var(--hr-border, #e2e8f0);
    }

.hr-contract-item:last-child .hr-contract-item-marker::after {
    display: none;
}

.hr-contract-item-marker span {
    position: relative;
    z-index: 1;
    width: 12px;
    height: 12px;
    margin-top: 8px;
    border-radius: 50%;
    background: var(--hr-primary, #0f766e);
    box-shadow: 0 0 0 5px rgba(15, 118, 110, .10);
}

.hr-contract-item.is-archived .hr-contract-item-marker span {
    background: #94a3b8;
    box-shadow: 0 0 0 5px rgba(148, 163, 184, .12);
}

.hr-contract-item-body {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--hr-border, #e2e8f0);
    border-radius: 16px;
    background: var(--hr-surface-soft, #f8fafc);
}

.hr-contract-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hr-contract-number {
    margin-bottom: 4px;
    color: var(--hr-muted, #64748b);
    font-size: 11px;
    font-weight: 800;
}

.hr-contract-item-top h3 {
    margin: 0;
    font-size: 16px;
}

.hr-contract-item-top p {
    margin: 5px 0 0;
    color: var(--hr-muted, #64748b);
    font-size: 12px;
}

.hr-contract-probation-pill {
    margin-right: 6px;
    color: #92400e;
    background: #fef3c7;
}

.hr-contract-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

    .hr-contract-meta > div {
        min-width: 0;
        padding: 11px 12px;
        border-radius: 11px;
        background: var(--hr-surface, #fff);
        border: 1px solid var(--hr-border, #edf2f7);
    }

    .hr-contract-meta span,
    .hr-contract-meta strong {
        display: block;
    }

    .hr-contract-meta span {
        margin-bottom: 4px;
        color: var(--hr-muted, #64748b);
        font-size: 10px;
    }

    .hr-contract-meta strong {
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 12px;
    }

.hr-contract-note {
    margin-top: 12px;
    padding: 11px 13px;
    border-radius: 10px;
    color: var(--hr-muted, #64748b);
    background: var(--hr-surface, #fff);
    font-size: 12px;
    line-height: 1.8;
}

    .hr-contract-note span {
        font-weight: 900;
    }

.hr-contract-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hr-contract-mini-btn {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--hr-border, #e2e8f0);
    color: var(--hr-text, #334155);
    background: var(--hr-surface, #fff);
    font-size: 11px;
}

    .hr-contract-mini-btn.primary {
        color: var(--hr-primary, #0f766e);
        border-color: rgba(15, 118, 110, .25);
        background: rgba(15, 118, 110, .07);
    }

.hr-contract-empty {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 45px 20px;
    border: 1px dashed var(--hr-border, #cbd5e1);
    border-radius: 16px;
    text-align: center;
}

    .hr-contract-empty strong {
        font-size: 15px;
    }

    .hr-contract-empty span {
        max-width: 620px;
        color: var(--hr-muted, #64748b);
        line-height: 1.9;
        font-size: 12px;
    }

.hr-contract-payroll-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

    .hr-contract-payroll-link h2 {
        margin: 4px 0 7px;
        font-size: 17px;
    }

    .hr-contract-payroll-link p {
        max-width: 850px;
        margin: 0;
        color: var(--hr-muted, #64748b);
        font-size: 12px;
        line-height: 1.9;
    }

.hr-contract-form {
    display: grid;
    gap: 16px;
}

.hr-contract-validation {
    padding: 12px 15px;
    border-radius: 12px;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

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

.hr-contract-field {
    min-width: 0;
}

    .hr-contract-field.full {
        grid-column: 1 / -1;
    }

    .hr-contract-field label:not(.hr-contract-check) {
        display: block;
        margin-bottom: 7px;
        font-size: 12px;
        font-weight: 800;
    }

    .hr-contract-field input:not([type="checkbox"]):not([type="file"]),
    .hr-contract-field select,
    .hr-contract-field textarea {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid var(--hr-border, #dbe3ec);
        border-radius: 11px;
        background: var(--hr-surface, #fff);
        color: inherit;
        padding: 11px 12px;
        outline: none;
        font: inherit;
    }

        .hr-contract-field input:not([type="checkbox"]):not([type="file"]):focus,
        .hr-contract-field select:focus,
        .hr-contract-field textarea:focus {
            border-color: rgba(15, 118, 110, .55);
            box-shadow: 0 0 0 3px rgba(15, 118, 110, .08);
        }

    .hr-contract-field input[type="file"] {
        width: 100%;
        box-sizing: border-box;
        padding: 10px;
        border: 1px dashed var(--hr-border, #cbd5e1);
        border-radius: 11px;
        background: var(--hr-surface-soft, #f8fafc);
    }

    .hr-contract-field textarea {
        resize: vertical;
        min-height: 100px;
        line-height: 1.8;
    }

    .hr-contract-field span.field-validation-error,
    .hr-contract-field span[data-valmsg-for] {
        display: block;
        margin-top: 5px;
        color: #dc2626;
        font-size: 11px;
    }

.hr-contract-check-field {
    display: flex;
    align-items: stretch;
}

.hr-contract-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    min-height: 66px;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--hr-border, #e2e8f0);
    border-radius: 12px;
    cursor: pointer;
    background: var(--hr-surface-soft, #f8fafc);
}

    .hr-contract-check input {
        width: 18px;
        height: 18px;
        margin-top: 2px;
        accent-color: var(--hr-primary, #0f766e);
        flex: 0 0 auto;
    }

    .hr-contract-check strong,
    .hr-contract-check small {
        display: block;
    }

    .hr-contract-check strong {
        font-size: 12px;
    }

    .hr-contract-check small,
    .hr-contract-file-help {
        margin-top: 4px;
        color: var(--hr-muted, #64748b);
        font-size: 10px;
        line-height: 1.8;
    }

.hr-contract-file-link {
    display: inline-flex;
    margin-top: 7px;
    color: var(--hr-primary, #0f766e);
    font-size: 11px;
    font-weight: 800;
}

.hr-contract-field.is-required-context label:not(.hr-contract-check)::after {
    content: " *";
    color: #dc2626;
}

.hr-contract-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 2px;
}

    .hr-contract-actions .hr-contract-primary-btn,
    .hr-contract-actions .hr-contract-secondary-btn {
        min-width: 150px;
    }

.hr-emp-action.contract {
    color: #0f766e;
    background: rgba(15, 118, 110, .09);
}

    .hr-emp-action.contract svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.7;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

@media (max-width: 1100px) {
    .hr-contract-summary {
        grid-template-columns: 1fr 1fr;
    }

    .hr-contract-summary-main {
        grid-column: 1 / -1;
    }

    .hr-contract-meta {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    .hr-contract-page {
        width: min(100% - 22px, 760px);
        padding-top: 18px;
    }

    .hr-contract-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-contract-head-actions {
        justify-content: stretch;
    }

        .hr-contract-head-actions > a {
            flex: 1 1 180px;
        }

    .hr-contract-summary {
        grid-template-columns: 1fr;
    }

    .hr-contract-summary-main {
        grid-column: auto;
    }

    .hr-contract-grid {
        grid-template-columns: 1fr;
    }

    .hr-contract-field.full {
        grid-column: auto;
    }

    .hr-contract-card {
        padding: 16px;
        border-radius: 16px;
    }

    .hr-contract-card-head {
        align-items: stretch;
        flex-direction: column;
    }

        .hr-contract-card-head > div {
            grid-template-columns: 38px minmax(0, 1fr);
        }

            .hr-contract-card-head > div > span:first-child {
                width: 38px;
                height: 38px;
            }

    .hr-contract-count,
    .hr-contract-mode-badge {
        align-self: flex-start;
    }

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

    .hr-contract-payroll-link {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .hr-contract-page {
        width: min(100% - 14px, 500px);
    }

    .hr-contract-head h1 {
        font-size: 23px;
    }

    .hr-contract-head-actions,
    .hr-contract-actions {
        flex-direction: column;
    }

        .hr-contract-head-actions > a,
        .hr-contract-actions > a,
        .hr-contract-actions > button {
            width: 100%;
        }

    .hr-contract-summary-main,
    .hr-contract-service-box,
    .hr-contract-rule-box {
        padding: 16px;
    }

    .hr-contract-meta {
        grid-template-columns: 1fr;
    }

    .hr-contract-item {
        grid-template-columns: 12px minmax(0, 1fr);
        gap: 9px;
    }

    .hr-contract-item-body {
        padding: 14px;
    }

    .hr-contract-item-top {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-contract-item-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hr-contract-mini-btn {
        width: 100%;
    }

    .hr-contract-info-banner,
    .hr-contract-retirement-banner {
        align-items: flex-start;
        flex-direction: column;
    }
}



/* =========================================================
   Employee contract service summary refinements
   Appended intentionally to preserve all existing styles.
   ========================================================= */

.hr-contract-service-values {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    gap: 10px;
    width: 100%;
    margin: 8px 0 10px;
    direction: rtl;
}

    .hr-contract-service-values > div {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 10px 8px;
        border: 1px solid var(--hr-border, #e2e8f0);
        border-radius: 12px;
        background: var(--hr-surface-soft, #f8fafc);
        text-align: center;
    }

        .hr-contract-service-values > div strong {
            display: block;
            margin: 0 0 2px;
            font-size: clamp(20px, 2vw, 26px);
            line-height: 1.2;
            font-weight: 900;
        }

        .hr-contract-service-values > div small {
            display: block;
            margin: 0;
            color: var(--hr-muted, #64748b);
            font-size: 11px;
            line-height: 1.5;
            white-space: nowrap;
        }

/*
 * The card header contains three direct children:
 * 01, title and description.
 * The previous grid allowed the description to fall into
 * the first column under 01. Keep all three elements in
 * their intended positions without changing the markup.
 */
.hr-contract-card-head > div > span:first-child {
    grid-column: 1;
    grid-row: 1 / span 2;
}

.hr-contract-card-head > div > strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.hr-contract-card-head > div > small {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
}

@media (max-width: 520px) {
    .hr-contract-service-values {
        gap: 7px;
    }

        .hr-contract-service-values > div {
            padding: 9px 5px;
        }

            .hr-contract-service-values > div strong {
                font-size: 20px;
            }

            .hr-contract-service-values > div small {
                font-size: 10px;
            }
}



/* Employee contracts - probation months and validation additions */
.hr-contract-probation-months-field {
    min-width: 0;
}

.hr-contract-number-wrap {
    display: flex;
    align-items: stretch;
    width: 100%;
    direction: rtl;
}

    .hr-contract-number-wrap input {
        flex: 1 1 auto;
        min-width: 0;
        border-radius: 0 12px 12px 0;
    }

    .hr-contract-number-wrap > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 58px;
        padding: 0 12px;
        border: 1px solid rgba(0, 0, 0, 0.10);
        border-right: 0;
        border-radius: 12px 0 0 12px;
        background: #f5f7fa;
        white-space: nowrap;
        font-weight: 700;
    }

.hr-contract-field-help {
    display: block;
    margin-top: 7px;
    line-height: 1.8;
    opacity: 0.72;
}

.hr-contract-probation-months-field.is-disabled {
    opacity: 0.58;
}

    .hr-contract-probation-months-field.is-disabled input {
        cursor: not-allowed;
        background: #f1f3f5;
    }

.hr-contract-validation ul {
    margin: 0;
    padding-right: 20px;
}

.hr-contract-probation-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 7px;
    padding: 4px 9px;
    border-radius: 999px;
    white-space: nowrap;
    line-height: 1.5;
}

@media (max-width: 900px) {
    .hr-contract-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-contract-probation-months-field {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .hr-contract-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .hr-contract-probation-months-field {
        grid-column: auto;
    }

    .hr-contract-number-wrap > span {
        min-width: 54px;
        padding: 0 10px;
    }

    .hr-contract-check {
        align-items: flex-start;
    }

    .hr-contract-probation-pill {
        margin-top: 6px;
        margin-right: 0;
    }
}


/* =========================================================
   Payroll Tax Reports - final responsive refinements
   Added without changing existing dashboard styles.
   ========================================================= */
.hr-tax-report-page {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 24px clamp(12px, 2.5vw, 32px) 40px;
    box-sizing: border-box;
}

.hr-tax-report-filter-card,
.hr-tax-report-card,
.hr-tax-report-hero {
    width: 100%;
    box-sizing: border-box;
}

.hr-tax-report-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.hr-tax-report-table {
    min-width: 1050px;
}

@media (max-width: 1100px) {
    .hr-tax-report-page {
        padding-inline: 16px;
    }

    .hr-tax-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-tax-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hr-tax-report-page {
        padding: 14px 10px 28px;
    }

    .hr-tax-report-hero {
        gap: 14px;
    }

    .hr-tax-report-filter-grid,
    .hr-tax-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-tax-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

        .hr-tax-report-filter-actions button,
        .hr-tax-report-filter-actions a {
            width: 100%;
            box-sizing: border-box;
            text-align: center;
        }

    .hr-tax-report-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-tax-report-table {
        min-width: 900px;
    }
}


/* =========================================================
   Sidebar overflow fix - keep the complete navigation visible
   Added at the end so existing dashboard styles remain unchanged.
   ========================================================= */
.sidebar {
    min-height: 0;
}

.sidebar-top {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

    .sidebar-top::-webkit-scrollbar {
        width: 7px;
    }

    .sidebar-top::-webkit-scrollbar-track {
        background: transparent;
    }

    .sidebar-top::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.20);
        border-radius: 999px;
    }

        .sidebar-top::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 255, 255, 0.34);
        }

.sidebar-bottom {
    flex: 0 0 auto;
}

@media (max-width: 900px) {
    .sidebar {
        height: 100vh;
        height: 100dvh;
        min-height: 0;
    }

    .sidebar-top {
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .sidebar-bottom {
        flex-shrink: 0;
    }
}

@media (max-width: 640px) {
    .sidebar-top {
        padding-bottom: 10px;
    }

    .sidebar-bottom {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
    }
}


/* ========================================================================== */
/* Users Management - appended responsive styles                              */
/* ========================================================================== */

.hr-users-page {
    width: 100%;
    min-width: 0;
}

.hr-users-section {
    width: 100%;
    margin-top: 24px;
}

.hr-users-active-section {
    margin-top: 30px;
}

.hr-users-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 0 2px;
}

    .hr-users-section-head > div {
        min-width: 0;
    }

    .hr-users-section-head h2 {
        margin: 3px 0 6px;
        color: var(--hr-text, #0f172a);
        font-size: 20px;
        font-weight: 800;
        line-height: 1.7;
    }

    .hr-users-section-head p {
        margin: 0;
        color: var(--hr-muted, #64748b);
        font-size: 13px;
        line-height: 1.9;
    }

.hr-users-section-eyebrow {
    display: inline-block;
    color: var(--hr-primary, #2563eb);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.6;
}

.hr-users-count {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    min-height: 38px;
    padding: 7px 13px;
    border: 1px solid var(--hr-border, #e2e8f0);
    border-radius: 12px;
    background: var(--hr-surface, #ffffff);
    color: var(--hr-text, #0f172a);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.hr-users-table th,
.hr-users-table td {
    vertical-align: middle;
}

.hr-users-ltr {
    direction: ltr;
    text-align: right;
    unicode-bidi: plaintext;
}

.hr-users-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 180px;
}

    .hr-users-actions form {
        margin: 0;
    }

    .hr-users-actions .hr-emp-action {
        min-height: 34px;
        padding: 6px 10px;
        border-radius: 9px;
        white-space: nowrap;
    }

.hr-users-management-actions {
    min-width: 250px;
}

.hr-user-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.hr-user-status-active {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.22);
}

.hr-user-status-blocked {
    background: rgba(239, 68, 68, 0.10);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.20);
}

.hr-user-block-action {
    background: rgba(245, 158, 11, 0.10) !important;
    color: #b45309 !important;
    border-color: rgba(245, 158, 11, 0.24) !important;
}

.hr-user-password-action {
    background: rgba(37, 99, 235, 0.09) !important;
    color: #1d4ed8 !important;
    border-color: rgba(37, 99, 235, 0.20) !important;
}

@media (max-width: 1100px) {
    .hr-users-section-head {
        align-items: stretch;
    }

        .hr-users-section-head h2 {
            font-size: 19px;
        }

    .hr-users-table {
        min-width: 1080px;
    }

    .hr-users-active-table {
        min-width: 1180px;
    }
}

@media (max-width: 768px) {
    .hr-users-section {
        margin-top: 20px;
    }

    .hr-users-active-section {
        margin-top: 24px;
    }

    .hr-users-section-head {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 12px;
    }

        .hr-users-section-head h2 {
            margin-top: 2px;
            font-size: 18px;
        }

        .hr-users-section-head p {
            font-size: 12px;
            line-height: 1.8;
        }

    .hr-users-count {
        align-self: flex-start;
        min-height: 34px;
    }

    .hr-users-table,
    .hr-users-active-table {
        min-width: 1040px;
    }

    .hr-users-actions {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .hr-users-section-head h2 {
        font-size: 17px;
    }

    .hr-users-section-head p {
        font-size: 11px;
    }

    .hr-users-table,
    .hr-users-active-table {
        min-width: 980px;
    }

    .hr-users-actions .hr-emp-action {
        min-height: 32px;
        padding: 5px 9px;
        font-size: 11px;
    }
}

/* =========================================================
   Payroll reports - advanced filters, exports and totals
   Added at the end intentionally.
   ========================================================= */

.hr-report-export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.hr-report-export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 12.5px;
    font-weight: 700;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

    .hr-report-export:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow);
    }

.hr-report-export-excel {
    background: var(--surface);
    color: var(--success);
    border-color: color-mix(in srgb, var(--success) 35%, var(--border));
}

.hr-report-export-pdf {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.hr-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

.hr-report-filter-field {
    min-width: 0;
}

    .hr-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--text-muted);
        font-size: 12px;
        font-weight: 700;
    }

    .hr-report-filter-field input,
    .hr-report-filter-field select {
        width: 100%;
        min-height: 44px;
        padding: 9px 12px;
        border: 1px solid var(--border);
        border-radius: 11px;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
    }

        .hr-report-filter-field input:focus,
        .hr-report-filter-field select:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-report-filter-search {
    grid-column: span 2;
}

.hr-report-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.hr-report-filter-submit,
.hr-report-filter-clear {
    min-height: 44px;
    padding: 9px 16px;
    border-radius: 11px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
}

.hr-report-filter-submit {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
}

.hr-report-filter-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
}

.hr-report-organization-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hr-report-organization-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-report-organization-head span {
        display: block;
        color: var(--text-muted);
        font-size: 11.5px;
        margin-bottom: 4px;
    }

    .hr-report-organization-head strong {
        font-size: 14px;
    }

.hr-report-organization-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.hr-report-organization-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

    .hr-report-organization-table th,
    .hr-report-organization-table td {
        padding: 11px 12px;
        border-bottom: 1px solid var(--border);
        text-align: center;
        white-space: nowrap;
        font-size: 12px;
    }

    .hr-report-organization-table th {
        background: var(--bg);
        color: var(--text-muted);
        font-weight: 800;
    }

    .hr-report-organization-table tbody tr:last-child td {
        border-bottom: none;
    }

    .hr-report-organization-table td:nth-child(n+3) {
        font-variant-numeric: tabular-nums;
        font-weight: 700;
    }

.hr-monthly-report-actions,
.hr-real-salary-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
}

.hr-monthly-report-export,
.hr-real-salary-report-export {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 11px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
}

    .hr-monthly-report-export-excel,
    .hr-real-salary-report-export.hr-report-export-excel {
        color: var(--success);
        background: var(--surface);
    }

    .hr-monthly-report-export-pdf,
    .hr-real-salary-report-export.hr-report-export-pdf {
        color: #fff;
        background: var(--primary);
        border-color: var(--primary);
    }

.hr-monthly-report-filters,
.hr-real-salary-report-filters {
    margin-top: 18px;
}

.hr-annual-report-filter-card,
.hr-monthly-report-filters,
.hr-real-salary-report-filters {
    padding: 18px;
}

.hr-jalali-input {
    direction: ltr;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1180px) {
    .hr-report-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-report-filter-search {
        grid-column: span 2;
    }

    .hr-report-filter-actions {
        grid-column: span 1;
    }
}

@media (max-width: 900px) {
    .hr-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-report-filter-search {
        grid-column: span 2;
    }

    .hr-report-filter-actions {
        grid-column: span 2;
    }

    .hr-report-export-actions {
        justify-content: stretch;
    }

        .hr-report-export-actions .hr-report-export {
            flex: 1 1 180px;
        }

    .hr-monthly-report-actions,
    .hr-real-salary-report-actions {
        justify-content: stretch;
    }

        .hr-monthly-report-actions > *,
        .hr-real-salary-report-actions > * {
            flex: 1 1 180px;
        }
}

@media (max-width: 640px) {
    .hr-report-filter-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .hr-report-filter-search,
    .hr-report-filter-actions {
        grid-column: auto;
    }

    .hr-report-filter-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hr-report-filter-submit,
    .hr-report-filter-clear {
        width: 100%;
    }

    .hr-report-organization-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-report-organization-table {
        min-width: 620px;
    }

    .hr-report-export-actions,
    .hr-monthly-report-actions,
    .hr-real-salary-report-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

        .hr-report-export-actions .hr-report-export,
        .hr-monthly-report-actions > *,
        .hr-real-salary-report-actions > * {
            width: 100%;
        }

    .hr-annual-report-filter-card,
    .hr-monthly-report-filters,
    .hr-real-salary-report-filters {
        padding: 13px;
    }
}

@media (max-width: 420px) {
    .hr-report-filter-actions {
        grid-template-columns: 1fr;
    }

    .hr-report-filter-field input,
    .hr-report-filter-field select,
    .hr-report-filter-submit,
    .hr-report-filter-clear {
        min-height: 42px;
    }

    .hr-report-organization-table th,
    .hr-report-organization-table td {
        padding: 9px 10px;
        font-size: 11px;
    }
}


/* =========================================================
   Role & Permission Management
   Added at the end of hr-dashboard.css
   ========================================================= */

.hr-role-page,
.hr-role-edit-page,
.hr-user-role-page {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
}

    .hr-role-page .hr-emp-head,
    .hr-role-edit-page .hr-emp-head {
        align-items: flex-start;
        gap: 24px;
    }

.hr-role-primary-btn,
.hr-role-secondary-btn,
.hr-role-danger-btn,
.hr-role-save-btn,
.hr-role-cancel-btn,
.hr-role-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 18px;
    border: 1px solid transparent;
    text-decoration: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.hr-role-primary-btn,
.hr-role-save-btn {
    color: #fff;
    background: var(--primary, #2563eb);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.16);
}

    .hr-role-primary-btn:hover,
    .hr-role-save-btn:hover,
    .hr-role-secondary-btn:hover,
    .hr-role-danger-btn:hover,
    .hr-role-cancel-btn:hover,
    .hr-role-tool-btn:hover {
        transform: translateY(-1px);
    }

.hr-role-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.hr-role-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: var(--card-bg, #fff);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hr-role-card-head,
.hr-role-permission-head,
.hr-user-role-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.hr-role-card-label {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.hr-role-card h2,
.hr-role-permission-head h2,
.hr-user-role-card h1,
.hr-role-form-card h1 {
    margin: 0;
    color: #172033;
    font-size: 19px;
    font-weight: 800;
}

.hr-role-system-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.hr-role-description {
    min-height: 48px;
    margin: 18px 0;
    color: #64748b;
    font-size: 14px;
    line-height: 1.9;
}

.hr-role-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
    font-size: 13px;
}

    .hr-role-meta strong {
        color: #172033;
        font-size: 16px;
    }

.hr-role-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

    .hr-role-actions form {
        margin: 0;
    }

.hr-role-secondary-btn {
    color: #1e40af;
    border-color: #bfdbfe;
    background: #eff6ff;
}

.hr-role-danger-btn {
    color: #b91c1c;
    border-color: #fecaca;
    background: #fff1f2;
}

.hr-role-form-card,
.hr-user-role-card {
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    background: var(--card-bg, #fff);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);
}

.hr-role-form-card-head {
    margin-bottom: 22px;
}

.hr-role-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.hr-role-field {
    min-width: 0;
}

    .hr-role-field label {
        display: block;
        margin-bottom: 8px;
        color: #334155;
        font-size: 13px;
        font-weight: 800;
    }

.hr-role-input {
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    outline: none;
    background: #fff;
    color: #172033;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

    .hr-role-input:focus {
        border-color: #93c5fd;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
    }

    .hr-role-input[readonly] {
        background: #f8fafc;
        color: #64748b;
    }

.hr-role-help {
    display: block;
    margin-top: 7px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.7;
}

.hr-role-validation {
    margin-bottom: 16px;
    color: #b91c1c;
    font-size: 13px;
}

    .hr-role-validation:empty {
        display: none;
    }

.hr-role-permission-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 22px 0 14px;
    padding: 17px 20px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 16px;
    background: #f8fafc;
}

    .hr-role-permission-toolbar strong {
        display: block;
        color: #172033;
        font-size: 15px;
    }

    .hr-role-permission-toolbar span {
        display: block;
        margin-top: 4px;
        color: #64748b;
        font-size: 12px;
    }

.hr-role-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hr-role-tool-btn {
    min-height: 38px;
    padding: 8px 13px;
    color: #334155;
    border-color: #dbe2ea;
    background: #fff;
}

.hr-role-permission-groups {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hr-role-permission-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.hr-role-permission-head {
    padding-bottom: 15px;
    border-bottom: 1px solid #eef2f7;
}

    .hr-role-permission-head small {
        display: block;
        margin-top: 5px;
        color: #94a3b8;
        direction: ltr;
        text-align: right;
        font-size: 11px;
    }

.hr-role-controller-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex: 0 0 auto;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

    .hr-role-controller-toggle input,
    .hr-role-permission-item input,
    .hr-user-role-item input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #2563eb;
    }

.hr-role-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 15px;
}

.hr-role-permission-item,
.hr-user-role-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e5eaf0;
    border-radius: 12px;
    background: #fbfdff;
    cursor: pointer;
}

    .hr-role-permission-item:hover,
    .hr-user-role-item:hover {
        border-color: #bfdbfe;
        background: #f8fbff;
    }

    .hr-role-permission-item span,
    .hr-user-role-item span {
        min-width: 0;
    }

    .hr-role-permission-item strong,
    .hr-user-role-item strong {
        display: block;
        overflow-wrap: anywhere;
        color: #334155;
        font-size: 13px;
    }

    .hr-role-permission-item small,
    .hr-user-role-item small {
        display: block;
        margin-top: 4px;
        overflow-wrap: anywhere;
        color: #94a3b8;
        font-size: 10px;
        line-height: 1.7;
    }

.hr-role-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.hr-role-cancel-btn {
    color: #475569;
    border-color: #dbe2ea;
    background: #fff;
}

.hr-user-role-form {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.hr-user-role-username {
    margin: 6px 0 0;
    color: #64748b;
    direction: ltr;
    text-align: right;
    font-size: 13px;
}

.hr-user-role-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.hr-user-role-item {
    align-items: center;
    min-height: 68px;
}

.hr-user-role-note {
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 13px;
    background: #eff6ff;
    color: #475569;
    font-size: 12px;
    line-height: 1.9;
}

.hr-user-role-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .hr-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-role-permission-groups {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hr-role-form-grid,
    .hr-user-role-list {
        grid-template-columns: 1fr;
    }

    .hr-role-permission-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 700px) {
    .hr-role-grid {
        grid-template-columns: 1fr;
    }

    .hr-role-page .hr-emp-head,
    .hr-role-edit-page .hr-emp-head {
        flex-direction: column;
    }

    .hr-role-primary-btn {
        width: 100%;
    }

    .hr-role-form-card,
    .hr-user-role-card,
    .hr-role-permission-card,
    .hr-role-card {
        padding: 16px;
        border-radius: 14px;
    }

    .hr-role-actions-grid {
        grid-template-columns: 1fr;
    }

    .hr-role-permission-head,
    .hr-role-card-head,
    .hr-user-role-card-head {
        flex-direction: column;
    }

    .hr-role-controller-toggle {
        width: 100%;
    }

    .hr-role-form-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

        .hr-role-form-footer > * {
            width: 100%;
        }

    .hr-role-toolbar-actions {
        width: 100%;
    }

    .hr-role-tool-btn {
        flex: 1 1 0;
    }
}

@media (max-width: 480px) {
    .hr-role-permission-toolbar {
        padding: 14px;
    }

    .hr-role-toolbar-actions {
        flex-direction: column;
    }

    .hr-role-tool-btn {
        width: 100%;
    }

    .hr-role-card h2,
    .hr-role-permission-head h2,
    .hr-user-role-card h1,
    .hr-role-form-card h1 {
        font-size: 17px;
    }

    .hr-role-primary-btn,
    .hr-role-secondary-btn,
    .hr-role-danger-btn,
    .hr-role-save-btn,
    .hr-role-cancel-btn {
        width: 100%;
    }

    .hr-role-actions {
        flex-direction: column;
    }

        .hr-role-actions form {
            width: 100%;
        }
}


/* =========================================================
   Employee Questionnaire UX v2
   New questionnaire styles are intentionally appended here
   so existing dashboard/questionnaire styles remain untouched.
   ========================================================= */

.hrq-builder-v2 {
    max-width: 1380px;
    padding-bottom: 60px;
}

.hrq-builder-head-v2 {
    align-items: center;
    padding: 4px 0 8px;
}

    .hrq-builder-head-v2 h1 {
        font-size: clamp(24px, 3vw, 34px);
        font-weight: 900;
    }

    .hrq-builder-head-v2 p {
        max-width: 900px;
        margin-bottom: 0;
    }

    .hrq-builder-head-v2 .hrq-builder-actions {
        flex-shrink: 0;
    }

.hrq-builder-meta-v2 {
    grid-template-columns: minmax(220px, .9fr) minmax(300px, 1.4fr) minmax(210px, .65fr);
    align-items: end;
    padding: 20px;
}

.hrq-meta-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

    .hrq-meta-field > label {
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hrq-meta-field input,
    .hrq-meta-field textarea {
        min-height: 44px;
    }

.hrq-switch-field {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    cursor: pointer;
}

    .hrq-switch-field input {
        width: auto !important;
        accent-color: var(--primary);
    }

    .hrq-switch-field strong,
    .hrq-switch-field small {
        display: block;
    }

    .hrq-switch-field strong {
        font-size: 12px;
    }

    .hrq-switch-field small {
        margin-top: 2px;
        color: var(--text-muted);
        font-size: 10px;
    }

.hrq-builder-guide {
    display: grid;
    grid-template-columns: auto minmax(150px, 1fr) auto minmax(150px, 1fr) auto minmax(150px, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.hrq-guide-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 900;
}

.hrq-builder-guide strong,
.hrq-builder-guide span {
    display: block;
}

.hrq-builder-guide strong {
    margin-bottom: 3px;
    font-size: 12px;
}

.hrq-builder-guide span {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.7;
}

.hrq-quick-add {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

    .hrq-quick-add > div:first-child {
        min-width: 190px;
    }

    .hrq-quick-add strong,
    .hrq-quick-add span {
        display: block;
    }

    .hrq-quick-add strong {
        font-size: 13px;
    }

    .hrq-quick-add span {
        margin-top: 4px;
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.7;
    }

.hrq-quick-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 7px;
}

    .hrq-quick-buttons button {
        min-height: 38px;
        padding: 0 12px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
        color: var(--text);
        font: inherit;
        font-size: 11px;
        cursor: pointer;
        transition: .15s ease;
    }

        .hrq-quick-buttons button:hover {
            border-color: var(--primary);
            color: var(--primary);
            transform: translateY(-1px);
        }

.hrq-builder-section-v2 {
    padding: 0;
    overflow: hidden;
}

.hrq-section-toolbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 17px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.hrq-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-size: 14px;
    font-weight: 900;
}

.hrq-section-title-wrap {
    min-width: 0;
}

    .hrq-section-title-wrap > input {
        width: 100%;
        border: 0 !important;
        padding: 2px 0 !important;
        background: transparent !important;
        box-shadow: none !important;
        font-size: 17px;
        font-weight: 900;
    }

    .hrq-section-title-wrap .hrq-section-desc {
        margin-top: 4px;
        font-size: 11px;
        color: var(--text-muted);
        font-weight: 400;
    }

.hrq-builder-section-v2 > .hrq-questions {
    margin: 0;
    padding: 16px;
    background: var(--bg);
}

.hrq-question-v2 {
    position: relative;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 15px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 15px;
}

    .hrq-question-v2:hover {
        border-color: color-mix(in srgb, var(--primary) 40%, var(--border));
    }

.hrq-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 900;
}

.hrq-question-main {
    min-width: 0;
}

.hrq-question-top {
    grid-template-columns: minmax(0, 1fr) minmax(190px, 240px);
}

    .hrq-question-top input {
        min-height: 46px;
        font-weight: 700;
    }

    .hrq-question-top select {
        min-height: 46px;
    }

.hrq-question-settings {
    display: grid;
    grid-template-columns: auto auto minmax(180px, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 9px;
}

    .hrq-question-settings .hrq-inline-check {
        margin: 0;
        min-height: 40px;
        padding: 0 10px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
    }

.hrq-question-help {
    margin-top: 0 !important;
    min-height: 40px;
}

.hrq-question-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hrq-action-secondary,
.hrq-action-danger {
    min-width: 54px;
    min-height: 34px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--bg);
    color: var(--text-muted);
    font: inherit;
    font-size: 10px;
    cursor: pointer;
}

.hrq-action-danger {
    border-color: color-mix(in srgb, var(--danger) 20%, var(--border));
    color: var(--danger);
    background: color-mix(in srgb, var(--danger) 5%, transparent);
}

.hrq-options-v2 {
    margin-top: 12px;
    border: 1px solid var(--border);
}

    .hrq-options-v2 .hrq-options-head {
        padding-bottom: 9px;
        border-bottom: 1px solid var(--border);
    }

.hrq-options-head strong,
.hrq-options-head small {
    display: block;
}

.hrq-options-head small {
    margin-top: 3px;
    color: var(--text-muted);
    font-size: 10px;
}

.hrq-option {
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
}

.hrq-option-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 800;
}

.hrq-option input {
    min-height: 40px;
}

.hrq-option button {
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.hrq-condition {
    margin-top: 12px;
    padding: 13px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
    border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
}

.hrq-condition-title {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
}

    .hrq-condition-title span {
        font-size: 12px;
        font-weight: 900;
    }

    .hrq-condition-title small {
        padding: 3px 7px;
        border-radius: 999px;
        background: var(--bg);
        color: var(--text-muted);
        font-size: 9px;
    }

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

    .hrq-condition-row label {
        display: block;
        margin-bottom: 5px;
        color: var(--text-muted);
        font-size: 10px;
    }

    .hrq-condition-row select {
        min-height: 42px;
    }

.hrq-condition-hint {
    font-size: 10px;
}

.hrq-add-question-v2 {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
    min-height: 46px;
}

    .hrq-add-question-v2 span,
    .hrq-add-section-v2 span {
        font-size: 20px;
        line-height: 1;
    }

.hrq-add-section-v2 {
    min-height: 58px;
    margin-top: 16px;
}

.hrq-print-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--primary);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

    .hrq-print-button:hover {
        background: var(--bg);
    }

.hr-profile-page-v2 {
    max-width: 1180px;
    padding-bottom: 60px;
}

.hr-profile-head-v2 {
    align-items: center;
}

.hr-profile-head-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.hr-profile-intro {
    margin-bottom: 16px;
    padding: 17px 19px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

    .hr-profile-intro strong {
        display: block;
        font-size: 16px;
    }

    .hr-profile-intro p {
        margin: 5px 0 0;
        color: var(--text-muted);
        line-height: 1.9;
    }

.hr-profile-section-v2 {
    padding: 0;
    overflow: hidden;
}

    .hr-profile-section-v2 .hr-profile-section-head {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        margin: 0;
        padding: 17px 19px;
        background: var(--surface);
    }

.hr-profile-section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 900;
}

.hr-profile-section-head h2 {
    margin: 0 0 3px;
}

.hr-profile-section-head p {
    margin: 0;
}

.hr-profile-questions {
    padding: 0 19px;
    background: var(--surface);
}

.hr-profile-question-v2 {
    display: grid;
    grid-template-columns: minmax(180px, .65fr) minmax(280px, 1.35fr);
    gap: 22px;
    padding: 20px 0;
}

.hr-profile-question-head {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 9px;
    align-items: start;
}

.hr-profile-question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--bg);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 900;
}

.hr-profile-answer input[type="text"],
.hr-profile-answer input[type="number"],
.hr-profile-answer input[type="date"],
.hr-profile-answer textarea {
    min-height: 45px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: var(--surface-2);
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
}

.hr-profile-answer textarea {
    width: 100%;
    resize: vertical;
}

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

    .hr-profile-choice-v2 label,
    .hr-profile-choice-grid label,
    .hr-profile-checkbox-v2 {
        min-height: 45px;
        margin: 0;
        cursor: pointer;
        transition: .15s ease;
    }

        .hr-profile-choice-v2 label:hover,
        .hr-profile-choice-grid label:hover,
        .hr-profile-checkbox-v2:hover {
            border-color: var(--primary);
        }

        .hr-profile-choice-v2 input,
        .hr-profile-choice-grid input,
        .hr-profile-checkbox-v2 input {
            width: auto;
            accent-color: var(--primary);
        }

.hr-profile-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 17px 19px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

    .hr-profile-submit-row strong,
    .hr-profile-submit-row small {
        display: block;
    }

    .hr-profile-submit-row strong {
        font-size: 12px;
    }

    .hr-profile-submit-row small {
        margin-top: 4px;
        color: var(--text-muted);
        line-height: 1.7;
    }

.hr-profile-submit {
    min-height: 46px;
    padding-inline: 22px;
}

.hr-profile-question[hidden] {
    display: none !important;
}

.hr-profile-question.is-condition-hidden {
    opacity: .55;
}

@media (max-width: 1050px) {
    .hrq-builder-guide {
        grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr);
    }

        .hrq-builder-guide .hrq-guide-icon:nth-of-type(3),
        .hrq-builder-guide .hrq-guide-icon:nth-of-type(3) + div {
            display: none;
        }

    .hrq-question-v2 {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    .hrq-question-actions {
        grid-column: 2;
        flex-direction: row;
        justify-content: flex-start;
    }

    .hr-profile-question-v2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 820px) {
    .hrq-builder-meta-v2 {
        grid-template-columns: 1fr;
    }

    .hrq-quick-add {
        align-items: flex-start;
        flex-direction: column;
    }

    .hrq-quick-buttons {
        justify-content: flex-start;
    }

    .hrq-builder-guide {
        grid-template-columns: auto minmax(0, 1fr);
    }

        .hrq-builder-guide .hrq-guide-icon:nth-of-type(3),
        .hrq-builder-guide .hrq-guide-icon:nth-of-type(3) + div {
            display: flex;
        }

    .hrq-question-top {
        grid-template-columns: 1fr;
    }

    .hrq-question-settings {
        grid-template-columns: 1fr 1fr;
    }

    .hrq-question-help {
        grid-column: 1 / -1;
    }

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

    .hr-profile-submit-row {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-profile-submit {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .hrq-builder-head-v2 {
        align-items: stretch;
    }

        .hrq-builder-head-v2 .hrq-builder-actions {
            width: 100%;
        }

            .hrq-builder-head-v2 .hrq-builder-actions > * {
                flex: 1;
            }

    .hrq-section-toolbar {
        grid-template-columns: 36px minmax(0, 1fr);
    }

        .hrq-section-toolbar .hrq-remove {
            grid-column: 2;
            justify-self: start;
        }

    .hrq-builder-section-v2 > .hrq-questions {
        padding: 10px;
    }

    .hrq-question-v2 {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .hrq-question-number {
        width: 30px;
        height: 30px;
    }

    .hrq-question-main {
        width: 100%;
    }

    .hrq-question-actions {
        grid-column: auto;
        width: 100%;
    }

    .hrq-action-secondary,
    .hrq-action-danger {
        flex: 1;
    }

    .hrq-question-settings {
        grid-template-columns: 1fr;
    }

    .hrq-question-help {
        grid-column: auto;
    }

    .hrq-option {
        grid-template-columns: 26px minmax(0, 1fr) 34px;
    }

    .hr-profile-head-v2 {
        align-items: stretch;
    }

    .hr-profile-head-actions {
        justify-content: space-between;
    }

        .hr-profile-head-actions .hrq-print-button {
            flex: 1;
        }

    .hr-profile-choice-v2 {
        grid-template-columns: 1fr;
    }

    .hr-profile-questions {
        padding: 0 13px;
    }

    .hr-profile-section-v2 .hr-profile-section-head {
        padding: 14px;
    }
}

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

    .hr-profile-page-v2 {
        max-width: none;
        padding: 0;
        margin: 0;
    }

        .hr-profile-page-v2 .hr-profile-head-actions,
        .hr-profile-page-v2 .hr-profile-submit-row,
        .hr-profile-page-v2 .hr-emp-alert,
        .hr-profile-page-v2 .hrq-print-button {
            display: none !important;
        }

        .hr-profile-page-v2 .hr-profile-section-v2,
        .hr-profile-page-v2 .hr-profile-intro {
            box-shadow: none !important;
            break-inside: avoid;
        }

        .hr-profile-page-v2 .hr-profile-question-v2 {
            break-inside: avoid;
        }

    .hrq-resume-card:not(.is-print-target) {
        display: none !important;
    }

    .hrq-resume-card.is-print-target {
        display: block !important;
        box-shadow: none !important;
        border: 0 !important;
    }

        .hrq-resume-card.is-print-target .hrq-resume-body {
            display: block !important;
        }

    .hrq-print-response {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .hrq-quick-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .hrq-quick-buttons button {
            width: 100%;
        }

    .hrq-section-title-wrap > input {
        font-size: 15px;
    }
}


/* =========================================================
   Questionnaire index v2
   ========================================================= */

.hrq-index-v2 {
    max-width: 1380px;
    padding-bottom: 60px;
}

.hrq-head-v2 {
    align-items: center;
}

    .hrq-head-v2 h1 {
        font-size: clamp(24px, 3vw, 34px);
        font-weight: 900;
    }

    .hrq-head-v2 p {
        max-width: 900px;
    }

.hrq-create-button {
    min-height: 46px;
    flex-shrink: 0;
}

.hrq-index-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

    .hrq-index-stats > div {
        padding: 16px 18px;
        border: 1px solid var(--border);
        border-radius: 15px;
        background: var(--surface);
        box-shadow: var(--shadow);
    }

    .hrq-index-stats span,
    .hrq-index-stats strong {
        display: block;
    }

    .hrq-index-stats span {
        color: var(--text-muted);
        font-size: 11px;
    }

    .hrq-index-stats strong {
        margin-top: 4px;
        font-size: 25px;
        font-weight: 900;
    }

.hrq-index-help {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 4%, var(--surface));
}

.hrq-index-help-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
    font-weight: 900;
}

.hrq-index-help strong {
    display: block;
    font-size: 13px;
}

.hrq-index-help p {
    margin: 4px 0 0;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.9;
}

.hrq-list-v2 {
    gap: 12px;
}

.hrq-card-v2 {
    padding: 18px 20px;
}

.hrq-card-main {
    min-width: 0;
}

.hrq-card-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hrq-card-count {
    color: var(--text-muted);
    font-size: 10px;
}

.hrq-card-v2 h2 {
    margin: 9px 0 5px;
    font-size: 17px;
}

.hrq-card-v2 p {
    max-width: 850px;
    margin: 0;
    font-size: 11px;
    line-height: 1.8;
}

.hrq-actions-v2 a,
.hrq-actions-v2 button {
    min-height: 38px;
}

.hrq-empty-v2 {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 6px;
}

    .hrq-empty-v2 strong {
        font-size: 15px;
        color: var(--text);
    }

    .hrq-empty-v2 span {
        margin-bottom: 7px;
        color: var(--text-muted);
        font-size: 11px;
    }

@media (max-width: 760px) {
    .hrq-head-v2 {
        align-items: stretch;
    }

    .hrq-create-button {
        width: 100%;
    }

    .hrq-index-stats {
        grid-template-columns: 1fr;
    }

    .hrq-card-v2 {
        align-items: stretch;
    }

    .hrq-actions-v2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

        .hrq-actions-v2 > *,
        .hrq-actions-v2 a,
        .hrq-actions-v2 button {
            width: 100%;
        }
}

@media (max-width: 430px) {
    .hrq-actions-v2 {
        grid-template-columns: 1fr;
    }

    .hrq-index-help {
        grid-template-columns: 1fr;
    }
}

.hrq-index-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.hrq-self-answer-button {
    min-height: 46px;
}

@media (max-width: 760px) {
    .hrq-index-head-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .hrq-self-answer-button,
    .hrq-create-button {
        width: 100%;
    }
}

/* ==========================================================
   Employee Questionnaires - employee response list
   Added at the end intentionally so existing dashboard styles
   remain untouched.
   ========================================================== */

.hr-employee-questionnaires-page {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.hr-employee-questionnaires-head {
    align-items: center;
}

    .hr-employee-questionnaires-head h1 {
        margin-bottom: 8px;
    }

    .hr-employee-questionnaires-head p {
        margin: 0;
        color: var(--text-muted, #64748b);
        line-height: 1.9;
    }

.hr-employee-questionnaires-intro {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start;
    margin: 20px 0;
    padding: 18px 20px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 18px;
    background: rgba(14, 165, 233, 0.05);
}

.hr-employee-questionnaires-intro-icon {
    display: flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
    font-weight: 800;
}

.hr-employee-questionnaires-intro strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text, #0f172a);
}

.hr-employee-questionnaires-intro p {
    margin: 0;
    color: var(--text-muted, #64748b);
    line-height: 1.9;
}

.hr-employee-questionnaires-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.hr-employee-questionnaire-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 20px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 20px;
    background: var(--surface, #ffffff);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.hr-employee-questionnaire-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--text-muted, #64748b);
    font-size: 12px;
}

.hr-employee-questionnaire-card h2 {
    margin: 16px 0 8px;
    color: var(--text, #0f172a);
    font-size: 20px;
    line-height: 1.6;
}

.hr-employee-questionnaire-card > p {
    min-height: 52px;
    margin: 0;
    color: var(--text-muted, #64748b);
    line-height: 1.9;
}

.hr-employee-questionnaire-progress {
    margin-top: 22px;
}

.hr-employee-questionnaire-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: var(--text-muted, #64748b);
    font-size: 12px;
}

    .hr-employee-questionnaire-progress-head strong {
        color: var(--text, #0f172a);
    }

.hr-employee-questionnaire-progress-track {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

    .hr-employee-questionnaire-progress-track span {
        display: block;
        height: 100%;
        min-width: 0;
        border-radius: inherit;
        background: #0ea5e9;
        transition: width 0.2s ease;
    }

.hr-employee-questionnaire-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border, #e2e8f0);
}

    .hr-employee-questionnaire-card-footer > span {
        min-width: 0;
        color: var(--text-muted, #64748b);
        font-size: 11px;
        line-height: 1.8;
    }

    .hr-employee-questionnaire-card-footer .hrq-primary {
        flex: 0 0 auto;
        text-decoration: none;
        white-space: nowrap;
    }

.hr-employee-questionnaires-empty {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .hr-employee-questionnaires-empty strong,
    .hr-employee-questionnaires-empty span {
        line-height: 1.9;
    }

.hrq-action-answer {
    font-weight: 700;
}

@media (max-width: 980px) {
    .hr-employee-questionnaires-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hr-employee-questionnaires-head {
        align-items: stretch;
    }

        .hr-employee-questionnaires-head > a {
            width: 100%;
            text-align: center;
        }

    .hr-employee-questionnaires-intro {
        grid-template-columns: 1fr;
    }

    .hr-employee-questionnaire-card {
        padding: 16px;
        border-radius: 16px;
    }

    .hr-employee-questionnaire-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

        .hr-employee-questionnaire-card-footer .hrq-primary {
            width: 100%;
            text-align: center;
        }
}

@media (max-width: 430px) {
    .hr-employee-questionnaire-card-top {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-employee-questionnaires-intro {
        padding: 15px;
    }
}

@media print {
    .hr-employee-questionnaires-page .hr-employee-questionnaires-head > a,
    .hr-employee-questionnaires-page .hrq-primary {
        display: none !important;
    }
}


/* ================================================================
   Employee Questionnaire workflow - responsive additions
   Added at the end intentionally; existing dashboard styles remain untouched.
   ================================================================ */
.hrq-admin-response-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

    .hrq-admin-response-actions form {
        margin: 0;
    }

.hrq-response-edit,
.hrq-response-delete,
.hrq-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 10px;
    border: 1px solid transparent;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.hrq-response-edit {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.20);
}

.hrq-response-delete,
.hrq-danger {
    background: rgba(239, 68, 68, 0.09);
    border-color: rgba(239, 68, 68, 0.20);
    color: #b42318;
}

    .hrq-response-edit:hover,
    .hrq-response-delete:hover,
    .hrq-danger:hover {
        transform: translateY(-1px);
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    }

.hr-profile-submit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hr-profile-delete-form {
    margin: 0;
}

@media (max-width: 900px) {
    .hrq-admin-response-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 8px;
    }

    .hrq-resume-meta {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .hrq-admin-response-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

        .hrq-admin-response-actions .hrq-print-response {
            grid-column: 1 / -1;
            width: 100%;
        }

        .hrq-admin-response-actions form,
        .hrq-response-edit,
        .hrq-response-delete {
            width: 100%;
        }

    .hr-profile-submit-actions {
        width: 100%;
        flex-direction: column-reverse;
        align-items: stretch;
    }

        .hr-profile-submit-actions form,
        .hr-profile-submit-actions button,
        .hr-profile-delete-form {
            width: 100%;
        }

        .hr-profile-submit-actions .hrq-primary,
        .hr-profile-submit-actions .hrq-danger {
            width: 100%;
        }
}

/* ============================================================================
   Payroll Reports - unified visual system based on AnnualReport
   Added at the end intentionally. Existing report-specific styles remain in
   place and this block only aligns the requested report pages visually.
   ============================================================================ */

.hr-report-standard-topbar,
.hr-annual-report-topbar {
    position: relative;
    z-index: 20;
}

.hr-monthly-report-page,
.hr-real-salary-report-page,
.hr-tax-report-page {
    width: min(100%, 1480px);
    max-width: 1480px;
    margin: 0 auto;
    padding: 22px 24px 44px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-monthly-report-hero,
.hr-real-salary-report-hero,
.hr-tax-report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

    .hr-monthly-report-hero > div:first-child,
    .hr-real-salary-report-hero > div:first-child,
    .hr-tax-report-hero > div:first-child {
        min-width: 0;
    }

.hr-monthly-report-eyebrow,
.hr-real-salary-report-eyebrow,
.hr-tax-report-eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.hr-monthly-report-hero h1,
.hr-real-salary-report-hero h1,
.hr-tax-report-hero h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(16px, 1.9vw, 24px);
    line-height: 1.45;
    font-weight: 800;
}

.hr-monthly-report-hero p,
.hr-real-salary-report-hero p,
.hr-tax-report-hero p {
    max-width: 850px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}

.hr-monthly-report-actions,
.hr-real-salary-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 9px;
    flex-shrink: 0;
}

.hr-monthly-report-export,
.hr-real-salary-report-export {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 15px;
    border-radius: 11px;
    border: 1px solid var(--border);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .18s ease, filter .18s ease, box-shadow .18s ease;
}

    .hr-monthly-report-export:hover,
    .hr-real-salary-report-export:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-sm);
    }

    .hr-monthly-report-export-excel,
    .hr-real-salary-report-export.hr-report-export-excel {
        color: var(--success);
        background: var(--surface);
    }

    .hr-monthly-report-export-pdf,
    .hr-real-salary-report-export.hr-report-export-pdf {
        color: #fff;
        background: var(--primary);
        border-color: var(--primary);
    }

.hr-monthly-report-filters,
.hr-real-salary-report-filters,
.hr-tax-report-filter-card {
    margin: 0;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.hr-monthly-report-filters,
.hr-real-salary-report-filters {
    display: grid;
    align-items: end;
    gap: 14px;
}

.hr-monthly-report-filters {
    grid-template-columns: minmax(160px, 190px) minmax(160px, 190px) minmax(240px, 1fr) auto;
}

.hr-real-salary-report-filters {
    grid-template-columns: repeat(2, minmax(150px, 190px)) minmax(220px, 1fr) auto;
}

.hr-monthly-report-filter,
.hr-real-salary-report-filter,
.hr-tax-report-filter-field {
    min-width: 0;
}

    .hr-monthly-report-filter label,
    .hr-real-salary-report-filter label,
    .hr-tax-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-monthly-report-filter select,
    .hr-monthly-report-filter input,
    .hr-real-salary-report-filter select,
    .hr-real-salary-report-filter input,
    .hr-tax-report-filter-field select,
    .hr-tax-report-filter-field input {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
        padding: 0 13px;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-monthly-report-filter select:focus,
        .hr-monthly-report-filter input:focus,
        .hr-real-salary-report-filter select:focus,
        .hr-real-salary-report-filter input:focus,
        .hr-tax-report-filter-field select:focus,
        .hr-tax-report-filter-field input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-monthly-report-filter-button,
.hr-real-salary-report-filter-button,
.hr-tax-report-primary-button {
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-size: 12.5px;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
}

.hr-tax-report-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hr-tax-report-filter-actions {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 14px;
}

.hr-tax-report-reset-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.hr-monthly-report-summary,
.hr-real-salary-report-summary,
.hr-tax-report-summary-grid {
    display: grid;
    gap: 14px;
    margin: 0;
}

.hr-monthly-report-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-real-salary-report-summary {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hr-tax-report-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-monthly-report-summary > div,
.hr-real-salary-report-summary > div,
.hr-tax-report-summary-card {
    min-width: 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

    .hr-monthly-report-summary span,
    .hr-monthly-report-summary small,
    .hr-real-salary-report-summary span,
    .hr-real-salary-report-summary small,
    .hr-tax-report-summary-card span,
    .hr-tax-report-summary-card small {
        display: block;
        color: var(--text-muted);
    }

    .hr-monthly-report-summary span,
    .hr-real-salary-report-summary span,
    .hr-tax-report-summary-card span {
        margin-bottom: 8px;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-monthly-report-summary strong,
    .hr-real-salary-report-summary strong,
    .hr-tax-report-summary-card strong {
        display: block;
        overflow: hidden;
        color: var(--text);
        font-size: clamp(16px, 1.7vw, 20px);
        font-weight: 800;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hr-monthly-report-summary small,
    .hr-real-salary-report-summary small,
    .hr-tax-report-summary-card small {
        margin-top: 4px;
        font-size: 10.5px;
    }

.hr-monthly-report-summary-net,
.hr-tax-report-summary-highlight,
.hr-tax-report-summary-tax {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border)) !important;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface)) !important;
}

    .hr-monthly-report-summary-net strong,
    .hr-tax-report-summary-highlight strong,
    .hr-tax-report-summary-tax strong {
        color: var(--primary);
    }

.hr-monthly-report-table-card,
.hr-real-salary-report-table-card,
.hr-tax-report-card {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.hr-monthly-report-table-head,
.hr-real-salary-report-table-head,
.hr-tax-report-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-monthly-report-table-head h2,
    .hr-real-salary-report-table-head h2,
    .hr-tax-report-card-head h2 {
        margin: 4px 0 0;
        color: var(--text);
        font-size: 18px;
        font-weight: 800;
    }

    .hr-monthly-report-table-head > div > span,
    .hr-real-salary-report-table-head > div > span,
    .hr-tax-report-card-head > div > span {
        color: var(--primary);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-monthly-report-table-head p,
    .hr-real-salary-report-table-head p {
        margin: 0;
        color: var(--text-muted);
        font-size: 11.5px;
        line-height: 1.8;
        text-align: end;
    }

.hr-monthly-report-table-scroll,
.hr-real-salary-report-table-scroll,
.hr-tax-report-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-monthly-report-table,
.hr-real-salary-report-table,
.hr-tax-report-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 12px;
}

    .hr-monthly-report-table th,
    .hr-monthly-report-table td,
    .hr-real-salary-report-table th,
    .hr-real-salary-report-table td,
    .hr-tax-report-table th,
    .hr-tax-report-table td {
        padding: 13px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        text-align: right;
        white-space: nowrap;
    }

    .hr-monthly-report-table thead th,
    .hr-real-salary-report-table thead th,
    .hr-tax-report-table thead th {
        background: var(--bg);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-monthly-report-table tbody tr:hover td,
    .hr-real-salary-report-table tbody tr:hover td,
    .hr-tax-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

    .hr-monthly-report-table tfoot th,
    .hr-monthly-report-table tfoot td,
    .hr-real-salary-report-table tfoot th,
    .hr-real-salary-report-table tfoot td,
    .hr-tax-report-table tfoot th,
    .hr-tax-report-table tfoot td {
        background: color-mix(in srgb, var(--primary) 5%, var(--surface));
        border-bottom: 0;
        font-weight: 800;
    }

.hr-tax-report-record-count {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
}

@media (max-width: 1180px) {
    .hr-tax-report-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .hr-monthly-report-search {
        grid-column: span 2;
    }

    .hr-monthly-report-filter-button,
    .hr-real-salary-report-filter-button {
        grid-column: span 2;
    }

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

    .hr-real-salary-report-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-tax-report-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-monthly-report-page,
    .hr-real-salary-report-page,
    .hr-tax-report-page {
        padding: 18px 16px 34px;
    }

    .hr-monthly-report-hero,
    .hr-real-salary-report-hero,
    .hr-tax-report-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .hr-monthly-report-actions,
    .hr-real-salary-report-actions {
        width: 100%;
        justify-content: stretch;
    }

        .hr-monthly-report-actions > *,
        .hr-real-salary-report-actions > * {
            flex: 1 1 180px;
        }

    .hr-tax-report-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-tax-report-filter-actions {
        flex-wrap: wrap;
    }

    .hr-tax-report-primary-button,
    .hr-tax-report-reset-button {
        flex: 1 1 180px;
    }

    .hr-monthly-report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .hr-monthly-report-page,
    .hr-real-salary-report-page,
    .hr-tax-report-page {
        padding: 14px 10px 28px;
        gap: 14px;
    }

    .hr-monthly-report-hero,
    .hr-real-salary-report-hero,
    .hr-tax-report-hero {
        padding: 18px;
        border-radius: 16px;
    }

        .hr-monthly-report-hero h1,
        .hr-real-salary-report-hero h1,
        .hr-tax-report-hero h1 {
            font-size: 18px;
        }

        .hr-monthly-report-hero p,
        .hr-real-salary-report-hero p,
        .hr-tax-report-hero p {
            font-size: 11.5px;
            line-height: 1.85;
        }

    .hr-monthly-report-actions,
    .hr-real-salary-report-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

        .hr-monthly-report-actions > *,
        .hr-real-salary-report-actions > * {
            width: 100%;
        }

    .hr-monthly-report-filters,
    .hr-real-salary-report-filters,
    .hr-tax-report-filter-card,
    .hr-tax-report-filter-grid {
        grid-template-columns: 1fr;
        padding: 13px;
        border-radius: 15px;
    }

    .hr-monthly-report-search,
    .hr-monthly-report-filter-button,
    .hr-real-salary-report-filter-button {
        grid-column: auto;
    }

    .hr-monthly-report-summary,
    .hr-real-salary-report-summary,
    .hr-tax-report-summary-grid {
        grid-template-columns: 1fr;
    }

    .hr-monthly-report-table-head,
    .hr-real-salary-report-table-head,
    .hr-tax-report-card-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

        .hr-monthly-report-table-head p,
        .hr-real-salary-report-table-head p {
            text-align: start;
        }

    .hr-tax-report-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-tax-report-primary-button,
    .hr-tax-report-reset-button {
        width: 100%;
        flex: none;
    }
}

@media (max-width: 420px) {
    .hr-monthly-report-page,
    .hr-real-salary-report-page,
    .hr-tax-report-page {
        padding-inline: 8px;
    }
}

/* Real salary report uses the shared AnnualReport filter field markup. */
.hr-real-salary-report-filters .hr-report-filter-field {
    min-width: 0;
}

    .hr-real-salary-report-filters .hr-report-filter-field label {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-real-salary-report-filters .hr-report-filter-field input,
    .hr-real-salary-report-filters .hr-report-filter-field select {
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
        padding: 0 13px;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
    }

        .hr-real-salary-report-filters .hr-report-filter-field input:focus,
        .hr-real-salary-report-filters .hr-report-filter-field select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

/* ============================================================================
   REPORT PAGES ? AnnualReport visual language
   --------------------------------------------------------------------------
   ??? ??? ????? ?? ?????? ???? ???? ????? ???.
   ???? ????????? ??? ???????? ???? ? ?????????? ????? ??? ????????.
   ============================================================================ */

/* Shared report shell ------------------------------------------------------- */
.hr-attendance-report-page,
.hr-doc-report-page,
.hr-fin-report-page,
.hr-report-page,
.hr-personnel-report-page {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding: 22px 24px 44px;
    box-sizing: border-box;
}

.hr-attendance-report-topbar,
.hr-doc-report-topbar,
.hr-emp-topbar {
    position: relative;
    z-index: 20;
}

.hr-attendance-report-page,
.hr-doc-report-page,
.hr-fin-report-page,
.hr-report-page,
.hr-personnel-report-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Common hero --------------------------------------------------------------- */
.hr-attendance-report-hero,
.hr-doc-report-hero,
.hr-fin-hero,
.hr-report-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

    .hr-attendance-report-hero > div:first-child,
    .hr-doc-report-hero-content,
    .hr-fin-hero > div:first-child,
    .hr-report-hero > div:first-child {
        min-width: 0;
    }

.hr-attendance-report-eyebrow,
.hr-doc-report-eyebrow,
.hr-emp-eyebrow,
.hr-attendance-report-table-head span,
.hr-doc-report-table-eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 800;
}

.hr-attendance-report-eyebrow,
.hr-doc-report-eyebrow,
.hr-emp-eyebrow {
    display: block;
    margin-bottom: 7px;
}

.hr-attendance-report-hero h1,
.hr-doc-report-hero h1,
.hr-fin-hero h1,
.hr-report-hero h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(17px, 1.9vw, 24px);
    line-height: 1.45;
    font-weight: 800;
}

.hr-attendance-report-hero p,
.hr-doc-report-hero p,
.hr-fin-hero p,
.hr-report-hero p {
    max-width: 900px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}

.hr-attendance-report-actions,
.hr-report-hero > .hr-report-year-badge,
.hr-doc-report-hero-icon {
    flex: 0 0 auto;
}

/* Export buttons ------------------------------------------------------------ */
.hr-attendance-report-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.hr-attendance-report-export,
.hr-real-salary-report-export,
.hr-report-export,
.hr-doc-report-search-button,
.hr-doc-report-clear-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 15px;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s ease, filter .18s ease, border-color .18s ease;
}

.hr-attendance-report-export-excel,
.hr-real-salary-report-export-excel,
.hr-report-export-excel {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
}

.hr-attendance-report-export-pdf,
.hr-real-salary-report-export-pdf,
.hr-report-export-pdf {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.hr-attendance-report-export:hover,
.hr-real-salary-report-export:hover,
.hr-report-export:hover,
.hr-doc-report-search-button:hover,
.hr-doc-report-clear-button:hover {
    transform: translateY(-1px);
}

/* Filter cards -------------------------------------------------------------- */
.hr-attendance-report-filter-card,
.hr-doc-report-filter-card,
.hr-fin-filter-card,
.hr-report-filter-card,
.hr-personnel-filter-card {
    margin: 0;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

    .hr-attendance-report-filter-grid,
    .hr-doc-report-filter-form,
    .hr-fin-filter-card form,
    .hr-report-filter-card > .hr-report-filter-grid,
    .hr-personnel-filter-grid {
        display: grid;
        gap: 14px;
        align-items: end;
    }

.hr-attendance-report-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-doc-report-filter-form {
    grid-template-columns: minmax(160px, 230px) minmax(260px, 1fr) auto;
}

.hr-fin-filter-card form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hr-report-filter-card > .hr-report-filter-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-personnel-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.hr-attendance-report-field,
.hr-doc-report-filter-field,
.hr-doc-field,
.hr-fin-filter-card .hr-doc-field,
.hr-report-filter-card .hr-doc-field {
    min-width: 0;
}

    .hr-attendance-report-field label,
    .hr-doc-report-filter-field label,
    .hr-doc-field > span,
    .hr-fin-filter-card .hr-doc-field > span,
    .hr-report-filter-card .hr-doc-field > span {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-attendance-report-field input,
    .hr-attendance-report-field select,
    .hr-doc-report-filter-field input,
    .hr-doc-report-filter-field select,
    .hr-doc-field input,
    .hr-doc-field select,
    .hr-fin-filter-card input,
    .hr-fin-filter-card select,
    .hr-report-filter-card input,
    .hr-report-filter-card select {
        width: 100%;
        min-height: 46px;
        padding: 0 13px;
        box-sizing: border-box;
        border: 1px solid var(--border);
        border-radius: 12px;
        outline: none;
        background: var(--surface);
        color: var(--text);
        font-family: inherit;
        font-size: 13px;
        transition: border-color .18s ease, box-shadow .18s ease;
    }

        .hr-attendance-report-field input:focus,
        .hr-attendance-report-field select:focus,
        .hr-doc-report-filter-field input:focus,
        .hr-doc-report-filter-field select:focus,
        .hr-doc-field input:focus,
        .hr-doc-field select:focus,
        .hr-fin-filter-card input:focus,
        .hr-fin-filter-card select:focus,
        .hr-report-filter-card input:focus,
        .hr-report-filter-card select:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
        }

.hr-attendance-report-filter-actions,
.hr-doc-report-filter-actions,
.hr-report-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.hr-attendance-report-primary-button,
.hr-attendance-report-reset-button,
.hr-report-filter-submit,
.hr-report-filter-clear,
.hr-insurance-filter-btn,
.hr-report-reset-btn,
.hr-doc-report-search-button,
.hr-doc-report-clear-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.hr-attendance-report-primary-button,
.hr-report-filter-submit,
.hr-insurance-filter-btn,
.hr-doc-report-search-button {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #fff;
}

.hr-attendance-report-reset-button,
.hr-report-filter-clear,
.hr-report-reset-btn,
.hr-doc-report-clear-button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
}

.hr-attendance-report-filter-help,
.hr-doc-report-table-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.9;
}

/* Summary cards ------------------------------------------------------------- */
.hr-attendance-report-summary-grid,
.hr-doc-report-summary-grid,
.hr-report-summary-grid,
.hr-fin-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.hr-attendance-report-summary-card,
.hr-doc-report-summary-card,
.hr-report-summary-card,
.hr-fin-summary-highlight {
    min-width: 0;
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

    .hr-attendance-report-summary-card span,
    .hr-attendance-report-summary-card strong,
    .hr-doc-report-summary-card span,
    .hr-doc-report-summary-card strong,
    .hr-doc-report-summary-card small,
    .hr-report-summary-card span,
    .hr-report-summary-card strong,
    .hr-report-summary-card small,
    .hr-fin-summary-highlight span,
    .hr-fin-summary-highlight strong {
        display: block;
    }

    .hr-attendance-report-summary-card span,
    .hr-doc-report-summary-card span,
    .hr-report-summary-card span,
    .hr-fin-summary-highlight span {
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-attendance-report-summary-card strong,
    .hr-doc-report-summary-card strong,
    .hr-report-summary-card strong,
    .hr-fin-summary-highlight strong {
        margin: 8px 0 3px;
        color: var(--text);
        font-size: clamp(16px, 1.5vw, 21px);
        line-height: 1.4;
        overflow-wrap: anywhere;
    }

    .hr-doc-report-summary-card small,
    .hr-report-summary-card small {
        color: var(--text-muted);
        font-size: 10px;
    }

    .hr-doc-report-summary-card-primary,
    .hr-report-summary-card.is-total {
        background: color-mix(in srgb, var(--primary) 6%, var(--surface));
    }

/* Content cards and tables -------------------------------------------------- */
.hr-attendance-report-table-card,
.hr-doc-report-table-card,
.hr-report-table-card,
.hr-personnel-org-summary-card,
.hr-report-org-summary-card {
    margin: 0;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.hr-attendance-report-table-head,
.hr-doc-report-table-head,
.hr-report-table-head,
.hr-personnel-section-head,
.hr-report-org-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 15px;
}

    .hr-attendance-report-table-head h2,
    .hr-doc-report-table-head h2,
    .hr-report-table-head h2,
    .hr-personnel-section-head h2,
    .hr-report-org-summary-head h2 {
        margin: 4px 0 0;
        color: var(--text);
        font-size: 15px;
        line-height: 1.6;
    }

.hr-attendance-report-table-scroll,
.hr-doc-report-table-scroll,
.hr-report-table-scroll,
.hr-fin-table-wrap,
.hr-personnel-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
    border-radius: 14px;
}

.hr-attendance-report-table,
.hr-doc-report-table,
.hr-report-table,
.hr-fin-table,
.hr-personnel-report-table {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 11px;
}

    .hr-attendance-report-table th,
    .hr-attendance-report-table td,
    .hr-doc-report-table th,
    .hr-doc-report-table td,
    .hr-report-table th,
    .hr-report-table td,
    .hr-fin-table th,
    .hr-fin-table td,
    .hr-personnel-report-table th,
    .hr-personnel-report-table td {
        padding: 12px 11px;
        border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
        text-align: right;
        vertical-align: middle;
        white-space: nowrap;
    }

    .hr-attendance-report-table thead th,
    .hr-doc-report-table thead th,
    .hr-report-table thead th,
    .hr-fin-table thead th,
    .hr-personnel-report-table thead th {
        background: color-mix(in srgb, var(--primary) 4%, var(--surface));
        color: var(--text);
        font-size: 10px;
        font-weight: 800;
    }

    .hr-attendance-report-table tbody tr:last-child td,
    .hr-doc-report-table tbody tr:last-child td,
    .hr-report-table tbody tr:last-child td,
    .hr-fin-table tbody tr:last-child td,
    .hr-personnel-report-table tbody tr:last-child td {
        border-bottom: 0;
    }

    .hr-attendance-report-table tbody tr:hover td,
    .hr-doc-report-table tbody tr:hover td,
    .hr-report-table tbody tr:hover td,
    .hr-fin-table tbody tr:hover td,
    .hr-personnel-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

    .hr-report-table tfoot td,
    .hr-personnel-report-table tfoot td {
        border-top: 2px solid var(--border);
        border-bottom: 0;
        background: color-mix(in srgb, var(--primary) 4%, var(--surface));
        font-weight: 800;
    }

.hr-attendance-report-empty,
.hr-doc-report-empty,
.hr-doc-empty {
    padding: 34px 18px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    color: var(--text-muted);
    text-align: center;
}

/* Financial report ---------------------------------------------------------- */
.hr-fin-report-page .hr-fin-hero,
.hr-fin-report-page .hr-fin-filter-card,
.hr-fin-report-page .hr-fin-table-wrap {
    margin-bottom: 0;
}

.hr-fin-report-page .hr-fin-hero {
    padding: 26px 28px;
}

.hr-fin-report-page .hr-fin-filter-card {
    padding: 18px;
}

.hr-fin-report-page .hr-fin-report-table {
    min-width: 1200px;
}

.hr-fin-summary-highlight.is-creditor {
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

.hr-fin-summary-highlight.is-debtor {
    background: color-mix(in srgb, #b44a54 5%, var(--surface));
}

/* Employee list reports: advances / loans / penalties / rewards / missions */
.hr-report-page > .hr-report-hero {
    margin: 0;
}

.hr-report-page > .hr-report-filter-card {
    margin: 0;
}

.hr-report-page .hr-report-year-badge {
    min-width: 210px;
    padding: 14px 18px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
    color: var(--text-muted);
    text-align: center;
    box-sizing: border-box;
}

    .hr-report-page .hr-report-year-badge strong {
        color: var(--text);
    }

.hr-report-page .hr-report-org-grid,
.hr-personnel-report-page .hr-personnel-org-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.hr-report-page .hr-report-org-item,
.hr-personnel-report-page .hr-personnel-org-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: color-mix(in srgb, var(--primary) 2.5%, var(--surface));
}

    .hr-report-page .hr-report-org-item strong,
    .hr-personnel-report-page .hr-personnel-org-name {
        display: block;
        margin-bottom: 7px;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-report-page .hr-report-org-item span {
        display: block;
        color: var(--text-muted);
        font-size: 10px;
        line-height: 1.9;
    }

/* Personnel count ----------------------------------------------------------- */
.hr-personnel-report-page .hr-personnel-filter-mode {
    margin-bottom: 14px;
}

.hr-personnel-report-page .hr-personnel-mode-btn {
    min-height: 38px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 800;
}

    .hr-personnel-report-page .hr-personnel-mode-btn.active {
        border-color: var(--primary);
        background: color-mix(in srgb, var(--primary) 8%, var(--surface));
        color: var(--primary);
    }

.hr-personnel-report-page .hr-personnel-total-pill,
.hr-personnel-report-page .hr-personnel-table-total {
    flex: 0 0 auto;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface));
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
}

/* Responsive --------------------------------------------------------------- */
@media (max-width: 1250px) {
    .hr-attendance-report-filter-grid,
    .hr-report-filter-card > .hr-report-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-personnel-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-attendance-report-summary-grid,
    .hr-doc-report-summary-grid,
    .hr-report-summary-grid,
    .hr-fin-report-summary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hr-report-page .hr-report-org-grid,
    .hr-personnel-report-page .hr-personnel-org-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-attendance-report-page,
    .hr-doc-report-page,
    .hr-fin-report-page,
    .hr-report-page,
    .hr-personnel-report-page {
        padding: 18px 14px 36px;
    }

    .hr-attendance-report-hero,
    .hr-doc-report-hero,
    .hr-fin-hero,
    .hr-report-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 22px;
        border-radius: 18px;
    }

    .hr-attendance-report-actions {
        justify-content: flex-start;
    }

    .hr-doc-report-hero-icon,
    .hr-report-page .hr-report-year-badge {
        width: 100%;
        min-width: 0;
    }

    .hr-attendance-report-filter-grid,
    .hr-doc-report-filter-form,
    .hr-fin-filter-card form,
    .hr-report-filter-card > .hr-report-filter-grid,
    .hr-personnel-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-attendance-report-summary-grid,
    .hr-doc-report-summary-grid,
    .hr-report-summary-grid,
    .hr-fin-report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-report-page .hr-report-org-grid,
    .hr-personnel-report-page .hr-personnel-org-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-attendance-report-table-head,
    .hr-doc-report-table-head,
    .hr-report-table-head,
    .hr-personnel-section-head,
    .hr-report-org-summary-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 620px) {
    .hr-attendance-report-page,
    .hr-doc-report-page,
    .hr-fin-report-page,
    .hr-report-page,
    .hr-personnel-report-page {
        padding: 12px 10px 28px;
        gap: 12px;
    }

    .hr-attendance-report-hero,
    .hr-doc-report-hero,
    .hr-fin-hero,
    .hr-report-hero,
    .hr-attendance-report-filter-card,
    .hr-doc-report-filter-card,
    .hr-fin-filter-card,
    .hr-report-filter-card,
    .hr-personnel-filter-card,
    .hr-attendance-report-table-card,
    .hr-doc-report-table-card,
    .hr-report-table-card,
    .hr-personnel-org-summary-card,
    .hr-report-org-summary-card {
        padding: 14px;
        border-radius: 15px;
    }

        .hr-attendance-report-hero h1,
        .hr-doc-report-hero h1,
        .hr-fin-hero h1,
        .hr-report-hero h1 {
            font-size: 17px;
        }

        .hr-attendance-report-hero p,
        .hr-doc-report-hero p,
        .hr-fin-hero p,
        .hr-report-hero p {
            font-size: 11px;
            line-height: 1.85;
        }

        .hr-attendance-report-filter-grid,
        .hr-doc-report-filter-form,
        .hr-fin-filter-card form,
        .hr-report-filter-card > .hr-report-filter-grid,
        .hr-personnel-filter-grid {
            grid-template-columns: 1fr;
        }

    .hr-attendance-report-summary-grid,
    .hr-doc-report-summary-grid,
    .hr-report-summary-grid,
    .hr-fin-report-summary,
    .hr-report-page .hr-report-org-grid,
    .hr-personnel-report-page .hr-personnel-org-grid {
        grid-template-columns: 1fr;
    }

    .hr-attendance-report-actions,
    .hr-attendance-report-filter-actions,
    .hr-doc-report-filter-actions,
    .hr-report-filter-actions {
        width: 100%;
    }

    .hr-attendance-report-export,
    .hr-attendance-report-primary-button,
    .hr-attendance-report-reset-button,
    .hr-report-filter-submit,
    .hr-report-filter-clear,
    .hr-insurance-filter-btn,
    .hr-report-reset-btn,
    .hr-doc-report-search-button,
    .hr-doc-report-clear-button {
        width: 100%;
    }

    .hr-attendance-report-summary-card,
    .hr-doc-report-summary-card,
    .hr-report-summary-card,
    .hr-fin-summary-highlight {
        padding: 14px;
    }

    .hr-attendance-report-table,
    .hr-doc-report-table,
    .hr-report-table,
    .hr-fin-table,
    .hr-personnel-report-table {
        min-width: 920px;
    }
}

@media (max-width: 420px) {
    .hr-attendance-report-page,
    .hr-doc-report-page,
    .hr-fin-report-page,
    .hr-report-page,
    .hr-personnel-report-page {
        padding-inline: 8px;
    }

    .hr-attendance-report-hero,
    .hr-doc-report-hero,
    .hr-fin-hero,
    .hr-report-hero {
        padding: 13px;
    }

    .hr-attendance-report-filter-card,
    .hr-doc-report-filter-card,
    .hr-fin-filter-card,
    .hr-report-filter-card,
    .hr-personnel-filter-card,
    .hr-attendance-report-table-card,
    .hr-doc-report-table-card,
    .hr-report-table-card,
    .hr-personnel-org-summary-card,
    .hr-report-org-summary-card {
        padding: 11px;
    }
}


/* ============================================================================
   REPORT FAMILY EXTENSION ? SUPPLEMENTARY INSURANCE + FINANCIAL LEDGER
   --------------------------------------------------------------------------
   ??? ??? ????? ?? ?????? ???? ???? ????? ??? ?? ???? ?? ????? ???? ??
   AnnualReport ? ???? ????? ????? ??????? ???? ???? ??? ?? ???????? ??????????
   ????. ???????? ??????? ?? ???? ?????? ??? ???????.
   ============================================================================ */

.hr-supplementary-report-topbar,
.hr-financial-report-topbar {
    position: relative;
    z-index: 20;
}

    .hr-supplementary-report-topbar .icon-btn,
    .hr-financial-report-topbar .icon-btn {
        flex: 0 0 auto;
    }

        .hr-supplementary-report-topbar .icon-btn svg,
        .hr-financial-report-topbar .icon-btn svg {
            width: 20px;
            height: 20px;
        }

.hr-insurance-report-page,
.hr-fin-report-page {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding: 22px 24px 44px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-insurance-hero,
.hr-fin-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0;
    padding: 26px 28px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    box-sizing: border-box;
}

.hr-insurance-hero-content,
.hr-fin-hero-content {
    min-width: 0;
}

.hr-insurance-hero h1,
.hr-fin-hero h1 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: clamp(17px, 1.9vw, 24px);
    line-height: 1.45;
    font-weight: 800;
}

.hr-insurance-hero p,
.hr-fin-hero p {
    max-width: 900px;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.95;
}

.hr-report-export-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
}

.hr-insurance-export-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 15px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: transform .18s ease, filter .18s ease;
}

    .hr-insurance-export-btn:hover {
        color: #fff;
        filter: brightness(.96);
        transform: translateY(-1px);
    }

.hr-insurance-filter-card,
.hr-fin-filter-card {
    margin: 0;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.hr-insurance-filter-form,
.hr-fin-report-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 14px;
}

.hr-fin-report-filter-form {
    grid-template-columns: minmax(260px, 1.6fr) minmax(190px, 1fr) auto;
}

    .hr-insurance-filter-form .hr-doc-field,
    .hr-fin-report-filter-form .hr-doc-field {
        min-width: 0;
    }

        .hr-insurance-filter-form .hr-doc-field > span,
        .hr-fin-report-filter-form .hr-doc-field > span {
            display: block;
            margin-bottom: 7px;
            color: var(--text);
            font-size: 12px;
            font-weight: 800;
        }

        .hr-insurance-filter-form .hr-doc-field input,
        .hr-insurance-filter-form .hr-doc-field select,
        .hr-fin-report-filter-form .hr-doc-field input,
        .hr-fin-report-filter-form .hr-doc-field select {
            width: 100%;
            min-height: 46px;
            box-sizing: border-box;
            padding: 0 13px;
            border: 1px solid var(--border);
            border-radius: 12px;
            outline: none;
            background: var(--surface);
            color: var(--text);
            font-family: inherit;
            font-size: 13px;
            transition: border-color .18s ease, box-shadow .18s ease;
        }

            .hr-insurance-filter-form .hr-doc-field input:focus,
            .hr-insurance-filter-form .hr-doc-field select:focus,
            .hr-fin-report-filter-form .hr-doc-field input:focus,
            .hr-fin-report-filter-form .hr-doc-field select:focus {
                border-color: var(--primary);
                box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
            }

.hr-insurance-filter-actions,
.hr-fin-report-filter-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.hr-insurance-filter-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 17px;
    border: 1px solid var(--primary);
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
    transition: transform .18s ease, filter .18s ease;
}

    .hr-insurance-filter-btn:hover {
        filter: brightness(.96);
        transform: translateY(-1px);
    }

.hr-insurance-report-summary,
.hr-fin-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

    .hr-insurance-report-summary > div,
    .hr-fin-report-summary > div {
        min-width: 0;
        padding: 18px 20px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 16px;
        box-shadow: var(--shadow-sm);
    }

        .hr-insurance-report-summary > div span,
        .hr-fin-report-summary > div span {
            display: block;
            margin-bottom: 8px;
            color: var(--text-muted);
            font-size: 12px;
            font-weight: 700;
        }

        .hr-insurance-report-summary > div strong,
        .hr-fin-report-summary > div strong {
            display: block;
            overflow: hidden;
            color: var(--text);
            font-size: clamp(16px, 1.7vw, 20px);
            font-weight: 800;
            line-height: 1.35;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

.hr-insurance-summary-highlight,
.hr-fin-summary-highlight.is-creditor {
    border-color: color-mix(in srgb, var(--primary) 30%, var(--border)) !important;
    background: color-mix(in srgb, var(--primary) 5%, var(--surface)) !important;
}

    .hr-insurance-summary-highlight strong,
    .hr-fin-summary-highlight.is-creditor strong {
        color: var(--primary) !important;
    }

.hr-fin-summary-highlight.is-debtor {
    border-color: color-mix(in srgb, #d97706 28%, var(--border));
    background: color-mix(in srgb, #d97706 5%, var(--surface));
}

    .hr-fin-summary-highlight.is-debtor strong {
        color: #b45309;
    }

.hr-insurance-report-table-wrap,
.hr-fin-table-wrap {
    overflow: hidden;
    margin: 0;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    box-sizing: border-box;
}

.hr-insurance-report-table-head,
.hr-fin-report-table-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--border);
}

    .hr-insurance-report-table-head span:first-child,
    .hr-fin-report-table-head span:first-child {
        display: block;
        margin-bottom: 7px;
        color: var(--primary);
        font-size: 12px;
        font-weight: 800;
    }

    .hr-insurance-report-table-head h2,
    .hr-fin-report-table-head h2 {
        margin: 0;
        color: var(--text);
        font-size: 18px;
        font-weight: 800;
    }

.hr-insurance-report-table-note,
.hr-fin-report-table-note {
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.8;
    text-align: end;
}

.hr-insurance-table-scroll,
.hr-fin-report-table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-insurance-report-table,
.hr-fin-report-table {
    width: 100%;
    min-width: 1500px;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    font-size: 12px;
}

.hr-fin-report-table {
    min-width: 1120px;
}

    .hr-insurance-report-table th,
    .hr-insurance-report-table td,
    .hr-fin-report-table th,
    .hr-fin-report-table td {
        padding: 13px 12px;
        border-bottom: 1px solid var(--border);
        vertical-align: middle;
        text-align: right;
        white-space: nowrap;
    }

    .hr-insurance-report-table thead th,
    .hr-fin-report-table thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: var(--bg);
        color: var(--text-muted);
        font-size: 11px;
        font-weight: 800;
    }

    .hr-insurance-report-table tbody tr:hover td,
    .hr-fin-report-table tbody tr:hover td {
        background: color-mix(in srgb, var(--primary) 3%, var(--surface));
    }

    .hr-insurance-report-table tbody tr:last-child td,
    .hr-fin-report-table tbody tr:last-child td {
        border-bottom: 0;
    }

.hr-insurance-report-status,
.hr-fin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
}

.hr-insurance-row-edit-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 11px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}

    .hr-insurance-row-edit-btn:hover {
        border-color: var(--primary);
        background: color-mix(in srgb, var(--primary) 7%, var(--surface));
        color: var(--primary);
    }

.hr-fin-badge.is-credit {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--border));
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    color: var(--primary);
}

.hr-fin-badge.is-debit {
    border-color: color-mix(in srgb, #d97706 28%, var(--border));
    background: color-mix(in srgb, #d97706 6%, var(--surface));
    color: #b45309;
}

.hr-fin-badge.is-completed {
    border-color: color-mix(in srgb, var(--primary) 24%, var(--border));
}

.hr-fin-badge.is-cancelled {
    opacity: .72;
}

.hr-insurance-report-table-wrap .hr-doc-empty,
.hr-fin-table-wrap .hr-doc-empty {
    margin: 18px;
}

@media (max-width: 1180px) {
    .hr-insurance-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-fin-report-filter-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-insurance-filter-actions,
    .hr-fin-report-filter-actions {
        justify-content: stretch;
    }

        .hr-insurance-filter-actions .hr-insurance-filter-btn,
        .hr-fin-report-filter-actions .hr-insurance-filter-btn {
            width: 100%;
        }

    .hr-insurance-report-summary,
    .hr-fin-report-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-insurance-report-page,
    .hr-fin-report-page {
        padding: 18px 16px 34px;
        gap: 16px;
    }

    .hr-insurance-hero,
    .hr-fin-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
        border-radius: 18px;
    }

    .hr-report-export-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .hr-insurance-export-btn {
        width: auto;
    }

    .hr-insurance-report-table-head,
    .hr-fin-report-table-head {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .hr-insurance-report-table-note,
    .hr-fin-report-table-note {
        text-align: right;
    }
}

@media (max-width: 640px) {
    .hr-insurance-report-page,
    .hr-fin-report-page {
        padding: 12px 10px 28px;
        gap: 12px;
    }

    .hr-insurance-hero,
    .hr-fin-hero,
    .hr-insurance-filter-card,
    .hr-fin-filter-card,
    .hr-insurance-report-table-wrap,
    .hr-fin-table-wrap {
        border-radius: 15px;
    }

    .hr-insurance-hero,
    .hr-fin-hero {
        padding: 15px;
    }

        .hr-insurance-hero h1,
        .hr-fin-hero h1 {
            font-size: 17px;
        }

        .hr-insurance-hero p,
        .hr-fin-hero p {
            font-size: 11px;
            line-height: 1.85;
        }

    .hr-insurance-filter-card,
    .hr-fin-filter-card {
        padding: 14px;
    }

    .hr-insurance-filter-form,
    .hr-fin-report-filter-form,
    .hr-insurance-report-summary,
    .hr-fin-report-summary {
        grid-template-columns: 1fr;
    }

    .hr-insurance-filter-actions,
    .hr-fin-report-filter-actions,
    .hr-report-export-actions {
        width: 100%;
    }

    .hr-insurance-filter-btn,
    .hr-insurance-export-btn {
        width: 100%;
    }

    .hr-insurance-report-summary > div,
    .hr-fin-report-summary > div {
        padding: 14px;
    }

    .hr-insurance-report-table-head,
    .hr-fin-report-table-head {
        padding: 15px;
    }

        .hr-insurance-report-table-head h2,
        .hr-fin-report-table-head h2 {
            font-size: 16px;
        }

    .hr-insurance-report-table,
    .hr-fin-report-table {
        min-width: 1500px;
    }

    .hr-fin-report-table {
        min-width: 1120px;
    }
}

@media (max-width: 420px) {
    .hr-insurance-report-page,
    .hr-fin-report-page {
        padding-inline: 8px;
    }

    .hr-insurance-hero,
    .hr-fin-hero {
        padding: 13px;
    }

    .hr-insurance-filter-card,
    .hr-fin-filter-card {
        padding: 11px;
    }
}

/* =========================================================
   Payroll Tax Settings - final spacing refinements
   These overrides are intentionally appended so the existing
   payroll tax styles and other dashboard sections remain intact.
   ========================================================= */
.hr-pay-tax-settings-page .hr-pay-tax-settings-card .hr-job-card-head {
    padding: 20px 22px;
}

.hr-pay-tax-settings-page .hr-pay-tax-exemption-box {
    gap: 28px;
    padding: 22px;
    margin: 0;
}

    .hr-pay-tax-settings-page .hr-pay-tax-exemption-box > label {
        padding: 18px;
        border: 1px solid #e5eaf2;
        border-radius: 16px;
        background: #ffffff;
    }

    .hr-pay-tax-settings-page .hr-pay-tax-exemption-box .hr-pay-tax-active {
        padding: 18px;
    }

.hr-pay-tax-settings-page .hr-pay-tax-settings-head h1 {
    font-size: 26px;
    line-height: 1.45;
}

@media (max-width: 900px) {
    .hr-pay-tax-settings-page .hr-pay-tax-settings-card .hr-job-card-head {
        padding: 18px;
    }

    .hr-pay-tax-settings-page .hr-pay-tax-exemption-box {
        gap: 18px;
        padding: 18px;
    }
}

@media (max-width: 560px) {
    .hr-pay-tax-settings-page .hr-pay-tax-settings-card .hr-job-card-head {
        padding: 15px;
    }

    .hr-pay-tax-settings-page .hr-pay-tax-exemption-box {
        gap: 14px;
        padding: 14px;
    }

        .hr-pay-tax-settings-page .hr-pay-tax-exemption-box > label,
        .hr-pay-tax-settings-page .hr-pay-tax-exemption-box .hr-pay-tax-active {
            padding: 14px;
        }

    .hr-pay-tax-settings-page .hr-pay-tax-settings-head h1 {
        font-size: 21px;
    }
}

/* ============================================================================
   Payroll Tax Settings - Responsive layout refinement
   --------------------------------------------------------------------------
   ??? ??? ????? ?? ?????? ???? ???? ????? ???.
   ??? ???? ??????? ?????? ???? ?? ??? ???? ?????? ? ?? ???? ????? ?????
   ??? ???????. ?????? ? ???? ?????? ???? ????? ???? ????? ???.
   ============================================================================ */

.hr-pay-tax-settings-page {
    width: min(100%, 1380px);
    max-width: 1380px;
    box-sizing: border-box;
    min-width: 0;
    padding: 22px 26px 48px;
    margin-inline: auto;
}

    .hr-pay-tax-settings-page,
    .hr-pay-tax-settings-page * {
        box-sizing: border-box;
    }

.hr-pay-tax-settings-head {
    width: 100%;
    min-width: 0;
}

    .hr-pay-tax-settings-head > div:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .hr-pay-tax-settings-head h1,
    .hr-pay-tax-settings-head p {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

.hr-pay-tax-year-form {
    flex: 0 0 210px;
    min-width: 0;
}

    .hr-pay-tax-year-form label {
        width: 100%;
    }

    .hr-pay-tax-year-form select,
    .hr-pay-tax-exemption-box input,
    .hr-pay-tax-exemption-box select,
    .hr-pay-tax-table input {
        width: 100%;
        max-width: 100%;
    }

.hr-pay-tax-settings-card {
    width: 100%;
    min-width: 0;
}

    .hr-pay-tax-settings-card .hr-job-card-head {
        min-width: 0;
    }

        .hr-pay-tax-settings-card .hr-job-card-head > div {
            min-width: 0;
            flex: 1 1 auto;
        }

        .hr-pay-tax-settings-card .hr-job-card-head > span {
            max-width: 46%;
            overflow-wrap: anywhere;
        }

.hr-pay-tax-exemption-box {
    width: 100%;
    min-width: 0;
}

    .hr-pay-tax-exemption-box > label,
    .hr-pay-tax-active {
        min-width: 0;
    }

.hr-pay-money-input {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

    .hr-pay-money-input input {
        min-width: 0;
        flex: 1 1 auto;
    }

.hr-pay-tax-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-pay-tax-table {
    margin: 0;
}

.hr-pay-tax-annual-note,
.hr-pay-tax-legal-note {
    min-width: 0;
}

.hr-pay-tax-benefit-grid {
    width: 100%;
    min-width: 0;
}

.hr-pay-tax-settings-footer {
    width: 100%;
    min-width: 0;
}

@media (max-width: 1100px) {
    .hr-pay-tax-settings-page {
        width: 100%;
        padding: 20px 20px 40px;
    }

    .hr-pay-tax-settings-head {
        align-items: stretch;
        gap: 20px;
    }

    .hr-pay-tax-year-form {
        flex: 0 1 230px;
    }

    .hr-pay-tax-settings-card .hr-job-card-head {
        align-items: flex-start;
        gap: 14px;
    }

        .hr-pay-tax-settings-card .hr-job-card-head > span {
            max-width: 42%;
        }

    .hr-pay-tax-table-wrap {
        border-radius: 14px;
    }
}

@media (max-width: 820px) {
    .hr-pay-tax-settings-page {
        padding: 18px 16px 36px;
    }

    .hr-pay-tax-settings-head {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        margin-bottom: 18px;
    }

    .hr-pay-tax-year-form {
        width: 100%;
        flex: 0 0 auto;
    }

        .hr-pay-tax-year-form select {
            min-height: 46px;
        }

    .hr-pay-tax-settings-card .hr-job-card-head {
        flex-direction: column;
        align-items: stretch;
        padding: 17px 18px;
    }

        .hr-pay-tax-settings-card .hr-job-card-head > span {
            width: 100%;
            max-width: none;
            display: block;
            line-height: 1.8;
        }

    .hr-pay-tax-exemption-box {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

        .hr-pay-tax-exemption-box > label,
        .hr-pay-tax-exemption-box .hr-pay-tax-active {
            width: 100%;
            padding: 15px;
        }

    .hr-pay-tax-table-wrap {
        margin: 0;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }

    .hr-pay-tax-table {
        min-width: 900px;
    }

    .hr-pay-tax-annual-note,
    .hr-pay-tax-legal-note {
        margin: 14px 16px 0;
    }

    .hr-pay-tax-benefit-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 16px;
    }

    .hr-pay-tax-settings-footer {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .hr-pay-tax-settings-page {
        width: 100%;
        padding: 14px 10px 28px;
    }

    .hr-pay-tax-settings-form {
        gap: 14px;
    }

    .hr-pay-tax-settings-head h1 {
        font-size: 21px;
        line-height: 1.55;
    }

    .hr-pay-tax-settings-head p {
        font-size: 12px;
        line-height: 1.9;
    }

    .hr-pay-tax-settings-card {
        border-radius: 16px;
    }

        .hr-pay-tax-settings-card .hr-job-card-head {
            padding: 14px;
        }

            .hr-pay-tax-settings-card .hr-job-card-head h2 {
                font-size: 16px;
                line-height: 1.6;
            }

            .hr-pay-tax-settings-card .hr-job-card-head small {
                font-size: 11px;
            }

            .hr-pay-tax-settings-card .hr-job-card-head > span {
                font-size: 11px;
                padding: 7px 9px;
            }

    .hr-pay-tax-exemption-box {
        gap: 12px;
        padding: 12px;
    }

        .hr-pay-tax-exemption-box > label,
        .hr-pay-tax-exemption-box .hr-pay-tax-active {
            padding: 13px;
            border-radius: 14px;
        }

        .hr-pay-tax-exemption-box label > span,
        .hr-pay-tax-active > span {
            font-size: 12px;
        }

        .hr-pay-tax-exemption-box small,
        .hr-pay-tax-active small {
            font-size: 11px;
            line-height: 1.8;
        }

    .hr-pay-money-input {
        min-width: 0;
    }

        .hr-pay-money-input input {
            min-width: 0;
            font-size: 13px;
        }

        .hr-pay-money-input b {
            flex: 0 0 auto;
            padding-inline: 8px;
            font-size: 11px;
        }

    .hr-pay-tax-table-wrap {
        width: 100%;
        overflow-x: auto;
    }

    .hr-pay-tax-table {
        min-width: 860px;
    }

        .hr-pay-tax-table th,
        .hr-pay-tax-table td {
            padding: 10px 8px;
            font-size: 11px;
        }

        .hr-pay-tax-table input[type="number"] {
            width: 125px;
            min-height: 40px;
            padding: 7px 9px;
            font-size: 12px;
        }

        .hr-pay-tax-table .hr-pay-tax-order {
            width: 60px;
        }

    .hr-pay-tax-rate-input input {
        width: 78px !important;
    }

    .hr-pay-tax-annual-note,
    .hr-pay-tax-legal-note {
        margin: 12px 12px 0;
        padding: 12px;
        gap: 8px;
        flex-direction: column;
        font-size: 11px;
        line-height: 1.85;
    }

        .hr-pay-tax-annual-note strong,
        .hr-pay-tax-legal-note strong {
            white-space: normal;
        }

    .hr-pay-tax-benefit-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .hr-pay-tax-benefit-item {
        min-height: 50px;
        padding: 11px 12px;
    }

    .hr-pay-tax-settings-footer {
        padding: 14px;
        border-radius: 16px;
    }

        .hr-pay-tax-settings-footer .hr-job-primary-btn {
            width: 100%;
        }
}

@media (max-width: 380px) {
    .hr-pay-tax-settings-page {
        padding-inline: 7px;
    }

    .hr-pay-tax-settings-card .hr-job-card-head {
        padding-inline: 12px;
    }

    .hr-pay-tax-exemption-box {
        padding-inline: 9px;
    }

    .hr-pay-tax-table {
        min-width: 820px;
    }
}


/* =========================================================
   Payroll support pages - unified responsive family
   Appended intentionally: existing styles/classes remain unchanged.
   PayrollTax is the visual/layout reference.
   ========================================================= */

.hr-pay-insurance-settings-page,
.hr-pay-rules-page,
.hr-benefits-page,
.hr-pay-settings-page,
.hr-support-page,
.hr-insurance-support-page {
    width: min(100% - 40px, 1380px);
    max-width: 1380px;
    margin-inline: auto;
    box-sizing: border-box;
    min-width: 0;
}

    .hr-pay-insurance-settings-page *,
    .hr-pay-rules-page *,
    .hr-benefits-page *,
    .hr-pay-settings-page *,
    .hr-work-calendar-page *,
    .hr-support-page *,
    .hr-insurance-support-page *,
    .hr-job-page * {
        box-sizing: border-box;
    }

    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head,
    .hr-pay-rules-page .hr-job-hero,
    .hr-benefits-page .hr-benefits-hero,
    .hr-pay-settings-page .hr-job-hero,
    .hr-support-page .hr-insurance-hero,
    .hr-support-page .hr-emp-head,
    .hr-insurance-support-page .hr-emp-head {
        width: 100%;
        min-width: 0;
    }

    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 28px;
        margin-bottom: 24px;
    }

        .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head > div:first-child,
        .hr-pay-rules-page .hr-job-hero > div:first-child,
        .hr-benefits-page .hr-benefits-hero > div:first-child,
        .hr-pay-settings-page .hr-job-hero > div:first-child,
        .hr-support-page .hr-insurance-hero > div:first-child,
        .hr-support-page .hr-emp-head > div:first-child,
        .hr-insurance-support-page .hr-emp-head > div:first-child {
            min-width: 0;
            flex: 1 1 auto;
        }

        .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head h1,
        .hr-pay-rules-page .hr-job-hero h1,
        .hr-benefits-page .hr-benefits-hero h1,
        .hr-pay-settings-page .hr-job-hero h1,
        .hr-support-page .hr-insurance-hero h1,
        .hr-support-page .hr-emp-head h1,
        .hr-insurance-support-page .hr-emp-head h1 {
            overflow-wrap: anywhere;
        }

.hr-pay-insurance-year-form {
    flex: 0 0 210px;
    min-width: 0;
}

    .hr-pay-insurance-year-form select,
    .hr-job-year-form select,
    .hr-pay-settings-page .hr-job-year-form input,
    .hr-benefits-page .hr-job-year-form input {
        width: 100%;
        max-width: 100%;
    }

.hr-pay-insurance-rate-grid,
.hr-pay-insurance-ceiling-grid,
.hr-pay-rules-page .hr-job-grid,
.hr-benefits-page .hr-benefit-grid,
.hr-pay-settings-page .hr-pay-settings-grid {
    min-width: 0;
    width: 100%;
}

    .hr-pay-insurance-rate-grid > *,
    .hr-pay-insurance-ceiling-grid > *,
    .hr-pay-rules-page .hr-job-grid > *,
    .hr-benefits-page .hr-benefit-grid > *,
    .hr-pay-settings-page .hr-pay-settings-grid > * {
        min-width: 0;
    }

.hr-pay-rules-page .hr-job-card,
.hr-benefits-page .hr-job-card,
.hr-pay-settings-page .hr-job-card,
.hr-pay-insurance-settings-page .hr-job-card,
.hr-support-page .hr-emp-table-card,
.hr-insurance-support-page .hr-emp-table-card {
    width: 100%;
    min-width: 0;
}

.hr-pay-rules-page .hr-job-table-wrap,
.hr-benefits-page .hr-benefit-table-wrap,
.hr-pay-settings-page .hr-job-table-wrap,
.hr-support-page .hr-emp-table-wrap,
.hr-insurance-support-page .hr-emp-table-wrap,
.hr-insurance-table-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.hr-pay-rules-page .hr-job-table,
.hr-benefits-page .hr-benefit-table,
.hr-pay-settings-page .hr-job-table,
.hr-support-page .hr-emp-table,
.hr-insurance-support-page .hr-emp-table,
.hr-insurance-table {
    max-width: none;
}

.hr-pay-rules-page .hr-job-toolbar,
.hr-benefits-page .hr-job-toolbar,
.hr-pay-settings-page .hr-job-toolbar {
    width: 100%;
    min-width: 0;
}

    .hr-pay-rules-page .hr-job-toolbar > *,
    .hr-benefits-page .hr-job-toolbar > *,
    .hr-pay-settings-page .hr-job-toolbar > * {
        min-width: 0;
    }

.hr-pay-rules-page .hr-job-year-form,
.hr-benefits-page .hr-job-year-form,
.hr-pay-settings-page .hr-job-year-form {
    min-width: 0;
}

.hr-pay-rules-page .hr-job-hero-actions,
.hr-benefits-page .hr-benefits-year-badge {
    flex-shrink: 0;
}

/* Compact edit/delete icons used in operation columns. */
.hr-pay-action-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0 !important;
    margin: 0;
    border: 1px solid #dce5ee !important;
    border-radius: 10px;
    background: #ffffff !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none !important;
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

    .hr-pay-action-icon svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.hr-pay-action-edit {
    color: #147da9 !important;
}

.hr-pay-action-delete {
    color: #c44d59 !important;
}

.hr-pay-action-icon:hover,
.hr-pay-action-icon:focus-visible {
    transform: translateY(-1px);
    border-color: currentColor !important;
    background: #f8fbfd !important;
    outline: none;
}

.hr-pay-rules-page .hr-job-actions form,
.hr-benefits-page .hr-job-actions form,
.hr-pay-settings-page .hr-job-actions form,
.hr-support-page .hr-emp-actions form,
.hr-insurance-support-page .hr-emp-actions form {
    margin: 0;
    display: inline-flex;
}

.hr-insurance-row-edit-btn.hr-pay-action-icon {
    display: inline-flex;
}

.hr-wc-delete-btn.hr-pay-action-icon {
    font-size: 0;
}

    .hr-wc-delete-btn.hr-pay-action-icon svg {
        margin: 0;
    }

/* Support lists receive the same content width and card rhythm. */
.hr-support-page .hr-insurance-hero,
.hr-support-page .hr-emp-head,
.hr-insurance-support-page .hr-emp-head {
    margin-bottom: 20px;
}

.hr-support-page .hr-insurance-table-wrap,
.hr-insurance-support-page .hr-emp-table-card {
    border-radius: 20px;
}

.hr-support-page .hr-insurance-table th,
.hr-support-page .hr-insurance-table td,
.hr-insurance-support-page .hr-emp-table th,
.hr-insurance-support-page .hr-emp-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.hr-work-calendar-page .hr-wc-container {
    width: min(100% - 40px, 1380px);
    max-width: 1380px;
    min-width: 0;
    margin-inline: auto;
}

.hr-work-calendar-page .hr-wc-hero,
.hr-work-calendar-page .hr-wc-card {
    min-width: 0;
    max-width: 100%;
}

.hr-work-calendar-page .hr-wc-form,
.hr-work-calendar-page .hr-wc-card-head,
.hr-work-calendar-page .hr-wc-week-grid {
    min-width: 0;
}

/* Organization structure follows the same content rail without renaming classes. */
.hr-job-page:has(.hr-job-hero-actions) {
    width: min(100% - 40px, 1380px);
    max-width: 1380px;
    margin-inline: auto;
    box-sizing: border-box;
    min-width: 0;
}

    .hr-job-page:has(.hr-job-hero-actions) .hr-job-hero,
    .hr-job-page:has(.hr-job-hero-actions) .hr-job-toolbar,
    .hr-job-page:has(.hr-job-hero-actions) .hr-job-grid {
        min-width: 0;
        max-width: 100%;
    }

    .hr-job-page:has(.hr-job-hero-actions) .hr-job-table-wrap {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .hr-job-page:has(.hr-job-hero-actions) .hr-job-card {
        min-width: 0;
    }

/* Keep the topbar and hamburger usable on every viewport. */
.hr-emp-topbar .topbar-start,
.topbar .topbar-start {
    min-width: 0;
}

.hr-emp-topbar .topbar-title,
.topbar .topbar-title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.hr-emp-topbar .icon-btn,
.topbar .icon-btn {
    flex: 0 0 auto;
    touch-action: manipulation;
}

@media (max-width: 1100px) {
    .hr-pay-insurance-settings-page,
    .hr-pay-rules-page,
    .hr-benefits-page,
    .hr-pay-settings-page,
    .hr-support-page,
    .hr-insurance-support-page {
        width: 100%;
        padding-inline: 20px;
    }

    .hr-work-calendar-page .hr-wc-container {
        width: 100%;
        padding-inline: 20px;
    }

    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head {
        gap: 20px;
    }

    .hr-pay-insurance-rate-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-insurance-ceiling-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head {
        align-items: stretch;
    }

    .hr-pay-insurance-year-form {
        flex: 0 1 230px;
    }

    .hr-pay-rules-page .hr-job-hero,
    .hr-benefits-page .hr-benefits-hero,
    .hr-pay-settings-page .hr-job-hero,
    .hr-support-page .hr-insurance-hero,
    .hr-support-page .hr-emp-head,
    .hr-insurance-support-page .hr-emp-head {
        gap: 18px;
    }

    .hr-pay-rules-page .hr-job-hero-actions,
    .hr-benefits-page .hr-benefits-year-badge {
        flex-shrink: 1;
    }

    .hr-work-calendar-page .hr-wc-hero {
        grid-template-columns: 1fr;
    }

    .hr-work-calendar-page .hr-wc-week-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .hr-pay-insurance-settings-page,
    .hr-pay-rules-page,
    .hr-benefits-page,
    .hr-pay-settings-page,
    .hr-support-page,
    .hr-insurance-support-page {
        padding-inline: 16px;
    }

    .hr-work-calendar-page .hr-wc-container {
        padding-inline: 16px;
    }

    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head,
    .hr-pay-rules-page .hr-job-hero,
    .hr-benefits-page .hr-benefits-hero,
    .hr-pay-settings-page .hr-job-hero,
    .hr-support-page .hr-insurance-hero,
    .hr-support-page .hr-emp-head,
    .hr-insurance-support-page .hr-emp-head {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-pay-insurance-year-form,
    .hr-pay-rules-page .hr-job-year-form,
    .hr-benefits-page .hr-job-year-form,
    .hr-pay-settings-page .hr-job-year-form {
        width: 100%;
        flex: 0 0 auto;
    }

    .hr-pay-rules-page .hr-job-hero-actions,
    .hr-benefits-page .hr-benefits-year-badge {
        width: 100%;
    }

    .hr-pay-rules-page .hr-job-hero-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-work-calendar-page .hr-wc-week-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-benefits-guide {
        grid-template-columns: 1fr;
    }

    .hr-pay-benefit-item {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .hr-pay-insurance-settings-page,
    .hr-pay-rules-page,
    .hr-benefits-page,
    .hr-pay-settings-page,
    .hr-support-page,
    .hr-insurance-support-page {
        width: 100%;
        padding-inline: 10px;
        padding-bottom: 28px;
    }

    .hr-work-calendar-page .hr-wc-container {
        width: 100%;
        padding-inline: 10px;
        padding-bottom: 28px;
    }

    .hr-pay-insurance-settings-page .hr-pay-insurance-settings-head,
    .hr-pay-rules-page .hr-job-hero,
    .hr-benefits-page .hr-benefits-hero,
    .hr-pay-settings-page .hr-job-hero,
    .hr-support-page .hr-insurance-hero,
    .hr-support-page .hr-emp-head,
    .hr-insurance-support-page .hr-emp-head {
        margin-bottom: 16px;
    }

    .hr-pay-rules-page .hr-job-hero-actions {
        grid-template-columns: 1fr;
    }

    .hr-pay-rules-page .hr-job-primary-btn,
    .hr-pay-rules-page .hr-job-secondary-btn,
    .hr-benefits-page .hr-job-primary-btn,
    .hr-benefits-page .hr-job-secondary-btn,
    .hr-pay-settings-page .hr-job-primary-btn,
    .hr-pay-settings-page .hr-job-secondary-btn,
    .hr-support-page .hr-insurance-report-btn,
    .hr-support-page .hr-emp-primary-btn,
    .hr-insurance-support-page .hr-emp-primary-btn {
        width: 100%;
        justify-content: center;
    }

    .hr-work-calendar-page .hr-wc-week-grid {
        grid-template-columns: 1fr;
    }

    .hr-pay-benefit-item {
        grid-template-columns: 1fr;
    }

    .hr-pay-benefits-footer,
    .hr-pay-insurance-settings-footer,
    .hr-pay-tax-settings-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-pay-action-icon {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }

    .hr-support-page .hr-insurance-table,
    .hr-insurance-support-page .hr-emp-table {
        min-width: 680px;
    }
}

@media (max-width: 380px) {
    .hr-pay-insurance-settings-page,
    .hr-pay-rules-page,
    .hr-benefits-page,
    .hr-pay-settings-page,
    .hr-support-page,
    .hr-insurance-support-page {
        padding-inline: 7px;
    }

    .hr-work-calendar-page .hr-wc-container {
        padding-inline: 7px;
    }

    .hr-pay-action-icon {
        width: 34px;
        height: 34px;
        min-width: 34px;
    }
}

/* =========================================================
   Work Calendar - Exception Form Responsive Refinement
   Added at the end intentionally to preserve previous styles
   ========================================================= */

.hr-work-calendar-page .hr-wc-management-grid > .hr-wc-card:last-child {
    min-width: 0;
    overflow: hidden;
}

.hr-work-calendar-page .hr-wc-exception-form {
    display: grid;
    grid-template-columns: minmax(90px, 0.8fr) minmax(160px, 1.25fr) minmax(150px, 1.15fr) minmax(115px, 0.9fr) minmax(115px, 0.9fr) minmax(180px, 1.7fr) minmax(120px, 1fr);
    align-items: end;
    gap: 14px;
    padding: 20px;
    box-sizing: border-box;
    width: 100%;
}

    .hr-work-calendar-page .hr-wc-exception-form label {
        width: auto;
        min-width: 0;
        margin: 0;
    }

        .hr-work-calendar-page .hr-wc-exception-form label > span {
            display: block;
            margin-bottom: 7px;
            color: #526b7e;
            font-size: 11px;
            font-weight: 800;
            line-height: 1.6;
            white-space: nowrap;
        }

    .hr-work-calendar-page .hr-wc-exception-form input,
    .hr-work-calendar-page .hr-wc-exception-form select {
        width: 100%;
        min-width: 0;
        height: 44px;
        box-sizing: border-box;
        padding: 0 11px;
        border: 1px solid #dce6ee;
        border-radius: 11px;
        background: #ffffff;
        color: #29465d;
        font-size: 12px;
        font-family: inherit;
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    }

        .hr-work-calendar-page .hr-wc-exception-form input:focus,
        .hr-work-calendar-page .hr-wc-exception-form select:focus {
            border-color: #76b8dc;
            box-shadow: 0 0 0 3px rgba(77, 159, 207, .10);
        }

    .hr-work-calendar-page .hr-wc-exception-form .hr-wc-duration-input {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 7px;
        min-width: 0;
    }

        .hr-work-calendar-page .hr-wc-exception-form .hr-wc-duration-input small {
            color: #71879a;
            font-size: 10px;
            white-space: nowrap;
        }

    .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow {
        min-width: 0;
        width: auto;
    }

    .hr-work-calendar-page .hr-wc-exception-form button {
        width: 100%;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        white-space: nowrap;
        box-sizing: border-box;
    }

    .hr-work-calendar-page .hr-wc-exception-form .exception-closed-minutes-field,
    .hr-work-calendar-page .hr-wc-exception-form .exception-time-field {
        min-width: 0;
    }

.hr-work-calendar-page .hr-wc-management-grid > .hr-wc-card:last-child .hr-wc-list {
    min-width: 0;
}

.hr-work-calendar-page .hr-wc-management-grid > .hr-wc-card:last-child .hr-wc-list-row {
    min-width: 0;
}

@media (max-width: 1250px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

        .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow {
            grid-column: span 2;
        }

        .hr-work-calendar-page .hr-wc-exception-form button {
            grid-column: span 2;
        }
}

@media (max-width: 900px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        padding: 18px;
    }

        .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow,
        .hr-work-calendar-page .hr-wc-exception-form button {
            grid-column: 1 / -1;
        }
}

@media (max-width: 560px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        grid-template-columns: 1fr;
        gap: 11px;
        padding: 16px;
    }

        .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow,
        .hr-work-calendar-page .hr-wc-exception-form button {
            grid-column: auto;
        }

        .hr-work-calendar-page .hr-wc-exception-form input,
        .hr-work-calendar-page .hr-wc-exception-form select,
        .hr-work-calendar-page .hr-wc-exception-form button {
            height: 45px;
        }

        .hr-work-calendar-page .hr-wc-exception-form label > span {
            font-size: 10px;
        }
}

/* =========================================================
   Payroll Settings - Fixed Annual Leave / Attendance Rules
   Compact family styling for desktop, tablet and mobile
   ========================================================= */

.hr-pay-settings-page .hr-pay-leave-card {
    min-width: 0;
    overflow: hidden;
}

    .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head {
        gap: 16px;
        padding-bottom: 16px;
    }

        .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head small {
            display: block;
            margin-bottom: 5px;
            color: #7890a2;
            font-size: 10px;
            font-weight: 700;
            line-height: 1.6;
        }

        .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head h2 {
            margin: 0;
            color: #24465e;
            font-size: 17px;
            line-height: 1.6;
        }

.hr-pay-settings-page .hr-pay-rules-intro {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
}

    .hr-pay-settings-page .hr-pay-rules-intro strong {
        margin-bottom: 3px;
        font-size: 12px;
    }

    .hr-pay-settings-page .hr-pay-rules-intro p {
        font-size: 10px;
        line-height: 1.9;
    }

.hr-pay-settings-page .hr-pay-rules-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.hr-pay-settings-page .hr-pay-rule-edit-item {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #e1eaf0;
    border-radius: 12px;
    background: #ffffff;
    box-sizing: border-box;
}

    .hr-pay-settings-page .hr-pay-rule-edit-item > span {
        display: block;
        min-height: 34px;
        color: #4d687c;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.7;
    }

    .hr-pay-settings-page .hr-pay-rule-edit-item input,
    .hr-pay-settings-page .hr-pay-rule-edit-item select {
        width: 100%;
        height: 40px;
        margin-top: 7px;
        padding: 0 10px;
        box-sizing: border-box;
        border: 1px solid #dce6ee;
        border-radius: 9px;
        background: #fbfdff;
        color: #2d4b61;
        font-family: inherit;
        font-size: 11px;
        outline: none;
    }

        .hr-pay-settings-page .hr-pay-rule-edit-item input:focus,
        .hr-pay-settings-page .hr-pay-rule-edit-item select:focus {
            border-color: #78b9dc;
            box-shadow: 0 0 0 3px rgba(77, 159, 207, .09);
        }

    .hr-pay-settings-page .hr-pay-rule-edit-item small {
        display: block;
        min-height: 32px;
        margin-top: 6px;
        color: #8799a8;
        font-size: 9px;
        line-height: 1.8;
    }

.hr-pay-settings-page .hr-pay-rule-active-item select {
    background: #f9fcfd;
}

.hr-pay-settings-page .hr-pay-rules-save-form {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    gap: 12px;
}

    .hr-pay-settings-page .hr-pay-rules-save-form strong {
        font-size: 11px;
    }

    .hr-pay-settings-page .hr-pay-rules-save-form span {
        margin-top: 3px;
        font-size: 9px;
        line-height: 1.7;
    }

    .hr-pay-settings-page .hr-pay-rules-save-form .hr-job-primary-btn {
        min-height: 40px;
        padding-inline: 18px;
        font-size: 11px;
    }

.hr-pay-settings-page .hr-pay-rules-note {
    margin-top: 11px;
    padding: 11px 13px;
    border-radius: 12px;
    gap: 9px;
}

.hr-pay-settings-page .hr-pay-rule-icon {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
    border-radius: 8px;
    font-size: 10px;
}

.hr-pay-settings-page .hr-pay-rules-note strong {
    margin-bottom: 2px;
    font-size: 10px;
}

.hr-pay-settings-page .hr-pay-rules-note p {
    font-size: 9px;
    line-height: 1.8;
}

@media (max-width: 1200px) {
    .hr-pay-settings-page .hr-pay-rules-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .hr-pay-settings-page .hr-pay-rules-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head {
        align-items: flex-start;
    }

    .hr-pay-settings-page .hr-pay-rule-edit-item > span {
        min-height: auto;
    }
}

@media (max-width: 620px) {
    .hr-pay-settings-page .hr-pay-rules-grid {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .hr-pay-settings-page .hr-pay-rule-edit-item {
        padding: 11px 12px;
    }

        .hr-pay-settings-page .hr-pay-rule-edit-item small {
            min-height: auto;
        }

    .hr-pay-settings-page .hr-pay-rules-save-form {
        align-items: stretch;
        flex-direction: column;
    }

        .hr-pay-settings-page .hr-pay-rules-save-form .hr-job-primary-btn {
            width: 100%;
        }
}

@media (max-width: 390px) {
    .hr-pay-settings-page .hr-pay-rules-intro,
    .hr-pay-settings-page .hr-pay-rule-edit-item,
    .hr-pay-settings-page .hr-pay-rules-save-form,
    .hr-pay-settings-page .hr-pay-rules-note {
        border-radius: 10px;
    }

        .hr-pay-settings-page .hr-pay-rule-edit-item input,
        .hr-pay-settings-page .hr-pay-rule-edit-item select {
            height: 42px;
        }
}

/* =========================================================
   Final UI Refinement - Work Calendar Exceptions
   Keep the exception section readable at every breakpoint
   ========================================================= */

.hr-work-calendar-page .hr-wc-management-grid > .hr-wc-card:last-child {
    grid-column: 1 / -1;
    min-width: 0;
}

    .hr-work-calendar-page .hr-wc-management-grid > .hr-wc-card:last-child .hr-wc-card-head {
        min-width: 0;
    }

.hr-work-calendar-page .hr-wc-exception-form {
    display: grid;
    grid-template-columns: minmax(90px, 0.8fr) minmax(170px, 1.25fr) minmax(150px, 1.1fr) minmax(130px, 0.95fr);
    grid-template-areas:
        "day type duration start"
        "end note note button";
    align-items: end;
    gap: 14px;
    padding: 20px 22px 22px;
    width: 100%;
    box-sizing: border-box;
}

    .hr-work-calendar-page .hr-wc-exception-form label:nth-of-type(1) {
        grid-area: day;
    }

    .hr-work-calendar-page .hr-wc-exception-form label:nth-of-type(2) {
        grid-area: type;
    }

    .hr-work-calendar-page .hr-wc-exception-form .exception-closed-minutes-field {
        grid-area: duration;
    }

    .hr-work-calendar-page .hr-wc-exception-form .exception-time-field:nth-of-type(4) {
        grid-area: start;
    }

    .hr-work-calendar-page .hr-wc-exception-form .exception-time-field:nth-of-type(5) {
        grid-area: end;
    }

    .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow {
        grid-area: note;
        min-width: 0;
        width: auto;
    }

    .hr-work-calendar-page .hr-wc-exception-form button {
        grid-area: button;
        width: 100%;
        min-width: 0;
        min-height: 44px;
        margin: 0;
        box-sizing: border-box;
    }

    .hr-work-calendar-page .hr-wc-exception-form input,
    .hr-work-calendar-page .hr-wc-exception-form select {
        min-width: 0;
    }

    .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow input {
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* =========================================================
   Final UI Refinement - Payroll Settings Rule Cards
   Create breathing room between the rule cards and main card
   ========================================================= */

.hr-pay-settings-page .hr-pay-leave-card {
    padding-bottom: 8px;
}

    .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-intro {
        margin-inline: 10px;
    }

    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-grid {
        margin-inline: 10px;
    }

    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-save-form,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-note {
        margin-inline: 10px;
    }

@media (max-width: 1100px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "day type"
            "duration start"
            "end note"
            "button button";
    }

        .hr-work-calendar-page .hr-wc-exception-form .hr-wc-grow {
            grid-column: auto;
        }
}

@media (max-width: 700px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        grid-template-columns: 1fr;
        grid-template-areas:
            "day"
            "type"
            "duration"
            "start"
            "end"
            "note"
            "button";
        gap: 12px;
        padding: 18px 16px 20px;
    }

        .hr-work-calendar-page .hr-wc-exception-form input,
        .hr-work-calendar-page .hr-wc-exception-form select,
        .hr-work-calendar-page .hr-wc-exception-form button {
            min-height: 44px;
        }

        .hr-work-calendar-page .hr-wc-exception-form button {
            margin-top: 2px;
        }

    .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-intro,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-grid,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-save-form,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-note {
        margin-inline: 8px;
    }
}

@media (max-width: 420px) {
    .hr-work-calendar-page .hr-wc-exception-form {
        padding-inline: 12px;
        gap: 10px;
    }

    .hr-pay-settings-page .hr-pay-leave-card .hr-job-card-head,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-intro,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-grid,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-save-form,
    .hr-pay-settings-page .hr-pay-leave-card .hr-pay-rules-note {
        margin-inline: 6px;
    }
}

/* ============================================================
   Home Dashboard Live Statistics & Responsive Refinement
   All new dashboard styles are intentionally kept at the end.
   ============================================================ */

.stat-trend.neutral {
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
}

.welcome-text p strong {
    color: var(--text);
    font-weight: 800;
}

.activity-head .activity-caption {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.activity-card {
    min-width: 0;
    overflow: hidden;
}

.activity-item {
    min-width: 0;
}

    .activity-item .act-icon.hire {
        color: var(--primary);
        background: color-mix(in srgb, var(--primary) 12%, transparent);
    }

    .activity-item .act-icon.leave {
        color: var(--success);
        background: color-mix(in srgb, var(--success) 12%, transparent);
    }

    .activity-item .act-icon.attendance {
        color: var(--accent);
        background: color-mix(in srgb, var(--accent) 14%, transparent);
    }

.activity-empty {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 12px;
    background: var(--bg);
}

.mini-cal {
    min-width: 0;
    padding: 18px 22px 20px;
}

.mini-cal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

    .mini-cal-head strong {
        font-size: 15px;
        font-weight: 800;
    }

.mini-cal-nav button {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

    .mini-cal-nav button:hover {
        background: var(--bg);
        border-color: var(--primary);
    }

    .mini-cal-nav button:active {
        transform: scale(.96);
    }

.cal-body {
    padding-top: 6px;
    gap: 10px;
}

.weekdays,
.days {
    gap: 5px;
}

    .weekdays span {
        padding: 7px 0 5px;
        font-size: 11px;
    }

    .days button {
        width: 100%;
        max-height: none;
        min-height: 34px;
        aspect-ratio: auto;
        border-radius: 9px;
        font-size: 12.5px;
        position: relative;
        cursor: default;
    }

        .days button.muted {
            cursor: default;
        }

        .days button.today {
            box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent);
        }

        .days button.event::after {
            width: 4px;
            height: 4px;
            top: auto;
            bottom: 4px;
            position: absolute;
        }

@media (max-width: 1180px) {
    .welcome-card {
        min-height: 190px;
    }

    .activity-item {
        padding-block: 10px;
    }
}

@media (max-width: 700px) {
    .welcome-card {
        padding: 22px 20px;
    }

    .welcome-text h1 {
        line-height: 1.65;
    }

    .stat-card {
        min-width: 0;
        padding: 15px 14px;
        gap: 10px;
    }

    .stat-meta strong {
        font-size: 18px;
    }

    .stat-meta span {
        line-height: 1.7;
    }

    .stat-trend {
        display: none;
    }

    .mini-cal {
        padding: 16px 16px 18px;
    }

    .days button {
        min-height: 38px;
    }

    .activity-card {
        padding: 16px;
    }

    .activity-head {
        align-items: flex-start;
        gap: 10px;
    }

        .activity-head .activity-caption {
            text-align: left;
            line-height: 1.7;
        }

    .activity-item {
        align-items: flex-start;
        gap: 9px;
        padding: 11px 2px;
    }

    .act-body span {
        line-height: 1.7;
    }

    .act-time {
        white-space: nowrap;
        font-size: 10px;
    }
}

@media (max-width: 420px) {
    .content {
        padding-inline: 12px;
    }

    .welcome-card {
        border-radius: 15px;
    }

    .welcome-text h1 {
        font-size: 17px;
    }

    .welcome-text p {
        font-size: 12px;
    }

    .stats-grid {
        gap: 10px;
    }

    .stat-card {
        border-radius: 14px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

        .stat-icon svg {
            width: 19px;
            height: 19px;
        }

    .mini-cal {
        padding-inline: 12px;
    }

    .weekdays,
    .days {
        gap: 3px;
    }

        .days button {
            min-height: 34px;
            font-size: 11.5px;
        }

    .activity-head .activity-caption {
        display: none;
    }
}


/* Protected file links: responsive and safe presentation */
.hr-doc-card-file {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: inherit;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .hr-doc-card-file:hover,
    .hr-doc-card-file:focus-visible {
        text-decoration: underline;
    }

.hr-fin-icon-btn,
.hr-extra-receipt-link,
.hr-contract-file-link {
    min-height: 36px;
}

@media (max-width: 768px) {
    .hr-doc-card-file {
        white-space: normal;
        overflow-wrap: anywhere;
        line-height: 1.7;
    }

    .hr-fin-attachment-actions {
        flex-wrap: wrap;
    }

    .hr-fin-icon-btn,
    .hr-extra-receipt-link,
    .hr-contract-file-link {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .hr-doc-card-file {
        font-size: 12px;
    }
}


/* ==========================================================================
   File maintenance page (FileMaintenance/Index) ? admin only
   Fully responsive: desktop, tablet, mobile. Uses the same design tokens
   as the rest of the dashboard so light/dark modes and palettes just work.
   ========================================================================== */

.hr-fm-page {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

    .hr-fm-page .hr-emp-head,
    .hr-fm-page .hr-emp-alert {
        margin-bottom: 0;
    }

/* ---------- Summary cards ---------- */

.hr-fm-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
}

.hr-fm-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-inline-start: 4px solid var(--primary);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

    .hr-fm-stat.is-ok {
        border-inline-start-color: var(--success);
    }

    .hr-fm-stat.is-warn {
        border-inline-start-color: #e0a526;
    }

    .hr-fm-stat.is-danger {
        border-inline-start-color: var(--danger);
    }

.hr-fm-stat-label {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.7;
}

.hr-fm-stat-value {
    color: var(--text);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.hr-fm-stat-hint {
    color: var(--text-muted);
    font-size: 11.5px;
}

/* ---------- Panels ---------- */

.hr-fm-panel {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 18px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.hr-fm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

    .hr-fm-panel-head h2 {
        margin: 0;
        color: var(--text);
        font-size: 15px;
        font-weight: 800;
    }

.hr-fm-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
    line-height: 2;
}

    .hr-fm-note strong {
        color: var(--text);
    }

.hr-fm-code {
    display: inline-block;
    padding: 1px 8px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: Consolas, "Courier New", monospace;
    font-size: 11.5px;
    overflow-wrap: anywhere;
}

.hr-fm-empty {
    margin: 0;
    color: var(--text-muted);
    font-size: 12.5px;
}

/* ---------- Action forms ---------- */

.hr-fm-actions {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
}

.hr-fm-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

    .hr-fm-field span {
        color: var(--text-muted);
        font-size: 11.5px;
        font-weight: 700;
    }

    .hr-fm-field input {
        width: 150px;
        max-width: 100%;
        min-height: 40px;
        padding: 0 12px;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: 10px;
        color: var(--text);
        font-size: 13px;
    }

        .hr-fm-field input:focus {
            outline: none;
            border-color: var(--primary);
        }

/* ---------- Path lists ---------- */

.hr-fm-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 320px;
    overflow: auto;
}

    .hr-fm-list li {
        padding: 8px 12px;
        background: var(--surface-2);
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text);
        font-family: Consolas, "Courier New", monospace;
        font-size: 12px;
        text-align: left;
        overflow-wrap: anywhere;
        word-break: break-all;
    }

.hr-fm-footnote {
    margin: 0;
    color: var(--text-muted);
    font-size: 11.5px;
}

.hr-fm-table th,
.hr-fm-table td {
    white-space: normal;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
    .hr-fm-stats {
        grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }

    .hr-fm-stat-value {
        font-size: 23px;
    }
}

/* ---------- Large phones / small tablets ---------- */

@media (max-width: 768px) {
    .hr-fm-page {
        gap: 14px;
    }

        .hr-fm-page .hr-emp-head {
            flex-direction: column;
            align-items: stretch;
        }

            .hr-fm-page .hr-emp-head .hr-emp-secondary-btn {
                width: 100%;
            }

    .hr-fm-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .hr-fm-stat {
        padding: 14px;
    }

    .hr-fm-panel {
        padding: 14px;
    }

    .hr-fm-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hr-fm-field input {
        width: 100%;
    }

    .hr-fm-actions .hr-emp-primary-btn,
    .hr-fm-actions .hr-emp-secondary-btn {
        width: 100%;
        white-space: normal;
        min-height: 44px;
    }
}

/* ---------- Phones: sources table becomes stacked cards ---------- */

@media (max-width: 640px) {
    .hr-fm-table,
    .hr-fm-table tbody,
    .hr-fm-table tr,
    .hr-fm-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

        .hr-fm-table thead {
            display: none;
        }

        .hr-fm-table tr {
            padding: 10px 12px;
            margin-bottom: 10px;
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 12px;
        }

        .hr-fm-table td {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 6px 0;
            border: 0;
            text-align: start;
        }

            .hr-fm-table td::before {
                content: attr(data-label);
                flex: 0 0 auto;
                color: var(--text-muted);
                font-size: 11.5px;
                font-weight: 700;
            }

            .hr-fm-table td.hr-emp-empty {
                display: block;
                text-align: center;
            }

                .hr-fm-table td.hr-emp-empty::before {
                    content: none;
                }
}

/* ---------- Small phones ---------- */

@media (max-width: 480px) {
    .hr-fm-stats {
        grid-template-columns: minmax(0, 1fr);
    }

    .hr-fm-stat-value {
        font-size: 22px;
    }

    .hr-fm-panel-head h2 {
        font-size: 14px;
    }

    .hr-fm-note {
        font-size: 12px;
    }

    .hr-fm-list li {
        font-size: 11px;
    }
}


/* ==========================================================================
   File maintenance backup panel
   New styles appended intentionally at the end of hr-dashboard.css.
   Responsive for desktop, tablet and mobile.
   ========================================================================== */

.hr-fm-backup-panel {
    gap: 14px;
}

    .hr-fm-backup-panel .hr-fm-panel-head > div {
        min-width: 0;
        flex: 1 1 420px;
    }

    .hr-fm-backup-panel .hr-fm-panel-head h2 {
        margin-bottom: 6px;
    }

.hr-fm-backup-warning {
    padding: 12px 14px;
    background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--border));
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.9;
}

    .hr-fm-backup-warning strong {
        color: var(--text);
    }

.hr-fm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    text-decoration: none;
}

@media (max-width: 768px) {
    .hr-fm-backup-panel .hr-fm-panel-head {
        align-items: stretch;
    }

        .hr-fm-backup-panel .hr-fm-panel-head > div {
            flex-basis: 100%;
        }

    .hr-fm-download-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hr-fm-backup-warning {
        padding: 11px 12px;
        font-size: 11.5px;
    }

    .hr-fm-backup-panel .hr-fm-panel-head h2 {
        font-size: 14px;
    }
}

/* ==========================================================================
   Password Recovery Flow
   New styles are intentionally appended at the end of hr-dashboard.css.
   Responsive for desktop, tablet and mobile.
   ========================================================================== */

.hr-auth-forgot-link {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.7;
    text-decoration: none;
    white-space: nowrap;
}

    .hr-auth-forgot-link:hover,
    .hr-auth-forgot-link:focus-visible {
        color: var(--accent);
        text-decoration: underline;
    }

.hr-auth-recovery-modal {
    max-width: 440px;
}

.hr-auth-validation {
    margin: 0 0 14px;
    padding: 0;
    color: var(--danger);
    font-size: 11.5px;
    line-height: 1.8;
}

    .hr-auth-validation ul {
        margin: 0;
        padding-inline-start: 18px;
    }

.hr-auth-validation-message {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 10.5px;
    line-height: 1.7;
}

.hr-auth-password-hint {
    margin-top: -4px;
    padding: 10px 12px;
    background: var(--tint);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.9;
}

.hr-auth-recovery-status {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 4px;
    padding: 14px;
    background: var(--tint);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-muted);
}

.hr-auth-recovery-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

    .hr-auth-recovery-status-icon svg {
        width: 18px;
        height: 18px;
    }

.hr-auth-recovery-status p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.9;
}

.hr-auth-login-after-reset {
    width: 100%;
    min-height: 44px;
    margin-top: 18px;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 700px) {
    .hr-auth-recovery-modal {
        max-width: 100%;
    }

    .hr-auth-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-auth-forgot-link {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .hr-auth-recovery-modal {
        width: 100%;
    }

    .hr-auth-validation,
    .hr-auth-password-hint,
    .hr-auth-recovery-status p {
        font-size: 10.5px;
    }

    .hr-auth-forgot-link {
        font-size: 11px;
    }

    .hr-auth-recovery-status {
        padding: 12px;
    }

    .hr-auth-recovery-status-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }
}

@media (max-width: 360px) {
    .hr-auth-shell {
        padding: 10px;
    }

    .hr-auth-recovery-modal {
        padding-inline: 14px;
    }

    .hr-auth-recovery-status {
        gap: 8px;
    }
}

/* =========================================================
   HR report exports - additional report pages
   Added at the end intentionally.
   ========================================================= */

.hr-fin-report-export-actions {
    margin: 0 0 14px;
}

@media (max-width: 900px) {
    .hr-report-export-actions {
        width: 100%;
        justify-content: stretch;
    }

        .hr-report-export-actions .hr-report-export {
            flex: 1 1 220px;
            min-width: 0;
        }
}

@media (max-width: 600px) {
    .hr-report-export-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

        .hr-report-export-actions .hr-report-export {
            width: 100%;
            min-height: 44px;
        }
}

@media print {
    .hr-report-export-actions,
    .hr-report-filter-card,
    .hr-tax-report-filter-card,
    .hr-doc-report-filter-card,
    .hr-insurance-filter-card,
    .hr-fin-filter-card,
    .hr-personnel-filter-card,
    .hr-tax-report-reset-button,
    .hr-report-reset-btn,
    .hr-insurance-export-btn {
        display: none !important;
    }

    .topbar {
        position: static !important;
        box-shadow: none !important;
    }

    body {
        background: #fff !important;
    }

    .hr-report-page,
    .hr-tax-report-page,
    .hr-doc-report-page,
    .hr-insurance-report-page,
    .hr-fin-page,
    .hr-personnel-report-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hr-report-table-scroll,
    .hr-tax-report-table-scroll,
    .hr-doc-report-table-scroll,
    .hr-insurance-table-scroll,
    .hr-fin-report-table-scroll {
        overflow: visible !important;
    }

    table {
        page-break-inside: auto;
    }

    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}

/* =========================================================
   Employee contracts - contract order document and signed upload
   Appended intentionally to preserve all existing dashboard styles.
   ========================================================= */

.hr-contract-order-actions-group {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 9px;
    width: 100%;
    margin-top: 2px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

    .hr-contract-order-actions-group .hr-contract-order-btn {
        gap: 7px;
        min-height: 46px;
        padding-inline: 14px;
        border-color: color-mix(in srgb, var(--primary) 22%, transparent);
        background: color-mix(in srgb, var(--primary) 8%, transparent);
        color: var(--primary);
    }

        .hr-contract-order-actions-group .hr-contract-order-btn svg {
            width: 18px;
            height: 18px;
            flex: 0 0 18px;
            stroke: currentColor;
            stroke-width: 1.7;
            stroke-linecap: round;
            stroke-linejoin: round;
        }

.hr-contract-order-upload-form {
    flex: 1 1 360px;
    min-width: min(100%, 300px);
    margin: 0;
}

.hr-contract-upload-btn {
    position: relative;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    min-height: 58px;
    width: 100%;
    padding: 9px 11px;
    border: 1px dashed color-mix(in srgb, var(--primary) 34%, transparent);
    border-radius: 12px;
    background: color-mix(in srgb, var(--primary) 4%, transparent);
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
    box-sizing: border-box;
}

    .hr-contract-upload-btn:hover {
        border-color: var(--primary);
        background: color-mix(in srgb, var(--primary) 7.5%, transparent);
        transform: translateY(-1px);
    }

    .hr-contract-upload-btn input[type="file"] {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
    }

.hr-contract-upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 11%, transparent);
    color: var(--primary);
}

    .hr-contract-upload-icon svg {
        width: 19px;
        height: 19px;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.hr-contract-upload-copy {
    min-width: 0;
}

    .hr-contract-upload-copy strong,
    .hr-contract-upload-copy small {
        display: block;
    }

    .hr-contract-upload-copy strong {
        color: var(--text);
        font-size: 11.5px;
        font-weight: 900;
        line-height: 1.7;
    }

    .hr-contract-upload-copy small {
        margin-top: 2px;
        color: var(--text-muted);
        font-size: 9.5px;
        line-height: 1.6;
    }

.hr-contract-upload-select {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 9px;
    background: #ffffff;
    color: var(--primary);
    font-size: 10.5px;
    font-weight: 900;
    white-space: nowrap;
}

.hr-contract-signed-document {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 46px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

    .hr-contract-signed-document:hover {
        border-color: color-mix(in srgb, var(--primary) 28%, transparent);
        background: rgba(15, 118, 110, 0.05);
        transform: translateY(-1px);
    }

    .hr-contract-signed-document.is-verified {
        border-color: rgba(5, 150, 105, 0.24);
        background: rgba(5, 150, 105, 0.07);
        color: #047857;
    }

.hr-contract-signed-document-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 9px;
    background: color-mix(in srgb, var(--primary) 9%, transparent);
    color: var(--primary);
}

.hr-contract-signed-document.is-verified .hr-contract-signed-document-icon {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

.hr-contract-signed-document-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hr-contract-signed-document > span:last-child {
    min-width: 0;
}

.hr-contract-signed-document strong,
.hr-contract-signed-document small {
    display: block;
}

.hr-contract-signed-document strong {
    font-size: 10.5px;
    font-weight: 900;
    line-height: 1.7;
}

.hr-contract-signed-document small {
    margin-top: 1px;
    color: var(--text-muted);
    font-size: 9px;
    line-height: 1.6;
}

.hr-contract-order-body {
    margin: 0;
    min-width: 0;
    background: #eef3f5;
    color: #17212b;
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    direction: rtl;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.hr-contract-order-page {
    width: min(100% - 28px, 1120px);
    margin: 0 auto;
    padding: 22px 0 44px;
    box-sizing: border-box;
}

.hr-contract-order-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #dbe5e8;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.055);
}

.hr-contract-order-toolbar-copy {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hr-contract-order-toolbar-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    background: rgba(15, 118, 110, 0.1);
    color: var(--primary);
}

    .hr-contract-order-toolbar-icon svg,
    .hr-contract-order-toolbar-actions svg {
        width: 20px;
        height: 20px;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.hr-contract-order-toolbar-copy strong,
.hr-contract-order-toolbar-copy span {
    display: block;
}

.hr-contract-order-toolbar-copy strong {
    color: #17212b;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.7;
}

.hr-contract-order-toolbar-copy span:not(.hr-contract-order-toolbar-icon) {
    margin-top: 2px;
    color: #667785;
    font-size: 10.5px;
    line-height: 1.8;
}

.hr-contract-order-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.hr-contract-order-print-btn,
.hr-contract-order-close-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 13px;
    border-radius: 10px;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.hr-contract-order-print-btn {
    border: 1px solid var(--primary);
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 7px 16px color-mix(in srgb, var(--primary) 18%, transparent);
}

.hr-contract-order-close-btn {
    border: 1px solid #d9e2e7;
    background: #ffffff;
    color: #52616d;
}

    .hr-contract-order-print-btn:hover,
    .hr-contract-order-close-btn:hover {
        transform: translateY(-1px);
    }

.hr-contract-order-print-btn:hover {
    background: color-mix(in srgb, var(--primary) 82%, #000000);
    box-shadow: 0 9px 20px color-mix(in srgb, var(--primary) 23%, transparent);
}

.hr-contract-order-close-btn:hover {
    background: #f8fafb;
}

.hr-contract-order-sheet {
    width: 100%;
    min-width: 0;
    padding: 34px;
    border: 1px solid #dce5e8;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
    box-sizing: border-box;
}

.hr-contract-order-header {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    border-bottom: 1px solid #dfe7ea;
}

.hr-contract-order-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 15px;
    background: color-mix(in srgb, var(--primary) 10%, var(--surface));
    color: var(--primary);
}

    .hr-contract-order-brand-mark svg {
        width: 28px;
        height: 28px;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.hr-contract-order-company {
    min-width: 0;
}

.hr-contract-order-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--primary);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.hr-contract-order-company h1 {
    margin: 0;
    color: #17212b;
    font-size: clamp(19px, 2.2vw, 25px);
    font-weight: 950;
    line-height: 1.6;
}

.hr-contract-order-company-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 4px;
    color: #71808c;
    font-size: 9.5px;
    line-height: 1.8;
}

    .hr-contract-order-company-meta strong {
        color: #4f5e69;
        font-weight: 800;
    }

.hr-contract-order-title-box {
    min-width: 164px;
    padding: 12px 16px;
    border: 1px solid #dce6e9;
    border-radius: 14px;
    background: #f8fbfb;
    text-align: center;
}

    .hr-contract-order-title-box span,
    .hr-contract-order-title-box strong,
    .hr-contract-order-title-box small {
        display: block;
    }

    .hr-contract-order-title-box span {
        color: #657682;
        font-size: 9.5px;
        font-weight: 800;
    }

    .hr-contract-order-title-box strong {
        margin: 3px 0;
        color: var(--primary);
        font-size: 17px;
        font-weight: 950;
    }

    .hr-contract-order-title-box small {
        color: #7a8994;
        font-size: 9px;
    }

.hr-contract-order-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(190px, 0.32fr);
    align-items: stretch;
    gap: 14px;
    margin-top: 20px;
}

.hr-contract-order-hero-copy,
.hr-contract-order-hero-number {
    border-radius: 16px;
    box-sizing: border-box;
}

.hr-contract-order-hero-copy {
    padding: 20px 22px;
    background: linear-gradient(135deg, var(--primary) 0%, #155e75 100%);
    color: #ffffff;
}

.hr-contract-order-document-label {
    display: inline-flex;
    padding: 4px 9px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 9px;
    font-weight: 900;
}

.hr-contract-order-hero-copy h2 {
    margin: 9px 0 4px;
    font-size: clamp(19px, 2.1vw, 24px);
    font-weight: 950;
    line-height: 1.6;
}

.hr-contract-order-hero-copy p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 10.5px;
    line-height: 1.95;
}

.hr-contract-order-hero-number {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    border: 1px solid #dce6e9;
    background: #f7fafb;
    text-align: center;
}

    .hr-contract-order-hero-number span,
    .hr-contract-order-hero-number small {
        color: #6e7d88;
        font-size: 9.5px;
    }

    .hr-contract-order-hero-number strong {
        margin: 4px 0;
        color: #17212b;
        font-size: 21px;
        font-weight: 950;
    }

.hr-contract-order-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.hr-contract-order-highlight {
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #dfe7ea;
    border-radius: 13px;
    background: #ffffff;
}

    .hr-contract-order-highlight.is-primary {
        border-color: color-mix(in srgb, var(--primary) 22%, transparent);
        background: color-mix(in srgb, var(--primary) 7%, var(--surface));
    }

    .hr-contract-order-highlight span,
    .hr-contract-order-highlight strong {
        display: block;
    }

    .hr-contract-order-highlight span {
        margin-bottom: 3px;
        color: #75838e;
        font-size: 9px;
        font-weight: 700;
    }

    .hr-contract-order-highlight strong {
        overflow-wrap: anywhere;
        color: #26323b;
        font-size: 12px;
        font-weight: 900;
        line-height: 1.7;
    }

    .hr-contract-order-highlight.is-primary strong {
        color: var(--primary);
    }

.hr-contract-order-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e3eaed;
}

.hr-contract-order-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

    .hr-contract-order-section-heading > span {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        flex: 0 0 34px;
        border-radius: 10px;
        background: color-mix(in srgb, var(--primary) 8%, var(--surface));
        color: var(--primary);
        font-size: 10px;
        font-weight: 950;
    }

    .hr-contract-order-section-heading strong,
    .hr-contract-order-section-heading small {
        display: block;
    }

    .hr-contract-order-section-heading strong {
        color: #1f2b34;
        font-size: 12px;
        font-weight: 950;
    }

    .hr-contract-order-section-heading small {
        margin-top: 2px;
        color: #7a8994;
        font-size: 9px;
    }

.hr-contract-order-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid #e1e8eb;
    border-right: 1px solid #e1e8eb;
    border-radius: 11px;
    overflow: hidden;
}

.hr-contract-order-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-contract-order-grid > div {
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
    border-left: 1px solid #e1e8eb;
    border-bottom: 1px solid #e1e8eb;
    background: #ffffff;
    box-sizing: border-box;
}

    .hr-contract-order-grid > div:nth-child(even) {
        background: #fbfcfd;
    }

.hr-contract-order-grid span,
.hr-contract-order-grid strong {
    display: block;
}

.hr-contract-order-grid span {
    margin-bottom: 4px;
    color: #7b8993;
    font-size: 8.5px;
    line-height: 1.6;
}

.hr-contract-order-grid strong {
    overflow-wrap: anywhere;
    color: #26333c;
    font-size: 10.5px;
    font-weight: 850;
    line-height: 1.75;
}

.hr-contract-order-terms ol {
    margin: 0;
    padding: 12px 28px 12px 14px;
    border: 1px solid #e0e8eb;
    border-radius: 12px;
    background: #fbfcfd;
    color: #485761;
}

.hr-contract-order-terms li {
    padding: 3px 2px;
    font-size: 9.5px;
    line-height: 1.95;
}

    .hr-contract-order-terms li::marker {
        color: var(--primary);
        font-weight: 900;
    }

.hr-contract-order-notes {
    margin-top: 10px;
    padding: 11px 13px;
    border-right: 3px solid var(--primary);
    border-radius: 10px;
    background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

    .hr-contract-order-notes span {
        display: block;
        margin-bottom: 3px;
        color: var(--primary);
        font-size: 9px;
        font-weight: 900;
    }

    .hr-contract-order-notes p {
        margin: 0;
        color: #4f5e68;
        font-size: 9.5px;
        line-height: 1.9;
    }

.hr-contract-order-signatures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.hr-contract-order-signature-box {
    min-height: 172px;
    padding: 14px;
    border: 1px solid #dce5e8;
    border-radius: 13px;
    background: #ffffff;
    box-sizing: border-box;
}

.hr-contract-order-signature-head {
    padding-bottom: 8px;
    border-bottom: 1px solid #e6ecef;
}

    .hr-contract-order-signature-head span,
    .hr-contract-order-signature-head strong {
        display: block;
    }

    .hr-contract-order-signature-head span {
        color: var(--primary);
        font-size: 8.5px;
        font-weight: 900;
    }

    .hr-contract-order-signature-head strong {
        margin-top: 2px;
        color: #26333c;
        font-size: 11px;
        font-weight: 900;
    }

.hr-contract-order-signature-meta {
    display: grid;
    gap: 5px;
    margin-top: 9px;
    color: #697985;
    font-size: 9px;
    line-height: 1.7;
}

.hr-contract-order-signature-line {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 50px;
    margin-top: 8px;
    padding-bottom: 4px;
    border-bottom: 1px dashed #aebbc3;
    color: #89969f;
    font-size: 8.5px;
}

.hr-contract-order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding-top: 11px;
    border-top: 1px solid #e3e9ec;
    color: #87949d;
    font-size: 8.5px;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .hr-contract-order-page {
        width: min(100% - 20px, 860px);
        padding-top: 14px;
    }

    .hr-contract-order-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-contract-order-toolbar-actions {
        justify-content: flex-start;
    }

    .hr-contract-order-sheet {
        padding: 24px;
    }

    .hr-contract-order-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .hr-contract-order-actions-group {
        display: grid;
        grid-template-columns: 1fr;
    }

        .hr-contract-order-actions-group .hr-contract-order-btn,
        .hr-contract-order-upload-form,
        .hr-contract-signed-document {
            width: 100%;
            min-width: 0;
        }

    .hr-contract-order-header {
        grid-template-columns: 46px minmax(0, 1fr);
    }

    .hr-contract-order-brand-mark {
        width: 46px;
        height: 46px;
        border-radius: 12px;
    }

    .hr-contract-order-title-box {
        grid-column: 1 / -1;
        min-width: 0;
        text-align: right;
    }

        .hr-contract-order-title-box span,
        .hr-contract-order-title-box strong,
        .hr-contract-order-title-box small {
            display: inline;
            margin-left: 8px;
        }

    .hr-contract-order-hero {
        grid-template-columns: 1fr;
    }

    .hr-contract-order-highlight-grid,
    .hr-contract-order-grid,
    .hr-contract-order-grid-four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-contract-order-signatures {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .hr-contract-upload-btn {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .hr-contract-upload-select {
        grid-column: 1 / -1;
        width: 100%;
        box-sizing: border-box;
    }

    .hr-contract-order-page {
        width: min(100% - 12px, 500px);
        padding: 8px 0 22px;
    }

    .hr-contract-order-toolbar {
        margin-bottom: 8px;
        padding: 12px;
        border-radius: 12px;
    }

    .hr-contract-order-toolbar-copy {
        align-items: flex-start;
    }

    .hr-contract-order-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .hr-contract-order-print-btn,
    .hr-contract-order-close-btn {
        width: 100%;
    }

    .hr-contract-order-sheet {
        padding: 16px 12px;
        border-radius: 14px;
    }

    .hr-contract-order-company h1 {
        font-size: 17px;
    }

    .hr-contract-order-company-meta {
        display: grid;
        gap: 1px;
    }

    .hr-contract-order-hero-copy {
        padding: 16px;
    }

    .hr-contract-order-highlight-grid,
    .hr-contract-order-grid,
    .hr-contract-order-grid-four {
        grid-template-columns: 1fr;
    }

        .hr-contract-order-grid > div {
            min-height: 56px;
        }

    .hr-contract-order-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    .hr-contract-order-body {
        background: #ffffff !important;
    }

        .hr-contract-order-body .no-print,
        .hr-contract-order-toolbar {
            display: none !important;
        }

    .hr-contract-order-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .hr-contract-order-sheet {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 7mm !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .hr-contract-order-header {
        padding-bottom: 4mm;
    }

    .hr-contract-order-hero {
        margin-top: 4mm;
    }

    .hr-contract-order-section {
        margin-top: 4mm;
        padding-top: 3mm;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .hr-contract-order-highlight-grid,
    .hr-contract-order-grid,
    .hr-contract-order-grid-four,
    .hr-contract-order-signatures {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .hr-contract-order-signature-box {
        min-height: 34mm;
    }

    .hr-contract-order-footer {
        margin-top: 4mm;
    }
}


/* Contract order typography and palette alignment
   Uses the same Vazirmatn family and active project palette as the dashboard. */
.hr-contract-order-body,
.hr-contract-order-body button,
.hr-contract-order-body input,
.hr-contract-order-body select,
.hr-contract-order-body textarea {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
}

.hr-contract-order-body {
    --contract-primary: var(--primary);
}

    .hr-contract-order-body .hr-contract-order-print-btn,
    .hr-contract-order-body .hr-contract-order-highlight.is-primary strong,
    .hr-contract-order-body .hr-contract-order-section-heading > span,
    .hr-contract-order-body .hr-contract-order-section-heading strong,
    .hr-contract-order-body .hr-contract-order-title-box strong,
    .hr-contract-order-body .hr-contract-order-kicker,
    .hr-contract-order-body .hr-contract-order-toolbar-icon,
    .hr-contract-order-body .hr-contract-order-brand-mark,
    .hr-contract-order-body .hr-contract-order-notes span,
    .hr-contract-order-body .hr-contract-order-signature-head span,
    .hr-contract-order-body .hr-contract-order-terms li::marker {
        color: var(--primary);
    }

    .hr-contract-order-body .hr-contract-order-print-btn {
        border-color: var(--primary);
        color: #fff;
    }

        .hr-contract-order-body .hr-contract-order-print-btn:hover {
            background: color-mix(in srgb, var(--primary) 82%, #000000);
        }

    .hr-contract-order-body .hr-contract-order-hero-copy {
        background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 72%, #155e75) 100%);
    }



/* Global number input formatting                                             */
/* ========================================================================== */
.hr-number-formatted-input {
    direction: ltr;
    text-align: right;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.01em;
}

    .hr-number-formatted-input:focus {
        direction: ltr;
        text-align: right;
    }

@media (max-width: 768px) {
    .hr-number-formatted-input {
        width: 100%;
        max-width: 100%;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hr-number-formatted-input {
        font-size: 16px;
    }
}


/* ========================================================================== */
/* Persian amount words                                                      */
/* ========================================================================== */

.hr-number-amount-words {
    margin-top: 7px;
    padding: 5px 2px 0;
    color: var(--text-muted, #64748b);
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.8;
    text-align: right;
    direction: rtl;
    transition: opacity 0.2s ease, color 0.2s ease;
}

    .hr-number-amount-words:not([hidden]) {
        color: color-mix(in srgb, var(--primary) 72%, var(--text-muted, #64748b));
    }

@media (max-width: 768px) {
    .hr-number-amount-words {
        margin-top: 6px;
        padding-inline: 1px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hr-number-amount-words {
        font-size: 0.78rem;
        line-height: 1.75;
    }
}

/* ?????? ?????/????????? ?? ??? ????? */
.hr-pay-slip-subsection-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    /*   margin-top: 12px;*/
    padding: 8px 10px;
    background: rgba(16, 185, 129, 0.08);
    font-size: 12px;
}




@media (max-width: 768px) {
    .hr-pay-slip-subsection-title {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .hr-pay-slip-subsection-title {
        gap: 6px;
        font-size: 0.85rem;
    }
}


/* ==================== Admin password recovery - appended styles ==================== */
.hr-auth-recovery-modal {
    width: min(100% - 32px, 560px);
    margin-inline: auto;
}

    .hr-auth-recovery-modal .hr-auth-modal-head p {
        line-height: 1.9;
    }

@media (max-width: 768px) {
    .hr-auth-recovery-modal {
        width: min(100% - 20px, 560px);
    }

        .hr-auth-recovery-modal .hr-auth-modal-head h1 {
            font-size: 1.35rem;
        }
}

@media (max-width: 480px) {
    .hr-auth-recovery-modal {
        width: calc(100% - 16px);
    }

        .hr-auth-recovery-modal .hr-auth-modal-head h1 {
            font-size: 1.2rem;
        }

        .hr-auth-recovery-modal input,
        .hr-auth-recovery-modal button {
            min-height: 46px;
        }
}


/* =========================================================
   Employee workflow refinement
   Added at the end intentionally.
   - Dedicated employee financial/bank-account page
   - Read-only bank information on supplementary insurance
   - Responsive employee action toolbar
   ========================================================= */

.hr-emp-action.profile {
    color: #6b5cc5;
    background: color-mix(in srgb, #6b5cc5 8%, var(--surface));
}

.hr-emp-action.financial-info {
    color: #2f7f8f;
    background: color-mix(in srgb, #2f7f8f 9%, var(--surface));
}

.hr-emp-action.contract {
    color: #8a633b;
    background: color-mix(in srgb, #8a633b 9%, var(--surface));
}

.hr-emp-action.supplementary-insurance {
    color: #a25c91;
    background: color-mix(in srgb, #a25c91 9%, var(--surface));
}

.hr-financial-info-page {
    width: min(1280px, calc(100% - 32px));
    margin: 28px auto 48px;
}

.hr-financial-info-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

    .hr-financial-info-hero h1 {
        margin: 6px 0 8px;
        font-size: clamp(22px, 3vw, 32px);
        line-height: 1.3;
    }

        .hr-financial-info-hero h1 span {
            color: var(--primary);
        }

    .hr-financial-info-hero p {
        max-width: 820px;
        margin: 0;
        color: var(--text-muted);
        line-height: 2;
        font-size: 12.5px;
    }

.hr-financial-info-personnel {
    flex: 0 0 auto;
    padding: 11px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    color: var(--text-muted);
    font-size: 12px;
}

    .hr-financial-info-personnel strong {
        color: var(--text);
        margin-right: 5px;
    }

.hr-financial-info-form {
    display: block;
}

.hr-financial-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.hr-financial-info-card {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.hr-financial-info-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

    .hr-financial-info-card-head span:first-child {
        color: var(--text-muted);
        font-size: 11px;
    }

    .hr-financial-info-card-head h2 {
        margin: 4px 0 0;
        font-size: 16px;
    }

.hr-financial-info-slot {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--primary);
    background: var(--tint);
    font-size: 10px;
}

.hr-financial-info-card .hr-doc-field {
    margin-bottom: 12px;
}

    .hr-financial-info-card .hr-doc-field:last-child {
        margin-bottom: 0;
    }

.hr-financial-info-save-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

    .hr-financial-info-save-bar div {
        display: grid;
        gap: 4px;
    }

    .hr-financial-info-save-bar strong {
        font-size: 13px;
    }

    .hr-financial-info-save-bar span {
        color: var(--text-muted);
        font-size: 11px;
    }

    .hr-financial-info-save-bar > .hr-doc-submit-btn {
        width: auto;
        min-width: 150px;
        margin-top: 0;
        padding: 0 18px;
        flex: 0 0 auto;
    }

.hr-insurance-bank-readonly-section {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--surface);
}

    .hr-insurance-bank-readonly-section .hr-insurance-section-title {
        margin-bottom: 14px;
    }

.hr-insurance-bank-manage-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--primary);
    background: var(--tint);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
}

.hr-insurance-bank-readonly-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hr-insurance-bank-readonly-card {
    min-width: 0;
    display: grid;
    gap: 5px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--surface) 92%, var(--primary));
}

    .hr-insurance-bank-readonly-card strong {
        font-size: 12px;
    }

    .hr-insurance-bank-readonly-card span,
    .hr-insurance-bank-readonly-card small {
        overflow-wrap: anywhere;
        color: var(--text-muted);
        font-size: 10.5px;
        line-height: 1.8;
    }

.hr-insurance-bank-readonly-note {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 10.5px;
    line-height: 1.9;
}

@media (max-width: 1100px) {
    .hr-financial-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hr-insurance-bank-readonly-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 760px) {
    .hr-financial-info-page {
        width: min(100% - 20px, 680px);
        margin-top: 18px;
    }

    .hr-financial-info-hero {
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
    }

    .hr-financial-info-personnel {
        width: 100%;
    }

    .hr-financial-info-grid {
        grid-template-columns: 1fr;
    }

    .hr-insurance-bank-readonly-grid {
        grid-template-columns: 1fr;
    }

    .hr-financial-info-save-bar {
        align-items: stretch;
        flex-direction: column;
    }

        .hr-financial-info-save-bar .hr-doc-submit-btn {
            width: 100%;
            justify-content: center;
        }
}

@media (max-width: 560px) {
    .hr-emp-actions {
        flex-wrap: wrap;
        max-width: 230px;
        margin-inline: auto;
    }

    .hr-emp-action {
        width: 32px;
        height: 32px;
    }

    .hr-financial-info-card {
        padding: 15px;
    }

    .hr-insurance-bank-readonly-section {
        padding: 14px;
    }

        .hr-insurance-bank-readonly-section .hr-insurance-section-title {
            align-items: flex-start;
            flex-direction: column;
            gap: 10px;
        }

    .hr-insurance-bank-manage-link {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   ??????? ? ????? ???? ? ???? ? ??????
   ?????????? ??????: 2026-10
   ========================================================= */
.hr-contract-job-title-field select {
    min-height: 46px;
}

.hr-contract-job-title-field .hr-contract-field-help {
    display: block;
    margin-top: 7px;
}

.hr-pay-contract-source-card .hr-pay-job-panel {
    align-items: stretch;
}

.hr-pay-contract-source-card .hr-pay-current-job {
    min-height: 116px;
}

.hr-pay-contract-source-note {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 15px;
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 14px;
    background: rgba(59, 130, 246, 0.055);
    color: #475569;
    font-size: 13px;
    line-height: 1.9;
}

    .hr-pay-contract-source-note svg {
        width: 22px;
        min-width: 22px;
        height: 22px;
        stroke: currentColor;
    }

    .hr-pay-contract-source-note strong {
        color: #1e3a8a;
    }

@media (max-width: 900px) {
    .hr-pay-contract-source-card .hr-pay-job-panel {
        grid-template-columns: 1fr;
    }

    .hr-pay-contract-source-note {
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .hr-contract-job-title-field {
        grid-column: 1 / -1;
    }

        .hr-contract-job-title-field select {
            width: 100%;
            min-height: 48px;
        }

    .hr-pay-contract-source-note {
        padding: 12px;
        font-size: 12px;
    }
}

.hr-contract-job-title-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin-top: 10px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.8;
}

    .hr-contract-job-title-summary strong {
        color: #334155;
        font-weight: 700;
    }

@media (max-width: 600px) {
    .hr-contract-job-title-summary {
        display: block;
    }

        .hr-contract-job-title-summary span,
        .hr-contract-job-title-summary strong {
            display: block;
        }
}

/* =========================================================
   ?????? ?????? ?????? - ????? ????? ? ?????????
   ??????????: 2026-10-03
   ========================================================= */
.hr-role-permission-toolbar-enhanced {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hr-role-toolbar-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
}

    .hr-role-toolbar-intro > div:first-child {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .hr-role-toolbar-intro strong {
        color: #172033;
        font-size: 16px;
    }

    .hr-role-toolbar-intro span {
        color: #64748b;
        font-size: 12px;
        line-height: 1.9;
    }

.hr-role-permission-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

    .hr-role-permission-summary span {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 8px 11px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
        white-space: nowrap;
    }

    .hr-role-permission-summary strong {
        color: #2563eb;
    }

.hr-role-permission-search-row {
    display: flex;
    align-items: flex-end;
    gap: 14px;
    width: 100%;
}

.hr-role-permission-search {
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1 1 auto;
    min-width: 0;
}

    .hr-role-permission-search > span {
        color: #475569;
        font-size: 12px;
        font-weight: 700;
    }

    .hr-role-permission-search .hr-role-input {
        width: 100%;
    }

.hr-role-toolbar-actions {
    flex-shrink: 0;
}

.hr-role-permission-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.hr-role-guide-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
}

    .hr-role-guide-item strong {
        color: #334155;
        font-size: 12px;
    }

    .hr-role-guide-item span {
        color: #64748b;
        font-size: 11px;
        line-height: 1.8;
    }

.hr-role-controller-heading {
    min-width: 0;
}

    .hr-role-controller-heading h2 {
        margin-bottom: 6px;
    }

    .hr-role-controller-heading p {
        max-width: 760px;
        margin: 0 0 7px;
        color: #64748b;
        font-size: 12px;
        line-height: 1.9;
    }

.hr-role-technical-name,
.hr-role-technical-permission {
    color: #94a3b8 !important;
    font-size: 10px !important;
    direction: ltr;
    text-align: right;
    unicode-bidi: plaintext;
}

.hr-role-controller-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 9px;
    flex-shrink: 0;
}

.hr-role-controller-count {
    color: #64748b;
    font-size: 11px;
    white-space: nowrap;
}

    .hr-role-controller-count strong {
        color: #2563eb;
    }

.hr-role-permission-item {
    align-items: flex-start;
    gap: 11px;
    min-height: 92px;
}

    .hr-role-permission-item > input {
        margin-top: 4px;
        flex-shrink: 0;
    }

.hr-role-permission-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

    .hr-role-permission-content > strong {
        color: #1e293b;
        font-size: 13px;
        line-height: 1.7;
    }

.hr-role-action-description {
    color: #64748b !important;
    font-size: 11px !important;
    line-height: 1.8 !important;
    white-space: normal !important;
}

.hr-role-technical-permission {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.hr-role-no-search-result {
    margin: 14px 0;
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #64748b;
    text-align: center;
    font-size: 13px;
}

.permission-controller-card[hidden],
.hr-role-permission-item[hidden] {
    display: none !important;
}

@media (max-width: 1000px) {
    .hr-role-toolbar-intro {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-role-permission-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .hr-role-toolbar-actions {
        width: 100%;
    }

        .hr-role-toolbar-actions .hr-role-tool-btn {
            flex: 1 1 0;
        }

    .hr-role-permission-guide {
        grid-template-columns: 1fr;
    }

    .hr-role-permission-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-role-controller-controls {
        align-items: flex-start;
        width: 100%;
    }
}

@media (max-width: 700px) {
    .hr-role-permission-summary {
        width: 100%;
    }

        .hr-role-permission-summary span {
            flex: 1 1 auto;
            justify-content: center;
        }

    .hr-role-permission-item {
        min-height: 0;
        padding: 12px;
    }

    .hr-role-actions-grid {
        grid-template-columns: 1fr;
    }

    .hr-role-controller-toggle {
        width: 100%;
    }

        .hr-role-controller-toggle span {
            flex: 1;
        }
}

@media (max-width: 480px) {
    .hr-role-permission-toolbar-enhanced {
        padding: 13px;
    }

    .hr-role-permission-summary {
        flex-direction: column;
        align-items: stretch;
    }

        .hr-role-permission-summary span {
            width: 100%;
        }

    .hr-role-toolbar-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

        .hr-role-toolbar-actions .hr-role-tool-btn {
            width: 100%;
        }

    .hr-role-controller-heading p {
        font-size: 11px;
    }

    .hr-role-permission-content > strong {
        font-size: 12px;
    }
}

/* ================================================================
   Employee Contracts - Delete action
   Added at the end of hr-dashboard.css.
   ================================================================ */
.hr-contract-delete-form {
    display: inline-flex;
    margin: 0;
}

.hr-contract-mini-btn.danger {
    border: 1px solid rgba(220, 38, 38, 0.22);
    background: rgba(254, 226, 226, 0.82);
    color: #b42318;
    cursor: pointer;
    font: inherit;
}

    .hr-contract-mini-btn.danger:hover {
        background: rgba(254, 202, 202, 0.95);
        border-color: rgba(220, 38, 38, 0.34);
    }

    .hr-contract-mini-btn.danger:focus-visible {
        outline: 3px solid rgba(220, 38, 38, 0.18);
        outline-offset: 2px;
    }

@media (max-width: 768px) {
    .hr-contract-delete-form {
        width: 100%;
    }

        .hr-contract-delete-form .hr-contract-mini-btn.danger {
            width: 100%;
            justify-content: center;
        }
}



/* ================================================================
   Employee Financial Info - user-friendly IBAN / Sheba input
   Added at the end of hr-dashboard.css.
   ================================================================ */
.hr-sheba-field {
    position: relative;
}

.hr-sheba-input {
    width: 100%;
    min-height: 48px;
    direction: ltr;
    text-align: left;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

    .hr-sheba-input:focus {
        letter-spacing: 0.05em;
    }

.hr-sheba-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 7px;
    direction: rtl;
}

.hr-sheba-help {
    color: #64748b;
    line-height: 1.8;
}

.hr-sheba-counter {
    flex: 0 0 auto;
    min-width: 52px;
    color: #475569;
    font-weight: 700;
    direction: rtl;
    text-align: center;
}

.hr-sheba-input.hr-sheba-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10);
}

.hr-sheba-input.hr-sheba-complete {
    border-color: #16a34a;
}

@media (max-width: 768px) {
    .hr-sheba-input {
        min-height: 50px;
        font-size: 14px;
    }

    .hr-sheba-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }

    .hr-sheba-counter {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .hr-sheba-input {
        font-size: 13px;
        letter-spacing: 0.02em;
    }

    .hr-sheba-help {
        font-size: 11px;
    }

    .hr-sheba-counter {
        font-size: 11px;
    }
}

/* ========================================================================== */
/* Employee Financial Ledger - installment amount in Toman below the input */
/* ========================================================================== */
.hr-fin-installment-amount-words {
    grid-column: 1 / -1;
    margin-top: 1px;
    padding: 0 2px;
    color: color-mix(in srgb, var(--primary) 68%, var(--text-muted, #64748b));
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.7;
    text-align: right;
    direction: rtl;
}

@media (max-width: 768px) {
    .hr-fin-installment-amount-words {
        font-size: 0.66rem;
        line-height: 1.65;
    }
}

@media (max-width: 480px) {
    .hr-fin-installment-amount-words {
        font-size: 0.64rem;
    }
}


/* Payroll payment history action icons. Added at the end as requested. */
.hr-extra-actions .hr-pay-action-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 9px;
    box-sizing: border-box;
}

    .hr-extra-actions .hr-pay-action-icon svg {
        width: 16px;
        height: 16px;
    }

.hr-extra-actions .hr-pay-action-edit {
    color: #147da9 !important;
}

.hr-extra-actions .hr-pay-action-delete {
    color: #c44d59 !important;
}

.hr-extra-actions .hr-pay-action-icon:hover {
    transform: translateY(-1px);
}

.hr-extra-actions .hr-pay-action-icon:focus-visible {
    outline: 3px solid rgba(20, 125, 169, 0.18);
    outline-offset: 2px;
}

@media (max-width: 640px) {
    .hr-extra-actions {
        gap: 6px;
    }

        .hr-extra-actions .hr-pay-action-icon {
            flex-basis: 34px;
            width: 34px;
            height: 34px;
            min-width: 34px;
        }
}


/* Payroll payment history - explicit styles for the existing action classes. */
.hr-extra-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
}

    .hr-extra-actions .hr-extra-secondary-btn.hr-pay-action-icon,
    .hr-extra-actions .hr-extra-danger-btn.hr-pay-action-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        padding: 0;
        margin: 0;
        border: 1px solid transparent;
        border-radius: 9px;
        box-sizing: border-box;
        cursor: pointer;
        line-height: 1;
        transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    }

    .hr-extra-actions .hr-extra-secondary-btn.hr-pay-action-icon {
        color: #147da9;
        background: rgba(20, 125, 169, 0.08);
        border-color: rgba(20, 125, 169, 0.2);
    }

    .hr-extra-actions .hr-extra-danger-btn.hr-pay-action-icon {
        color: #c44d59;
        background: rgba(196, 77, 89, 0.08);
        border-color: rgba(196, 77, 89, 0.2);
    }

    .hr-extra-actions .hr-pay-action-icon svg {
        width: 17px;
        height: 17px;
        display: block;
    }

    .hr-extra-actions .hr-extra-secondary-btn.hr-pay-action-icon:hover {
        color: #0d6388;
        background: rgba(20, 125, 169, 0.15);
        border-color: rgba(20, 125, 169, 0.35);
        transform: translateY(-1px);
    }

    .hr-extra-actions .hr-extra-danger-btn.hr-pay-action-icon:hover {
        color: #a83a47;
        background: rgba(196, 77, 89, 0.15);
        border-color: rgba(196, 77, 89, 0.35);
        transform: translateY(-1px);
    }

    .hr-extra-actions .hr-pay-action-icon:focus-visible {
        outline: 3px solid rgba(20, 125, 169, 0.18);
        outline-offset: 2px;
    }

    .hr-extra-actions .hr-pay-action-delete:focus-visible {
        outline-color: rgba(196, 77, 89, 0.2);
    }

@media (max-width: 640px) {
    .hr-extra-actions {
        gap: 6px;
    }

        .hr-extra-actions .hr-extra-secondary-btn.hr-pay-action-icon,
        .hr-extra-actions .hr-extra-danger-btn.hr-pay-action-icon {
            flex-basis: 34px;
            width: 34px;
            height: 34px;
            min-width: 34px;
            min-height: 34px;
        }

        .hr-extra-actions .hr-pay-action-icon svg {
            width: 16px;
            height: 16px;
        }
}

/* ==========================================================================
   File upload controls - polished responsive styling
   Added at the end of this file.
   Scope: existing file inputs only; no upload logic or markup is changed.
   ========================================================================== */

:where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ) {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--primary) 18%, #d8e2e7);
    border-radius: 12px;
    background: #f8fafb;
    color: var(--text, #263238);
    font-family: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.5;
    box-sizing: border-box;
    cursor: pointer;
    transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ):hover {
        border-color: color-mix(in srgb, var(--primary) 42%, #d8e2e7);
        background: #ffffff;
    }

    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ):focus {
        outline: none;
        border-color: var(--primary);
        background: #ffffff;
        box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
    }

    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile )::file-selector-button {
        min-height: 36px;
        margin-inline-end: 9px;
        padding: 7px 14px;
        border: 1px solid color-mix(in srgb, var(--primary) 24%, transparent);
        border-radius: 9px;
        background: color-mix(in srgb, var(--primary) 9%, #ffffff);
        color: var(--primary);
        font: inherit;
        font-size: 10.5px;
        font-weight: 900;
        line-height: 1.3;
        cursor: pointer;
        transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
    }

        :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile )::file-selector-button:hover {
            border-color: color-mix(in srgb, var(--primary) 42%, transparent);
            background: color-mix(in srgb, var(--primary) 15%, #ffffff);
            box-shadow: 0 4px 10px color-mix(in srgb, var(--primary) 12%, transparent);
            transform: translateY(-1px);
        }

        :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile )::file-selector-button:active {
            transform: translateY(0);
            box-shadow: none;
        }

    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ):disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

        :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ):disabled::file-selector-button {
            cursor: not-allowed;
        }

/* Employee Contracts - keep the existing custom upload card consistent
   with the rest of the new file controls. */
.hr-contract-upload-btn {
    border-width: 1px;
    border-style: solid;
    border-color: color-mix(in srgb, var(--primary) 20%, #d8e2e7);
    background: #f8fafb;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.035);
}

    .hr-contract-upload-btn:hover {
        border-color: color-mix(in srgb, var(--primary) 48%, #d8e2e7);
        background: #ffffff;
        box-shadow: 0 7px 18px color-mix(in srgb, var(--primary) 10%, transparent);
    }

.hr-contract-upload-select {
    min-height: 36px;
    padding: 7px 12px;
    border-color: color-mix(in srgb, var(--primary) 24%, transparent);
    background: color-mix(in srgb, var(--primary) 8%, #ffffff);
    color: var(--primary);
    box-shadow: 0 3px 8px color-mix(in srgb, var(--primary) 7%, transparent);
    transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hr-contract-upload-btn:hover .hr-contract-upload-select {
    border-color: color-mix(in srgb, var(--primary) 42%, transparent);
    background: color-mix(in srgb, var(--primary) 14%, #ffffff);
    box-shadow: 0 5px 12px color-mix(in srgb, var(--primary) 11%, transparent);
    transform: translateY(-1px);
}

.hr-contract-upload-btn:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent), 0 7px 18px color-mix(in srgb, var(--primary) 9%, transparent);
}

@media (max-width: 768px) {
    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ) {
        min-height: 50px;
        padding: 5px;
        font-size: 11px;
    }

        :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile )::file-selector-button {
            min-height: 38px;
            padding: 8px 13px;
            font-size: 10.5px;
        }

    .hr-contract-upload-btn {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 9px;
        min-height: 62px;
        padding: 9px;
    }

    .hr-contract-upload-icon {
        width: 36px;
        height: 36px;
    }

    .hr-contract-upload-select {
        grid-column: 2;
        justify-self: start;
        min-height: 34px;
        padding: 6px 11px;
    }
}

@media (max-width: 480px) {
    :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile ) {
        min-height: 52px;
        padding: 4px;
        border-radius: 11px;
        font-size: 10px;
    }

        :where( #documentFile, #terminationDocument, #settlementReceipt, #additionalReceiptFile, #finAttachmentFile )::file-selector-button {
            min-height: 40px;
            margin-inline-end: 6px;
            padding: 8px 10px;
            border-radius: 8px;
            font-size: 10px;
        }

    .hr-contract-upload-btn {
        grid-template-columns: 34px minmax(0, 1fr);
        min-height: 60px;
        gap: 8px;
        padding: 8px;
        border-radius: 11px;
    }

    .hr-contract-upload-icon {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

        .hr-contract-upload-icon svg {
            width: 17px;
            height: 17px;
        }

    .hr-contract-upload-copy strong {
        font-size: 10.5px;
    }

    .hr-contract-upload-copy small {
        font-size: 8.5px;
    }

    .hr-contract-upload-select {
        min-height: 33px;
        padding: 6px 9px;
        font-size: 9.5px;
    }
}



/* =========================================================
   Global Jalali Date Picker - Holiday Highlight
   ??????? ??????? ?? ????? ????? ?? ??? ???? ???? ? ??????
   ========================================================= */

.hr-jp-days button.holiday {
    position: relative;
    border-color: #fca5a5;
    background: #fff1f2;
    color: #dc2626;
    font-weight: 900;
    box-shadow: inset 0 0 0 1px rgba(239, 68, 68, 0.06);
}

    .hr-jp-days button.holiday::after {
        content: "";
        position: absolute;
        right: 4px;
        bottom: 4px;
        width: 4px;
        height: 4px;
        border-radius: 50%;
        background: #ef4444;
    }

    .hr-jp-days button.holiday:hover {
        border-color: #f87171;
        background: #ffe4e6;
        color: #b91c1c;
        box-shadow: 0 5px 12px rgba(239, 68, 68, 0.14);
        transform: translateY(-1px);
    }

    .hr-jp-days button.holiday.official-holiday {
        border-color: #fb7185;
        background: #ffe4e6;
        color: #be123c;
        box-shadow: inset 0 0 0 1px rgba(244, 63, 94, 0.08), 0 3px 8px rgba(244, 63, 94, 0.08);
    }

        .hr-jp-days button.holiday.official-holiday::after {
            width: 5px;
            height: 5px;
            background: #e11d48;
        }

    .hr-jp-days button.holiday.selected {
        border-color: var(--primary);
        background: var(--primary);
        color: #ffffff;
        box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 20%, transparent), 0 5px 12px color-mix(in srgb, var(--primary) 16%, transparent);
    }

        .hr-jp-days button.holiday.selected::after {
            background: #ffffff;
        }

@media (max-width: 700px) {
    .hr-jp-days button.holiday::after {
        right: 3px;
        bottom: 3px;
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 520px) {
    .hr-jp-days button.holiday {
        font-weight: 900;
    }

        .hr-jp-days button.holiday::after {
            right: 2px;
            bottom: 2px;
            width: 3px;
            height: 3px;
        }

        .hr-jp-days button.holiday.official-holiday::after {
            width: 4px;
            height: 4px;
        }
}
