/* 1. Design tokens: update these values to change the theme */
:root {
    --navy: #0B2545;
    --navy-deep: #081D36;
    --blue: #2563EB;
    --blue-soft: #DBEAFE;
    --background: #F1F5F9;
    --surface: #FFFFFF;
    --text: #1E293B;
    --muted: #64748B;
    --border: #E2E8F0;
    --green: #10B981;
    --red: #F43F5E;
    --amber: #F59E0B;
    --purple: #8B5CF6;
    --shadow: 0 4px 14px rgba(15, 23, 42, 0.045);
    --radius: 12px;
}

* { box-sizing: border-box; }

html { min-width: 320px; }

body {
    margin: 0;
    font-family: Inter, "Segoe UI", Arial, Helvetica, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible {
    outline: 2px solid #93C5FD;
    outline-offset: 3px;
}

/* 2. Main application frame and fixed sidebar */
.app-layout { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    width: 230px;
    height: 100vh;
    padding: 18px 12px 14px;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
    border-right: 1px solid rgba(255,255,255,.08);
    color: #F8FAFC;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { display: none; }

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 118px;
    margin-bottom: 16px;
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(203,213,225,.16);
}
.sidebar-brand img {
    display: block;
    width: 170px;
    height: 90px;
    object-fit: contain;
}

/* 3. Sidebar navigation and active/hover states */
.sidebar-nav, .quick-actions {
    display: flex;
    flex-direction: column;
}
.sidebar-nav { gap: 3px; }

.sidebar-nav a,
.quick-actions a,
.sidebar .quick-link-sidebar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 39px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    color: #D9E5F4;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color .18s ease, border-color .18s ease,
                color .18s ease, transform .18s ease;
}
.sidebar-nav a:hover,
.quick-actions a:hover,
.sidebar .quick-link-sidebar:hover {
    color: #FFF;
    background: rgba(148,177,211,.12);
    border-color: rgba(191,219,254,.12);
}
.sidebar-nav a:hover,
.quick-actions a:hover { transform: translateX(2px); }

