/* ============================================================
   HAKIM - INSURANCE PAYMENTS DASHBOARD STYLE
   ------------------------------------------------------------
   Matches the Masterly Insurance Payments inspiration:
   * Dark navy sidebar with white text + orange accent on active item
   * Clean light gray workspace
   * White KPI cards with colored icon circles
   * Refined data tables, status pills, alert rows, activity feed
   ============================================================ */

/* === TOKENS === */
:root, [data-bs-theme="light"] {
    --hk-sidebar:        #1A2236;
    --hk-sidebar-2:      #232C42;
    --hk-sidebar-hover:  #2B3551;
    --hk-sidebar-line:   #2C3550;
    --hk-sidebar-text:   #FFFFFF;
    --hk-sidebar-text-2: #A4ACC4;
    --hk-sidebar-text-3: #6B7494;

    --hk-bg:             #F5F7FA;
    --hk-paper:          #FFFFFF;
    --hk-paper-2:        #FAFBFC;

    --hk-line:           #E7EAF0;
    --hk-line-strong:    #D5DAE3;
    --hk-line-soft:      #F0F2F6;

    --hk-ink:            #000000;  /* pure black for primary */
    --hk-ink-2:          #1A1F2E;  /* very dark for secondary */
    --hk-ink-3:          #2A2F3E;  /* dark for "muted" */
    --hk-ink-4:          #5A5F6E;  /* medium for placeholders only */

    /* Brand accent (Hakim orange) */
    --hk-accent:         #F26722;
    --hk-accent-hover:   #D85510;
    --hk-accent-deep:    #B84408;
    --hk-accent-soft:    #FFEFE5;
    --hk-accent-ink:     #8A2F08;

    /* Semantic */
    --hk-blue:    #3B82F6; --hk-blue-soft:    #EAF2FE;
    --hk-cyan:    #06B6D4; --hk-cyan-soft:    #CFFAFE;
    --hk-green:   #10B981; --hk-green-soft:   #E5F6EE;
    --hk-purple:  #8B5CF6; --hk-purple-soft:  #F0EBFE;
    --hk-orange:  #F59E0B; --hk-orange-soft:  #FEF3DD;
    --hk-red:     #EF4444; --hk-red-soft:     #FDECEC;
    --hk-yellow:  #EAB308; --hk-yellow-soft:  #FCF3CB;
    --hk-teal:    #14B8A6; --hk-teal-soft:    #DAF5F0;

    --hk-font: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --hk-font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;

    --r-xs: 4px;
    --r-sm: 6px;
    --r:    8px;
    --r-lg: 10px;
    --r-xl: 14px;

    --rail-w: 240px;
    --top-h: 64px;

    --bs-primary:     #F26722;
    --bs-primary-rgb: 242, 103, 34;
    --bs-body-color:  #1A1F2E;
    --bs-body-bg:     #F5F7FA;
    --bs-border-color:#E7EAF0;
}

* { box-sizing: border-box; }

html, body {
    background: var(--hk-bg) !important;
    color: var(--hk-ink);
    font-family: var(--hk-font);
    font-size: 16px;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.app-root, .app-page, .app-wrapper, #kt_app_root, #kt_app_page, #kt_app_wrapper {
    margin: 0 !important;
    padding: 0 !important;
}
.app-main, #kt_app_main {
    padding: 0 !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    margin-left: var(--rail-w) !important;
}
@media (max-width: 991.98px) {
    .app-main, #kt_app_main { margin-left: 0 !important; }
}
.hk-top { margin: 0 !important; border-radius: 0 !important; border-left: none !important; border-top: none !important; border-right: none !important; }

h1, h2, h3, h4, h5, h6 {
    color: var(--hk-ink);
    font-family: var(--hk-font);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 0;
    line-height: 1.2;
}

a { color: var(--hk-ink); text-decoration: none; }
a:hover { color: var(--hk-accent-deep); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hk-line-strong); border-radius: 999px; border: 2px solid var(--hk-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--hk-ink-3); }

/* Metronic gray overrides */
.text-gray-900, .text-dark, .text-gray-800 { color: var(--hk-ink) !important; }
.text-gray-700, .text-gray-600 { color: var(--hk-ink-2) !important; }
.text-gray-500, .text-muted, .text-gray-400 { color: var(--hk-ink-3) !important; }

/* === APP SHELL === */
.app-header-separator { display: none !important; }
.app-aside { display: none !important; }
.app-header { background: transparent !important; border: none !important; }

body, .app-default, .app-root, .app-page, .app-wrapper, .app-main, .app-content {
    background: var(--hk-bg) !important;
}

/* === DARK SIDEBAR - fixed to full viewport height === */
.app-sidebar, .hk-rail {
    background: var(--hk-sidebar) !important;
    color: var(--hk-sidebar-text) !important;
    border-right: none !important;
    width: var(--rail-w) !important;
    padding: 0 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    overflow-y: auto !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
}
.app-sidebar::-webkit-scrollbar { width: 4px; }
.app-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border: none; }

/* Sign-out item: subtle red on hover */
.app-sidebar .menu .menu-link.hk-rail__signout:hover {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #FCA5A5 !important;
}
.app-sidebar .menu .menu-link.hk-rail__signout:hover i,
.app-sidebar .menu .menu-link.hk-rail__signout:hover .menu-icon i {
    color: #FCA5A5 !important;
}
[data-kt-app-sidebar-minimize="on"] .app-sidebar { width: var(--rail-w) !important; }

