/* ==========================================================================
   JPSC Group Holdings — Office Supplies Management System theme
   Navy + gold enterprise theme matching the JPSC inventory reference design.
   ========================================================================== */

:root {
    --sb-bg: #0d1a29;
    --sb-bg-2: #0a1420;
    --sb-line: #1b2c3f;
    --gold: #eaa60f;
    --gold-2: #f6bb2c;
    --gold-dark: #a4700a;
    --gold-soft: #fdf3d8;
    --ink: #13273f;
    --ink-2: #33475c;
    --muted: #7b8a99;
    --bg: #edf1f6;
    --card: #ffffff;
    --line: #e4e9f0;
    --blue: #1668c7;
    --blue-soft: #e8f1fd;
    --green: #189a52;
    --green-soft: #e5f6ec;
    --purple: #8b5cf6;
    --purple-soft: #f1ebfe;
    --red: #e11d48;
    --red-soft: #fdeaef;
    --indigo: #6366f1;
    --indigo-soft: #eceefe;
    --teal: #0ea5e9;
    --teal-soft: #e5f5fd;
    --orange: #f59e0b;
    --orange-soft: #fef3e0;
    --pink: #ec4899;
    --pink-soft: #fdeaf3;
    --sb-w: 264px;
    --sb-w-mini: 78px;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 42, 67, .05);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--ink-2);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; color: var(--ink); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- MudBlazor resets to keep the JPSC look ---------- */
.mud-application-layout-rtl, .mud-layout { all: unset; }
.mud-popover, .mud-dialog, .mud-snackbar { font-family: inherit; }
.mud-input-slot { border: none !important; box-shadow: none !important; }
.mud-dialog { border-radius: 16px !important; }
.mud-dialog .mud-dialog-title { font-weight: 800; color: var(--ink); font-size: 17px; }
.mud-snackbar { border-radius: 10px !important; font-weight: 600; }

