/* =========================================================
   Lahab Stock Inventory — Design System (Facebook-style)
   Loaded LAST in css.blade.php. Hard global override.

   Layers, in order:
     1. Tokens (CSS vars)
     2. Reset / base typography
     3. AdminLTE skin neutralization
     4. Layout shell
     5. Components: header, sidebar, buttons, forms, tables, cards, modals
     6. Auth (login) layout
     7. Utilities
     8. Print
   ========================================================= */

/* ============== 1. TOKENS ============== */
:root {
    /* Surfaces */
    --fb-bg:        #F0F2F5;
    --fb-surface:   #FFFFFF;
    --fb-surface-2: #F7F8FA;
    --fb-border:    #DADDE1;
    --fb-divider:   #E4E6E9;
    --fb-hover:     #E4E6E9;
    --fb-pressed:   #D8DADF;

    /* Text */
    --fb-text:           #050505;
    --fb-text-secondary: #65676B;
    --fb-text-tertiary:  #8A8D91;
    --fb-text-disabled:  #BCC0C4;

    /* Accents */
    --fb-blue:            #1877F2;
    --fb-blue-hover:      #166FE5;
    --fb-blue-active:     #1462C2;
    --fb-blue-soft:       #E7F3FF;
    --fb-blue-soft-hover: #D8E9FF;

    /* Status */
    --fb-green:      #42B72A;
    --fb-green-soft: #E8F5E5;
    --fb-amber:      #F7B928;
    --fb-amber-soft: #FFF6E0;
    --fb-rose:       #E41E3F;
    --fb-rose-soft:  #FBE5E8;

    /* Radius */
    --fb-radius-sm: 6px;
    --fb-radius-md: 8px;
    --fb-radius-lg: 12px;
    --fb-radius-xl: 16px;

    /* Elevation */
    --fb-shadow-xs: 0 1px 1px rgba(0, 0, 0, 0.04);
    --fb-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --fb-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --fb-shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.14), 0 2px 4px rgba(0, 0, 0, 0.08);

    /* Type stack */
    --fb-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
               "Source Sans Pro", Roboto, Arial, sans-serif;

    /* Layout */
    --fb-sidebar-w: 248px;
    --fb-header-h: 56px;
}

/* ============== 2. RESET / BASE ============== */
html, body {
    background-color: var(--fb-bg) !important;
    font-family: var(--fb-font) !important;
    color: var(--fb-text);
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Reset all Bootstrap heading colors to charcoal */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--fb-text);
    font-family: var(--fb-font);
    font-weight: 600;
    margin-top: 0;
}

a {
    color: var(--fb-blue);
}
a:hover, a:focus {
    color: var(--fb-blue-hover);
    text-decoration: none;
}

/* Tabular numbers wherever money / counts render */
.tw-font-mono, .font-mono,
.total_sell, .net, .invoice_due, .total_sell_return,
.total_purchase, .purchase_due,
.dataTable td.text-right, .dataTable td.text-end,
[class*="_amount"], [class*="_total"] {
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

/* ============== 3. ADMINLTE SKIN NEUTRALIZATION ============== */
/* The body still has "hold-transition skin-blue-light sidebar-mini" applied
   from app.blade.php; we neutralize every AdminLTE side-effect here so we
   don't need to touch every page. */

body[class*="skin-"] {
    background-color: var(--fb-bg) !important;
}
body[class*="skin-"] .main-header,
body[class*="skin-"] .main-header .navbar,
body[class*="skin-"] .main-header .logo {
    background-color: var(--fb-surface) !important;
    color: var(--fb-text) !important;
    border: none !important;
    box-shadow: none !important;
}

/* Kill any leftover AdminLTE gradient banners */
body[class*="skin-"] .main-header .navbar .nav > li > a {
    color: var(--fb-text) !important;
}

/* AdminLTE legacy content header (used on a lot of list pages) */
.content-header {
    background: transparent;
    padding: 20px 24px 12px !important;
    margin: 0 !important;
}
.content-header > h1 {
    margin: 0 0 4px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--fb-text) !important;
    line-height: 1.3 !important;
    letter-spacing: -0.01em;
}
.content-header > h1 > small {
    display: block;
    color: var(--fb-text-secondary) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    margin-top: 2px !important;
}
.content {
    padding: 12px 24px 32px !important;
}