.sidebar-nav a.active {
    color: #FFF;
    background: linear-gradient(100deg, #2563EB 0%, #1D4ED8 100%);
    border-color: rgba(147,197,253,.28);
    box-shadow: 0 5px 14px rgba(37,99,235,.22);
    font-weight: 650;
}
.sidebar-nav a.active::before {
    position: absolute;
    inset: 8px auto 8px -1px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: #FFF;
    content: "";
}
.icon {
    display: inline-block;
    flex: 0 0 19px;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: middle;
}
.sidebar-nav .icon { color: #AFC4DE; }
.sidebar-nav a.active .icon { color: #FFF; }

/* 4. Sidebar quick actions and signed-in user */
.quick-actions {
    gap: 3px;
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(203,213,225,.17);
}
.quick-actions h3 {
    margin: 0 0 7px;
    padding: 0 10px;
    color: #8FA9C8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
}
.quick-actions a,
.sidebar .quick-link-sidebar {
    min-height: 36px;
    padding: 8px 11px;
    color: #C8D8EA;
    font-size: 12px;
}
.quick-actions .icon,
.sidebar .quick-link-sidebar .icon { color: #8FB5E8; }

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin-top: auto;
    padding: 14px 8px 4px;
    border-top: 1px solid rgba(203,213,225,.17);
}
.admin-avatar {
    display: grid;
    flex: 0 0 36px;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--navy);
    font-weight: 700;
}
.sidebar-user-details { min-width: 0; }
.sidebar-user-details strong,
.sidebar-user-details small { display: block; overflow-wrap: anywhere; }
.sidebar-user-details strong { color: #F8FAFC; font-size: 12px; }
.sidebar-user-details small { margin-top: 4px; color: #AFC4DE; font-size: 11px; }

/* 5. Main content area and top navigation bar */
.main-area {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    width: calc(100% - 230px);
    margin-left: 230px;
}
.topbar {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    width: 100%;
    min-width: 0;
    min-height: 72px;
    padding: 12px 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.menu-toggle {
    display: none;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 22px;
    cursor: pointer;
}
.search-box {
    display: flex;
    flex: 1 1 240px;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    max-width: 420px;
    padding: 10px 13px;
    border: 1px solid #E8EEF6;
    border-radius: 8px;
    background: #F1F5F9;
    color: var(--muted);
}
.search-box .icon { flex-basis: 17px; width: 17px; height: 17px; }
.search-box input {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 12px;
}
.topbar-tools {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
    margin-left: auto;
}
.icon-button {
    position: relative;
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--navy);
    cursor: pointer;
}
.icon-button:hover { background: #EFF6FF; }
.icon-button .icon { width: 20px; height: 20px; flex-basis: 20px; }
.notification-count {
    position: absolute;
    top: 0;
    right: -1px;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--red);
    color: #FFF;
    font-size: 10px;
    font-weight: 700;
}

/* 6. Header quick actions */
.topbar-quick-links {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    gap: 6px;
    min-width: 0;
}
.topbar-quick-links a {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    min-height: 38px;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #F8FAFC;
    color: var(--navy);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color .16s ease, border-color .16s ease;
}
.topbar-quick-links a:hover { background: #EFF6FF; border-color: #BFDBFE; }
.topbar-quick-links .icon {
    flex-basis: 17px;
    width: 17px;
    height: 17px;
    color: var(--blue);
}

/* 7. Dashboard content spacing and common panel style */
main {
    display: block;
    flex: 1 0 auto;
    min-width: 0;
    width: 100%;
    padding: 22px 26px;
}
.dashboard-cards,
.tables-grid,
.dashboard-grid,
.bottom-grid { width: 100%; min-width: 0; }
.tables-grid,
.dashboard-grid,
.bottom-grid {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}
.attendance-section,
.leave-section,
.analytics-section,
.department-section,
.bottom-panel {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.section-heading,
.analytics-heading,
.bottom-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 20px;
}
.section-heading h2,
.analytics-heading h2,
.panel-heading h2,
.bottom-panel-heading h2 {
    margin: 0 0 7px;
    color: var(--navy);
    font-size: 18px;
    font-weight: 650;
    line-height: 1.35;
}
.section-heading p,
.analytics-heading p,
.panel-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}
.view-all,
.bottom-panel-heading > a {
    flex-shrink: 0;
    color: var(--blue);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}
.view-all:hover,
.bottom-panel-heading > a:hover { text-decoration: underline; }

/* 8. KPI cards: compact, aligned attendance totals */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 0;
}
.summary-card {
    position: relative;
    min-width: 0;
    min-height: 112px;
    padding: 14px 16px 14px 78px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--blue);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}
.summary-card h3 {
    margin: 0 0 6px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.card-value {
    margin: 0;
    color: var(--navy);
    font-size: 28px;
    font-weight: 750;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
}
.card-note { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.summary-icon {
    position: absolute;
    top: 18px;
    left: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--blue-soft);
    color: var(--blue);
}
.summary-icon .icon { width: 22px; height: 22px; flex-basis: 22px; }
.present-card { border-top-color: var(--green); }
.present-card .summary-icon { background: #D1FAE5; color: #059669; }
.absent-card { border-top-color: var(--red); }
.absent-card .summary-icon { background: #FFE4E6; color: #E11D48; }
.leave-card { border-top-color: var(--amber); }
.leave-card .summary-icon { background: #FEF3C7; color: #D97706; }

/* 9. Attendance and leave tables */
.tables-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; }
.section-heading input[type="date"] {
    flex: 0 0 130px;
    width: 130px;
    min-width: 0;
    height: 32px;
    padding: 4px 7px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: var(--surface);
    color: #334155;
    font-size: 11px;
}
.table-container { width: 100%; max-width: 100%; overflow-x: auto; border-radius: 8px; }
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    white-space: nowrap;
}
thead { background: #F1F5F9; }
th, td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    line-height: 1.4;
    vertical-align: middle;
}
th { color: #334155; font-weight: 600; }
td { color: #475569; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: #F8FAFC; }
tbody tr:last-child td { border-bottom: 0; }
.status, .leave-status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}
.status.present, .leave-status.approved { background: #D1FAE5; color: #047857; }
.status.absent, .leave-status.rejected { background: #FFE4E6; color: #BE123C; }
.status.late, .leave-status.pending { background: #FEF3C7; color: #92400E; }

/* 10. Seven-day attendance bar chart */
.dashboard-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: stretch; }
.chart-period {
    flex-shrink: 0;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: #475569;
    font-size: 11px;
}
.attendance-chart {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-height: 190px;
    padding: 14px 4px 0;
    border-bottom: 1px solid #CBD5E1;
    background-image: linear-gradient(to bottom,
        transparent 24%, #E2E8F0 25%, transparent 25.5%,
        transparent 49%, #E2E8F0 50%, transparent 50.5%,
        transparent 74%, #E2E8F0 75%, transparent 75.5%);
}
.chart-column {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    color: var(--muted);
    font-size: 10px;
}
.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    width: 100%;
    height: 155px;
}
.bar { width: 25%; max-width: 22px; min-height: 5px; border-radius: 4px 4px 0 0; }
.present-bar { background: var(--green); }
.absent-bar { background: var(--red); }
.leave-bar { background: #3B82F6; }
.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    color: #475569;
    font-size: 11px;
}
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; }
.present-dot { background: var(--green); }
.absent-dot { background: var(--red); }
.leave-dot { background: #3B82F6; }

/* 11. Department distribution donut chart */
.department-visual {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) minmax(135px, 1fr);
    align-items: center;
    gap: 18px;
    min-height: 230px;
    padding-top: 8px;
}
.department-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: min(100%, 220px);
    aspect-ratio: 1;
    margin-inline: auto;
    border-radius: 50%;
    /* Segment sizes are percentages of the 124 sample employees. */
    background: conic-gradient(
        #3B82F6 0% 14.52%,
        #10B981 14.52% 40.32%,
        #F59E0B 40.32% 56.45%,
        #8B5CF6 56.45% 67.74%,
        #F43F5E 67.74% 77.42%,
        #94A3B8 77.42% 100%
    );
}
.department-donut::before {
    position: absolute;
    width: 62%;
    height: 62%;
    border-radius: 50%;
    background: var(--surface);
    content: "";
}
.donut-center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}
.donut-center strong { color: var(--navy); font-size: 25px; line-height: 1.1; }
.donut-center span { color: var(--muted); font-size: 11px; }
.department-legend {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.department-legend li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
}
.department-legend strong { color: var(--navy); font-weight: 650; font-variant-numeric: tabular-nums; }
.legend-swatch { width: 9px; height: 9px; border-radius: 50%; }
.swatch-hr { background: #3B82F6; }
.swatch-production { background: #10B981; }
.swatch-sales { background: #F59E0B; }
.swatch-it { background: #8B5CF6; }
.swatch-accounts { background: #F43F5E; }
.swatch-others { background: #94A3B8; }

/* 12. Upcoming birthdays and holidays */
.bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.bottom-panel { min-height: 136px; padding: 16px 18px; }
.bottom-panel-heading { margin-bottom: 14px; }
.bottom-panel-heading h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 15px; }
.bottom-panel-heading h2 .icon { color: var(--blue); width: 19px; height: 19px; flex-basis: 19px; }
.people-row { display: flex; justify-content: space-between; gap: 14px; }
.person-mini {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}
.person-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #FFF;
    font-size: 12px;
    font-weight: 700;
}
.avatar-green { background: #0F9F78; }
.avatar-pink { background: #DB5B91; }
.avatar-blue { background: #3978D4; }
.person-mini strong { max-width: 100%; color: var(--navy); font-size: 10px; overflow-wrap: anywhere; }
.person-mini small { color: var(--muted); font-size: 10px; }
.holiday-row { display: inline-flex; align-items: center; gap: 10px; margin: 0 12px 6px 0; vertical-align: top; }
.holiday-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 8px;
    border-radius: 8px;
    background: #FFE4E6;
    color: #BE123C;
}
.holiday-date strong { font-size: 10px; }
.holiday-date b { margin-top: 2px; font-size: 21px; line-height: 1.1; }
.holiday-date.november { background: #DBEAFE; color: #1D4ED8; }
.holiday-row > div:last-child strong,
.holiday-row > div:last-child small { display: block; }
.holiday-row > div:last-child strong { color: var(--navy); font-size: 11px; }
.holiday-row > div:last-child small { margin-top: 5px; color: var(--muted); font-size: 10px; }

/* 13. Footer */
footer {
    width: 100%;
    margin-top: auto;
    padding: 12px 20px;
    color: var(--muted);
    text-align: center;
    font-size: 11px;
}
footer p { margin: 0; }

/* 14. Responsive layout: tablets and smaller laptop screens */
@media (max-width: 1200px) {
    .topbar { gap: 9px; padding-inline: 14px; }
    .topbar-quick-links a span { display: none; }
    .topbar-quick-links a { width: 36px; padding: 8px; }
    .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .department-visual { grid-template-columns: minmax(130px, .9fr) minmax(130px, 1fr); }
}

/* 15. Responsive layout: compact screens and mobile */
@media (max-width: 900px) {
    .tables-grid, .dashboard-grid, .bottom-grid { grid-template-columns: minmax(0, 1fr); }
    .search-box { max-width: none; }
    .department-visual { grid-template-columns: minmax(150px, .8fr) minmax(160px, 1fr); }
}
@media (max-width: 700px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        min-height: 0;
        max-height: none;
        padding: 14px 16px;
        overflow: visible;
    }
    .sidebar-brand { min-height: 82px; margin-bottom: 12px; padding-bottom: 10px; }
    .sidebar-brand img { height: 68px; }
    .sidebar-user { margin-top: 16px; }
    .main-area { width: 100%; margin-left: 0; }
    .topbar { flex-wrap: wrap; padding: 12px 16px; }
    .menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .search-box { order: 3; flex: 1 1 100%; width: 100%; }
    .topbar-tools { width: 100%; flex-wrap: wrap; justify-content: space-between; }
    .topbar-quick-links a span { display: inline; }
    .topbar-quick-links a { width: auto; }
    main { padding: 16px; }
    .dashboard-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .summary-card { padding-left: 68px; }
    .summary-icon { left: 14px; width: 40px; height: 40px; }
    .section-heading, .analytics-heading { align-items: flex-start; }
    .attendance-section, .leave-section, .analytics-section, .department-section { padding: 16px; }
}
@media (max-width: 480px) {
    .dashboard-cards { grid-template-columns: minmax(0, 1fr); }
    .section-heading, .analytics-heading { flex-direction: column; }
    .section-heading input[type="date"] { flex-basis: auto; }
    .department-visual { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .department-donut { width: 180px; }
    .department-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .bottom-grid { gap: 14px; }
    .people-row { gap: 8px; }
    .holiday-row { margin-right: 4px; }
    .topbar-quick-links { flex-wrap: wrap; }
}

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


/* 17. Compact KPI cards with subtle trend sparklines (reference-inspired) */
.dashboard-cards { gap: 12px; }
.dashboard-cards .summary-card {
    min-height: 82px;
    height: 82px;
    padding: 10px 74px 9px 66px;
    border-top-width: 1px;
    overflow: hidden;
}
.dashboard-cards .summary-card .summary-icon {
    top: 18px;
    left: 13px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
}
.dashboard-cards .summary-card h3 {
    margin: 0 0 2px;
    font-size: 11px;
    line-height: 1.25;
    white-space: nowrap;
}
.dashboard-cards .summary-card .card-value {
    display: inline-block;
    font-size: 22px;
    line-height: 1.1;
}
.dashboard-cards .summary-card .card-note {
    margin-top: 3px;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}
.card-sparkline {
    position: absolute;
    right: 8px;
    bottom: 10px;
    width: 64px;
    height: 28px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .88;
}
.card-sparkline .sparkline-area { fill: currentColor; opacity: .10; stroke: none; }
.card-sparkline .sparkline-line { fill: none; }
.sparkline-blue { color: #60A5FA; }
.sparkline-green { color: #34D399; }
.sparkline-red { color: #FB7185; }
.sparkline-amber { color: #FBBF24; }

/* At narrow widths, keep the cards readable and the decorative waves discreet. */
@media (max-width: 700px) {
    .dashboard-cards .summary-card {
        min-height: 82px;
        height: 82px;
        padding-left: 64px;
        padding-right: 64px;
    }
    .card-sparkline { width: 52px; right: 6px; }
}
@media (max-width: 480px) {
    .dashboard-cards .summary-card { padding-right: 70px; }
    .card-sparkline { width: 58px; }
}


/* KPI refinement: compact height, trend percentage, and one wave per card */
.dashboard-cards { gap: 12px; }
.dashboard-cards .summary-card {
    height: 90px;
    min-height: 82px;
    padding: 9px 74px 8px 66px;
    overflow: hidden;
}
.dashboard-cards .summary-card .summary-icon {
    top: 17px;
    left: 13px;
    width: 40px;
    height: 40px;
}
.dashboard-cards .summary-card h3 {
    margin: 0 0 1px;
    font-size: 11px;
    line-height: 1.2;
}
.card-value-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 25px;
}
.dashboard-cards .summary-card .card-value {
    margin: 0;
    font-size: 22px;
    line-height: 1.1;
}
.card-trend {
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}
.trend-positive { color: #059669; }
.trend-negative { color: #E11D48; }
.trend-neutral { color: #64748B; }
.dashboard-cards .summary-card .card-note {
    margin-top: 2px;
    font-size: 9px;
    line-height: 1.2;
    white-space: nowrap;
}
.card-sparkline {
    position: absolute;
    right: 7px;
    bottom: 11px;
    width: 62px;
    height: 25px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: .9;
}
.card-sparkline .sparkline-area { fill: currentColor; opacity: .12; stroke: none; }
.card-sparkline .sparkline-line { fill: none; }
.sparkline-blue { color: #60A5FA; }
.sparkline-green { color: #34D399; }
.sparkline-red { color: #FB7185; }
.sparkline-amber { color: #FBBF24; }

@media (max-width: 700px) {
    .dashboard-cards .summary-card {
        padding-left: 62px;
        padding-right: 64px;
    }
    .dashboard-cards .summary-icon { left: 11px; }
    .card-sparkline { width: 52px; right: 5px; }
}
@media (max-width: 480px) {
    .dashboard-cards .summary-card { padding-right: 62px; }
    .card-sparkline { width: 48px; }
}


/* Employee module only: dashboard CSS above is preserved. */
.employee-module-view[hidden],#employeeListView[hidden],#employeeFormView[hidden]{display:none!important}
.employee-module-view{padding:0 26px 24px;min-width:0}
.employee-crumb{display:flex;align-items:center;gap:9px;min-height:40px;color:#536f98;font-size:12px}
.employee-crumb strong{color:#0b2557;font-weight:700}.employee-crumb .crumb-separator{color:#9aabc1}.employee-crumb .crumb-link{padding:0;border:0;color:#536f98;background:none;font:inherit;cursor:pointer}.employee-crumb .crumb-link:hover{color:#1768d2}
.employee-person-icon{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.employee-heading{display:flex;align-items:center;gap:15px;min-height:74px;margin-bottom:13px;padding:12px 14px;border:1px solid #e5edf7;border-radius:11px;background:#fff;box-shadow:0 4px 16px #1739610b}
.employee-heading-icon{display:grid;place-items:center;flex:0 0 54px;height:54px;border-radius:11px;color:#1768d2;background:#e5f0ff;font-size:25px}
.employee-heading h1{margin:0 0 4px;color:#0b2557;font-size:21px}.employee-heading p{margin:0;color:#607d9d;font-size:12px}
.employee-primary,.employee-form-actions button{min-height:39px;padding:0 14px;border:1px solid transparent;border-radius:8px;font:600 12px "Segoe UI",Arial,sans-serif;cursor:pointer}
.employee-primary{margin-left:auto;color:white;background:#1768d2}.employee-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}
.employee-search{display:flex;align-items:center;gap:9px;flex:1 1 280px;min-height:40px;padding:0 12px;border:1px solid #dce6f2;border-radius:8px;background:white;color:#607d9d;font-size:21px}
.employee-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:12px}
.employee-toolbar select{min-width:150px;min-height:40px;padding:0 11px;border:1px solid #cbd9eb;border-radius:8px;background:#fff;color:#173555;font:12px "Segoe UI",Arial,sans-serif;outline:0;accent-color:#1768d2}.employee-toolbar select:hover{border-color:#8bb6ef}.employee-toolbar select:focus{border-color:#1768d2;box-shadow:0 0 0 3px #1768d21a}.employee-toolbar select option{padding:8px 10px;color:#173555;background:#fff}.employee-toolbar select option:checked{color:#fff;background:#1768d2}
.employee-list-card{overflow:hidden;border:1px solid #dce6f2;border-radius:12px;background:white;box-shadow:0 4px 14px #0f172a08}
.employee-list-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px}.employee-list-head h2{margin:0 0 5px;color:#0b2557;font-size:16px}.employee-list-head p{margin:0;color:#607d9d;font-size:11px}.employee-list-head>span{padding:7px 10px;border-radius:20px;color:#1768d2;background:#eaf3ff;font-size:10px;font-weight:650}
.employee-table-wrap{width:100%;overflow-x:auto}.employee-table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}.employee-table thead{background:#f1f5f9}.employee-table th,.employee-table td{padding:13px 16px;border-bottom:1px solid #e2e8f0;color:#405c82;font-size:12px}.employee-table th{color:#263f6b;font-weight:700}.employee-table td b,.employee-table td small{display:block}.employee-table td b{color:#102a57}.employee-table td small{margin-top:4px;color:#7186a5;font-size:10px}.employee-table tbody tr:hover{background:#f8fbff}.emp-status{display:inline-block;padding:5px 10px;border-radius:20px;color:#05865d;background:#d6f9e9;font-size:10px;font-weight:700}.emp-status.inactive{color:#64748b;background:#e8edf4}.emp-view{padding:6px 10px;border:1px solid #d8e5f5;border-radius:6px;color:#1768d2;background:white;font-size:11px;cursor:pointer}.employee-demo-note{margin:0;padding:12px 18px;color:#7186a5;background:#fbfdff;font-size:10px}
.employee-form-layout{display:grid;grid-template-columns:minmax(0,1fr) 245px;gap:10px;align-items:start}.employee-form-main{min-width:0}.employee-tabs{display:flex;overflow-x:auto;min-height:47px;border-radius:9px 9px 0 0;background:#ffffffc9}.employee-tabs button{position:relative;flex:1 0 auto;min-width:112px;padding:0 11px;border:0;border-right:1px solid #e7eef7;color:#29466f;background:transparent;font-size:11px;white-space:nowrap;cursor:pointer}.employee-tabs button.active{color:#0754d6;background:#fff;font-weight:700}.employee-tabs button.active:after{position:absolute;right:0;bottom:0;left:0;height:3px;background:#1674ff;content:""}
.employee-form-card,.employee-side-card{min-width:0;margin-bottom:8px;padding:15px 17px;border:1px solid #e5edf7;border-radius:10px;background:#fff;box-shadow:0 4px 16px #17396109;scroll-margin-top:14px}.employee-section-title{display:flex;align-items:center;gap:12px;margin-bottom:15px}.employee-section-title>span{display:grid;place-items:center;width:29px;height:29px;border-radius:7px;color:#1476f8;background:#edf5ff;font-size:18px}.employee-section-title h2{margin:0 0 4px;color:#102a5a;font-size:14px}.employee-section-title p{margin:0;color:#6a83aa;font-size:11px}
.employee-fields{display:grid;gap:14px 17px}.employee-fields.four{grid-template-columns:repeat(4,minmax(0,1fr))}.employee-fields.two{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-fields>label,.employee-fields>fieldset{display:flex;flex-direction:column;gap:6px;min-width:0;color:#102a57;font-size:11px;font-weight:700}.employee-fields em{color:#ef4444;font-style:normal}.employee-fields input:not([type=radio]):not([type=checkbox]):not([type=file]),.employee-fields select,.employee-fields textarea{width:100%;min-width:0;min-height:35px;padding:8px 10px;border:1px solid #d2deee;border-radius:6px;outline:0;color:#142c51;background:white;font:12px "Segoe UI",Arial,sans-serif}.employee-fields textarea{min-height:67px;resize:vertical}.employee-fields input:focus,.employee-fields select:focus,.employee-fields textarea:focus{border-color:#5b9dff;box-shadow:0 0 0 3px #1c75f81a}.employee-fields select option{color:#173555;background:#fff}.employee-fields select option:checked{color:#fff;background:#1768d2}.employee-fields small{color:#6b83a8;font-size:10px;font-weight:400}.employee-fields .span-all{grid-column:1/-1}.employee-fields .counter{align-self:flex-end;margin-top:-3px}.employee-fields fieldset{margin:0;padding:0;border:0}.employee-fields legend{margin-bottom:5px}.employee-fields .radio-label{display:inline-flex;align-items:center;gap:4px;margin:4px 4px 0 0;color:#334f78;font-size:10px;font-weight:400}.employee-fields input[type=radio]{accent-color:#1476f8}.switch-line{display:flex;align-items:center;gap:8px;min-height:35px;color:#07956e}.switch-line input{accent-color:#12b981}.employee-side-panels{display:grid;gap:8px}.employee-side-card{margin:0;padding:13px 12px}.employee-side-card h2{margin:0 0 12px;color:#102a5a;font-size:14px}.photo-drop{display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:190px;padding:12px 8px;border:1px dashed #a9ceff;border-radius:8px;background:#f7fbff;cursor:pointer;text-align:center}.photo-drop>span{display:grid;place-items:center;width:112px;height:112px;margin-bottom:10px;overflow:hidden;border:2px solid white;border-radius:15px;color:#1b72ef;background:#e6f1ff;font-size:38px}.photo-drop img{width:100%;height:100%;object-fit:cover}.photo-drop b{color:#496795;font-size:11px;font-weight:500}.photo-drop small{margin-top:4px;color:#7186a5;font-size:10px}.photo-actions{display:flex;justify-content:center;margin-top:9px}.photo-remove{min-height:30px;padding:0 12px;border:1px solid #d5e2f2;border-radius:7px;color:#b42332;background:#fff;font:600 11px "Segoe UI",Arial,sans-serif;cursor:pointer;transition:background .15s,border-color .15s}.photo-remove:hover:not(:disabled){border-color:#f1a4ab;background:#fff1f2}.photo-remove:disabled{color:#9aa9bd;background:#f7f9fc;cursor:not-allowed;opacity:.8}.employee-error{display:block;margin-top:5px;color:#dc2626;font-size:10px}.employee-side-card dl{display:grid;gap:14px;margin:0}.employee-side-card dl div{display:flex;justify-content:space-between;gap:8px}.employee-side-card dt{color:#4d6892;font-size:11px}.employee-side-card dd{margin:0;color:#0c2a58;font-size:11px;text-align:right}.employee-doc-list{margin:0;padding:0;list-style:none}.employee-doc-list li{padding:10px 0;border-bottom:1px solid #edf1f7;color:#435f8b;font-size:11px}.employee-help{color:#7186a5;font-size:10px}.employee-form-actions{position:sticky;bottom:8px;z-index:8;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:10px;width:100%;min-height:62px;margin:14px 0 0;padding:11px 14px;border:1px solid #dce6f2;border-radius:11px;background:rgba(255,255,255,.97);box-shadow:0 6px 22px rgba(16,42,87,.10);backdrop-filter:blur(8px);text-align:right}.employee-form-actions #employeeFormMessage{flex:1;min-width:0;color:#17745d;font-size:11px;line-height:1.4}.employee-form-actions button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;min-width:76px;white-space:nowrap;margin-left:0}.employee-form-actions .secondary{border-color:#dce6f2;color:#244775;background:#f7faff}.employee-form-actions .cancel{color:#b42332;background:#fff0f1;border-color:#ffe0e3}.employee-form-actions .save{min-width:116px;color:white;background:#1768d2}.employee-form-actions button:hover{filter:brightness(.98)}
@media(max-width:1200px){.employee-form-layout{grid-template-columns:minmax(0,1fr) 220px}.employee-fields.four{column-gap:11px}}@media(max-width:950px){.employee-form-layout{grid-template-columns:minmax(0,1fr)}.employee-side-panels{grid-template-columns:repeat(3,minmax(0,1fr))}.photo-drop{min-height:150px}.photo-drop>span{width:85px;height:85px}}@media(max-width:700px){.employee-module-view{padding:0 16px 20px}.employee-fields.four{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-side-panels{grid-template-columns:repeat(2,minmax(0,1fr))}.employee-side-card:last-child{grid-column:1/-1}.employee-tabs button{min-width:145px}}@media(max-width:480px){.employee-module-view{padding:0 12px 16px}.employee-heading{flex-wrap:wrap}.employee-primary{margin-left:0}.employee-fields.four,.employee-fields.two{grid-template-columns:minmax(0,1fr)}.employee-fields .span-all{grid-column:auto}.employee-side-panels{grid-template-columns:minmax(0,1fr)}.employee-side-card:last-child{grid-column:auto}.employee-form-actions{flex-wrap:wrap;gap:8px;padding:10px}.employee-form-actions #employeeFormMessage{flex:1 0 100%}.employee-form-actions button{flex:0 0 auto;min-width:0;padding:0 10px}.employee-form-actions .save{min-width:0}}


/* Branded custom dropdowns: consistent blue menus across browsers and Windows. */
.asr-select {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 0;
    color: #102a57;
    font: 12px "Segoe UI", Arial, sans-serif;
}
.employee-toolbar .asr-select { width: auto; min-width: 150px; }
.asr-select-native-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow: hidden !important;
}
.asr-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 35px;
    padding: 8px 10px;
    border: 1px solid #d2deee;
    border-radius: 6px;
    background: #fff;
    color: #142c51;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.employee-toolbar .asr-select-trigger {
    min-height: 40px;
    padding: 0 11px;
    border-color: #cbd9eb;
    border-radius: 8px;
}
.asr-select-trigger:hover { border-color: #8bb6ef; }
.asr-select-trigger:focus-visible,
.asr-select.is-open .asr-select-trigger {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px #2563eb20;
}
.asr-select-trigger[aria-invalid="true"] { border-color: #dc2626; }
.asr-select-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asr-select-placeholder { color: #7186a5; }
.asr-select-chevron {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    color: #2563eb;
    transition: transform .15s ease;
}
.asr-select.is-open .asr-select-chevron { transform: rotate(180deg); }
.asr-select-menu {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    display: none;
    max-height: 240px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid #cfe0fb;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 12px 28px #102a5726, 0 2px 6px #102a5710;
}
.asr-select.is-open .asr-select-menu { display: block; }
.asr-select-option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 32px;
    padding: 8px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #173555;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color .12s ease, background .12s ease;
}
.asr-select-option:hover,
.asr-select-option:focus-visible {
    outline: none;
    background: #eaf2ff;
    color: #174ea6;
}
.asr-select-option[aria-selected="true"] {
    background: #2563eb;
    color: #fff;
    font-weight: 600;
}
.asr-select-option[aria-selected="true"]::after {
    content: "✓";
    margin-left: auto;
    padding-left: 10px;
    font-weight: 700;
}
@media (max-width: 760px) {
    .employee-toolbar .asr-select { width: 100%; }
}


/* Respect the HTML hidden attribute even when component styles define display. */
[hidden] { display: none !important; }


/* Employee registration refinement: consistent alignment, icons and controls. */
.employee-fields > label,
.employee-fields > fieldset,
.employee-fields > .status-field {
    align-self: start;
    min-width: 0;
}
.employee-fields > label {
    display: grid;
    grid-template-rows: minmax(16px, auto) auto auto;
    align-content: start;
    gap: 6px;
}
.employee-fields > label > input,
.employee-fields > label > select,
.employee-fields > label > textarea,
.employee-fields > label > .asr-select {
    grid-row: 2;
}
.employee-fields > label > small {
    grid-row: 3;
}
.employee-fields textarea { resize: none !important; }
.employee-fields .section-icon,
.employee-tabs button svg,
.employee-section-title > span svg {
    display: block;
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.employee-tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.employee-tabs button svg { width: 14px; height: 14px; flex: 0 0 auto; }
.employee-section-title > span { flex: 0 0 29px; }
.employee-section-title > span svg { width: 17px; height: 17px; }
.employee-fields em { display: none !important; }
.employee-fields .status-field { display: flex; flex-direction: column; gap: 6px; color: #102a57; font-size: 11px; font-weight: 700; }
.status-switch { display: inline-flex; align-items: center; gap: 9px; min-height: 35px; width: fit-content; cursor: pointer; user-select: none; }
.status-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch-track { position: relative; display: inline-block; width: 38px; height: 22px; border-radius: 999px; background: #cbd5e1; box-shadow: inset 0 0 0 1px #b9c7d9; transition: background .18s ease; }
.switch-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #0f172a30; transition: transform .18s ease; }
.status-switch input:checked + .switch-track { background: #2563eb; box-shadow: inset 0 0 0 1px #2563eb; }
.status-switch input:checked + .switch-track::after { transform: translateX(16px); }
.status-switch input:focus-visible + .switch-track { outline: 3px solid #2563eb30; outline-offset: 2px; }
.switch-state { min-width: 48px; color: #64748b; font-size: 11px; font-weight: 600; }
.status-switch input:checked ~ .switch-state { color: #1768d2; }
.document-fields { align-items: stretch; }
.document-upload { display: grid; grid-template-columns: 34px minmax(0,1fr) auto auto; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid #dce6f4; border-radius: 9px; background: #fbfdff; }
.document-upload-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; color: #2563eb; background: #eaf2ff; }
.document-upload-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.document-upload-details { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.document-upload-details strong { color: #102a57; font-size: 11px; }
.document-file-name { overflow: hidden; color: #7186a5; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.document-choose { display: inline-flex; align-items: center; justify-content: center; min-height: 31px; padding: 0 10px; border: 1px solid #cbdcf5; border-radius: 7px; color: #1d5ecb; background: #fff; font-size: 10px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.document-choose:hover { border-color: #2563eb; background: #eff6ff; }
.document-choose input { display: none; }
.document-remove { min-height: 31px; padding: 0 9px; border: 1px solid #f2c9ce; border-radius: 7px; color: #b42332; background: #fff7f7; font: 600 10px "Segoe UI", Arial, sans-serif; cursor: pointer; }
.document-remove:disabled { opacity: .42; cursor: not-allowed; }
.document-remove:not(:disabled):hover { background: #fee2e2; }
.employee-empty-row td { padding: 0 !important; }
.employee-empty-state { display: flex; align-items: center; flex-direction: column; justify-content: center; gap: 7px; min-height: 190px; padding: 24px; text-align: center; }
.employee-empty-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #2563eb; background: #eaf2ff; }
.employee-empty-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.employee-empty-state strong { color: #102a57; font-size: 13px; }
.employee-empty-state > span:last-child { color: #7186a5; font-size: 11px; }
@media (max-width: 950px) { .document-upload { grid-template-columns: 30px minmax(0,1fr) auto; } .document-remove { grid-column: 2 / -1; justify-self: end; } }
@media (max-width: 560px) { .document-upload { grid-template-columns: 30px minmax(0,1fr); } .document-choose, .document-remove { grid-column: 1 / -1; width: 100%; } }


/* Employee form actions live on the right side of the breadcrumb row. */
.employee-crumb-actions { justify-content: space-between; gap: 16px; min-height: 54px; flex-wrap: wrap; }
.employee-crumb-path { display: flex; align-items: center; gap: 9px; min-width: 0; flex-wrap: wrap; }
.employee-crumb-actions .employee-form-actions { position: static; display: flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; width: auto; min-height: 0; margin: 0 0 0 auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.employee-crumb-actions .employee-form-actions button { min-height: 36px; }
@media (max-width: 560px) {
  .employee-crumb-actions { align-items: flex-start; }
  .employee-crumb-actions .employee-form-actions { width: 100%; margin-left: 0; justify-content: flex-end; }
}



/* Keep one breadcrumb row; show form actions on its right only while adding an employee. */
.employee-crumb-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 54px;
    flex-wrap: wrap;
}
.employee-crumb-path {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}
.employee-crumb-actions .employee-top-actions {
    position: static;
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    width: auto;
    min-height: 0;
    margin: 0 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}
.employee-module-view:has(#employeeFormView:not([hidden])) .employee-top-actions {
    display: flex;
}
.employee-top-actions button {
    min-height: 36px;
}
@media (max-width: 600px) {
    .employee-crumb-actions {
        align-items: flex-start;
    }
    .employee-module-view:has(#employeeFormView:not([hidden])) .employee-top-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* Compact professional employee form spacing */
.employee-form-layout { gap: 8px; }
.employee-form-card, .employee-side-card { padding: 13px 15px; }
.employee-form-card { margin-bottom: 7px; }
.employee-section-title { margin-bottom: 11px; gap: 10px; }
.employee-fields { gap: 10px 14px; }
.employee-fields > label, .employee-fields > fieldset { gap: 5px; }
.employee-fields input:not([type=radio]):not([type=checkbox]):not([type=file]),
.employee-fields select, .employee-fields textarea,
.employee-fields .asr-select-trigger { min-height: 33px; padding-top: 7px; padding-bottom: 7px; }
.employee-type-fieldset { display: flex !important; flex-direction: column; justify-content: flex-start; }
.employee-type-fieldset .radio-label { display: inline-flex; align-items: center; flex-direction: row; gap: 5px; margin: 3px 12px 0 0; white-space: nowrap; }
.employee-type-fieldset legend { margin-bottom: 4px; }
@media (min-width: 701px) {
  .employee-type-fieldset { flex-direction: row !important; align-items: center; flex-wrap: wrap; column-gap: 10px; }
  .employee-type-fieldset legend { flex: 0 0 100%; }
  .employee-type-fieldset .radio-label { margin: 0 8px 0 0; }
}
@media (max-width: 480px) {
  .employee-form-card, .employee-side-card { padding: 12px; }
  .employee-fields { gap: 10px; }
}

/* Department & Role — align every field to one consistent control grid. */
.employee-form-card .employee-fields.four {
    align-items: start;
    column-gap: 16px;
    row-gap: 14px;
}

.employee-form-card .employee-fields.four > label {
    min-width: 0;
}

.employee-form-card .employee-fields.four > label > select,
.employee-form-card .employee-fields.four > label > input:not([type="radio"]):not([type="checkbox"]):not([type="file"]) {
    box-sizing: border-box;
    width: 100%;
    min-height: 35px;
}

.employee-form-card .employee-type-fieldset {
    box-sizing: border-box;
    display: grid !important;
    grid-template-columns: repeat(3, max-content);
    align-content: start;
    align-items: center;
    justify-content: start;
    column-gap: 14px;
    row-gap: 0;
    min-width: 0;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.employee-form-card .employee-type-fieldset legend {
    grid-column: 1 / -1;
    width: 100%;
    margin: 0 0 6px;
    padding: 0;
    color: #102a57;
    font: 700 11px "Segoe UI", Arial, sans-serif;
    line-height: 1.35;
}

.employee-form-card .employee-type-fieldset .radio-label {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 35px;
    margin: 0;
    padding: 0;
    color: #263b5b;
    font: 500 11px "Segoe UI", Arial, sans-serif;
    white-space: nowrap;
}

.employee-form-card .employee-type-fieldset input[type="radio"] {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #1768e8;
}

.employee-form-card .employee-fields.four > label > select:focus,
.employee-form-card .employee-fields.four > label > input:focus {
    border-color: #6b9df5;
    outline: none;
    box-shadow: 0 0 0 3px rgb(23 104 232 / 10%);
}

@media (max-width: 900px) {
    .employee-form-card .employee-fields.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .employee-form-card .employee-fields.four {
        grid-template-columns: minmax(0, 1fr);
    }

    .employee-form-card .employee-type-fieldset {
        grid-template-columns: repeat(3, minmax(0, max-content));
        column-gap: 12px;
    }
}