.hk-rail__brand {
    height: var(--top-h);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    border-bottom: 1px solid var(--hk-sidebar-line);
}
.hk-rail__brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}
.hk-rail__brand-name {
    font-weight: 800;
    font-size: 20px;
    color: var(--hk-sidebar-text);
    letter-spacing: -0.02em;
}

.hk-rail__section-label {
    padding: 18px 20px 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hk-sidebar-text-2);
}

.app-sidebar .menu, .hk-rail__menu {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 0 10px;
}
.app-sidebar .menu .menu-item { padding: 0; }
.app-sidebar .menu .menu-link, .hk-rail__item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 11px 14px !important;
    border-radius: var(--r-sm) !important;
    color: var(--hk-sidebar-text-2) !important;
    font-size: 13.5px;
    font-weight: 600;
    background: transparent;
    transition: background 100ms ease, color 100ms ease;
    position: relative;
    text-decoration: none;
}
.app-sidebar .menu .menu-link .menu-icon i, .hk-rail__item i {
    color: var(--hk-sidebar-text-2) !important;
    font-size: 18px !important;
    margin: 0 !important;
}
.app-sidebar .menu .menu-link .menu-title, .hk-rail__item span {
    color: inherit !important;
    font-size: 13.5px;
    font-weight: 600;
}
.app-sidebar .menu .menu-link:hover, .hk-rail__item:hover {
    background: var(--hk-sidebar-hover) !important;
    color: var(--hk-sidebar-text) !important;
}
.app-sidebar .menu .menu-link:hover i, .hk-rail__item:hover i {
    color: var(--hk-sidebar-text) !important;
}
.app-sidebar .menu .menu-link.active, .hk-rail__item.active {
    background: var(--hk-sidebar-2) !important;
    color: var(--hk-sidebar-text) !important;
    border: none !important;
    box-shadow: none !important;
}
.app-sidebar .menu .menu-link.active::before, .hk-rail__item.active::before {
    content: "";
    position: absolute;
    left: -10px; top: 8px; bottom: 8px;
    width: 3px;
    background: var(--hk-accent);
    border-radius: 0 2px 2px 0;
}
.app-sidebar .menu .menu-link.active i, .hk-rail__item.active i {
    color: var(--hk-accent) !important;
}

.hk-rail__subitem {
    display: flex;
    align-items: center;
    padding: 6px 14px 6px 40px !important;
    color: var(--hk-sidebar-text-2) !important;
    font-size: 13px;
    text-decoration: none;
    border-radius: var(--r-sm);
}
.hk-rail__subitem:hover {
    background: var(--hk-sidebar-hover);
    color: var(--hk-sidebar-text) !important;
}
.hk-rail__subitem.active {
    color: var(--hk-accent) !important;
    font-weight: 600;
}

.hk-rail__foot {
    padding: 16px 14px 18px;
    margin-top: auto;
    border-top: 1px solid var(--hk-sidebar-line);
}
.hk-rail__help {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--r-sm);
    background: var(--hk-sidebar-2);
    color: var(--hk-sidebar-text);
    font-size: 13.5px;
    text-decoration: none;
}
.hk-rail__help:hover { background: var(--hk-sidebar-hover); color: var(--hk-sidebar-text); }
.hk-rail__help i { color: var(--hk-sidebar-text-2); font-size: 17px; }
.hk-rail__help .t { display: block; font-weight: 600; }
.hk-rail__help .s { display: block; color: var(--hk-sidebar-text-2); font-size: 13px; }

/* === TOPBAR === */
.hk-top {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(10px, 1vw, 14px) clamp(14px, 1.6vw, 26px);
    background: var(--hk-paper);
    border-bottom: 1px solid var(--hk-line);
    position: sticky;
    top: 0;
    z-index: 30;
    gap: clamp(10px, 1.2vw, 20px);
    flex-wrap: wrap;
}
.hk-top__title {
    display: flex;
    flex-direction: column;
    flex: 1 1 200px;
    min-width: 0;
}
.hk-top__title .t {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 800;
    color: var(--hk-ink);
    letter-spacing: -0.025em;
    line-height: 1.2;
    min-width: 0;
}
.hk-top__title .t i {
    color: var(--hk-accent);
    font-size: clamp(20px, 1.9vw, 26px) !important;
    flex-shrink: 0;
}
.hk-top__title .s {
    font-size: clamp(12.5px, 1.1vw, 14px);
    color: var(--hk-ink-2);
    margin-top: 2px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hk-search {
    position: relative;
    width: clamp(180px, 22vw, 320px);
}
@media (max-width: 760px) { .hk-top .hk-search { display: none !important; } }
.hk-search input {
    width: 100%;
    height: 34px;
    padding: 6px 12px 6px 34px;
    background: var(--hk-bg);
    border: 1px solid var(--hk-line);
    border-radius: var(--r);
    font-size: 13.5px;
    color: var(--hk-ink);
    font-family: var(--hk-font);
    transition: border-color 100ms, box-shadow 100ms;
}
.hk-search input::placeholder { color: var(--hk-ink-4); }
.hk-search input:focus {
    outline: none;
    border-color: var(--hk-accent);
    background: var(--hk-paper);
    box-shadow: 0 0 0 3px rgba(242,103,34,0.12);
}
.hk-search__ic {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--hk-ink-3);
    font-size: 14px;
    pointer-events: none;
}