/* ============== 4. LAYOUT SHELL ============== */
.lh-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--fb-bg);
}

.lh-main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    background: var(--fb-bg);
}

.lh-content-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--fb-bg);
}

/* ============== 5a. HEADER ============== */
.lh-header {
    height: var(--fb-header-h);
    background: var(--fb-surface);
    border-bottom: 1px solid var(--fb-border);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.lh-header__left,
.lh-header__right {
    display: flex;
    align-items: center;
    gap: 6px;
}
.lh-header__right { margin-left: auto; }

/* Icon button — used everywhere in the header */
.lh-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fb-hover);
    color: var(--fb-text);
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 120ms ease;
    position: relative;
}
.lh-icon-btn:hover, .lh-icon-btn:focus {
    background: var(--fb-pressed);
    color: var(--fb-text);
    outline: none;
}
.lh-icon-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.25);
}
.lh-icon-btn svg, .lh-icon-btn i {
    width: 20px; height: 20px;
    color: var(--fb-text);
}
.lh-icon-btn .badge {
    position: absolute;
    top: -2px; right: -2px;
    min-width: 18px; height: 18px;
    background: var(--fb-rose);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fb-surface);
}

/* Primary CTA in header ("New Sale") */
.lh-cta {
    background: var(--fb-blue);
    color: #fff !important;
    height: 36px;
    padding: 0 14px;
    border-radius: var(--fb-radius-md);
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    cursor: pointer;
    transition: background 120ms ease;
}
.lh-cta:hover, .lh-cta:focus {
    background: var(--fb-blue-hover);
    color: #fff !important;
    outline: none;
}
.lh-cta svg { width: 18px; height: 18px; }

/* Dropdown wrapping <details>/<summary> in current header markup */
.lh-header details > summary { list-style: none; }
.lh-header details > summary::-webkit-details-marker { display: none; }
.lh-header details > summary { cursor: pointer; }

/* Generic dropdown menu */
.lh-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 240px;
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    box-shadow: var(--fb-shadow-md);
    padding: 6px;
    z-index: 30;
}
.lh-menu a, .lh-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: var(--fb-radius-sm);
    color: var(--fb-text);
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.lh-menu a:hover, .lh-menu button:hover {
    background: var(--fb-hover);
    color: var(--fb-text);
}
.lh-menu svg { width: 18px; height: 18px; color: var(--fb-text-secondary); }
.lh-menu hr {
    margin: 6px 0;
    border: 0;
    border-top: 1px solid var(--fb-divider);
}

/* Page title shown in header (used by some pages) */
.lh-page-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-text);
    max-width: 40ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============== 5b. SIDEBAR ============== */
.lh-sidebar {
    width: var(--fb-sidebar-w);
    background: var(--fb-surface);
    border-right: 1px solid var(--fb-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
}
@media (max-width: 1023px) {
    .lh-sidebar {
        position: fixed;
        left: 0; top: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 200ms ease;
        box-shadow: var(--fb-shadow-lg);
    }
    .lh-sidebar.is-open { transform: translateX(0); }
}

.lh-brand {
    height: var(--fb-header-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--fb-border);
    background: var(--fb-surface);
    flex-shrink: 0;
}
.lh-brand__mark {
    width: 36px; height: 36px;
    border-radius: var(--fb-radius-md);
    background: var(--fb-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.lh-brand__name {
    font-weight: 600;
    color: var(--fb-text);
    font-size: 15px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}
.lh-brand__status {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--fb-green);
    box-shadow: 0 0 0 2px var(--fb-green-soft);
    flex-shrink: 0;
}

.lh-sidebar__search {
    padding: 12px 12px 8px;
    flex-shrink: 0;
}
.lh-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--fb-bg);
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 8px 12px;
    transition: border-color 120ms ease;
}
.lh-search:focus-within {
    background: var(--fb-surface);
    border-color: var(--fb-blue);
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15);
}
.lh-search svg { width: 16px; height: 16px; color: var(--fb-text-secondary); flex-shrink: 0; }
.lh-search input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    font-size: 14px;
    color: var(--fb-text);
    min-width: 0;
}
.lh-search input::placeholder { color: var(--fb-text-tertiary); }

