/* =========================================================
   E88 HRMS — ob.css (Odoo-inspired base)
   Port dari referensi contoh_odoo_laravel:
   tokens / topbar / app-launcher / layout / toolbar /
   tables / buttons / forms / modals / pagination / responsive
   Dimuat SETELAH Bootstrap 3 → override visual saja,
   grid col-* Bootstrap tetap dipakai semua halaman.
   ========================================================= */

/* ========================= TOKENS ========================= */
:root {
    --app-bg: #f6f7f9;
    --surface: #ffffff;
    --surface-muted: #f8f9fa;
    --surface-hover: #f1f2f4;

    --text-primary: #212529;
    --text-secondary: #5f6368;
    --text-muted: #8a8d91;

    --border: #dfe3e8;
    --border-soft: #eceff2;

    --radius-sm: 4px;
    --radius-md: 7px;
    --radius-lg: 10px;
    --radius-full: 9999px;

    --primary: #714b67;
    --primary-hover: #62415a;
    --primary-soft: #f2ebf0;
    --primary-foreground: #ffffff;

    --success: #2e7d5b;
    --success-soft: #e9f6ef;
    --warning: #9a6700;
    --warning-soft: #fff4d6;
    --danger: #b42318;
    --danger-soft: #fdecea;
    --info: #2563a6;
    --info-soft: #eaf2fb;

    --topbar-height: 50px;
    --topbar-height-sm: 46px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);

    --z-topbar: 100;
    --z-dropdown: 200;
    --z-overlay: 500;
    --z-modal: 600;
    --z-toast: 700;

    --font-sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ========================= BASE ========================= */
html { font-size: 100%; }
body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-primary);
    background: var(--app-bg);
    line-height: 1.45;
    display: block;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover, a:focus { color: var(--primary-hover); text-decoration: none; }
h1, h2, h3, h4, h5 { color: var(--text-primary); font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
hr { border-top: 1px solid var(--border-soft); margin: 14px 0; }
code { color: #4b4f54; }
[hidden] { display: none !important; }
body.launcher-open { overflow: hidden; }

.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: var(--primary); color: #fff; padding: 8px 14px; border-radius: 0 0 8px 0; z-index: 999; font-size: 13px;
}
.skip-link:focus { left: 0; }

/* ========================= TOPBAR ========================= */
.app-topbar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: var(--z-topbar);
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px 0 8px;
    gap: 8px;
}
.topbar-left { display: flex; align-items: center; gap: 4px; min-width: 0; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }

.topbar-launcher-btn {
    display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border: none; background: none;
    border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-secondary);
    transition: background 0.12s, color 0.12s;
    flex-shrink: 0;
}
.topbar-launcher-btn:hover { background: var(--surface-hover); color: var(--text-primary); }

.topbar-brand { display: inline-flex; align-items: center; gap: 8px; padding: 0 6px; min-width: 0; }
.topbar-brand-logo { width: 26px; height: 26px; border-radius: var(--radius-sm); object-fit: cover; display: block; flex-shrink: 0; }
.topbar-brand-name { font-size: 14px; font-weight: 700; color: var(--text-primary); white-space: nowrap; letter-spacing: -.2px; }
.topbar-brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 500; white-space: nowrap; }

.topbar-module { position: relative; flex-shrink: 0; }
.topbar-module-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 7px 8px; font-size: 13.5px; font-weight: 600;
    color: var(--text-primary); white-space: nowrap;
    border: none; background: none; border-radius: var(--radius-sm);
    cursor: pointer; font-family: var(--font-sans);
    transition: background 0.12s, color 0.12s;
}
.topbar-module-btn:hover { background: var(--surface-hover); }
.topbar-module-btn svg { color: var(--text-muted); flex-shrink: 0; }

.topbar-module-menu {
    left: 0; right: auto;
    min-width: 220px;
    max-height: calc(100vh - var(--topbar-height) - 24px);
    overflow-y: auto;
}
.topbar-module-menu.is-columns-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px; min-width: 380px; width: max-content; }
.topbar-module-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; font-size: 13px;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer; text-decoration: none;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}
.topbar-module-item i { width: 16px; text-align: center; color: var(--text-muted); }
.topbar-module-item:hover { background: var(--surface-hover); color: var(--text-primary); text-decoration: none; }
.topbar-module-item.is-active { color: var(--primary); font-weight: 500; background: var(--primary-soft); }
.topbar-module-item.is-active i { color: var(--primary); }

.topbar-module-group { padding-bottom: 4px; }
.topbar-module-group + .topbar-module-group { border-top: 1px solid var(--border-soft); margin-top: 4px; }
.topbar-module-group-label {
    font-size: 10.5px; font-weight: 700;
    letter-spacing: .5px; text-transform: uppercase;
    color: var(--text-muted);
    padding: 8px 12px 4px;
}

/* Dropdown Menu: 4 kolom sejajar, item terbagi rata, urut parent via label grup mengalir.
   Tinggi terkunci ±8 baris - tidak memanjang ke bawah. */
.topbar-module-menu.is-grid-groups {
    columns: 4;
    column-gap: 10px;
    width: min(92vw, 880px);
}
.topbar-module-menu.is-grid-groups .topbar-module-item {
    width: 100%;
    padding: 6px 10px;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}