.hk-top__right { display: flex; align-items: center; gap: clamp(6px, 0.8vw, 12px); flex-shrink: 0; }
@media (max-width: 920px) { .hk-userchip .d-md-flex { display: none !important; } .hk-userchip { padding: 5px !important; } }
.hk-iconbtn {
    width: 42px; height: 42px;
    border-radius: var(--r);
    background: var(--hk-bg);
    border: 1px solid var(--hk-line);
    color: var(--hk-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 100ms, border-color 100ms, color 100ms;
    text-decoration: none;
}
.hk-iconbtn i {
    font-size: 22px !important;
    color: var(--hk-ink) !important;
}
.hk-iconbtn:hover {
    background: var(--hk-accent-soft);
    border-color: var(--hk-accent);
    color: var(--hk-accent-deep);
}
.hk-iconbtn:hover i { color: var(--hk-accent-deep) !important; }
.hk-iconbtn .dot {
    position: absolute;
    top: -4px; right: -4px;
    min-width: 20px; height: 20px;
    background: var(--hk-red);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid var(--hk-paper);
}

.hk-userchip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    background: transparent;
    border-radius: var(--r-lg);
    color: var(--hk-ink);
    text-decoration: none;
    transition: background 100ms;
}
.hk-userchip:hover { background: var(--hk-bg); color: var(--hk-ink); }
.hk-userchip__av {
    width: 32px; height: 32px;
    border-radius: 999px;
    background: var(--hk-accent-soft);
    color: var(--hk-accent-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
}
.hk-userchip__name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--hk-ink);
    line-height: 1.2;
}
.hk-userchip__role {
    font-size: 12.5px;
    color: var(--hk-ink-3);
    line-height: 1.2;
}

/* Content offset - the dark sidebar is fixed-positioned, content sits next to it */
.app-main {
    margin-left: var(--rail-w) !important;
    width: calc(100% - var(--rail-w)) !important;
    max-width: calc(100% - var(--rail-w)) !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
.app-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}
.app-page, .app-root {
    width: 100% !important;
    max-width: none !important;
}
.flex-row-fluid, .flex-column-fluid {
    flex: 1 1 auto !important;
    max-width: none !important;
    width: auto !important;
}
@media (max-width: 991.98px) {
    .app-main { margin-left: 0 !important; width: 100% !important; max-width: 100% !important; }
    .app-sidebar { transform: translateX(-100%); transition: transform 200ms; position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000; }
    .app-sidebar.is-open { transform: translateX(0); }
}

.app-content {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
.app-main, .app-wrapper, .app-page, .app-root, .app-content,
#kt_app_main, #kt_app_wrapper, #kt_app_page, #kt_app_root {
    width: auto;
    max-width: none !important;
    min-width: 0;
}
.app-container, .app-content > .app-container, .container, .container-fluid, .container-xxl, .container-xl, .container-lg {
    max-width: none !important;
    width: 100% !important;
    padding: 12px 14px 18px !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Footer */
.app-footer, #kt_app_footer {
    background: transparent !important;
    border-top: 1px solid var(--hk-line) !important;
    color: var(--hk-ink-4);
    font-size: 13px;
    padding: 14px 28px !important;
}

/* === LIST AVATAR (org/contact avatars used in page headers + dashboards) === */
.hk-list__avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--r);
    background: var(--hk-accent-soft);
    color: var(--hk-accent-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    overflow: hidden;       /* clip any oversized image */
    position: relative;
}
.hk-list__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;      /* fill the box, don't overflow */
    display: block;
}

/* === BACK LINK (sub-pages) === */
.hk-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hk-ink-2);
    text-decoration: none;
    padding: 6px 10px 6px 6px;
    border-radius: var(--r-sm);
    transition: background 100ms, color 100ms;
}
.hk-back-link:hover { background: var(--hk-bg); color: var(--hk-accent-deep); }
.hk-back-link i { font-size: 16px !important; }