.lh-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 16px;
}

/* The Menu::render output uses these legacy classes — restyle them */
.lh-sidebar__nav .sidebar-menu,
.lh-sidebar__nav ul.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.lh-sidebar__nav .sidebar-menu li {
    list-style: none;
    margin: 1px 0;
}
.lh-sidebar__nav .sidebar-menu > li > a,
.lh-sidebar__nav #side-bar a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 8px 10px !important;
    border-radius: var(--fb-radius-md);
    color: var(--fb-text) !important;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    line-height: 1.3;
    transition: background 100ms ease, color 100ms ease;
}
.lh-sidebar__nav #side-bar a:hover {
    background: var(--fb-hover) !important;
    color: var(--fb-text) !important;
}
.lh-sidebar__nav #side-bar a > svg,
.lh-sidebar__nav #side-bar a > i {
    width: 20px; height: 20px;
    color: var(--fb-text-secondary) !important;
    flex-shrink: 0;
}
.lh-sidebar__nav #side-bar a:hover > svg,
.lh-sidebar__nav #side-bar a:hover > i {
    color: var(--fb-blue) !important;
}

/* Active item — solid soft-blue pill */
.lh-sidebar__nav #side-bar a.theme-sidebar-active,
.lh-sidebar__nav #side-bar .theme-sidebar-active {
    background: var(--fb-blue-soft) !important;
    color: var(--fb-blue) !important;
}
.lh-sidebar__nav #side-bar a.theme-sidebar-active > svg,
.lh-sidebar__nav #side-bar a.theme-sidebar-active > i,
.lh-sidebar__nav #side-bar .theme-sidebar-active > svg,
.lh-sidebar__nav #side-bar .theme-sidebar-active > i {
    color: var(--fb-blue) !important;
}

/* Treeview (nested menu) children */
.lh-sidebar__nav .treeview-menu {
    list-style: none;
    margin: 2px 0 4px 32px;
    padding: 0;
    border-left: 1px solid var(--fb-divider);
}
.lh-sidebar__nav .treeview-menu li a {
    padding: 6px 10px !important;
    font-size: 13px;
    font-weight: 500;
    color: var(--fb-text-secondary) !important;
}
.lh-sidebar__nav .treeview-menu li a:hover {
    background: var(--fb-hover) !important;
    color: var(--fb-blue) !important;
}
.lh-sidebar__nav .treeview-menu li.active > a,
.lh-sidebar__nav .treeview-menu li > a.theme-sidebar-child-active {
    color: var(--fb-blue) !important;
    background: transparent !important;
}

/* Treeview caret */
.lh-sidebar__nav .pull-right-container .fa-angle-left,
.lh-sidebar__nav .pull-right-container i {
    color: var(--fb-text-tertiary) !important;
    transition: transform 120ms ease;
}
.lh-sidebar__nav li.menu-open > a .pull-right-container i {
    transform: rotate(-90deg);
}

/* ============== 5c. BUTTONS (unify everything to FB blue) ============== */
.btn,
.btn-default,
.btn-flat {
    border-radius: var(--fb-radius-sm) !important;
    font-weight: 600 !important;
    font-family: var(--fb-font);
    padding: 6px 14px !important;
    transition: background 120ms ease, border-color 120ms ease;
}

.btn-default {
    background: var(--fb-hover) !important;
    border-color: var(--fb-hover) !important;
    color: var(--fb-text) !important;
}
.btn-default:hover { background: var(--fb-pressed) !important; border-color: var(--fb-pressed) !important; }

.btn-primary,
.btn-primary:focus,
.btn-primary.active {
    background-color: var(--fb-blue) !important;
    border-color: var(--fb-blue) !important;
    color: #FFFFFF !important;
}
.btn-primary:hover {
    background-color: var(--fb-blue-hover) !important;
    border-color: var(--fb-blue-hover) !important;
}

