:root {
    --bg: #f4f7fb;
    --ink: #172033;
    --muted: #68758a;
    --line: #e5eaf1;
    --blue: #2563eb;
    --nav: #101c35;
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, Arial, sans-serif; background: var(--bg); color: var(--ink); }

.shell { display: flex; min-height: 100vh; }
.sidebar { width: 245px; background: var(--nav); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.brand { font-weight: 800; font-size: 18px; padding: 10px 8px 24px; }
.brand.large { font-size: 22px; color: var(--nav); padding: 0; }
.sidebar a { color: #cbd5e1; text-decoration: none; padding: 12px; border-radius: 9px; }
.sidebar a:hover { background: #263653; color: #fff; }

.main { flex: 1; min-width: 0; }
.topbar { height: 68px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 28px; position: sticky; top: 0; z-index: 2; }
.content { padding: 26px; max-width: 1500px; margin: auto; }
.footer { padding: 20px 26px; color: var(--muted); font-size: 12px; }

.grid { display: grid; gap: 16px; }
.cards { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.stat, .panel { background: #fff; border: 1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: 0 4px 18px #17203308; }
.stat span { display: block; color: var(--muted); font-size: 13px; }
.stat strong { display: block; font-size: 30px; margin-top: 10px; }

.panel { margin-bottom: 20px; }
.panel h2 { font-size: 17px; margin: 0 0 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { color: var(--muted); font-weight: 650; background: #fafbfd; }

.btn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); padding: 10px 15px; border-radius: 9px; background: #fff; color: var(--ink); text-decoration: none; font-weight: 650; cursor: pointer; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.full { width: 100%; margin-top: 8px; }

.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.form-grid label, .filters label, .login-card label { display: flex; flex-direction: column; gap: 7px; color: var(--muted); font-size: 13px; }
input { width: 100%; padding: 11px 12px; border: 1px solid #d9e0ea; border-radius: 9px; background: #fff; color: var(--ink); font: inherit; }
.filters { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filters label { min-width: 170px; }
.pill { display: inline-block; background: #edf3ff; color: #2456aa; border-radius: 30px; padding: 5px 9px; font-size: 12px; }
.notice, .alert { padding: 12px 14px; background: #fff7df; border: 1px solid #f4df9d; border-radius: 9px; margin-bottom: 15px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #eaf0ff, #f7f9fc); }
.login-card { background: #fff; padding: 34px; border: 1px solid var(--line); border-radius: 18px; width: min(100%, 420px); box-shadow: 0 18px 55px #14213d12; }
.login-card h1 { font-size: 25px; margin: 22px 0 5px; }
.muted { color: var(--muted); margin: 0 0 22px; }
.login-card label { margin: 14px 0; }

@media(max-width: 950px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width: 650px) {
    .shell { display: block; }
    .sidebar { width: 100%; padding: 10px; flex-direction: row; overflow: auto; }
    .brand { white-space: nowrap; padding: 10px; }
    .sidebar a { white-space: nowrap; }
    .topbar { padding: 0 15px; }
    .content { padding: 14px; }
    .cards { grid-template-columns: 1fr 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .stat { padding: 15px; }
    .stat strong { font-size: 24px; }
}

/* Language selector and Arabic right-to-left layout */
.topbar-tools { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.language-switch { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.language-switch a { display: inline-block; padding: 6px 10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 12px; font-weight: 700; }
.language-switch a:hover { background: #e8eef9; }
.login-language { justify-content: flex-end; margin-bottom: 20px; }

html[dir="rtl"] body { font-family: "Noto Sans Arabic", Tahoma, Arial, sans-serif; }
html[dir="rtl"] .shell { direction: rtl; }
html[dir="rtl"] .sidebar { text-align: right; }
html[dir="rtl"] .topbar { direction: rtl; }
html[dir="rtl"] .topbar-tools { direction: rtl; }
html[dir="rtl"] .content, html[dir="rtl"] .panel, html[dir="rtl"] .login-card { text-align: right; }
html[dir="rtl"] th, html[dir="rtl"] td { text-align: right; }
html[dir="rtl"] .form-grid, html[dir="rtl"] .filters { direction: rtl; }
html[dir="rtl"] input { text-align: right; }
html[dir="rtl"] input[type="date"], html[dir="rtl"] input[type="number"] { direction: ltr; text-align: right; }

@media(max-width: 650px) {
    .topbar-tools { gap: 7px; font-size: 12px; }
    .topbar { gap: 8px; }
    .language-switch a { padding: 5px 7px; }
}

/* Editable company branding */
.company-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 8px 22px;
}
.company-brand-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    border-radius: 9px;
    background: #fff;
    padding: 4px;
    flex-shrink: 0;
}
.company-brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #263653;
    color: #fff;
    flex-shrink: 0;
}
.company-brand-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    overflow-wrap: anywhere;
}
.company-brand-text strong {
    color: #fff;
    font-size: 15px;
    line-height: 1.3;
}
.company-brand-text small {
    color: #cbd5e1;
    font-size: 11px;
    line-height: 1.3;
}
.logo-preview {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfd;
}
.logo-preview img {
    display: block;
    max-width: 100%;
}
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d9e0ea;
    border-radius: 9px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    resize: vertical;
}

@media(max-width: 650px) {
    .company-brand {
        padding: 6px 8px;
        flex-shrink: 0;
    }
    .company-brand-logo {
        width: 34px;
        height: 34px;
    }
    .company-brand-text strong {
        font-size: 12px;
    }
    .company-brand-text small {
        font-size: 10px;
    }
}

/* Logo sizing fix */
.sidebar .company-brand-logo {
    display: block !important;
    width: 46px !important;
    height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    min-width: 46px;
    object-fit: contain !important;
    flex: 0 0 46px;
}
.logo-preview {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}
.logo-preview img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 180px !important;
    max-height: 100px !important;
    object-fit: contain !important;
}
.logo-preview .btn {
    width: auto;
}

@media(max-width: 650px) {
    .sidebar .company-brand-logo {
        width: 34px !important;
        height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
        min-width: 34px;
        flex-basis: 34px;
    }
}

/* Head Office Dashboard - scoped styles */
.dashboard-page { display:grid; gap:20px; }
.dashboard-hero {
    position:relative; overflow:hidden; display:flex; align-items:center;
    justify-content:space-between; gap:24px; min-height:184px; padding:28px 32px;
    border-radius:20px; color:#fff;
    background:linear-gradient(115deg,#14213d 0%,#1e3a66 58%,#2563a6 100%);
    box-shadow:0 14px 34px rgba(20,33,61,.16);
}
.dashboard-hero::after {
    content:""; position:absolute; width:310px; height:310px; border-radius:50%;
    inset-inline-end:18%; top:-190px; border:1px solid rgba(255,255,255,.12);
    box-shadow:0 0 0 35px rgba(255,255,255,.035),0 0 0 72px rgba(255,255,255,.025);
    pointer-events:none;
}
.dashboard-hero-copy,.dashboard-date-card { position:relative; z-index:1; }
.dashboard-eyebrow,.dashboard-section-kicker {
    display:block; margin-bottom:8px; color:#8fbfff; font-size:11px;
    font-weight:800; letter-spacing:.12em; text-transform:uppercase;
}
.dashboard-hero h1 { margin:0; color:#fff; font-size:clamp(23px,3vw,32px); line-height:1.25; }
.dashboard-hero p { margin:9px 0 0; color:#d5e3f6; font-size:13px; }
.dashboard-date-card {
    display:flex; flex-direction:column; gap:5px; min-width:150px; padding:15px 18px;
    border:1px solid rgba(255,255,255,.2); border-radius:14px;
    background:rgba(255,255,255,.1); backdrop-filter:blur(8px);
}
.dashboard-date-card span,.dashboard-date-card small { color:#d5e3f6; font-size:11px; }
.dashboard-date-card strong { color:#fff; font-size:21px; }
.dashboard-kpis { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.dashboard-kpi {
    position:relative; min-width:0; overflow:hidden; padding:18px 19px 16px;
    border:1px solid var(--line); border-radius:15px; background:#fff;
    box-shadow:0 4px 16px rgba(23,32,51,.035);
}
.dashboard-kpi::before {
    content:""; position:absolute; inset-inline-start:0; top:0; bottom:0;
    width:3px; background:var(--kpi-accent);
}
.kpi-blue { --kpi-accent:#3978df; --kpi-soft:#eaf1ff; --kpi-color:#285fc0; }
.kpi-green { --kpi-accent:#18a875; --kpi-soft:#e6f7ef; --kpi-color:#13845d; }
.kpi-amber { --kpi-accent:#e7a32d; --kpi-soft:#fff4df; --kpi-color:#a66b10; }
.kpi-red { --kpi-accent:#e36b6b; --kpi-soft:#fff0f0; --kpi-color:#bd4b4b; }
.kpi-violet { --kpi-accent:#8b72d8; --kpi-soft:#f1edff; --kpi-color:#6b53b8; }
.kpi-slate { --kpi-accent:#6f829a; --kpi-soft:#edf1f6; --kpi-color:#50627a; }
.kpi-topline { display:flex; align-items:center; gap:10px; min-width:0; }
.kpi-icon {
    display:grid; place-items:center; width:34px; height:34px; flex:0 0 34px;
    border-radius:10px; background:var(--kpi-soft); color:var(--kpi-color);
    font-size:19px; font-weight:800;
}
.kpi-label { color:var(--muted); font-size:12px; font-weight:700; }
.kpi-value { display:block; margin-top:12px; color:var(--ink); font-size:30px; line-height:1; }
.dashboard-kpi > small { display:block; min-height:28px; margin-top:8px; color:var(--muted); font-size:10px; line-height:1.45; }
.dashboard-main-grid {
    display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr);
    gap:18px; align-items:stretch;
}
.dashboard-panel {
    min-width:0; padding:21px; border:1px solid var(--line); border-radius:16px;
    background:#fff; box-shadow:0 4px 16px rgba(23,32,51,.035);
}
.dashboard-panel-heading {
    display:flex; align-items:center; justify-content:space-between;
    gap:14px; margin-bottom:18px;
}
.dashboard-panel-heading h2 { margin:0; color:var(--ink); font-size:17px; }
.dashboard-panel-heading .dashboard-section-kicker { margin-bottom:4px; color:#7890ad; font-size:9px; }
.dashboard-total-badge {
    padding:7px 10px; border-radius:20px; background:#edf3ff;
    color:#315fa8; font-size:11px; font-weight:750; white-space:nowrap;
}
.dashboard-status-list { display:grid; gap:14px; }
.dashboard-status-meta {
    display:flex; align-items:center; justify-content:space-between;
    gap:12px; margin-bottom:6px; color:#45536a; font-size:12px;
}
.dashboard-status-meta > span { display:inline-flex; align-items:center; gap:8px; }
.dashboard-status-meta strong { color:var(--ink); font-size:12px; }
.dashboard-status-meta strong small { color:var(--muted); font-size:10px; font-weight:600; }
.status-dot { display:inline-block; width:8px; height:8px; border-radius:50%; background:#94a3b8; }
.dot-present,.fill-present { background:#19a875; }
.dot-late,.fill-late { background:#e5a32e; }
.dot-incomplete,.fill-incomplete { background:#5489dc; }
.dot-absent,.fill-absent { background:#df6868; }
.dot-leave,.fill-leave { background:#8b72d8; }
.dot-holiday,.fill-holiday { background:#6e9ca8; }
.dashboard-progress-track { height:7px; overflow:hidden; border-radius:20px; background:#eff2f6; }
.dashboard-progress-fill { display:block; height:100%; border-radius:inherit; }
.dashboard-panel-footer {
    display:flex; justify-content:space-between; gap:12px; margin-top:19px;
    padding-top:13px; border-top:1px solid var(--line); color:var(--muted); font-size:11px;
}
.dashboard-panel-footer strong { color:var(--ink); font-size:12px; }
.dashboard-empty-state {
    display:flex; min-height:220px; flex-direction:column; align-items:center;
    justify-content:center; gap:9px; padding:22px; text-align:center; color:var(--muted);
}
.dashboard-empty-state strong { color:#42516a; font-size:13px; }
.dashboard-empty-state span:last-child { font-size:11px; }
.empty-state-icon {
    display:grid; place-items:center; width:42px; height:42px; margin-bottom:3px;
    border-radius:14px; background:#f0f4fa; color:#69809d; font-size:23px;
}
.dashboard-empty-state.compact { min-height:125px; }
.dashboard-branch-list { display:grid; }
.dashboard-branch-item {
    display:flex; align-items:center; gap:11px; padding:13px 0;
    border-bottom:1px solid #eef1f5;
}
.dashboard-branch-item:first-child { padding-top:2px; }
.dashboard-branch-item:last-child { padding-bottom:2px; border-bottom:0; }
.branch-monogram {
    display:grid; place-items:center; width:37px; height:37px; flex:0 0 37px;
    border-radius:11px; background:#edf3ff; color:#315fa8; font-size:15px; font-weight:800;
}
.branch-details { display:flex; min-width:0; flex:1; flex-direction:column; gap:3px; }
.branch-details strong { overflow:hidden; color:var(--ink); font-size:12px; text-overflow:ellipsis; }
.branch-details small,.branch-details span { color:var(--muted); font-size:10px; }
.branch-record-count { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.branch-record-count strong { color:var(--ink); font-size:17px; }
.branch-record-count small { color:var(--muted); font-size:9px; white-space:nowrap; }
.dashboard-text-link { color:#3268b8; font-size:11px; font-weight:750; text-decoration:none; white-space:nowrap; }
.dashboard-text-link:hover { text-decoration:underline; }
.dashboard-table-wrap { margin:0 -4px; }
.dashboard-table th { background:#f8fafc; font-size:10px; text-transform:uppercase; }
.dashboard-table td { padding-top:13px; padding-bottom:13px; color:#48566b; font-size:11px; }
.dashboard-table td strong { color:var(--ink); font-size:11px; }
.employee-code { color:#315fa8; font-weight:750; }
.dashboard-status-badge {
    display:inline-flex; align-items:center; gap:6px; padding:5px 8px;
    border-radius:20px; font-size:10px; font-weight:750;
}
.dashboard-status-badge i { width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-present { background:#e8f7ef; color:#13845d; }
.badge-late { background:#fff4df; color:#a66b10; }
.badge-incomplete { background:#eaf1ff; color:#315fa8; }
.badge-absent { background:#fff0f0; color:#bd4b4b; }
.badge-leave { background:#f1edff; color:#6b53b8; }
.badge-holiday { background:#eaf4f5; color:#437d87; }
.dashboard-table-empty { padding:28px !important; text-align:center !important; color:var(--muted) !important; }
.dashboard-quick-section { padding:2px 0 4px; }
.dashboard-quick-section > .dashboard-panel-heading { margin-bottom:13px; }
.dashboard-quick-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.dashboard-quick-link {
    display:grid; grid-template-columns:36px minmax(0,1fr); grid-template-rows:auto auto;
    column-gap:11px; align-items:center; padding:14px; border:1px solid var(--line);
    border-radius:13px; background:#fff; color:var(--ink); text-decoration:none;
    transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease;
}
.dashboard-quick-link:hover { transform:translateY(-2px); border-color:#c7d7ed; box-shadow:0 7px 18px rgba(23,32,51,.06); }
.dashboard-quick-link > span {
    display:grid; grid-row:1 / span 2; place-items:center; width:36px; height:36px;
    border-radius:10px; background:#edf3ff; color:#315fa8; font-size:19px; font-weight:800;
}
.dashboard-quick-link strong { overflow:hidden; font-size:11px; text-overflow:ellipsis; }
.dashboard-quick-link small { margin-top:3px; color:var(--muted); font-size:9px; line-height:1.4; }
html[dir="rtl"] .dashboard-page { direction:rtl; }
html[dir="rtl"] .dashboard-table th,html[dir="rtl"] .dashboard-table td { text-align:right; }
html[dir="rtl"] .branch-record-count { align-items:flex-start; }
@media(max-width:1100px) {
    .dashboard-main-grid { grid-template-columns:1fr; }
}
@media(max-width:700px) {
    .dashboard-hero { align-items:flex-start; flex-direction:column; padding:22px; }
    .dashboard-date-card { min-width:0; width:100%; }
    .dashboard-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
    .dashboard-kpi { padding:14px; }
    .kpi-value { font-size:25px; }
    .dashboard-panel { padding:15px; }
    .dashboard-quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:420px) {
    .dashboard-kpis,.dashboard-quick-grid { grid-template-columns:1fr; }
    .dashboard-hero h1 { font-size:22px; }
    .dashboard-panel-heading { align-items:flex-start; flex-wrap:wrap; }
}


/* Premium Head Office Admin Dashboard */
.ho-dashboard {
    display:grid;
    gap:22px;
    max-width:1600px;
    margin:0 auto;
}
.ho-welcome {
    position:relative;
    isolation:isolate;
    overflow:hidden;
    min-height:205px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:25px;
    padding:34px 38px;
    border-radius:22px;
    color:#fff;
    background:linear-gradient(112deg,#101c35 0%,#172e52 52%,#245b85 100%);
    box-shadow:0 14px 34px rgba(16,28,53,.16);
}
.ho-welcome > div:first-child { position:relative; z-index:2; }
.ho-eyebrow {
    color:#9ec8ed;
    font-size:10px;
    font-weight:800;
    letter-spacing:.17em;
}
.ho-welcome h1 {
    margin:12px 0 7px;
    color:#fff;
    font-size:clamp(27px,3vw,38px);
    font-weight:800;
    letter-spacing:-.7px;
}
.ho-welcome p { margin:0; color:#d2e0ed; font-size:13px; }
.ho-welcome-meta {
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:24px;
    color:#c4d7e9;
    font-size:11px;
}
.ho-meta-dot { width:5px; height:5px; border-radius:50%; background:#79d4b1; }
.ho-date-box {
    position:relative;
    z-index:2;
    min-width:145px;
    padding:17px 20px;
    border:1px solid rgba(255,255,255,.2);
    border-radius:16px;
    background:rgba(255,255,255,.09);
    text-align:center;
    backdrop-filter:blur(8px);
}
.ho-date-box span { display:block; color:#bdd5e9; font-size:9px; font-weight:800; letter-spacing:.12em; }
.ho-date-box strong { display:block; margin:3px 0; color:#fff; font-size:45px; line-height:1.2; }
.ho-date-box div { color:#d7e6f2; font-size:11px; }
.ho-decoration {
    position:absolute;
    z-index:0;
    width:290px;
    height:290px;
    border:1px solid rgba(255,255,255,.10);
    border-radius:50%;
    pointer-events:none;
}
.ho-decoration-one { inset-inline-end:12%; top:-190px; box-shadow:0 0 0 35px rgba(255,255,255,.025),0 0 0 70px rgba(255,255,255,.02); }
.ho-decoration-two { inset-inline-end:-110px; bottom:-225px; width:350px; height:350px; }

.ho-kpis {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:16px;
}
.ho-kpi {
    position:relative;
    min-width:0;
    padding:21px 22px 19px;
    overflow:hidden;
    border:1px solid #e8edf4;
    border-radius:17px;
    background:#fff;
    box-shadow:0 5px 18px rgba(23,32,51,.045);
}
.ho-kpi::before {
    content:"";
    position:absolute;
    top:0;
    inset-inline-start:0;
    width:100%;
    height:3px;
    background:var(--ho-accent);
}
.ho-kpi-blue { --ho-accent:#4384d9; --ho-soft:#edf4ff; --ho-ink:#316db9; }
.ho-kpi-green { --ho-accent:#1ca77a; --ho-soft:#eaf8f1; --ho-ink:#14845e; }
.ho-kpi-orange { --ho-accent:#e5a23b; --ho-soft:#fff6e7; --ho-ink:#a97019; }
.ho-kpi-purple { --ho-accent:#8873d5; --ho-soft:#f2efff; --ho-ink:#6d56b7; }
.ho-kpi-heading { display:flex; justify-content:space-between; align-items:center; gap:8px; color:#64748b; font-size:12px; font-weight:700; }
.ho-kpi-symbol {
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    border-radius:12px;
    background:var(--ho-soft);
    color:var(--ho-ink);
    font-size:19px;
    font-weight:800;
}
.ho-kpi > strong { display:block; margin-top:13px; color:#16253b; font-size:35px; font-weight:800; line-height:1; }
.ho-kpi > small { display:block; margin-top:10px; color:#8793a5; font-size:10px; line-height:1.5; }
.ho-kpi-link { display:inline-block; margin-top:9px; color:var(--ho-ink); font-size:10px; font-weight:800; text-decoration:none; }

.ho-main-grid {
    display:grid;
    grid-template-columns:minmax(0,1.55fr) minmax(300px,.85fr);
    gap:18px;
    align-items:stretch;
}
.ho-card {
    min-width:0;
    padding:24px;
    border:1px solid #e7ecf3;
    border-radius:18px;
    background:#fff;
    box-shadow:0 5px 20px rgba(23,32,51,.045);
}
.ho-card-heading {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:15px;
    margin-bottom:19px;
}
.ho-card-kicker { display:block; margin-bottom:6px; color:#8292a8; font-size:9px; font-weight:800; letter-spacing:.15em; }
.ho-card-heading h2 { margin:0; color:#1b2a41; font-size:17px; font-weight:800; }
.ho-card-heading p { margin:5px 0 0; color:#8995a5; font-size:10px; }
.ho-period-label { padding:8px 12px; border-radius:9px; background:#f1f5fa; color:#63748b; font-size:10px; font-weight:700; white-space:nowrap; }
.ho-chart-legend { display:flex; align-items:center; gap:20px; margin:5px 0 12px; color:#7a8798; font-size:10px; }
.ho-chart-legend span { display:flex; align-items:center; gap:7px; }
.ho-legend-present,.ho-legend-late { width:8px; height:8px; display:inline-block; border-radius:3px; background:#4388d5; }
.ho-legend-late { background:#e8ae48; }
.ho-chart {
    display:grid;
    grid-template-columns:repeat(7,minmax(0,1fr));
    gap:10px;
    align-items:end;
    min-height:195px;
    padding:12px 4px 0;
    border-bottom:1px solid #e9edf3;
    background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,#f0f3f7 48px);
}
.ho-chart-column { min-width:0; height:185px; display:flex; flex-direction:column; align-items:center; justify-content:flex-end; gap:9px; }
.ho-chart-number { color:#617087; font-size:10px; font-weight:800; }
.ho-chart-track { display:flex; height:140px; width:100%; align-items:flex-end; justify-content:center; }
.ho-chart-bar {
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    width:min(35px,70%);
    min-height:3px;
    overflow:hidden;
    border-radius:7px 7px 2px 2px;
    background:#eef3fa;
}
.ho-bar-normal { display:block; width:100%; background:linear-gradient(180deg,#5b9add,#3876c2); }
.ho-bar-late { display:block; width:100%; background:#e8ae48; }
.ho-chart-day { min-height:15px; color:#748297; font-size:9px; text-align:center; }
.ho-chart-footer {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin-top:17px;
    padding-top:15px;
    border-top:1px solid #edf0f5;
}
.ho-chart-footer div { display:flex; flex-direction:column; gap:4px; }
.ho-chart-footer strong { color:#20334d; font-size:17px; }
.ho-chart-footer span { color:#8390a2; font-size:9px; }

.ho-branch-card { display:flex; flex-direction:column; }
.ho-heading-link {
    display:grid;
    place-items:center;
    width:33px;
    height:33px;
    border-radius:10px;
    background:#eff5fc;
    color:#3975b7;
    font-size:17px;
    font-weight:800;
    text-decoration:none;
}
.ho-branch-list { flex:1; }
.ho-branch-row {
    display:flex;
    align-items:center;
    gap:11px;
    padding:15px 0;
    border-bottom:1px solid #edf0f4;
}
.ho-branch-row:first-child { padding-top:2px; }
.ho-branch-row:last-child { border-bottom:0; }
.ho-branch-icon {
    display:grid;
    place-items:center;
    width:38px;
    height:38px;
    flex:0 0 38px;
    border-radius:12px;
    background:#edf4fc;
    color:#3977ba;
    font-size:19px;
}
.ho-branch-info { display:flex; min-width:0; flex:1; flex-direction:column; gap:4px; }
.ho-branch-info strong { color:#24344b; font-size:12px; }
.ho-branch-info small,.ho-branch-info span { color:#8793a4; font-size:9px; }
.ho-branch-count { display:flex; flex-direction:column; align-items:center; gap:3px; }
.ho-branch-count strong { color:#253750; font-size:18px; }
.ho-branch-count small { color:#8a96a6; font-size:9px; }
.ho-branch-footer {
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:14px;
    padding-top:14px;
    border-top:1px solid #edf0f4;
    color:#7f8da1;
    font-size:10px;
}
.ho-branch-footer strong { color:#223550; font-size:16px; }
.ho-no-data { display:grid; flex:1; place-items:center; min-height:120px; color:#8390a2; font-size:12px; }

.ho-recent-card { padding:24px 25px 10px; }
.ho-view-link { padding:8px 12px; border-radius:9px; background:#eff5fc; color:#3975b7; font-size:10px; font-weight:800; text-decoration:none; white-space:nowrap; }
.ho-table { white-space:nowrap; }
.ho-table th { padding:13px 15px; background:#f6f8fb; color:#8290a3; font-size:9px; font-weight:800; letter-spacing:.07em; }
.ho-table td { padding:14px 15px; border-bottom:1px solid #edf0f4; color:#5f6d80; font-size:11px; }
.ho-table tbody tr:last-child td { border-bottom:0; }
.ho-table td strong { color:#24344b; font-size:11px; }
.ho-employee-code { color:#3975b7; font-size:11px; font-weight:800; }
.ho-status { display:inline-flex; padding:5px 9px; border-radius:20px; font-size:9px; font-weight:800; }
.ho-status-present { background:#e9f7ef; color:#16835c; }
.ho-status-late { background:#fff5e5; color:#a9731c; }
.ho-status-incomplete { background:#edf3ff; color:#3869b0; }
.ho-status-absent { background:#fff0f0; color:#bd4d4d; }
.ho-status-leave { background:#f1edff; color:#6d56b7; }
.ho-status-holiday { background:#eaf4f5; color:#437d87; }
.ho-empty-row { padding:30px !important; text-align:center !important; color:#8995a5 !important; }
.ho-footer-note { display:flex; justify-content:space-between; gap:12px; padding:0 3px 8px; color:#98a3b2; font-size:9px; }

html[dir="rtl"] .ho-dashboard { direction:rtl; }
html[dir="rtl"] .ho-table th,html[dir="rtl"] .ho-table td { text-align:right; }
html[dir="rtl"] .ho-kpi::before { inset-inline-start:0; }
@media(max-width:1100px) {
    .ho-main-grid { grid-template-columns:1fr; }
}
@media(max-width:800px) {
    .ho-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(max-width:600px) {
    .ho-welcome { min-height:0; flex-direction:column; align-items:flex-start; padding:25px 22px; }
    .ho-date-box { display:grid; grid-template-columns:auto 1fr; align-items:center; gap:3px 12px; width:100%; text-align:start; }
    .ho-date-box span { grid-column:1 / -1; }
    .ho-date-box strong { grid-row:2 / span 2; font-size:36px; }
    .ho-kpis { gap:10px; }
    .ho-kpi { padding:15px; }
    .ho-kpi > strong { font-size:28px; }
    .ho-kpi-heading { font-size:10px; }
    .ho-kpi-symbol { width:32px; height:32px; }
    .ho-card { padding:17px; }
    .ho-chart { gap:4px; }
    .ho-chart-day { font-size:8px; }
    .ho-chart-footer { gap:6px; flex-wrap:wrap; }
    .ho-chart-footer span { font-size:8px; }
    .ho-footer-note { flex-direction:column; }
}
@media(max-width:380px) {
    .ho-kpis { grid-template-columns:1fr 1fr; }
    .ho-kpi-heading { align-items:flex-start; }
    .ho-kpi-heading > span:first-child { max-width:85px; }
}

/* Dashboard typography and spacing enlargement */
.ho-dashboard { gap: 26px; }

.ho-welcome {
    min-height: 225px;
    padding: 40px;
}
.ho-eyebrow { font-size: 12px; }
.ho-welcome h1 { font-size: clamp(32px, 3.2vw, 42px); }
.ho-welcome p { font-size: 15px; }
.ho-welcome-meta { font-size: 13px; }
.ho-date-box { min-width: 165px; padding: 20px 23px; }
.ho-date-box span { font-size: 11px; }
.ho-date-box strong { font-size: 52px; }
.ho-date-box div { font-size: 13px; }

.ho-kpis { gap: 19px; }
.ho-kpi { padding: 25px 25px 22px; }
.ho-kpi-heading { font-size: 15px; }
.ho-kpi-symbol { width: 43px; height: 43px; font-size: 22px; }
.ho-kpi > strong { font-size: 43px; margin-top: 17px; }
.ho-kpi > small { font-size: 12px; }
.ho-kpi-link { font-size: 12px; }

.ho-card { padding: 28px; }
.ho-card-heading h2 { font-size: 21px; }
.ho-card-heading p { font-size: 12px; }
.ho-card-kicker { font-size: 11px; }
.ho-period-label { font-size: 12px; }
.ho-chart-legend { font-size: 12px; }
.ho-chart { min-height: 220px; gap: 14px; }
.ho-chart-column { height: 205px; }
.ho-chart-track { height: 155px; }
.ho-chart-day { font-size: 11px; }
.ho-chart-number { font-size: 12px; }
.ho-chart-footer strong { font-size: 20px; }
.ho-chart-footer span { font-size: 11px; }

.ho-branch-row { padding: 18px 0; gap: 14px; }
.ho-branch-icon { width: 44px; height: 44px; flex-basis: 44px; font-size: 22px; }
.ho-branch-info strong { font-size: 15px; }
.ho-branch-info small, .ho-branch-info span { font-size: 11px; }
.ho-branch-count strong { font-size: 21px; }
.ho-branch-count small { font-size: 10px; }
.ho-branch-footer { font-size: 12px; }
.ho-branch-footer strong { font-size: 19px; }

.ho-table th { font-size: 11px; padding: 16px; }
.ho-table td { font-size: 13px; padding: 17px 16px; }
.ho-table td strong { font-size: 13px; }
.ho-employee-code { font-size: 13px; }
.ho-status { font-size: 11px; padding: 6px 11px; }
.ho-empty-row { font-size: 13px; }
.ho-view-link { font-size: 12px; padding: 10px 14px; }
.ho-heading-link { width: 38px; height: 38px; font-size: 20px; }
.ho-footer-note { font-size: 11px; }

@media(max-width: 800px) {
    .ho-welcome { padding: 28px; }
    .ho-welcome h1 { font-size: 29px; }
    .ho-kpi { padding: 19px; }
    .ho-kpi-heading { font-size: 13px; }
    .ho-kpi > strong { font-size: 35px; }
    .ho-card { padding: 20px; }
    .ho-card-heading h2 { font-size: 19px; }
}

@media(max-width: 600px) {
    .ho-welcome { padding: 23px 19px; }
    .ho-welcome h1 { font-size: 26px; }
    .ho-welcome p { font-size: 13px; }
    .ho-date-box strong { font-size: 38px; }
    .ho-kpi { padding: 15px; }
    .ho-kpi-heading { font-size: 11px; }
    .ho-kpi > strong { font-size: 30px; }
    .ho-kpi > small { font-size: 10px; }
    .ho-card { padding: 16px; }
    .ho-card-heading h2 { font-size: 17px; }
    .ho-chart-day { font-size: 9px; }
    .ho-chart-footer strong { font-size: 17px; }
    .ho-chart-footer span { font-size: 9px; }
    .ho-branch-info strong { font-size: 13px; }
    .ho-table th { font-size: 10px; }
    .ho-table td { font-size: 12px; padding: 13px 11px; }
    .ho-table td strong { font-size: 12px; }
}