/* === PAGE HEADER === */
.hk-pagehead {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.hk-pagehead__title {
    font-size: clamp(16px, 1.5vw, 19px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--hk-ink);
    line-height: 1.2;
    margin: 0 0 3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.hk-pagehead__title i { color: var(--hk-accent); font-size: clamp(16px, 1.5vw, 19px); }
.hk-pagehead__sub {
    font-size: clamp(13px, 1.15vw, 14.5px);
    color: var(--hk-ink-2);
    line-height: 1.4;
    margin: 0;
    font-weight: 500;
}

/* === KPI CARDS === */
.hk-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.hk-kpi {
    background: var(--hk-paper);
    border: 1px solid var(--hk-line);
    border-radius: var(--r-lg);
    padding: clamp(14px, 1.4vw, 20px) clamp(16px, 1.6vw, 22px);
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 120ms, box-shadow 120ms;
    min-width: 0;
}
.hk-kpi:hover { border-color: var(--hk-line-strong); }
.hk-kpi__head {
    display: flex;
    align-items: center;
    gap: clamp(10px, 1vw, 16px);
    margin-bottom: 4px;
    min-width: 0;
}
.hk-kpi__icon {
    width: clamp(36px, 3vw, 46px);
    height: clamp(36px, 3vw, 46px);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hk-kpi__icon i { font-size: clamp(16px, 1.4vw, 22px) !important; }
.hk-kpi__icon.is-blue   { background: var(--hk-blue-soft);   color: var(--hk-blue); }
.hk-kpi__icon.is-green  { background: var(--hk-green-soft);  color: var(--hk-green); }
.hk-kpi__icon.is-purple { background: var(--hk-purple-soft); color: var(--hk-purple); }
.hk-kpi__icon.is-orange { background: var(--hk-orange-soft); color: var(--hk-orange); }
.hk-kpi__icon.is-red    { background: var(--hk-red-soft);    color: var(--hk-red); }
.hk-kpi__icon.is-brand  { background: var(--hk-accent-soft); color: var(--hk-accent-deep); }
.hk-kpi__icon.is-teal   { background: var(--hk-teal-soft);   color: var(--hk-teal); }

.hk-kpi__label {
    font-size: clamp(12px, 1vw, 14px);
    font-weight: 700;
    color: var(--hk-ink);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: break-word;
}
.hk-kpi__value {
    font-weight: 800;
    font-size: clamp(20px, 2vw, 30px);
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: var(--hk-ink);
    font-variant-numeric: tabular-nums;
    word-break: break-word;
}
.hk-kpi__foot {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(12px, 1.1vw, 15px);
    color: var(--hk-ink-2);
    margin-top: 4px;
    flex-wrap: wrap;
    font-weight: 500;
}
.hk-kpi__sub { color: var(--hk-ink-2); font-size: clamp(12px, 1.1vw, 15px); font-weight: 600; }
.hk-kpi__delta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: clamp(12px, 1.1vw, 15px);
}
.hk-kpi__delta.is-up   { color: var(--hk-green); }
.hk-kpi__delta.is-down { color: var(--hk-red); }
.hk-kpi__delta.is-flat { color: var(--hk-ink-3); }

/* === PANELS (cards used for sections) === */
.hk-panel {
    background: var(--hk-paper);
    border: 1px solid var(--hk-line);
    border-radius: var(--r-lg);
    padding: clamp(14px, 1.4vw, 22px) clamp(16px, 1.6vw, 26px);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.hk-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: clamp(12px, 1.2vw, 20px);
    gap: 12px;
    flex-wrap: wrap;
}
.hk-panel__title {
    font-size: clamp(14px, 1.2vw, 17px);
    font-weight: 800;
    color: var(--hk-ink);
    letter-spacing: -0.015em;
    line-height: 1.25;
}
.hk-panel__link {
    font-size: clamp(12px, 1.05vw, 15px);
    color: var(--hk-accent-deep);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}
.hk-panel__link:hover { color: var(--hk-accent); }
.hk-panel__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--hk-line);
}
.hk-panel__foot a {
    color: var(--hk-accent-deep);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

/* === DONUT (CSS conic) === */
.hk-donut-wrap {
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.6vw, 28px);
    flex-wrap: wrap;
    justify-content: center;
}
.hk-donut-wrap .hk-legend { min-width: 0; flex: 1 1 200px; }
.hk-donut {
    --size: clamp(120px, 11vw, 170px);
    --thickness: clamp(18px, 1.6vw, 26px);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    background: conic-gradient(from -90deg, var(--seg, var(--hk-accent) 0% 100%));
}
.hk-donut::after {
    content: "";
    position: absolute;
    inset: var(--thickness);
    background: var(--hk-paper);
    border-radius: 50%;
}
.hk-donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
    text-align: center;
}
.hk-donut__center .num {
    font-family: var(--hk-font);
    font-weight: 700;
    font-size: clamp(18px, 1.5vw, 24px);
    letter-spacing: -0.01em;
    color: var(--hk-ink);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.hk-donut__center .lab {
    font-family: var(--hk-font);
    font-size: 13px;
    color: var(--hk-ink-2);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    margin-top: 4px;
}

.hk-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.hk-legend__row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto auto;
    align-items: center;
    column-gap: 10px;
    font-size: clamp(12.5px, 1.1vw, 14.5px);
    padding: 4px 0;
}
.hk-legend__row .swatch {
    width: 10px; height: 10px;
    border-radius: 999px;
}
.hk-legend__row .name {
    color: var(--hk-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(12.5px, 1.1vw, 14.5px);
    font-weight: 500;
    min-width: 0;
}
.hk-legend__row .name small {
    display: block;
    color: var(--hk-ink-2);
    font-size: clamp(11.5px, 1vw, 13px);
    font-weight: 600;
    margin-top: 2px;
}
.hk-legend__row .val {
    color: var(--hk-ink);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    font-size: clamp(12.5px, 1.1vw, 14.5px);
}
.hk-legend__row .pct {
    color: var(--hk-ink-2);
    font-size: clamp(11.5px, 1vw, 13.5px);
    font-weight: 700;
    min-width: 40px;
    text-align: right;
}

/* === AGING ROWS === */
.hk-aging { display: flex; flex-direction: column; }
.hk-aging__row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hk-line-soft);
}
.hk-aging__row:last-child { border-bottom: none; }
.hk-aging__row .bucket {
    font-size: clamp(12.5px, 1.1vw, 15px);
    color: var(--hk-ink);
    font-weight: 600;
}
.hk-aging__row .amount {
    font-size: clamp(13.5px, 1.2vw, 16px);
    font-weight: 700;
    color: var(--hk-ink);
    font-variant-numeric: tabular-nums;
}
.hk-aging__row .pct {
    font-size: clamp(12px, 1.1vw, 15px);
    font-weight: 700;
    color: var(--hk-green);
    min-width: 52px;
    text-align: right;
}
.hk-aging__row.is-warn .pct  { color: var(--hk-orange); }
.hk-aging__row.is-bad .pct   { color: var(--hk-red); }