.btn-success { background-color: var(--fb-green) !important; border-color: var(--fb-green) !important; }
.btn-success:hover { background-color: #379B22 !important; border-color: #379B22 !important; }
.btn-danger  { background-color: var(--fb-rose) !important; border-color: var(--fb-rose) !important; }
.btn-warning { background-color: var(--fb-amber) !important; border-color: var(--fb-amber) !important; color: #1F1B16 !important; }
.btn-info    { background-color: var(--fb-blue) !important; border-color: var(--fb-blue) !important; }
.btn-link    { color: var(--fb-blue) !important; }

/* DaisyUI gradient pills used in product/index */
.tw-dw-btn.tw-bg-gradient-to-r,
a.tw-dw-btn.tw-bg-gradient-to-r {
    background-image: none !important;
    background-color: var(--fb-blue) !important;
    border-radius: var(--fb-radius-md) !important;
    color: #FFFFFF !important;
    font-weight: 600 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}
.tw-dw-btn.tw-bg-gradient-to-r:hover { background-color: var(--fb-blue-hover) !important; }

/* ============== 5d. FORMS ============== */
.form-control,
input[type="text"].form-control,
input[type="email"].form-control,
input[type="password"].form-control,
input[type="number"].form-control,
textarea.form-control,
select.form-control {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border) !important;
    border-radius: var(--fb-radius-sm) !important;
    color: var(--fb-text);
    box-shadow: none !important;
    font-family: var(--fb-font);
    font-size: 14px;
    height: 38px;
    padding: 8px 12px;
}
.form-control:focus {
    border-color: var(--fb-blue) !important;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15) !important;
    outline: none;
}
textarea.form-control { height: auto; min-height: 80px; }
.has-error .form-control { border-color: var(--fb-rose) !important; }
.has-error .help-block, .text-danger { color: var(--fb-rose) !important; }

label {
    font-weight: 600;
    color: var(--fb-text);
    font-size: 13px;
    margin-bottom: 6px;
}

/* select2 */
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-color: var(--fb-border) !important;
    border-radius: var(--fb-radius-sm) !important;
    min-height: 38px !important;
}
.select2-container--default .select2-selection--single { height: 38px !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    color: var(--fb-text);
}
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px !important; }
.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--fb-blue) !important;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15) !important;
}
.select2-dropdown { border-color: var(--fb-border) !important; border-radius: var(--fb-radius-md) !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--fb-blue) !important;
}

/* Bootstrap input-group buttons */
.input-group-addon,
.input-group-btn .btn {
    border-color: var(--fb-border) !important;
    background: var(--fb-bg);
    color: var(--fb-text-secondary);
}

/* ============== 5e. CARDS / BOXES ============== */
.box, .box.box-solid, .box.box-primary, .box.box-info {
    background-color: var(--fb-surface) !important;
    border: 1px solid var(--fb-border) !important;
    border-top: 1px solid var(--fb-border) !important;
    border-radius: var(--fb-radius-md) !important;
    box-shadow: none !important;
}
.box > .box-header {
    border-bottom: 1px solid var(--fb-border) !important;
    color: var(--fb-text) !important;
    font-weight: 600;
    background-color: var(--fb-surface);
    padding: 14px 18px !important;
}
.box > .box-header .box-title {
    color: var(--fb-text) !important;
    font-weight: 600;
    font-size: 15px;
}
.box > .box-body { padding: 18px !important; }
.box > .box-footer {
    border-top: 1px solid var(--fb-border) !important;
    background-color: var(--fb-surface-2);
    border-radius: 0 0 var(--fb-radius-md) var(--fb-radius-md);
    padding: 12px 18px !important;
}

.tw-ring-gray-200 { --tw-ring-color: var(--fb-border) !important; }
.tw-bg-white     { background-color: var(--fb-surface) !important; }
.tw-bg-gray-100,
main.tw-bg-gray-100,
body.tw-bg-gray-100 { background-color: var(--fb-bg) !important; }