.topbar-module-menu.is-grid-groups .topbar-module-group-label {
    padding: 8px 0 2px;
    break-after: avoid-column;
}
@media (max-width: 1100px) {
    .topbar-module-menu.is-grid-groups { columns: 3; width: min(92vw, 720px); }
}
@media (max-width: 860px) {
    .topbar-module-menu.is-grid-groups { columns: 2; width: min(92vw, 540px); }
}

/* User menu (kanan) */
.topbar-user { position: relative; }
.topbar-user-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 5px 8px;
    border: none; background: none; border-radius: var(--radius-sm);
    cursor: pointer; color: var(--text-primary);
    font-family: var(--font-sans); font-size: 13px; font-weight: 500;
    transition: background 0.12s;
}
.topbar-user-btn:hover { background: var(--surface-hover); }
.topbar-user-btn svg { color: var(--text-muted); }
.topbar-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; display: block; flex-shrink: 0; }
.topbar-username { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Generic dropdown */
.ui-dropdown-menu {
    position: absolute; top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    z-index: var(--z-dropdown);
    min-width: 200px;
}
.ui-dropdown-menu.is-open { display: block; animation: dropdown-enter 0.13s ease; }
@keyframes dropdown-enter { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.user-dropdown { right: 0; left: auto; min-width: 250px; }
.user-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.user-dropdown-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.user-dropdown-info { min-width: 0; }
.user-dropdown-name { font-size: 13px; font-weight: 600; color: var(--text-primary); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-email { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-dropdown-divider { height: 1px; background: var(--border-soft); margin: 6px 4px; }
.user-dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: var(--radius-sm);
    color: var(--text-secondary); font-size: 13px; font-weight: 500;
    text-decoration: none;
}
.user-dropdown-item svg, .user-dropdown-item i { color: var(--text-muted); flex-shrink: 0; width: 16px; text-align: center; }
.user-dropdown-item:hover { background: var(--surface-hover); color: var(--text-primary); }
.user-dropdown-item.is-active { color: var(--primary); background: var(--primary-soft); }
.user-dropdown-item.danger { color: var(--danger); }
.user-dropdown-item.danger svg, .user-dropdown-item.danger i { color: var(--danger); }
.user-dropdown-item.danger:hover { background: var(--danger-soft); }
.user-dropdown-btn {
    width: 100%; display: flex; align-items: center; gap: 10px;
    border: none; background: none; font: inherit;
    color: var(--danger); padding: 8px 10px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13px; font-weight: 500;
}
.user-dropdown-btn svg, .user-dropdown-btn i { color: var(--danger); flex-shrink: 0; width: 16px; text-align: center; }
.user-dropdown-btn:hover { background: var(--danger-soft); }

/* ========================= APP LAUNCHER ========================= */
.app-launcher-overlay {
    position: fixed; inset: 0;
    z-index: var(--z-overlay);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: var(--topbar-height);
    background: rgba(0, 0, 0, 0.15);
}
.app-launcher-overlay.is-open { animation: dropdown-enter 0.15s ease; }

.app-launcher {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - var(--topbar-height) - 32px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    margin: 8px 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
}
.app-launcher-close {
    position: absolute; top: 10px; right: 12px; z-index: 2;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    border-radius: 50%;
    color: var(--text-muted); cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.app-launcher-close:hover { background: var(--surface-hover); color: var(--text-primary); border-color: var(--border); }
.app-launcher-close:active { transform: scale(0.95); }

.app-launcher-search {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 48px 14px 16px;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
    position: sticky; top: 0; z-index: 1;
}
.app-launcher-search-icon { color: var(--text-muted); flex-shrink: 0; }
.app-launcher-search-input {
    flex: 1; border: none; background: none;
    font-size: 14px; font-family: var(--font-sans);
    color: var(--text-primary); outline: none;
}
.app-launcher-search-input::placeholder { color: var(--text-muted); }

.app-launcher-scroll { overflow-y: auto; flex: 1; min-height: 0; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
.app-launcher-scroll::-webkit-scrollbar { width: 5px; }
.app-launcher-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }

.app-launcher-section { border-bottom: 1px solid var(--border-soft); }
.app-launcher-section:last-child { border-bottom: none; }
.app-launcher-section-title {
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 10px 16px 0;
}
.app-launcher-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px 12px 14px; }

.app-launcher-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius-md);
    cursor: pointer; text-decoration: none;
    color: var(--text-primary);
    transition: background 0.12s;
    position: relative;
}
.app-launcher-item:hover { background: var(--surface-hover); text-decoration: none; }
.app-launcher-item.is-active { background: var(--primary-soft); }

.app-launcher-item-icon {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface-muted);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 16px;
}
.app-launcher-item-name { font-size: 12px; font-weight: 500; text-align: center; line-height: 1.25; }

.app-launcher-empty { padding: 28px; text-align: center; color: var(--text-muted); font-size: 13px; }