/* === GRID LAYOUTS === */
.hk-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.hk-split {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
    gap: 12px;
    align-items: start;
}
@media (max-width: 1100px) { .hk-split { grid-template-columns: 1fr; } }

/* === INVOICES TABLE === */
.hk-itable {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}
.hk-itable thead th {
    font-size: clamp(11.5px, 1vw, 13px);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hk-ink);
    text-align: left;
    padding: clamp(9px, 0.95vw, 13px) clamp(11px, 1.1vw, 16px);
    background: var(--hk-paper-2);
    border-bottom: 1px solid var(--hk-line);
    white-space: nowrap;
}
.hk-itable thead th:first-child { border-top-left-radius: var(--r); }
.hk-itable thead th:last-child  { border-top-right-radius: var(--r); }
.hk-itable tbody td {
    padding: clamp(10px, 1.05vw, 14px) clamp(11px, 1.1vw, 16px);
    border-bottom: 1px solid var(--hk-line-soft);
    font-size: clamp(12.5px, 1.05vw, 14px);
    color: var(--hk-ink);
    vertical-align: middle;
    font-weight: 500;
}
.hk-itable tbody tr:last-child td { border-bottom: none; }
.hk-itable tbody tr.is-clickable { cursor: pointer; }
.hk-itable tbody tr:hover { background: var(--hk-paper-2); }
.hk-itable .inv-link {
    color: var(--hk-accent-deep);
    font-weight: 600;
    text-decoration: none;
}
.hk-itable .inv-link:hover { color: var(--hk-accent); }

.hk-action-cell {
    display: flex; align-items: center; gap: 6px; justify-content: flex-end;
}
.hk-action-cell button {
    width: 34px; height: 34px;
    background: var(--hk-paper);
    border: 1px solid var(--hk-line-strong);
    color: var(--hk-ink);
    border-radius: var(--r-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 100ms, border-color 100ms, color 100ms;
}
.hk-action-cell button i {
    font-size: 18px !important;
    color: var(--hk-ink) !important;
}
.hk-action-cell button:hover {
    background: var(--hk-accent-soft);
    border-color: var(--hk-accent);
    color: var(--hk-accent-deep);
}
.hk-action-cell button:hover i { color: var(--hk-accent-deep) !important; }

.hk-itable__empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--hk-ink-3);
    font-size: 14.5px;
}

/* === STATUS PILLS === */
.hk-status {
    display: inline-flex;
    align-items: center;
    padding: 4px clamp(9px, 1vw, 12px);
    border-radius: 999px;
    font-size: clamp(12px, 1vw, 13.5px);
    font-weight: 700;
    white-space: nowrap;
}
/* Each status code has its own distinct color and matches the overview legend exactly */
.hk-status.is-uploaded     { background: var(--hk-blue-soft);   color: var(--hk-blue); }   /* 10 Invoice Uploaded */
.hk-status.is-pending      { background: var(--hk-orange-soft); color: var(--hk-orange); } /* 11 Payment Pending */
.hk-status.is-confirmation { background: var(--hk-cyan-soft);   color: var(--hk-cyan); }   /* 12 Payment Confirmation Uploaded */
.hk-status.is-awaiting     { background: var(--hk-yellow-soft); color: var(--hk-yellow); } /* 13 Awaiting Accounting Verification */
.hk-status.is-received     { background: var(--hk-teal-soft);   color: var(--hk-teal); }   /* 14 Cheque Received */
.hk-status.is-deposited    { background: var(--hk-purple-soft); color: var(--hk-purple); } /* 15 Cheque Deposited */
.hk-status.is-complete     { background: var(--hk-green-soft);  color: var(--hk-green); }  /* 16 Complete & Audited */
.hk-status.is-overdue      { background: var(--hk-red-soft);    color: var(--hk-red); }    /* 99 Delayed / Overdue */
.hk-status.is-draft        { background: var(--hk-bg);          color: var(--hk-ink-2); }

/* === FILTER BAR === */
.hk-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--hk-line);
}
.hk-filter-bar .hk-search { width: 280px; max-width: 100%; }
.hk-filter-bar .hk-search input { height: 38px; font-size: 14px; }
.hk-chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hk-fchip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: clamp(5px, 0.6vw, 8px) clamp(10px, 1.1vw, 14px);
    border-radius: 999px;
    font-size: clamp(13px, 1.15vw, 14.5px);
    font-weight: 700;
    color: var(--hk-ink);
    background: transparent;
    border: 1.5px solid var(--hk-line-strong);
    cursor: pointer;
    transition: background 100ms, border-color 100ms, color 100ms;
    white-space: nowrap;
}
.hk-fchip:hover { background: var(--hk-bg); color: var(--hk-ink); }
.hk-fchip.is-on {
    background: var(--hk-accent);
    color: #fff;
    border-color: var(--hk-accent);
}