/* The legacy widget panel used on dashboards / filters */
.nav-tabs-custom {
    background: var(--fb-surface) !important;
    border-radius: var(--fb-radius-md) !important;
    border: 1px solid var(--fb-border) !important;
    box-shadow: none !important;
    margin-bottom: 16px;
}
.nav-tabs-custom > .nav-tabs {
    border-bottom: 1px solid var(--fb-border) !important;
    margin: 0 !important;
    padding: 0 12px;
}
.nav-tabs-custom > .nav-tabs > li > a {
    color: var(--fb-text-secondary) !important;
    font-weight: 600;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    margin-top: 4px;
}
.nav-tabs-custom > .nav-tabs > li.active > a,
.nav-tabs-custom > .nav-tabs > li.active > a:focus,
.nav-tabs-custom > .nav-tabs > li.active > a:hover {
    color: var(--fb-blue) !important;
    border-bottom-color: var(--fb-blue) !important;
    background: transparent !important;
}

/* ============== 5f. TABLES ============== */
table.dataTable,
table.table {
    background: var(--fb-surface);
    border-collapse: separate;
    border-spacing: 0;
    width: 100% !important;
}
table.dataTable thead th,
table.table > thead > tr > th {
    background-color: var(--fb-surface-2) !important;
    color: var(--fb-text-secondary) !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    border-bottom: 1px solid var(--fb-border) !important;
    padding: 10px 12px !important;
    text-align: left;
}
table.dataTable tbody tr:hover,
table.table > tbody > tr:hover {
    background-color: var(--fb-hover) !important;
}
table.dataTable tbody td,
table.table > tbody > tr > td {
    padding: 10px 12px !important;
    border-top: 1px solid var(--fb-divider) !important;
    color: var(--fb-text);
    font-size: 14px;
    vertical-align: middle !important;
}
table.dataTable.no-footer { border-bottom-color: var(--fb-border) !important; }

.dataTables_filter input,
.dataTables_length select {
    border-color: var(--fb-border) !important;
    border-radius: var(--fb-radius-sm) !important;
    padding: 6px 10px;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: var(--fb-blue) !important;
    border-color: var(--fb-blue) !important;
    color: #fff !important;
}

/* ============== 5g. MODALS ============== */
.modal-content {
    border-radius: var(--fb-radius-lg) !important;
    border: 1px solid var(--fb-border) !important;
    box-shadow: var(--fb-shadow-lg) !important;
}
.modal-header {
    border-bottom: 1px solid var(--fb-border) !important;
    background-color: var(--fb-surface);
    padding: 16px 20px;
    border-radius: var(--fb-radius-lg) var(--fb-radius-lg) 0 0;
}
.modal-header .modal-title { font-weight: 600; color: var(--fb-text); }
.modal-header .close { color: var(--fb-text-secondary); opacity: 1; font-size: 22px; }
.modal-body { padding: 20px; }
.modal-footer {
    border-top: 1px solid var(--fb-border) !important;
    padding: 14px 20px;
    background: var(--fb-surface-2);
    border-radius: 0 0 var(--fb-radius-lg) var(--fb-radius-lg);
}

/* Bootstrap labels (status pills) */
.label-success { background-color: var(--fb-green) !important; }
.label-danger  { background-color: var(--fb-rose)  !important; }
.label-warning { background-color: var(--fb-amber) !important; color: #1F1B16 !important; }
.label-info    { background-color: var(--fb-blue)  !important; }
.label { font-weight: 600; padding: 3px 8px; border-radius: 999px; font-size: 11px; letter-spacing: 0.02em; }

/* ============== 6. AUTH (LOGIN) ============== */
.lh-auth {
    min-height: 100vh;
    background: var(--fb-bg);
    display: flex;
    flex-direction: column;
    font-family: var(--fb-font);
    color: var(--fb-text);
}

.lh-auth__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 16px;
}
.lh-auth__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--fb-text);
}
.lh-auth__brand-mark {
    width: 36px; height: 36px;
    border-radius: var(--fb-radius-md);
    background: var(--fb-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}
.lh-auth__brand-name {
    font-weight: 700;
    color: var(--fb-text);
    font-size: 16px;
}
.lh-auth__topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lh-auth__topbar-actions a,
.lh-auth__topbar-actions button {
    color: var(--fb-text-secondary);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: var(--fb-radius-md);
    text-decoration: none;
    background: transparent;
    border: 0;
}
.lh-auth__topbar-actions a:hover,
.lh-auth__topbar-actions button:hover {
    color: var(--fb-text);
    background: var(--fb-hover);
}
.lh-auth__topbar-actions .lh-auth__cta {
    background: var(--fb-blue);
    color: #fff;
}
.lh-auth__topbar-actions .lh-auth__cta:hover {
    background: var(--fb-blue-hover);
    color: #fff;
}

.lh-auth__main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 48px;
}
.lh-auth__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 460px;
}
@media (min-width: 768px) {
    .lh-auth__grid.has-demo { max-width: 920px; grid-template-columns: 1fr 1fr; }
}