/* ---------- Shell ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sb-w);
    background: linear-gradient(180deg, #10202f 0%, var(--sb-bg) 40%, var(--sb-bg-2) 100%);
    color: #cfd9e2;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: width .18s ease;
    overflow: hidden;
}
.sidebar::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-2));
}
.sidebar.mini { width: var(--sb-w-mini); }

.sb-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 14px 12px;
}
.logo-tile {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8ce4b, #eaa60f);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 14px rgba(234, 166, 15, .35);
}
.logo-tile img { width: 32px; height: 32px; object-fit: contain; }
.sb-title { font-weight: 800; font-size: 13px; color: #fff; line-height: 1.3; letter-spacing: .01em; }
.sb-collapse {
    margin-left: auto;
    width: 30px; height: 30px;
    border-radius: 8px;
    border: 1px solid #24374c;
    background: #14263a;
    color: #9fb0c0;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.sb-collapse:hover { color: var(--gold-2); border-color: var(--gold); }
.sidebar.mini .sb-title, .sidebar.mini .sb-section, .sidebar.mini .sb-item span,
.sidebar.mini .sb-foot-info, .sidebar.mini .sb-caret { display: none; }
.sidebar.mini .sb-item { justify-content: center; padding: 10px; }
.sidebar.mini .sb-brand { justify-content: center; }
.sidebar.mini .sb-collapse { margin-left: 0; }

.sb-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 10px; }
.sb-nav::-webkit-scrollbar { width: 5px; }
.sb-nav::-webkit-scrollbar-thumb { background: #22364b; border-radius: 4px; }

.sb-section {
    padding: 14px 20px 6px;
    font-size: 10px;
    letter-spacing: .14em;
    color: #66798c;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}
.sb-item {
    display: flex; align-items: center; gap: 11px;
    margin: 2px 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #b9c6d2;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    border: none;
    background: transparent;
    width: calc(100% - 20px);
    text-align: left;
}
.sb-item:hover { background: #16283c; color: #fff; }
.sb-item.active {
    background: linear-gradient(90deg, #f2b41c, #eaa60f);
    color: #241600;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(234, 166, 15, .35);
}
.sb-item .sb-ico { width: 18px; height: 18px; flex: 0 0 18px; display: flex; align-items: center; justify-content: center; }
.sb-item .sb-ico svg { width: 17px; height: 17px; }
.sb-caret { margin-left: auto; color: #7d8fa1; }
.sb-sub { padding-left: 26px; }
.sb-sub .sb-item { font-size: 12.5px; padding: 7px 12px; }

.sb-footer {
    border-top: 1px solid var(--sb-line);
    padding: 12px 14px 16px;
    display: flex; align-items: center; gap: 10px;
}
.sb-avatar {
    width: 36px; height: 36px; flex: 0 0 36px;
    border-radius: 50%;
    background: #1d3350;
    color: #dfe7ee;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 13px;
    position: relative;
}
.sb-avatar .dot {
    position: absolute; right: -1px; bottom: -1px;
    width: 9px; height: 9px; border-radius: 50%;
    background: #22c55e; border: 2px solid var(--sb-bg);
}
.sb-foot-info .n { font-size: 12.5px; font-weight: 800; color: #fff; }
.sb-foot-info .r { font-size: 10px; letter-spacing: .1em; color: #7d8fa1; font-weight: 700; }

.main {
    margin-left: var(--sb-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left .18s ease;
}
.main.mini { margin-left: var(--sb-w-mini); }

.topbar {
    background: #f7f9fc;
    border-bottom: 1px solid var(--line);
    padding: 9px 22px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 50;
    min-height: 56px;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.crumb .home { display: flex; align-items: center; gap: 6px; color: var(--blue); font-weight: 700; }
.crumb .sep { color: #b6c2ce; }
.crumb .cur { color: var(--ink); font-weight: 700; }
.top-right { display: flex; align-items: center; gap: 12px; }

.bell-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: #4a5c6e;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.bell-btn:hover { color: var(--gold-dark); border-color: #f0d896; }
.bell-badge {
    position: absolute; top: -6px; right: -6px;
    min-width: 18px; height: 18px;
    border-radius: 999px;
    background: var(--red);
    color: #fff;
    font-size: 10px; font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    border: 2px solid #f7f9fc;
}

.user-chip {
    display: flex; align-items: center; gap: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 6px 12px 6px 7px;
    box-shadow: var(--shadow);
    cursor: pointer;
}
.user-chip .av {
    width: 32px; height: 32px; border-radius: 9px;
    background: linear-gradient(135deg, #2f80e0, #1668c7);
    color: #fff; display: flex; align-items: center; justify-content: center;
}
.user-chip .n { font-size: 12.5px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.user-chip .r { font-size: 10.5px; color: var(--muted); font-weight: 600; }

.content { padding: 20px 22px 30px; flex: 1; }

/* ---------- Page head ---------- */
.page-head {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px 22px;
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}
.ph-title {
    font-size: 26px; font-weight: 800; color: var(--ink);
    display: flex; align-items: center; gap: 11px;
    line-height: 1.15;
}
.ph-title::before { content: '◆'; color: var(--gold); font-size: 17px; }
.ph-sub { color: var(--muted); font-size: 12.5px; margin-top: 6px; font-weight: 500; }
.ph-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.chip-updated {
    background: #f1f4f8; border: 1px solid var(--line);
    color: #5b6b7b; font-size: 11.5px; font-weight: 600;
    padding: 7px 13px; border-radius: 999px;
    display: inline-flex; gap: 7px; align-items: center;
    white-space: nowrap;
}