/* === ALERTS PANEL === */
.hk-alert-row {
    display: grid;
    grid-template-columns: clamp(32px, 2.6vw, 40px) minmax(0, 1fr) auto;
    gap: clamp(10px, 1vw, 14px);
    align-items: center;
    padding: clamp(9px, 0.95vw, 13px) 0;
    border-bottom: 1px solid var(--hk-line-soft);
    transition: background 100ms;
    cursor: pointer;
}
.hk-alert-row:hover { background: var(--hk-paper-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--r-sm); }
.hk-alert-row:first-of-type { padding-top: 4px; }
.hk-alert-row:last-of-type  { border-bottom: none; padding-bottom: 4px; }
.hk-alert-row .ic {
    width: clamp(32px, 2.6vw, 40px);
    height: clamp(32px, 2.6vw, 40px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hk-alert-row .ic i { font-size: clamp(14px, 1.25vw, 18px); }
.hk-alert-row .ic.is-bad    { background: var(--hk-red-soft);    color: var(--hk-red); }
.hk-alert-row .ic.is-warn   { background: var(--hk-orange-soft); color: var(--hk-orange); }
.hk-alert-row .ic.is-info   { background: var(--hk-blue-soft);   color: var(--hk-blue); }
.hk-alert-row .ic.is-brand  { background: var(--hk-accent-soft); color: var(--hk-accent-deep); }
.hk-alert-row .ic.is-success{ background: var(--hk-green-soft);  color: var(--hk-green); }
.hk-alert-row .body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hk-alert-row .body .t {
    font-size: clamp(12px, 1.05vw, 14px); font-weight: 700;
    color: var(--hk-ink);
    line-height: 1.3;
}
.hk-alert-row .body .s {
    font-size: clamp(12px, 1vw, 14px);
    color: var(--hk-ink-2);
    line-height: 1.3;
    font-weight: 500;
}
.hk-alert-row .count {
    font-weight: 800;
    font-size: clamp(16px, 1.5vw, 22px);
    letter-spacing: -0.02em;
    color: var(--hk-ink);
    font-variant-numeric: tabular-nums;
}

/* === ACTIVITY FEED === */
.hk-activity-row {
    display: grid;
    grid-template-columns: clamp(32px, 2.6vw, 40px) 1fr;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hk-line-soft);
    align-items: start;
}
.hk-activity-row:last-of-type { border-bottom: none; }
.hk-activity-row .av {
    width: clamp(32px, 2.6vw, 40px);
    height: clamp(32px, 2.6vw, 40px);
    border-radius: 999px;
    background: var(--hk-accent-soft);
    color: var(--hk-accent-ink);
    font-weight: 800;
    font-size: clamp(12.5px, 1.1vw, 14px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}
.hk-activity-row .body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: clamp(13px, 1.15vw, 14.5px);
    color: var(--hk-ink);
    line-height: 1.4;
    min-width: 0;
    font-weight: 500;
    overflow-wrap: anywhere;
}
.hk-activity-row .body strong { color: var(--hk-ink); font-weight: 700; }
.hk-activity-row .body a { color: var(--hk-accent-deep); font-weight: 700; }
.hk-activity-row .body .when {
    font-size: 13px;
    color: var(--hk-ink-2);
    margin-top: 1px;
    font-weight: 600;
}

/* === BUTTONS === */
.btn {
    font-family: var(--hk-font) !important;
    font-weight: 700 !important;
    font-size: clamp(13px, 1.2vw, 15px) !important;
    letter-spacing: -0.005em !important;
    padding: clamp(9px, 1vw, 12px) clamp(14px, 1.4vw, 20px) !important;
    border-radius: var(--r-sm) !important;
    border: 1px solid transparent !important;
    transition: background 100ms, border-color 100ms, color 100ms !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    white-space: nowrap;
}
.btn-sm { padding: clamp(8px, 0.9vw, 10px) clamp(12px, 1.3vw, 18px) !important; font-size: clamp(12.5px, 1.1vw, 14px) !important; }
.btn-lg { padding: clamp(12px, 1.3vw, 14px) clamp(18px, 1.9vw, 26px) !important; font-size: clamp(14px, 1.3vw, 16px) !important; }
.btn-icon { padding: 8px !important; }

.btn-primary, .btn-hakim {
    background: var(--hk-accent) !important;
    border-color: var(--hk-accent) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-hakim:hover {
    background: var(--hk-accent-hover) !important;
    border-color: var(--hk-accent-hover) !important;
    color: #fff !important;
}
.btn-primary:active, .btn-hakim:active, .btn-primary:focus, .btn-hakim:focus {
    background: var(--hk-accent-deep) !important;
    border-color: var(--hk-accent-deep) !important;
    color: #fff !important;
}

.btn-light, .btn-secondary {
    background: var(--hk-paper) !important;
    border-color: var(--hk-line-strong) !important;
    color: var(--hk-ink) !important;
}
.btn-light:hover, .btn-secondary:hover {
    background: var(--hk-bg) !important;
    border-color: var(--hk-ink-3) !important;
    color: var(--hk-ink) !important;
}

.btn-light-primary {
    background: var(--hk-accent-soft) !important;
    color: var(--hk-accent-deep) !important;
    border-color: transparent !important;
}
.btn-light-primary:hover { background: #FFE0CA !important; color: var(--hk-accent-hover) !important; }
.btn-light-success { background: var(--hk-green-soft) !important; color: var(--hk-green) !important; border-color: transparent !important; }
.btn-light-danger  { background: var(--hk-red-soft)   !important; color: var(--hk-red)   !important; border-color: transparent !important; }
.btn-light-warning { background: var(--hk-orange-soft)!important; color: var(--hk-orange)!important; border-color: transparent !important; }
.btn-light-info    { background: var(--hk-blue-soft)  !important; color: var(--hk-blue)  !important; border-color: transparent !important; }

.btn-danger  { background: var(--hk-red) !important; border-color: var(--hk-red) !important; color: #fff !important; }
.btn-success { background: var(--hk-green) !important; border-color: var(--hk-green) !important; color: #fff !important; }

/* Cards: keep Metronic naming for other pages */
.card {
    background: var(--hk-paper) !important;
    border: 1px solid var(--hk-line) !important;
    border-radius: var(--r-lg) !important;
    box-shadow: none !important;
}
.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--hk-line) !important;
    padding: 18px 22px !important;
}
.card-header .card-title, .card-header h3.card-title {
    margin: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--hk-ink) !important;
    font-family: var(--hk-font) !important;
}
.card-body { padding: 22px !important; }
.card-footer {
    background: var(--hk-paper-2) !important;
    border-top: 1px solid var(--hk-line) !important;
    padding: 14px 22px !important;
}

.bg-light-success { background: var(--hk-green-soft)  !important; }
.bg-light-danger  { background: var(--hk-red-soft)    !important; }
.bg-light-warning { background: var(--hk-orange-soft) !important; }
.bg-light-info    { background: var(--hk-blue-soft)   !important; }
.bg-light-primary { background: var(--hk-accent-soft) !important; }
.bg-light         { background: var(--hk-bg)          !important; }

/* Badges */
.badge {
    font-family: var(--hk-font) !important;
    font-weight: 600 !important;
    font-size: 12.5px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
}
.badge-primary, .badge-light-primary { background: var(--hk-accent-soft) !important; color: var(--hk-accent-deep) !important; }
.badge-light-success { background: var(--hk-green-soft)  !important; color: var(--hk-green)  !important; }
.badge-light-danger  { background: var(--hk-red-soft)    !important; color: var(--hk-red)    !important; }
.badge-light-warning { background: var(--hk-orange-soft) !important; color: var(--hk-orange) !important; }
.badge-light-info    { background: var(--hk-blue-soft)   !important; color: var(--hk-blue)   !important; }
.badge-light         { background: var(--hk-bg) !important; color: var(--hk-ink-2) !important; }

/* Symbol */
.symbol .symbol-label {
    background: var(--hk-bg) !important;
    color: var(--hk-ink) !important;
    border-radius: var(--r-sm) !important;
    font-weight: 700;
    border: 1px solid var(--hk-line);
}
.symbol .symbol-label.bg-light-primary { background: var(--hk-accent-soft) !important; color: var(--hk-accent-deep) !important; }

/* Forms */
.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--hk-ink-2);
    margin-bottom: 6px;
}
.form-label.required::after { content: "*"; color: var(--hk-accent); margin-left: 4px; }