/* Per-icon color (ikuti palet referensi) */
.app-launcher-item-icon[data-icon-key="dashboard"]   { background: #e0f7fa; color: #00838f; }
.app-launcher-item-icon[data-icon-key="desktop"]     { background: #e0f7fa; color: #00838f; }
.app-launcher-item-icon[data-icon-key="users"]       { background: #e8eaf6; color: #283593; }
.app-launcher-item-icon[data-icon-key="user"]        { background: #ede7f6; color: #4527a0; }
.app-launcher-item-icon[data-icon-key="user-circle-o"]{ background: #ede7f6; color: #4527a0; }
.app-launcher-item-icon[data-icon-key="clipboard"]   { background: #e0f2f1; color: #00695c; }
.app-launcher-item-icon[data-icon-key="list"]        { background: #f3e5f5; color: #6a1b9a; }
.app-launcher-item-icon[data-icon-key="cog"]         { background: #eceff1; color: #455a64; }
.app-launcher-item-icon[data-icon-key="cogs"]        { background: #eceff1; color: #455a64; }
.app-launcher-item-icon[data-icon-key="money"]       { background: #e8f5e9; color: #2e7d32; }
.app-launcher-item-icon[data-icon-key="bank"]        { background: #e0f7fa; color: #00838f; }
.app-launcher-item-icon[data-icon-key="exchange"]    { background: #fff3e0; color: #e65100; }
.app-launcher-item-icon[data-icon-key="calculator"]  { background: #fff8e1; color: #f57f17; }
.app-launcher-item-icon[data-icon-key="calendar"]    { background: #fff8e1; color: #f57f17; }
.app-launcher-item-icon[data-icon-key="clock-o"]     { background: #f3e5f5; color: #6a1b9a; }
.app-launcher-item-icon[data-icon-key="database"]    { background: #e3f2fd; color: #1565c0; }
.app-launcher-item-icon[data-icon-key="map-marker"]  { background: #e0f7fa; color: #00838f; }
.app-launcher-item-icon[data-icon-key="google"]      { background: #fff3e0; color: #e65100; }
.app-launcher-item-icon[data-icon-key="user-plus"]   { background: #e3f2fd; color: #1565c0; }
.app-launcher-item-icon[data-icon-key="check-square"]{ background: #f3e5f5; color: #6a1b9a; }
.app-launcher-item-icon[data-icon-key="file"]        { background: #fff8e1; color: #f57f17; }
.app-launcher-item-icon[data-icon-key="file-excel-o"]{ background: #e9f6ef; color: #2e7d5b; }
.app-launcher-item-icon[data-icon-key="telegram"]    { background: #e3f2fd; color: #0288d1; }
.app-launcher-item-icon[data-icon-key="whatsapp"]    { background: #e9f6ef; color: #2e7d5b; }
.app-launcher-item-icon[data-icon-key="gift"]        { background: #fce4ec; color: #c62828; }
.app-launcher-item-icon[data-icon-key="key"]         { background: #fff8e1; color: #f57f17; }
.app-launcher-item-icon[data-icon-key="credit-card"] { background: #e0f7fa; color: #00838f; }
.app-launcher-item-icon[data-icon-key="sitemap"]     { background: #e8eaf6; color: #283593; }
.app-launcher-item-icon[data-icon-key="th-large"]    { background: #eceff1; color: #455a64; }

/* ========================= WORKSPACE ========================= */
.page-workspace {
    min-height: calc(100vh - var(--topbar-height));
    background: var(--app-bg);
    padding-top: var(--topbar-height);
}
.page-content {
    padding: 24px 8px 48px;
    max-width: none;
}
.page-content:has(.footer-menu) { padding-bottom: 0; }

/* Gutter seragam: wrapper full-width Bootstrap tidak boleh menambah padding 15px.
   Tepi konten mengikuti .page-content sehingga sejajar dengan dashboard dan floating-button. */
.page-content > .col-md-12,
.page-content > form > .col-md-12,
.page-content > .col-xs-12,
.page-content > form > .col-xs-12 {
    padding-left: 0;
    padding-right: 0;
}

/* Setelah gutter dirapikan, offset -15px .form-group tidak boleh menggeser form keluar gutter. */
.page-content .form-group { margin-left: 0; margin-right: 0; }
.page-content .modal .form-group { margin-left: -15px; margin-right: -15px; }

/* ========================= BOTTOM NAV (full-bleed, sticky) ========================= */
.footer-menu {
    position: sticky;
    bottom: 0;
    z-index: var(--z-dropdown);
    clear: both;
    width: calc(100% + 16px);
    margin: 20px -8px 0;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border, #dfe3e8);
    border-radius: 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 12px;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
}

.footer-menu a {
    color: var(--text-secondary, #5f6368);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 999px;
    transition: background .15s ease;
    position: relative;
}

.footer-menu a:hover { background: var(--surface-hover, #f1f2f4); color: var(--text-primary, #212529); }
.footer-menu a i { font-size: 20px; color: var(--text-secondary, #5f6368); opacity: .85; transition: opacity .15s ease, color .15s ease; }
.footer-menu a.active { background: var(--primary-soft, #f2ebf0); }
.footer-menu a.active i { color: var(--primary, #714b67); opacity: 1; }
.footer-menu .footer-icon-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.footer-menu .footer-chat-badge { position: absolute; top: -7px; right: -10px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: #d64545; color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; display: none; }
.footer-menu .footer-chat-badge.is-visible { display: inline-block; }
.footer-menu a.active .footer-chat-badge { box-shadow: 0 0 0 2px var(--primary-soft, #f2ebf0); }

/* ========================= PAGE TOOLBAR ========================= */
.page-toolbar { display: flex; flex-direction: column; gap: 0; margin-bottom: 10px; }
.toolbar-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.toolbar-row-top { min-height: 40px; }
.toolbar-row-bottom { border-top: 1px solid var(--border-soft); padding-top: 8px; flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.toolbar-center { display: flex; align-items: center; justify-content: center; flex: 1; }
.toolbar-right { display: flex; align-items: center; gap: 8px; flex: 1; justify-content: flex-end; flex-wrap: wrap; }
.toolbar-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0; text-align: center; }
.page-title { font-size: 18px; font-weight: 600; color: var(--text-primary); margin: 0; line-height: 1.3; }
.page-subtitle { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.user-profile { display: flex; flex-direction: column; align-items: center; margin-top: 20px; }
.user-photo { width: 250px; height: 250px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border); background: var(--surface-muted); }
.user-info { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.user-name { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.user-phone { font-size: 12px; color: var(--text-secondary); }
.small-muted { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; }
.profile-identity-wrap table { width: 100%; }
.profile-identity-wrap td:first-child { width: 40%; white-space: nowrap; color: var(--text-secondary); font-weight: 600; }
.profile-identity-wrap td:last-child { width: 60%; overflow-wrap: anywhere; }
.profile-section-title { margin: 20px 0 0; font-size: 14px; font-weight: 600; color: var(--text-primary); }
.profile-actions { margin-top: 20px; }

.search-input {
    height: 40px; padding: 0 12px;
    font-size: 13px; font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-input::placeholder { color: var(--text-muted); }

/* ========================= TABLES ========================= */
.data-table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 8px;
    overflow: auto;
}
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table thead { background: var(--surface-muted); border-bottom: 1px solid var(--border); }
.data-table th { padding: 8px 12px; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 12px; white-space: nowrap; }
.data-table td { padding: 8px 12px; border-bottom: 1px solid var(--border-soft); color: var(--text-primary); font-size: 12px; vertical-align: middle; }
.data-table tbody tr:hover { background: var(--surface-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* Override global tabel Bootstrap 3 (semua halaman lama) */
.table { border-collapse: collapse; font-size: 12px; background: transparent; }
.table > thead > tr > th, .table > thead > tr > td {
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border) !important;
    border-top: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    padding: 8px 12px;
    white-space: nowrap;
    text-transform: none;
}
.table > tbody > tr > th, .table > tbody > tr > td {
    padding: 8px 12px;
    border-top: 1px solid var(--border-soft);
    color: var(--text-primary);
    vertical-align: middle;
}
.table-bordered, .table-bordered > thead > tr > th, .table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th, .table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > th, .table-bordered > tfoot > tr > td {
    border-color: var(--border-soft) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) { background-color: #fbfcfd; }
.table-hover > tbody > tr:hover { background-color: var(--surface-hover); }
.table-responsive {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-top: 8px;
}
.jambo_table { background: var(--surface); }

/* ========================= BUTTONS ========================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-sans);
    font-size: 13px; font-weight: 500; line-height: 1.2;
    height: 40px;
    padding: 0 14px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s, box-shadow 0.12s, opacity 0.12s;
    text-decoration: none; white-space: nowrap;
    background-image: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    vertical-align: middle;
}
.btn:active { box-shadow: none !important; }
.btn:focus, .btn.focus { outline: 0; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled, .btn.disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn-sm, .btn-group-sm > .btn { height: 40px; padding: 0 11px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-xs, .btn-group-xs > .btn { height: 40px; padding: 0 8px; font-size: 11.5px; border-radius: var(--radius-sm); }
.btn-lg, .btn-group-lg > .btn { height: 40px; padding: 0 20px; font-size: 14px; border-radius: var(--radius-md); }

.btn-primary, .btn-primary:hover, .btn-primary:focus,
.btn-primary:active, .btn-primary.active,
.btn-primary:active:hover, .btn-primary.active:hover,
.open > .dropdown-toggle.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }

.btn-default, .btn-default:hover, .btn-default:focus, .btn-default:active {
    background: var(--surface) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}
.btn-default:hover, .btn-default:focus { background: var(--surface-hover) !important; border-color: var(--border) !important; }

.btn-success, .btn-success:hover, .btn-success:focus, .btn-success:active { background: var(--success) !important; border-color: var(--success) !important; color: #fff !important; }
.btn-info, .btn-info:hover, .btn-info:focus, .btn-info:active { background: var(--info) !important; border-color: var(--info) !important; color: #fff !important; }
.btn-warning, .btn-warning:hover, .btn-warning:focus, .btn-warning:active { background: var(--warning) !important; border-color: var(--warning) !important; color: #fff !important; }
.btn-danger, .btn-danger:hover, .btn-danger:focus, .btn-danger:active { background: var(--danger) !important; border-color: var(--danger) !important; color: #fff !important; }

.btn-link { color: var(--primary); background: none !important; border: 0 !important; box-shadow: none !important; }
.btn-link:hover { color: var(--primary-hover); text-decoration: underline; }
.btn-outline { background: transparent; color: var(--text-secondary); border-color: var(--border); }
.btn-outline:hover { background: var(--surface-hover); color: var(--text-primary); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text-primary); }

/* ========================= FORMS ========================= */
label { font-weight: 500; color: var(--text-secondary); font-size: 13px; }
legend { font-weight: 600; color: var(--text-primary); border-bottom: 1px solid var(--border-soft); }

.form-control {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: none;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    height: 40px;
    padding: 0 12px;
    background-color: var(--surface);
    background-image: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
textarea.form-control { height: auto; min-height: 40px; padding: 8px 12px; }
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    outline: 0;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control { background-color: var(--surface-muted); opacity: 0.7; }
select.form-control { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%238a8d91' d='M0 0h10L5 6z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.input-sm, .form-control.input-sm { border-radius: var(--radius-sm); font-size: 12.5px; padding: 6px 10px; }
.input-lg, .form-control.input-lg { border-radius: var(--radius-md); font-size: 15px; padding: 10px 14px; }
.input-group-addon {
    background: var(--surface-muted);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: var(--radius-md);
}
.input-group .form-control:first-child, .input-group-addon:first-child { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:last-child, .input-group-addon:last-child { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.checkbox label, .radio label { color: var(--text-secondary); font-weight: 500; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* ========================= ALERT / FLASH ========================= */
.alert {
    padding: 12px 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: 13px; font-weight: 500;
    box-shadow: none;
}
.alert-success { background: var(--success-soft); color: var(--success); border-color: #cdeee0; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: #f6cfcb; }
.alert-info { background: var(--info-soft); color: var(--info); border-color: #cbe2f4; }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: #f3e2ad; }
.alert a { color: inherit; text-decoration: underline; }
.alert .close { opacity: 0.4; text-shadow: none; }

/* ========================= PANEL / WELL (legacy pages) ========================= */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}
.panel-default > .panel-heading {
    background: var(--surface-muted);
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
}
.panel-heading .panel-title { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.panel-footer { background: var(--surface-muted); border-top: 1px solid var(--border-soft); border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.well, .well-sm, .well-lg {
    background: var(--surface-muted);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    box-shadow: none;
}

/* ========================= MODALS (Bootstrap 3) ========================= */
.modal-content {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    background: var(--surface);
}
.modal-header { border-bottom: 1px solid var(--border-soft); padding: 16px 20px 12px; }
.modal-header .modal-title, .modal-header h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.modal-body { font-size: 13.5px; color: var(--text-primary); }
.modal-footer { border-top: 1px solid var(--border-soft); background: transparent; border-bottom-left-radius: var(--radius-lg); border-bottom-right-radius: var(--radius-lg); }
.modal-backdrop.in { opacity: 0.55; }

/* ========================= DROPDOWN BS3 / PAGINATION / TABS / LABEL ========================= */
.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 6px;
    font-size: 13px;
}
.dropdown-menu > li > a { border-radius: var(--radius-sm); padding: 8px 12px; color: var(--text-secondary); font-weight: 500; }
.dropdown-menu > li > a:hover, .dropdown-menu > li > a:focus { background: var(--surface-hover); color: var(--text-primary); }
.dropdown-menu > .active > a, .dropdown-menu > .active > a:hover, .dropdown-menu > .active > a:focus { background: var(--primary); color: #fff; }

.pagination { margin: 14px 0; }
.pagination > li { margin: 0 2px; display: inline-block; float: none; }
.pagination > li > a, .pagination > li > span {
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: var(--radius-sm) !important;
    font-size: 12.5px; font-weight: 500;
    padding: 7px 11px;
    min-width: 34px;
    background: var(--surface);
}
.pagination > li > a:hover { background: var(--surface-hover); color: var(--primary); border-color: var(--border); }
.pagination > .active > a, .pagination > .active > span,
.pagination > .active > a:hover, .pagination > .active > a:focus {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.pager li > a, .pager li > span { border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); padding: 7px 12px; }
.pager li > a:hover { background: var(--surface-hover); color: var(--primary); }

.nav-tabs { border-bottom: 1px solid var(--border); }
.nav-tabs > li > a { border: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-weight: 500; font-size: 13px; color: var(--text-secondary); padding: 10px 14px; }
.nav-tabs > li > a:hover { background: var(--surface-hover); color: var(--text-primary); border-color: transparent; }
.nav-tabs > li.active > a, .nav-tabs > li.active > a:hover, .nav-tabs > li.active > a:focus {
    border: 0 !important;
    border-bottom: 2px solid var(--primary) !important;
    color: var(--text-primary);
    background: transparent;
}
.nav-pills > li > a { border-radius: var(--radius-full); font-size: 12.5px; font-weight: 500; color: var(--text-secondary); padding: 8px 14px; }
.nav-pills > li.active > a, .nav-pills > li.active > a:hover, .nav-pills > li.active > a:focus { background: var(--primary); color: #fff; }

.label { border-radius: var(--radius-full); font-weight: 600; font-size: 11px; padding: 0.3em 0.75em 0.35em; }
.label-primary { background: var(--primary); }
.label-success { background: var(--success); }
.label-info { background: var(--info); }
.label-warning { background: var(--warning); }
.label-danger { background: var(--danger); }
.label-default { background: var(--surface-hover); color: var(--text-secondary); }
.badge { border-radius: var(--radius-full); background: var(--primary); font-weight: 600; font-size: 11px; }

.list-group-item { border-color: var(--border-soft); font-size: 13px; }
.list-group-item:first-child { border-top-left-radius: var(--radius-md); border-top-right-radius: var(--radius-md); }
.list-group-item:last-child { border-bottom-left-radius: var(--radius-md); border-bottom-right-radius: var(--radius-md); }
.list-group-item.active, .list-group-item.active:hover, .list-group-item.active:focus { background: var(--primary); border-color: var(--primary); }
.list-group-item.active .badge { background: #fff; color: var(--primary); }

.breadcrumb { background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-md); padding: 8px 14px; font-size: 12.5px; }
.breadcrumb > li + li::before { color: var(--text-muted); content: "/\00a0"; }
.breadcrumb > .active { color: var(--text-muted); }

.progress { border-radius: var(--radius-full); height: 8px; background: var(--surface-hover); box-shadow: none; }
.progress-bar { background: var(--primary); box-shadow: none; }

/* ========================= TIPOGRAFI KANONIK (satu skala untuk semua halaman) ========================= */
/* Skala: 11 / 12 / 13 / 14 (dasar) / 16 / 18 / 20 — tak ada ukuran liar antar halaman */
h1 { font-size: 20px; font-weight: 600; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 600; line-height: 1.3; }
h3 { font-size: 15px; font-weight: 600; line-height: 1.35; }
h4, h5 { font-size: 14px; font-weight: 600; line-height: 1.4; }
h1 > b, h2 > b, h3 > b, h4 > b { font-weight: 600; }
p { margin: 0 0 10px; font-size: 14px; }
small, .small { font-size: 12px; }
legend { font-size: 15px; }

/* Tabel: sel & header seragam 12px di SEMUA halaman (menimpa ukuran inline legacy) */
.table, .table th, .table td,
.data-table, .data-table th, .data-table td,
.jambo_table, .jambo_table th, .jambo_table td,
.table-main, .table-main th, .table-main td { font-size: 12px !important; }
.table th, .table thead th { font-weight: 600 !important; }

/* Form input seragam 13px (pola kanonik: tabel 12 → form 13 → dasar 14) */
.form-control, select.form-control, textarea.form-control,
.input-sm, .form-control.input-sm,
.input-lg, .form-control.input-lg { font-size: 13px !important; }

/* ========================= LEGACY CANONICALIZER (visual-only) ========================= */
/* Judul halaman lama <center><h2><b>..</b></h2></center> → gaya judul OB */
center > h2, .center > h2 {
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.2px;
    color: var(--text-primary);
    margin: 0 0 14px;
    padding: 0;
}
center > h2 b, .center > h2 b { font-weight: 600; }

/* Panel Gentelella lama → kartu flat OB */
.x_panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}
.x_title { border-bottom: 1px solid var(--border-soft); padding-bottom: 8px; margin-bottom: 12px; }

/* Floating button (halaman lama) — selalu di bawah header fixed */
.floating-button {
    position: fixed;
    top: 58px;
    right: 10px;
    z-index: 9999;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}
.floating-button .btn,
.floating-button a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    margin: 0;
    gap: 8px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.floating-button a:hover { text-decoration: none; }
.floating-button .btn .fa { width: 16px; text-align: center; }

/* Label form horizontal legacy */
.form-horizontal .control-label { text-align: left; font-weight: 500; color: var(--text-secondary); }

/* Header modal legacy ber-warna → soft OB */
.modal-header.bg-warning { background: var(--warning-soft); color: var(--warning); }
.modal-header.bg-warning .close { color: var(--warning); opacity: .6; }
.modal-header.bg-danger { background: var(--danger-soft); color: var(--danger); }
.modal-header.bg-danger .close { color: var(--danger); opacity: .6; }
.modal-header .modal-title, .modal-header h4.modal-title { font-size: 15px; font-weight: 600; }

/* Tinggi row 34px PERSIS kanonik dashboard — SEMUA tabel semua halaman, TANPA TERKECUALI:
   font 12px x line-height 1.45 + padding 8+8 + border 1 = 34px.
   height 34px = tinggi minimum (isi panjang tetap boleh melebar), single-line = persis 34px. */
.page-content table > thead > tr > th,
.page-content table > thead > tr > td,
.page-content table > tbody > tr > th,
.page-content table > tbody > tr > td,
.page-content table > tfoot > tr > th,
.page-content table > tfoot > tr > td {
    height: 34px;
    padding: 8px 12px !important;
    font-size: 12px !important;
    line-height: 1.45;
}

/* Pager standar Laravel + pilihan baris per halaman */
.pager-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-top: 12px;
}
.pager-info { font-size: 12.5px; color: var(--text-secondary); }
.pager-info b { color: var(--text-primary); }
.pager-perpage { display: flex; align-items: center; gap: 8px; }
.pager-perpage label { font-size: 12px; color: var(--text-secondary); margin: 0; font-weight: 500; }
.pager-perpage select {
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 12px;
    font-family: var(--font-sans);
    padding: 0 26px 0 10px;
    cursor: pointer;
    outline: none;
}
.pager-perpage select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.pager-links { margin-top: 8px; }

/* Tabel: lebar mengikuti isi (TIDAK diatur), wajib scroll horizontal di wrapper.
   Berlaku untuk tabel anak-langsung wrapper scroll (nested table di dalam td tidak ikut). */
.page-content .table-responsive > table,
.page-content .data-table-wrap > table {
    width: max-content !important;
    min-width: 100%;
}
.page-content .table-responsive > table th,
.page-content .table-responsive > table td,
.page-content .data-table-wrap > table th,
.page-content .data-table-wrap > table td {
    white-space: nowrap;
}

/* ========================= RESPONSIVE ========================= */
@media (max-width: 768px) {
    .app-launcher-overlay { padding-top: 0; background: rgba(15, 23, 42, 0.32); }
    .app-launcher { max-width: 100%; max-height: 100vh; margin: 0; border-radius: 0; border: none; }
    .app-launcher-grid { grid-template-columns: repeat(3, 1fr); }
    .topbar-username { display: none; }
    .topbar-module { display: none; }
    .topbar-brand-sub { display: none; }
    .page-content { padding: 16px; }
    .page-content:has(.footer-menu) { padding-bottom: 0; }
    .footer-menu { width: calc(100% + 32px); margin: 16px -16px 0; }
    .toolbar-title { font-size: 16px; }
}
@media (max-width: 480px) {
    .toolbar-row-bottom { gap: 6px; }
    .app-launcher-item { padding: 12px 6px; }
}

/* ========================= PRINT ========================= */
@media print {
    .app-topbar, .app-launcher-overlay, .floating-button, .footer-menu, .no-print { display: none !important; }
    .page-workspace { padding-top: 0 !important; }
    body { background: #fff !important; }
    .page-content { padding: 0; }
}

/* ========================= SUPIR MONITORING ========================= */
.page-header-clear { margin-bottom: 16px; }
.page-header-clear h1 { margin: 0; }
.detail-table > tbody > tr > th { width: 180px; color: var(--text-secondary); font-weight: 600; background: var(--surface-muted); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 0 0 12px; }
.filter-bar .form-group { margin: 0; min-width: 170px; }
.filter-bar label { font-size: 12px; color: var(--text-secondary); font-weight: 500; margin-bottom: 4px; }
.filter-bar .form-control { height: 40px; font-size: 13px; }
.filter-actions { display: flex; gap: 8px; align-items: center; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
.kpi-label { font-size: 12px; color: var(--text-secondary); }
.kpi-value { font-size: 16px; font-weight: 600; color: var(--text-primary); margin-top: 4px; }
.kpi-note { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.pager-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.pager-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pager-form { display: flex; align-items: center; gap: 6px; margin: 0; }
.pager-form label { font-size: 12px; color: var(--text-secondary); margin: 0; }
.pager-select { width: 72px; height: 40px; font-size: 12px; padding: 0 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); }
.pager-right .pagination { margin: 0; }

.table-muted { color: var(--text-muted); }
.table-image { width: 42px; height: 42px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-soft); }
.status-pill { display: inline-block; padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; background: var(--surface-muted); color: var(--text-secondary); }
.status-pill.ok { background: var(--success-soft); color: var(--success); }
.status-pill.warn { background: var(--warning-soft); color: var(--warning); }
.status-pill.bad { background: var(--danger-soft); color: var(--danger); }
.status-pill.info { background: var(--info-soft); color: var(--info); }

/* Login mengikuti HRMS: kartu 380px, logo tengah, input 44px, toggle password. */
.auth-body { background: var(--surface-muted); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 12px; }
.auth-shell { width: 100%; max-width: 380px; }
.auth-card { border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 4px 16px rgba(113, 75, 103, .08); margin: 0; }
.auth-card .panel-body { padding: 32px 28px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; margin-bottom: 24px; }
.auth-brand img { width: 48px; height: 48px; object-fit: contain; }
.auth-brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); background: var(--primary); color: #fff; font-weight: 700; font-size: 14px; }
.auth-brand-title { margin: 0; font-size: 20px; font-weight: 600; color: var(--text-primary); }
.auth-brand-sub { font-size: 13px; color: var(--text-secondary); }
.auth-card .form-group { margin-bottom: 16px; }
.auth-card .form-control { height: 44px; padding: 10px 12px; }
.auth-card .form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.auth-card label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.username-result { min-height: 18px; margin-top: 6px; font-size: 12px; line-height: 1.5; }
.login-password-wrap { position: relative; }
.login-password-wrap .form-control { padding-right: 40px; }
.login-password-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 14px; cursor: pointer; z-index: 2; }
.login-submit { height: 44px; margin-top: 8px; border: 0; font-size: 14px; font-weight: 600; }
.login-alert { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 10px 14px; margin-bottom: 16px; border-radius: var(--radius-md); }
.login-alert .fa { flex: 0 0 auto; }
.auth-step[hidden], .auth-choice[hidden], .auth-password-panel[hidden], .auth-toast.hide { display: none; }
.auth-inline-error:empty { display: none; }
.auth-inline-error { margin-bottom: 12px; font-size: 12px; line-height: 1.5; color: var(--danger); }
.auth-choice { margin-bottom: 10px; }
.auth-choice-btn { height: 44px; line-height: 30px; border-radius: var(--radius-md); font-size: 13px; font-weight: 600; }
.auth-choice-btn[disabled] { opacity: .62; cursor: not-allowed; }
.auth-password-panel { margin-top: 12px; }
.finger-auth-status { display: none; margin: 8px 0 12px; font-size: 12px; line-height: 1.5; }
.finger-auth-status.show { display: block; }
.finger-auth-status.ok { color: var(--success); }
.finger-auth-status.error { color: var(--danger); }
.auth-toast {
    position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
    width: calc(100% - 32px); max-width: 360px; z-index: var(--z-toast);
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-md); box-shadow: var(--shadow-md);
    padding: 12px 14px; font-size: 13px; color: var(--text-primary);
    transition: opacity .2s ease, transform .2s ease;
}
.auth-toast-header { display: flex; align-items: center; gap: 8px; font-weight: 600; margin-bottom: 6px; }
.auth-toast-header .fa { color: var(--primary); }
.auth-toast-close { margin-left: auto; border: 0; background: none; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; }
.auth-footer { font-size: 12px; color: var(--text-muted); text-align: center; }
.auth-logout-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; }
.auth-logout-text strong { color: var(--text-primary); }
.auth-logout-cancel { margin-top: 10px; }

@media (max-width: 768px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .filter-bar .form-group { flex: 1 1 100%; }
}
@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .pager-right { width: 100%; justify-content: flex-start; }
    .auth-card .panel-body { padding: 24px 18px; }
    .auth-brand-title { font-size: 18px; }
}

/* ========================= DELIVERY DATA / VIEW ========================= */
.delivery-search-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.delivery-search-field { position: relative; display: flex; align-items: center; flex: 1 1 420px; min-width: 260px; }
.delivery-search-addon { width: 40px; height: 40px; flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border); border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); background: var(--surface-muted); color: var(--text-secondary); }
.delivery-search-input { height: 40px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding-right: 36px; font-size: 12px; }
.delivery-search-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--text-muted); font-size: 18px; line-height: 1; cursor: pointer; display: none; }
.delivery-search-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--text-muted); }
.delivery-search-count { font-weight: 600; color: var(--primary); }
.delivery-list-table th { white-space: nowrap; }
.delivery-col-no { width: 52px; text-align: center; }
.delivery-col-amount { text-align: right; }
.delivery-col-status { width: 90px; text-align: center; }
.delivery-col-view { width: 64px; text-align: center; }
.delivery-id { font-weight: 600; white-space: nowrap; }
.delivery-amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.delivery-view-link { display: inline-block; color: var(--primary); font-size: 14px; line-height: 1; }
.delivery-view-link:hover { color: var(--primary-hover); }
.delivery-view-empty { color: var(--text-muted); }
.delivery-detail-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.delivery-floating-back { position: fixed; top: calc(var(--topbar-height) + 16px); right: 24px; z-index: 900; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 76px; height: 40px; padding: 0 16px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-md); }
.delivery-floating-back:hover { background: var(--primary-hover); color: #fff; }
.delivery-detail-panel { border: 1px solid var(--border); box-shadow: none; }
.delivery-detail-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--surface-muted); }
.delivery-detail-panel-heading h2 { margin: 0; font-size: 14px; }
.delivery-detail-id { color: var(--primary); font-weight: 600; }
.delivery-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.delivery-detail-item { min-width: 0; padding: 10px 12px; border: 1px solid var(--border-soft); border-radius: var(--radius-md); background: var(--surface-muted); }
.delivery-detail-item-wide { grid-column: 1 / -1; }
.delivery-detail-label { display: block; color: var(--text-secondary); font-size: 11px; font-weight: 600; }
.delivery-detail-value { display: block; margin-top: 4px; color: var(--text-primary); font-size: 12px; overflow-wrap: anywhere; }
.delivery-detail-money { font-variant-numeric: tabular-nums; font-weight: 600; }
/* Data supir mengikuti gaya tabel Ringkasan Delivery (.table-main):
   font 12px/Inter, row 34px, header abu, lebar mengikuti isi. */
.delivery-summary-table th {
    background: var(--surface-muted);
    border-top: 0 !important;
    border-bottom: 1px solid var(--border) !important;
    font-weight: 600;
    white-space: nowrap;
}
.page-content .delivery-summary-table tbody th { color: var(--text-secondary); }
.delivery-summary-table td { overflow-wrap: anywhere; }
.delivery-detail-columns { margin-top: 0; }
.delivery-transfer-note { margin-bottom: 10px; }
.delivery-transfer-note .status-pill { display: inline-block; font-size: 11px; }
.delivery-transfer-detail-panel { margin-bottom: 16px; }
.delivery-detail-table th { white-space: nowrap; }
.delivery-detail-total-row td { border-top: 1px solid var(--border); background: var(--surface-muted); }
.delivery-proof { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 12px; text-decoration: none; }
.delivery-proof:hover, .delivery-proof:focus { color: var(--primary-hover); text-decoration: underline; }
@media (max-width: 767px) {
    .delivery-detail-grid { grid-template-columns: 1fr; }
    .delivery-search-field { flex-basis: 100%; }
    .delivery-floating-back { top: calc(var(--topbar-height-sm) + 12px); right: 16px; }
}