.lh-auth__card {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-xl);
    box-shadow: var(--fb-shadow-md);
    padding: 32px 28px;
}
.lh-auth__card-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--fb-text);
    letter-spacing: -0.02em;
}
.lh-auth__card-subtitle {
    font-size: 14px;
    color: var(--fb-text-secondary);
    margin: 0 0 24px;
}
.lh-auth__field { margin-bottom: 16px; }
.lh-auth__field label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--fb-text);
}
.lh-auth__field label a {
    font-weight: 600;
    color: var(--fb-blue);
    font-size: 12px;
}
.lh-auth__field-input-wrap { position: relative; }
.lh-auth__field input.form-control {
    height: 44px;
    font-size: 15px;
    border-radius: var(--fb-radius-md) !important;
    border: 1px solid var(--fb-border) !important;
    padding: 10px 14px;
}
.lh-auth__field input.form-control:focus {
    border-color: var(--fb-blue) !important;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.15) !important;
}
.lh-auth__pw-toggle {
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    width: 32px; height: 32px;
    background: transparent;
    border: 0;
    border-radius: var(--fb-radius-sm);
    color: var(--fb-text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lh-auth__pw-toggle:hover { background: var(--fb-hover); color: var(--fb-text); }
.lh-auth__pw-toggle svg { width: 18px; height: 18px; }

.lh-auth__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 20px;
}
.lh-auth__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--fb-text);
    cursor: pointer;
    margin: 0;
}
.lh-auth__check input { width: 16px; height: 16px; accent-color: var(--fb-blue); margin: 0; }

.lh-auth__submit {
    width: 100%;
    height: 48px;
    background: var(--fb-blue);
    color: #fff;
    border: 0;
    border-radius: var(--fb-radius-md);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 120ms ease;
    background-image: none !important;
}
.lh-auth__submit:hover, .lh-auth__submit:focus {
    background: var(--fb-blue-hover);
    outline: none;
}
.lh-auth__submit:focus-visible { box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.4); }

.lh-auth__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    color: var(--fb-text-tertiary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.lh-auth__divider::before,
.lh-auth__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--fb-divider);
}

.lh-auth__register {
    text-align: center;
    font-size: 14px;
    color: var(--fb-text-secondary);
    margin-top: 16px;
}
.lh-auth__register a {
    font-weight: 600;
    color: var(--fb-blue);
}

.lh-auth__demo {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-xl);
    padding: 28px 24px;
}
.lh-auth__demo h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--fb-text);
}
.lh-auth__demo p {
    font-size: 13px;
    color: var(--fb-text-secondary);
    margin: 0 0 16px;
    line-height: 1.5;
}
.lh-auth__demo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.lh-auth__demo-grid .demo-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--fb-radius-md);
    background: var(--fb-bg);
    color: var(--fb-text) !important;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--fb-border);
    transition: all 120ms ease;
    text-decoration: none;
    width: 100%;
    line-height: 1.2;
}
.lh-auth__demo-grid .demo-login:hover {
    background: var(--fb-blue-soft);
    border-color: var(--fb-blue);
    color: var(--fb-blue) !important;
}
.lh-auth__demo-grid .demo-login i { color: var(--fb-blue); font-size: 14px; }

/* Language switcher pill on auth pages */
.lh-auth__lang {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--fb-radius-md);
    background: var(--fb-hover);
    color: var(--fb-text);
    font-weight: 600;
    font-size: 13px;
    border: 0;
    cursor: pointer;
}
.lh-auth__lang:hover { background: var(--fb-pressed); }

/* ============== 7. UTILITIES & POLISH ============== */
.text-muted { color: var(--fb-text-secondary) !important; }
hr { border-color: var(--fb-divider); }