.form-control, .form-select {
    background: var(--hk-paper) !important;
    border: 1px solid var(--hk-line-strong) !important;
    border-radius: var(--r-sm) !important;
    color: var(--hk-ink) !important;
    font-size: 13.5px !important;
    padding: 10px 12px !important;
    min-height: 42px;
    font-family: var(--hk-font);
    transition: border-color 100ms, box-shadow 100ms;
}
.form-control:focus, .form-select:focus {
    border-color: var(--hk-accent) !important;
    box-shadow: 0 0 0 3px rgba(242,103,34,0.15) !important;
}
.form-control::placeholder { color: var(--hk-ink-4); }
.form-control[readonly] { background: var(--hk-bg) !important; }

.select2-container--default .select2-selection,
.select2-container--bootstrap5 .select2-selection {
    background: var(--hk-paper) !important;
    border: 1px solid var(--hk-line-strong) !important;
    border-radius: var(--r-sm) !important;
    min-height: 42px !important;
    color: var(--hk-ink) !important;
    padding: 4px 8px !important;
    display: flex !important;
    align-items: center !important;
}
.select2-container--default.select2-container--focus .select2-selection,
.select2-container--bootstrap5.select2-container--focus .select2-selection {
    border-color: var(--hk-accent) !important;
    box-shadow: 0 0 0 3px rgba(242,103,34,0.15) !important;
}
.form-check-input:checked { background-color: var(--hk-accent) !important; border-color: var(--hk-accent) !important; }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(242,103,34,0.15); border-color: var(--hk-accent); }

/* Tabs */
.nav-line-tabs, .nav-tabs {
    border-bottom: 1px solid var(--hk-line) !important;
    gap: 0;
}
.nav-line-tabs .nav-link, .nav-tabs .nav-link {
    border: none !important;
    background: transparent !important;
    color: var(--hk-ink-3) !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    padding: 13px 16px !important;
    margin-bottom: -1px;
    position: relative;
    font-family: var(--hk-font) !important;
}
.nav-line-tabs .nav-link:hover, .nav-tabs .nav-link:hover { color: var(--hk-ink) !important; }
.nav-line-tabs .nav-link.active, .nav-tabs .nav-link.active { color: var(--hk-ink) !important; }
.nav-line-tabs .nav-link.active::after, .nav-tabs .nav-link.active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--hk-accent);
}