/* ---------- Section labels / KPI cards ---------- */
.sec-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
    color: #8a97a5; margin: 4px 2px 10px;
    text-transform: uppercase;
}
.sec-label::before {
    content: '';
    width: 13px; height: 11px;
    background:
        linear-gradient(var(--gold), var(--gold)) 0 4px / 3px 7px no-repeat,
        linear-gradient(var(--gold-2), var(--gold-2)) 5px 0 / 3px 11px no-repeat,
        linear-gradient(var(--gold), var(--gold)) 10px 2px / 3px 9px no-repeat;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.kpi {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--blue);
    border-radius: 11px;
    padding: 15px 17px 13px;
    position: relative;
    box-shadow: var(--shadow);
    min-height: 108px;
}
.kpi .t { font-size: 12.5px; font-weight: 700; color: #3c4f63; padding-right: 44px; }
.kpi .v { font-size: 27px; font-weight: 800; color: var(--ink); margin-top: 7px; letter-spacing: -.01em; }
.kpi .f { font-size: 11px; color: var(--muted); margin-top: 9px; display: flex; gap: 6px; align-items: center; font-weight: 500; }
.kpi .ic {
    position: absolute; top: 13px; right: 13px;
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
}
.kpi .ic svg, .kpi .ic .mud-icon-root { width: 18px; height: 18px; }

.c-blue { border-left-color: var(--blue); }
.c-green { border-left-color: var(--green); }
.c-gold { border-left-color: var(--gold); }
.c-purple { border-left-color: var(--purple); }
.c-red { border-left-color: var(--red); }
.c-indigo { border-left-color: var(--indigo); }
.c-teal { border-left-color: var(--teal); }
.c-pink { border-left-color: var(--pink); }
.c-orange { border-left-color: var(--orange); }

.ic-blue { background: var(--blue-soft); color: var(--blue); }
.ic-green { background: var(--green-soft); color: var(--green); }
.ic-gold { background: var(--gold-soft); color: var(--gold-dark); }
.ic-purple { background: var(--purple-soft); color: var(--purple); }
.ic-red { background: var(--red-soft); color: var(--red); }
.ic-indigo { background: var(--indigo-soft); color: var(--indigo); }
.ic-teal { background: var(--teal-soft); color: var(--teal); }
.ic-pink { background: var(--pink-soft); color: var(--pink); }
.ic-orange { background: var(--orange-soft); color: var(--orange); }

/* ---------- Panels ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 1200px) { .grid-2, .grid-2-1, .grid-3 { grid-template-columns: 1fr; } }

.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 16px;
    display: flex; flex-direction: column;
    min-width: 0;
}
.panel-h {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #eef2f6;
}
.panel-h .pic {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 36px;
}
.panel-h .pt { font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.panel-h .ps { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.panel-h .ctrl { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.panel-b { padding: 16px 18px; flex: 1; }
.panel-b.tight { padding: 0; }

.seg {
    display: flex; background: #f1f4f8; border: 1px solid var(--line);
    border-radius: 999px; padding: 3px; gap: 2px;
}
.seg button {
    border: 0; background: transparent;
    padding: 5px 13px; font-size: 11.5px; font-weight: 700;
    color: #6b7a89; border-radius: 999px; cursor: pointer;
    font-family: inherit;
}
.seg button.on { background: #fff; color: var(--gold-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .13); }

.chip {
    background: #f1f4f8; border: 1px solid var(--line);
    border-radius: 999px; padding: 5px 12px;
    font-size: 11.5px; font-weight: 700; color: #5b6b7b;
    display: inline-flex; gap: 6px; align-items: center;
    white-space: nowrap;
}
.chip.gold { background: var(--gold-soft); border-color: #f0d896; color: var(--gold-dark); }
.chip.green { background: var(--green-soft); border-color: #cdead9; color: var(--green); }
.chip.red { background: var(--red-soft); border-color: #f6cfd8; color: var(--red); }
.chip.blue { background: var(--blue-soft); border-color: #cfe1f8; color: var(--blue); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--line); background: #fff; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.tbl thead th {
    background: #15263b;
    color: #e8eef5;
    text-align: left;
    font-size: 10.5px;
    letter-spacing: .09em;
    font-weight: 800;
    padding: 11px 14px;
    border-bottom: 3px solid var(--gold);
    text-transform: uppercase;
    white-space: nowrap;
}
.tbl tbody td {
    padding: 11px 14px;
    border-bottom: 1px solid #eef2f6;
    color: var(--ink-2);
    vertical-align: middle;
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr:hover { background: #f8fafc; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.cell-title { font-weight: 800; color: var(--ink); font-size: 12.5px; }
.cell-sub { font-size: 11px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.mono-pill {
    background: #eef2f7; border: 1px solid #dfe6ee; border-radius: 7px;
    padding: 4px 9px;
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 11.5px; font-weight: 700; color: #2a3d52;
    white-space: nowrap;
}

.pill {
    display: inline-flex; align-items: center; gap: 6px;
    border-radius: 999px; padding: 4px 11px;
    font-size: 11px; font-weight: 800; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.gold { background: var(--gold-soft); color: var(--gold-dark); }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.gray { background: #eef1f5; color: #5b6b7b; }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.orange { background: var(--orange-soft); color: #b45309; }
.pill.indigo { background: var(--indigo-soft); color: var(--indigo); }

.abtn {
    width: 30px; height: 30px; border-radius: 8px;
    border: 1px solid transparent;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer; margin-right: 6px;
    background: #eef1f5; color: #5b6b7b;
}
.abtn svg { width: 15px; height: 15px; }
.abtn.view { background: var(--blue-soft); color: var(--blue); border-color: #cfe1f8; }
.abtn.edit { background: var(--green-soft); color: var(--green); border-color: #cdead9; }
.abtn.del { background: var(--red-soft); color: var(--red); border-color: #f6cfd8; }
.abtn.warn { background: var(--gold-soft); color: var(--gold-dark); border-color: #f0d896; }
.abtn:hover { filter: brightness(.96); }
.abtn:disabled { opacity: .4; cursor: not-allowed; filter: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    border-radius: 9px; padding: 9px 16px;
    font-size: 12.5px; font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer; font-family: inherit;
    white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 3px 10px rgba(22, 104, 199, .3); }
.btn-primary:hover:not(:disabled) { background: #1258a8; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 3px 10px rgba(24, 154, 82, .28); }
.btn-green:hover:not(:disabled) { background: #12813f; }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 3px 10px rgba(225, 29, 72, .25); }
.btn-red:hover:not(:disabled) { background: #be123c; }
.btn-gold { background: linear-gradient(90deg, #f6d47c, var(--gold)); color: #241600; box-shadow: 0 3px 12px rgba(234, 166, 15, .35); }
.btn-gold:hover:not(:disabled) { filter: brightness(1.04); }
.btn-outline { background: #fff; border-color: #d6dee7; color: #3c4f63; }
.btn-outline:hover:not(:disabled) { border-color: #b9c6d2; background: #f8fafc; }
.btn-soft-green { background: var(--green-soft); border-color: #cdead9; color: var(--green); }
.btn-sm { padding: 6px 12px; font-size: 11.5px; border-radius: 8px; }
.btn .spin {
    width: 14px; height: 14px;
    border: 2px solid currentColor; border-right-color: transparent;
    border-radius: 50%;
    animation: rot .7s linear infinite;
}
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Forms ---------- */
.fld { margin-bottom: 14px; }
.fld > label {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700; color: #3c4f63;
    margin-bottom: 6px;
}
.fld > label .req { color: var(--red); }
.inp, select.inp, textarea.inp {
    width: 100%;
    border: 1px solid #d6dee7;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
    font-family: inherit;
    outline: none;
}
.inp:focus, select.inp:focus, textarea.inp:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(234, 166, 15, .15);
}
.inp::placeholder { color: #a9b6c2; }
.inp-upper { text-transform: uppercase; }
.inp-upper::placeholder { text-transform: none; }
.inp.err { border-color: var(--red); }
.err-msg { color: var(--red); font-size: 11px; font-weight: 600; margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .form-row, .form-row-3 { grid-template-columns: 1fr; } }

.search-box {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #d6dee7; border-radius: 9px;
    padding: 8px 12px; min-width: 220px;
    color: #8a97a5;
}
.search-box input { border: none; outline: none; font-size: 12.5px; width: 100%; font-family: inherit; color: var(--ink); background: transparent; }

/* ---------- Charts ---------- */
.chart-note {
    display: flex; gap: 8px; align-items: center;
    font-size: 11px; color: var(--muted); font-weight: 500;
    margin-top: 10px;
}
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bar-row .lbl { width: 165px; font-size: 11.5px; font-weight: 700; color: #44586c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { flex: 1; height: 9px; border-radius: 999px; background: #edf1f6; overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1fae62, #189a52); }
.bar-row .val { width: 34px; text-align: right; font-size: 12px; font-weight: 800; color: var(--ink); }

.legend-row { display: flex; align-items: center; gap: 10px; padding: 8px 2px; font-size: 12.5px; }
.legend-row .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-row .nm { font-weight: 700; color: #44586c; }
.legend-row .ct { margin-left: auto; font-weight: 800; color: var(--ink); }
.legend-row .pc { color: var(--muted); font-size: 11px; font-weight: 600; width: 38px; text-align: right; }
.stacked { display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin: 6px 0 12px; }

/* ---------- Login ---------- */
.login-wrap {
    min-height: 100vh;
    background: #0a1220;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7vw;
    padding: 48px 6vw;
}
.login-wrap::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(900px 500px at 18% 30%, rgba(234, 166, 15, .10), transparent 60%),
        radial-gradient(700px 500px at 85% 70%, rgba(22, 104, 199, .10), transparent 60%),
        linear-gradient(135deg, #0c1524 0%, #0a1220 55%, #0b1424 100%);
}
.lg-dots {
    position: absolute;
    width: 150px; height: 150px;
    background-image: radial-gradient(rgba(234, 166, 15, .55) 1.4px, transparent 1.5px);
    background-size: 15px 15px;
    opacity: .5;
}
.lg-dots.tl { top: 40px; left: 40px; }
.lg-dots.bl { bottom: 60px; left: 40px; }
.lg-streak {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(234, 166, 15, .8), transparent);
    transform: rotate(-38deg);
}
.lg-streak.s1 { width: 620px; top: 16%; left: -80px; }
.lg-streak.s2 { width: 460px; bottom: 12%; left: 6%; opacity: .7; }
.lg-streak.s3 { width: 520px; top: 30%; right: -120px; opacity: .5; }

.lg-left { position: relative; z-index: 2; max-width: 560px; }
.lg-logo { width: 250px; filter: drop-shadow(0 0 34px rgba(234, 166, 15, .45)); margin-bottom: 26px; }
.lg-kicker { letter-spacing: .38em; color: #93a3b4; font-size: 12px; font-weight: 800; margin-bottom: 10px; }
.lg-h1 { font-size: 54px; font-weight: 900; color: var(--gold); line-height: 1.04; letter-spacing: -.01em; }
.lg-h2 { font-size: 54px; font-weight: 900; color: #f2f6fa; line-height: 1.04; letter-spacing: -.01em; }
.lg-bar { width: 62px; height: 3px; background: var(--gold); margin-top: 22px; border-radius: 2px; }

.lg-card {
    position: relative; z-index: 2;
    width: 430px;
    background: rgba(15, 27, 43, .92);
    border: 1px solid #223349;
    border-radius: 18px;
    padding: 36px 38px 32px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
    backdrop-filter: blur(6px);
}
.lg-title { font-size: 26px; font-weight: 800; color: #fff; text-align: center; }
.lg-title span { color: var(--gold); }
.lg-sub { text-align: center; color: #8fa1b3; font-size: 12.5px; margin: 9px 0 24px; font-weight: 500; }
.lg-lbl { display: flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 700; color: #dfe7ee; margin-bottom: 7px; }
.lg-lbl svg { width: 13px; height: 13px; color: var(--gold); }
.lg-inp {
    width: 100%;
    background: #0b1523;
    border: 1px solid #24344a;
    border-radius: 10px;
    padding: 12px 14px;
    color: #e8eef5;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
}
.lg-inp:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(234, 166, 15, .16); }
.lg-row { display: flex; justify-content: space-between; align-items: center; margin: 15px 0 19px; font-size: 12px; color: #9fb0c0; font-weight: 600; }
.lg-row label { display: flex; gap: 7px; align-items: center; cursor: pointer; }
.lg-row a { color: #9fb0c0; }
.lg-row a:hover { color: var(--gold-2); }
.lg-btn {
    width: 100%;
    background: linear-gradient(90deg, #f3d078, var(--gold));
    border: 0; border-radius: 10px;
    padding: 13px;
    font-weight: 800; letter-spacing: .14em;
    color: #241600; font-size: 12.5px;
    cursor: pointer; font-family: inherit;
    display: flex; justify-content: center; gap: 10px; align-items: center;
    box-shadow: 0 8px 24px rgba(234, 166, 15, .35);
}
.lg-btn:hover { filter: brightness(1.05); }
.lg-err {
    background: rgba(225, 29, 72, .12);
    border: 1px solid rgba(225, 29, 72, .4);
    color: #fda4b4;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 12px; font-weight: 600;
    margin-bottom: 14px;
}
.lg-foot {
    position: absolute; bottom: 24px; left: 0; right: 0;
    text-align: center; color: #5c6c7c; font-size: 11.5px; z-index: 2; font-weight: 500;
}

/* ---------- Misc ---------- */
.boot-splash {
    min-height: 100vh;
    display: flex; flex-direction: column; gap: 16px;
    align-items: center; justify-content: center;
    background: var(--sb-bg);
    color: #9fb0c0; font-weight: 600;
}
.boot-splash img { width: 90px; filter: drop-shadow(0 0 24px rgba(234, 166, 15, .5)); }

.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.aic { align-items: center; }
.jcb { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.grow { flex: 1; }
.right { text-align: right; }

.notif-item {
    display: flex; gap: 11px; padding: 11px 14px;
    border-bottom: 1px solid #eef2f6;
    cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: #f6faff; }
.notif-item .nd {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--blue); margin-top: 5px; flex: 0 0 8px;
}
.notif-item.read .nd { background: #d5dde5; }
.notif-item .nt { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.notif-item .nm { font-size: 11.5px; color: var(--muted); margin-top: 3px; font-weight: 500; }
.notif-item .nw { font-size: 10.5px; color: #a9b6c2; margin-top: 4px; font-weight: 600; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: #e4e9f0; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
    content: ''; position: absolute; left: -21px; top: 3px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #fff; border: 3px solid var(--blue);
}
.tl-item.done::before { border-color: var(--green); background: var(--green); }
.tl-item.bad::before { border-color: var(--red); background: var(--red); }
.tl-item .tt { font-size: 12.5px; font-weight: 800; color: var(--ink); }
.tl-item .td { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.dyn-row {
    display: grid;
    grid-template-columns: 2.2fr 90px 1fr 36px;
    gap: 10px;
    align-items: start;
    margin-bottom: 10px;
}
@media (max-width: 900px) { .dyn-row { grid-template-columns: 1fr; } }
.dyn-head {
    display: grid;
    grid-template-columns: 2.2fr 90px 1fr 36px;
    gap: 10px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .09em;
    color: #8a97a5; text-transform: uppercase;
    margin-bottom: 8px;
}
@media (max-width: 900px) { .dyn-head { display: none; } }
.rm-btn {
    width: 34px; height: 38px;
    border-radius: 9px;
    border: 1px solid #f6cfd8;
    background: var(--red-soft);
    color: var(--red);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800;
}
.add-btn {
    width: 34px; height: 38px;
    border-radius: 9px;
    border: 1px solid #cdead9;
    background: var(--green-soft);
    color: var(--green);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 800;
}
.supply-pick { position: relative; }
.supply-drop {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--line);
    border-radius: 10px; box-shadow: 0 12px 34px rgba(16, 42, 67, .16);
    max-height: 250px; overflow-y: auto; z-index: 40;
}
.supply-drop .grp { padding: 7px 12px 3px; font-size: 10px; font-weight: 800; letter-spacing: .1em; color: #8a97a5; text-transform: uppercase; background: #f8fafc; position: sticky; top: 0; }
.supply-drop .opt { padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.supply-drop .opt:hover { background: var(--gold-soft); }
.supply-drop .opt.dis { opacity: .45; cursor: not-allowed; }
.supply-drop .opt .st { font-size: 10.5px; font-weight: 800; }

.picked {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    border: 1px solid var(--line); background: #f8fafc;
    border-radius: 10px; padding: 7px 10px; min-height: 38px;
}

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-state .big { font-size: 15px; font-weight: 800; color: #55697d; margin-bottom: 6px; }

/* ---------- Inventory / detail helpers ---------- */
.adj-now {
    display: flex; gap: 18px; flex-wrap: wrap;
    background: #f6f9fc; border: 1px solid var(--line);
    border-radius: 10px; padding: 10px 14px; margin-bottom: 14px;
    font-size: 12px; color: #5b6b7b; font-weight: 600;
}
.adj-now b { color: var(--ink); font-size: 13px; }

.delta-up { color: var(--green); font-weight: 800; }
.delta-down { color: var(--red); font-weight: 800; }

.tx-type {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 800; padding: 3px 9px;
    border-radius: 999px; white-space: nowrap;
}
.tx-StockIn { background: var(--green-soft); color: var(--green); }
.tx-StockOut { background: var(--red-soft); color: var(--red); }
.tx-Adjustment { background: var(--blue-soft); color: var(--blue); }
.tx-Reservation { background: var(--gold-soft); color: var(--gold-dark); }
.tx-Release { background: #ede9fe; color: #7c3aed; }
.tx-Unreserve { background: #fff7ed; color: #c2410c; }

/* ---------- Detail / summary blocks ---------- */
.detail-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .detail-grid { grid-template-columns: 1fr; } }

.meta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.meta-list .mi { display: flex; flex-direction: column; gap: 3px; }
.meta-list .mk { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a97a5; }
.meta-list .mv { font-size: 13px; font-weight: 700; color: var(--ink); }

.callout {
    border-radius: 10px; padding: 12px 14px; font-size: 12.5px;
    font-weight: 600; display: flex; gap: 10px; align-items: flex-start;
    margin-bottom: 14px; line-height: 1.5;
}
.callout.gold { background: var(--gold-soft); color: #7a5a06; border: 1px solid #f0d896; }
.callout.green { background: var(--green-soft); color: #14663a; border: 1px solid #cdead9; }
.callout.red { background: var(--red-soft); color: #97132f; border: 1px solid #f6cfd8; }
.callout.blue { background: var(--blue-soft); color: #14487f; border: 1px solid #cfe1f8; }

.remark-box {
    background: #f8fafc; border: 1px solid var(--line); border-left: 3px solid var(--gold);
    border-radius: 8px; padding: 10px 14px; font-size: 12.5px; color: #44586c;
    font-weight: 500; line-height: 1.55;
}

.qty-input { width: 74px; text-align: center; }

/* ---------- Report tabs ---------- */
.report-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
@media (max-width: 900px) { .stat-strip { grid-template-columns: 1fr 1fr; } }
.stat-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.stat-box .sk { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #8a97a5; }
.stat-box .sv { font-size: 22px; font-weight: 900; color: var(--ink); margin-top: 4px; }


/* ---------- Inline "+" adders, password toggle, structured name ---------- */
.fld-plus, .inp-plus { display: flex; align-items: center; gap: 8px; }
.fld-plus > .inp, .fld-plus > select.inp,
.inp-plus > .inp, .inp-plus > select.inp { flex: 1; min-width: 0; }
.plus-btn {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 9px; border: 1px solid #f0d896;
    background: var(--gold-soft); color: var(--gold-dark);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.plus-btn:hover { filter: brightness(.97); border-color: var(--gold); }
.plus-btn.on { background: var(--gold); border-color: var(--gold-dark); color: #241600; }
.del-select-btn {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 9px; border: 1px solid #f5c6c6;
    background: #fef2f2; color: var(--red);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.del-select-btn:hover { filter: brightness(.95); border-color: var(--red); }
.del-select-btn:disabled { opacity: .5; cursor: not-allowed; }

.inline-add {
    display: flex; gap: 8px; align-items: center;
    background: #fbf7ec; border: 1px dashed #e6cf95;
    border-radius: 10px; padding: 9px; margin: 8px 0 14px;
}
.inline-add > .inp { flex: 1; min-width: 0; }

.pw-wrap { position: relative; }
.pw-wrap > input { padding-right: 44px; }
.eye-btn {
    position: absolute; top: 50%; right: 5px; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 8px;
    border: none; background: transparent; color: #8a97a5;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.eye-btn:hover { background: #eef2f6; color: var(--ink); }
.pw-wrap.dark > input { padding-right: 46px; }
.pw-wrap.dark .eye-btn { color: #7f92a5; }
.pw-wrap.dark .eye-btn:hover { background: #16283c; color: var(--gold-2); }

.name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.name-grid .nf { display: flex; flex-direction: column; gap: 4px; }
.name-grid .nf-sm { grid-column: span 1; }
.nf-lbl {
    font-size: 10px; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: #8a97a5;
}
.name-preview {
    display: flex; gap: 10px; align-items: center;
    background: #f6f9fc; border: 1px solid var(--line);
    border-radius: 9px; padding: 8px 12px; margin-top: 10px;
}
.name-preview .np-k {
    font-size: 10px; font-weight: 800; letter-spacing: .07em;
    text-transform: uppercase; color: #8a97a5;
}
.name-preview .np-v { font-size: 12.5px; font-weight: 800; color: var(--ink); }
@media (max-width: 600px) { .name-grid { grid-template-columns: 1fr; } }

.editable-hint { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 5px; }

/* ---------- Read-only account view ---------- */
.acct-head {
    display: flex; align-items: center; gap: 12px;
    background: #f6f9fc; border: 1px solid var(--line);
    border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.acct-head .ah-av {
    width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px;
    background: var(--navy, #0d1a29); color: var(--gold-2, #eaa60f);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 900; letter-spacing: .04em;
}
/* Four-character department codes (ACCT, PROC, HRD-wide) need a smaller face to fit the square. */
.acct-head .ah-av.long { font-size: 10.5px; letter-spacing: .02em; }
.acct-head .ah-n { font-size: 14px; font-weight: 800; color: var(--ink); }
.acct-head .ah-u { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-top: 2px; }
.acct-head .ah-pills { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.sec-title {
    font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
    color: #8a97a5; margin: 16px 0 9px;
}

.pw-view {
    display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid #d6dee7; border-radius: 9px; padding: 8px 10px;
}
.pw-view .pwv {
    flex: 1; min-width: 0;
    font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace;
    font-size: 13px; font-weight: 700; color: var(--ink);
    letter-spacing: .06em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pw-view .pwv.na { font-family: inherit; letter-spacing: 0; color: var(--muted); font-weight: 600; font-style: italic; }
.pw-view button {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px;
    border: 1px solid var(--line); background: #f4f7fa; color: #5b6b7b;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pw-view button:hover { background: var(--gold-soft); border-color: #f0d896; color: var(--gold-dark); }
.view-note { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 7px; }

/* ==========================================================================
   Audit Reports — formal report sheet with filter bar
   ========================================================================== */

.audit-filter-bar {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 20px 24px; margin-bottom: 20px; box-shadow: var(--shadow);
}
.af-row {
    display: flex; gap: 16px; flex-wrap: wrap; align-items: end;
}
.af-fld {
    display: flex; flex-direction: column; gap: 5px; min-width: 150px;
}
.af-fld label {
    font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.af-fld .inp {
    height: 38px; font-size: 13px;
}
.af-actions {
    display: flex; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}

/* Report sheet — formal print-ready layout */
.report-sheet {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 36px 40px; box-shadow: var(--shadow);
}
.rs-header {
    text-align: center; margin-bottom: 20px;
}
.rs-company {
    font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: .5px;
}
.rs-system {
    font-size: 14px; font-weight: 700; color: var(--blue); margin-top: 2px;
}
.rs-title {
    font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 4px;
    letter-spacing: .08em; text-transform: uppercase;
}
.rs-meta {
    display: flex; gap: 28px; flex-wrap: wrap;
    border-top: 2px solid var(--blue); border-bottom: 1px solid var(--line);
    padding: 12px 0; margin: 16px 0 22px;
    font-size: 12.5px;
}
.rs-meta b { color: var(--ink); font-weight: 700; }
.rs-meta span { color: var(--ink-2); }

.rs-table {
    width: 100%; border-collapse: collapse; font-size: 12.5px; margin-bottom: 22px;
}
.rs-table th {
    background: var(--ink); color: #fff; padding: 9px 10px; text-align: left;
    font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    border: none;
}
.rs-table td {
    padding: 8px 10px; border-bottom: 1px solid var(--line); color: var(--ink-2);
}
.rs-table tr:nth-child(even) td { background: #f8f9fb; }
.rs-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.rs-summary {
    background: #f4f6f9; border: 1px solid var(--line); border-radius: 10px;
    padding: 16px 20px; margin-bottom: 28px;
}
.rs-summary h4 {
    margin: 0 0 10px; font-size: 11.5px; font-weight: 800; color: var(--ink);
    text-transform: uppercase; letter-spacing: .06em;
}
.rs-sum-grid {
    display: flex; gap: 36px; flex-wrap: wrap;
}
.rs-sum-item {
    font-size: 12.5px; color: var(--ink-2);
}
.rs-sum-item b { color: var(--ink); font-weight: 800; }

.rs-sigs {
    display: flex; gap: 80px; margin-top: 44px;
}
.rs-sig { flex: 1; }
.rs-sig-line {
    border-top: 1px solid var(--ink); margin-top: 56px; padding-top: 6px;
}
.rs-sig-label {
    font-size: 11.5px; color: var(--ink-2); font-weight: 600;
}
.rs-sig-date {
    font-size: 11px; color: var(--muted); margin-top: 2px;
}

/* ---------- User chip dropdown ---------- */
.chip-dropdown {
    position: fixed; top: 52px; right: 22px; z-index: 80;
    background: #fff; border: 1px solid var(--line); border-radius: 14px;
    box-shadow: 0 14px 40px rgba(16,42,67,.14);
    min-width: 230px; overflow: hidden;
}
.chip-header {
    padding: 14px 16px 12px; border-bottom: 1px solid var(--line);
}
.chip-name {
    font-size: 14px; font-weight: 800; color: var(--ink); line-height: 1.3;
}
.chip-role {
    font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 1px;
}
.chip-item {
    display: flex; align-items: center; justify-content: flex-start; gap: 12px;
    width: 100%; border: 0; background: transparent;
    padding: 11px 16px; cursor: pointer; text-align: left;
    font-size: 13.5px; font-weight: 600; color: #3c4f63;
    transition: background .15s;
}
.chip-item:hover {
    background: #f4f6f9;
}
.chip-item .ico-wrap {
    color: #7b8fa3; flex-shrink: 0;
}
.chip-form { margin: 0; }
.chip-logout { color: #c0392b; }
.chip-logout:hover { background: #fef2f2; }
.chip-logout .ico-wrap { color: #c0392b; }