/* Sticky table header inside scrollable container */
.lh-content-scroll table.dataTable thead {
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Tooltip / popover styling kept minimal — Bootstrap defaults are fine,
   but darken background to FB charcoal. */
.tooltip-inner { background: var(--fb-text); color: #fff; font-weight: 500; }
.tooltip.top .tooltip-arrow { border-top-color: var(--fb-text); }
.tooltip.bottom .tooltip-arrow { border-bottom-color: var(--fb-text); }

/* The dashboard hero band: kill it visually so dashboards feel clean */
.tw-pb-6.theme-header-bg {
    background: var(--fb-bg) !important;
    background-image: none !important;
    border-bottom: 0 !important;
    color: var(--fb-text) !important;
}
.theme-header-bg, body[class*="skin-"] .theme-header-bg {
    background-image: none !important;
    background-color: var(--fb-surface) !important;
    color: var(--fb-text) !important;
    border-bottom: 1px solid var(--fb-border);
}
.theme-header-bg .tw-text-white,
.theme-header-bg .text-white,
.theme-header-bg .tw-text-primary-800,
.theme-header-bg h1 { color: var(--fb-text) !important; }

/* Loosen the body height clamp from app.blade.php so modals & dropdowns
   don't get clipped when the new shell uses .lh-shell wrapper */
.thetop { height: 100vh; overflow: hidden; }

/* ============== 9. DASHBOARD HERO + KPI ============== */
.lh-dash-hero {
    background: var(--fb-surface);
    border-bottom: 1px solid var(--fb-border);
    padding: 0;
}
.lh-dash-hero__inner {
    max-width: 1440px;
    padding: 24px 24px 24px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.lh-dash-hero__title { min-width: 0; flex: 1; }
.lh-dash-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fb-text);
    margin: 0;
    line-height: 1.2;
}
.lh-dash-subtitle {
    margin: 4px 0 0;
    color: var(--fb-text-secondary);
    font-size: 13px;
    font-weight: 500;
}
.lh-dash-hero__controls {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.lh-dash-control { min-width: 200px; }
.lh-dash-date-btn {
    height: 38px;
    background: var(--fb-bg);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-md);
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--fb-text);
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}
.lh-dash-date-btn:hover {
    background: var(--fb-hover);
    border-color: var(--fb-text-tertiary);
}
.lh-dash-date-btn svg { width: 18px; height: 18px; color: var(--fb-text-secondary); }

.lh-kpi-section {
    padding: 24px;
    max-width: 1440px;
}
.lh-kpi-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 12px;
}
@media (min-width: 640px) { .lh-kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lh-kpi-grid { grid-template-columns: repeat(4, 1fr); } }

.lh-kpi {
    background: var(--fb-surface);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
    min-width: 0;
}
.lh-kpi:hover {
    border-color: var(--fb-text-tertiary);
    transform: translateY(-1px);
    box-shadow: var(--fb-shadow-sm);
}
.lh-kpi__icon {
    width: 44px; height: 44px;
    border-radius: var(--fb-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.lh-kpi__icon svg { width: 22px; height: 22px; }
.lh-kpi__icon--sky   { background: var(--fb-blue-soft); color: var(--fb-blue); }
.lh-kpi__icon--green { background: var(--fb-green-soft); color: var(--fb-green); }
.lh-kpi__icon--amber { background: var(--fb-amber-soft); color: #B57A00; }
.lh-kpi__icon--rose  { background: var(--fb-rose-soft); color: var(--fb-rose); }

.lh-kpi__body { min-width: 0; flex: 1; }
.lh-kpi__label {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--fb-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.lh-kpi__value {
    margin: 2px 0 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--fb-text);
    letter-spacing: -0.01em;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============== 8. PRINT ============== */
@media print {
    html, body { background: #fff !important; }
    .lh-header, .lh-sidebar, .theme-header-bg, .theme-btn-bg { display: none !important; }
    .lh-main { display: block !important; }
    .lh-content-scroll { overflow: visible !important; height: auto !important; }
    .box { border: 1px solid #ddd !important; box-shadow: none !important; }
}