/* Tables */
.table {
    color: var(--hk-ink) !important;
    border-color: var(--hk-line) !important;
}
.table > thead > tr > th {
    color: var(--hk-ink-3) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    border-bottom: 1px solid var(--hk-line) !important;
    background: var(--hk-paper-2) !important;
    padding: 14px 16px !important;
}
.table > tbody > tr > td {
    border-bottom: 1px solid var(--hk-line-soft) !important;
    border-top: none !important;
    padding: 14px 16px !important;
    color: var(--hk-ink) !important;
    font-size: 14px;
    vertical-align: middle;
}
.table > tbody > tr:hover { background: var(--hk-paper-2) !important; }

/* Modals */
.modal-content {
    border: 1px solid var(--hk-line) !important;
    border-radius: var(--r-xl) !important;
    background: var(--hk-paper) !important;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18) !important;
    overflow: hidden;
}
.modal-header {
    border-bottom: 1px solid var(--hk-line) !important;
    padding: 20px 26px !important;
}
.modal-header h2, .modal-header .modal-title {
    font-family: var(--hk-font) !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    color: var(--hk-ink) !important;
}
.modal-body   { padding: 26px !important; }
.modal-footer {
    border-top: 1px solid var(--hk-line) !important;
    background: var(--hk-paper-2) !important;
    padding: 14px 26px !important;
    gap: 8px;
}
.modal-backdrop.show { opacity: 0.5; background: #0F172A; }

/* Pagination */
.pagination .page-item .page-link {
    color: var(--hk-ink-2);
    border-radius: var(--r-sm) !important;
    margin: 0 2px;
    border: 1px solid transparent;
    background: transparent;
    min-width: 36px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
}
.pagination .page-item .page-link:hover { background: var(--hk-bg); color: var(--hk-ink); }
.pagination .page-item.active .page-link {
    background: var(--hk-accent) !important;
    border-color: var(--hk-accent) !important;
    color: #fff !important;
}

/* Tooltips / dropdowns */
.tooltip .tooltip-inner {
    background: var(--hk-ink);
    color: #fff;
    border-radius: var(--r-xs);
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 500;
}
.tooltip .tooltip-arrow::before { border-top-color: var(--hk-ink); }
.dropdown-menu, .menu-sub-dropdown {
    border: 1px solid var(--hk-line) !important;
    border-radius: var(--r) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12) !important;
    background: var(--hk-paper) !important;
    padding: 6px !important;
}

/* SweetAlert + Toastr */
.swal2-popup { border-radius: var(--r-xl) !important; font-family: var(--hk-font) !important; }
.swal2-title { font-weight: 700 !important; color: var(--hk-ink) !important; }
#toast-container > div { border-radius: var(--r) !important; font-family: var(--hk-font) !important; }

/* Dropzone */
.hk-dropzone {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 2px dashed var(--hk-line-strong);
    border-radius: var(--r-lg);
    background: var(--hk-paper-2);
    padding: 28px 20px;
    text-align: center;
    transition: border-color 120ms, background 120ms;
    cursor: pointer;
    margin-bottom: 4px;
}
.hk-dropzone:hover, .hk-dropzone.is-drag {
    border-color: var(--hk-accent);
    background: var(--hk-accent-soft);
}
.hk-dropzone__ic {
    display: inline-flex;
    width: 40px; height: 40px;
    background: var(--hk-paper);
    color: var(--hk-accent-deep);
    border-radius: var(--r);
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border: 1px solid var(--hk-line);
}
.hk-dropzone__t { font-weight: 600; color: var(--hk-ink); font-size: 14px; margin-bottom: 4px; }
.hk-dropzone__s { color: var(--hk-ink-3); font-size: 13px; }
.hk-dropzone input[type="file"] { display: none; }
.hk-dropzone__file {
    margin-top: 14px;
    padding: 10px 12px;
    background: var(--hk-paper);
    border: 1px solid var(--hk-line);
    border-radius: var(--r-sm);
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: var(--hk-ink);
    text-align: left;
}
.hk-dropzone__file .name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hk-dropzone__file .size { font-size: 12.5px; color: var(--hk-ink-3); }
.hk-dropzone__file .x {
    background: transparent; border: none; color: var(--hk-ink-3);
    cursor: pointer; padding: 4px; border-radius: var(--r-xs);
}
.hk-dropzone__file .x:hover { background: var(--hk-bg); color: var(--hk-ink); }

/* Detail rows in invoice modal */
.hk-detail-row {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 14px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hk-line-soft);
    align-items: center;
}
.hk-detail-row:last-of-type { border-bottom: none; }
.hk-detail-row .k {
    font-size: 12.5px;
    color: var(--hk-ink-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
}
.hk-detail-row .v { font-size: 14px; color: var(--hk-ink); font-weight: 500; }
.hk-detail-row .v.is-amount {
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.015em;
    font-variant-numeric: tabular-nums;
}

/* Period button */
.hk-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--r-sm);
    background: var(--hk-paper);
    border: 1px solid var(--hk-line-strong);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--hk-ink-2);
    cursor: pointer;
}
.hk-period:hover { border-color: var(--hk-ink-3); color: var(--hk-ink); }
.hk-period i { font-size: 14px !important; color: var(--hk-ink-3) !important; }

/* Print */
@media print {
    .app-sidebar, .app-header, .hk-top, .app-footer { display: none !important; }
    .app-main, .app-wrapper { margin-left: 0 !important; }
    body { background: white !important; }
}
