/* =========================================================
   RMS - Rice & Curry Anuradhapura
   Design tokens: warm turmeric palette, matching MJPOS/Kussiya
   dashboard structure (white sidebar, top navbar, colorful cards)
   ========================================================= */
:root {
    --color-bg:        #F4F6FB;
    --color-surface:   #FFFFFF;
    --color-sidebar:   #FFFFFF;
    --color-navy:      #16305C;   /* greeting banner / primary buttons */
    --color-navy-2:    #0E1F42;
    --color-accent:    #C1872E;   /* turmeric gold */
    --color-accent-2:  #7A2E2E;   /* curry maroon */
    --color-leaf:      #4B6B3A;   /* curry leaf green */
    --color-teal:      #1D7A8C;   /* sign-in button */
    --color-text:      #1E2430;
    --color-text-muted:#7A8194;
    --color-border:    #E7E9F0;
    --color-danger:    #B23A3A;
    --color-success:   #3F9142;
    --color-warning:   #C1872E;

    /* stat-card colors (matches reference: blue/green/purple/red) */
    --stat-blue:   #3B78D8;
    --stat-blue-2: #2E5FB0;
    --stat-green:  #3F9142;
    --stat-green-2:#2E7532;
    --stat-purple: #7C4DBE;
    --stat-purple-2:#63399C;
    --stat-red:    #B23A3A;
    --stat-red-2:  #8F2C2C;

    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(20,25,40,0.06);
    --shadow-md: 0 8px 24px rgba(20,25,40,0.10);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; margin: 0; }
.brand-title { font-family: var(--font-display); font-weight: 700; }

a { color: inherit; text-decoration: none; }

/* ---------- App Shell ---------- */
.app-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.sidebar {
    width: 236px;
    height: 100vh;
    background: linear-gradient(180deg, #141B2E 0%, #0F1526 100%);
    color: #C7CDDB;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,0.06);
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar .brand-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--color-accent), #8A611F);
    color: #fff;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.sidebar .brand-title { font-size: 15.5px; color: #fff; line-height: 1.25; }
.sidebar .brand-sub {
    font-size: 10.5px;
    color: #7C879E;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sidebar nav {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sidebar nav::-webkit-scrollbar { width: 5px; }
.sidebar nav::-webkit-scrollbar-track { background: transparent; }
.sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 10px; }
.sidebar nav::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

.sidebar .nav-section-label {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5A6478;
    padding: 16px 18px 6px;
}

.sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1px 10px;
    padding: 9px 12px;
    font-size: 13.5px;
    color: #AEB6C7;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar a.nav-link:hover { background: rgba(255,255,255,0.05); color: #fff; }

.sidebar a.nav-link.active {
    background: linear-gradient(135deg, var(--stat-blue), var(--stat-blue-2));
    color: #fff;
}

.sidebar .nav-link .nav-icon {
    width: 18px; text-align: center; font-size: 14.5px;
    flex-shrink: 0; opacity: 0.9;
}

.sidebar .user-box {
    margin: 8px 14px 14px;
    padding: 12px 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius);
    font-size: 12.5px;
}

.sidebar .user-box .name { font-weight: 700; color: #fff; }
.sidebar .user-box .role {
    display: inline-block; margin-top: 4px;
    color: var(--color-accent); font-size: 10.5px;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-weight: 700;
}

.sidebar .logout-link {
    display: inline-block; margin-top: 8px; font-size: 12px;
    color: #E8A0A0; font-weight: 600;
}

/* ---------- Top navbar ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

.topbar {
    z-index: 0;
    height: 60px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 26px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.topbar .crumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; color: var(--color-text-muted);
}
.topbar .crumb .menu-icon {
    width: 30px; height: 30px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    background: #F2F4FA; color: var(--color-text-muted); font-size: 15px;
}
.topbar .crumb a { color: var(--color-teal); font-weight: 600; }

.topbar .actions { display: flex; align-items: center; gap: 16px; }

.bell-wrap { position: relative; width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; background: #F2F4FA; font-size: 16px; }
.bell-wrap .bell-badge {
    position: absolute; top: -3px; right: -3px;
    background: var(--color-accent); color: #fff;
    font-size: 9.5px; font-weight: 700;
    min-width: 16px; height: 16px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; position: relative; cursor: pointer; user-select: none; }
.user-chip .avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--color-navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px; font-weight: 700;
}
.user-chip .caret { color: var(--color-text-muted); font-size: 10px; transition: transform 0.15s ease; }
.user-chip:has(.user-dropdown.open) .caret { transform: rotate(180deg); }

.user-dropdown {
    display: none;
    position: absolute; top: calc(100% + 12px); right: 0; z-index: 50;
    width: 220px; background: #fff; border-radius: 10px; border: 1px solid var(--color-border);
    box-shadow: var(--shadow-md); overflow: hidden; cursor: default;
}
.user-dropdown.open { display: block; }
.user-dropdown .ud-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--color-border); }
.user-dropdown .ud-header .avatar { width: 36px; height: 36px; font-size: 14px; }
.user-dropdown .ud-name { font-size: 13px; font-weight: 700; color: var(--color-text); }
.user-dropdown .ud-role { font-size: 11px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.user-dropdown .ud-item {
    display: flex; align-items: center; gap: 10px; padding: 11px 16px; font-size: 12.5px; font-weight: 600;
    color: var(--color-text); border-bottom: 1px solid var(--color-border);
}
.user-dropdown .ud-item:last-child { border-bottom: none; }
.user-dropdown .ud-item:hover { background: var(--color-bg); }
.user-dropdown .ud-item i { width: 16px; color: var(--color-text-muted); }
.user-dropdown .ud-logout { color: var(--color-danger); }
.user-dropdown .ud-logout i { color: var(--color-danger); }

.content { padding: 26px; flex: 1; overflow-y: auto; }

/* ---------- Greeting banner ---------- */
.greeting-banner {
    background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 22px;
}
.greeting-banner h2 { font-size: 20px; margin-bottom: 4px; }
.greeting-banner .meta {
    font-size: 12.5px; color: rgba(255,255,255,0.72);
    display: flex; gap: 16px; flex-wrap: wrap;
}
.greeting-banner .banner-actions { display: flex; gap: 10px; }
.greeting-banner .btn-outline {
    background: rgba(255,255,255,0.1); color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
}
.greeting-banner .btn-teal { background: var(--color-teal); color: #fff; }

/* ---------- Stat cards (colorful, matches reference) ---------- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card::after {
    content: '';
    position: absolute; right: -22px; bottom: -22px;
    width: 90px; height: 90px; border-radius: 50%;
    background: rgba(255,255,255,0.10);
}
.stat-card .stat-icon {
    width: 36px; height: 36px; border-radius: 9px;
    background: rgba(255,255,255,0.18);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; margin-bottom: 14px;
}
.stat-card .stat-label {
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.82);
    font-weight: 700;
}
.stat-card .stat-value {
    font-family: var(--font-display);
    font-size: 25px;
    margin-top: 6px;
    font-weight: 700;
}
.stat-card .stat-sub {
    font-size: 11.5px;
    margin-top: 6px;
    color: rgba(255,255,255,0.75);
}

.stat-card.c-blue   { background: linear-gradient(135deg, var(--stat-blue), var(--stat-blue-2)); }
.stat-card.c-green  { background: linear-gradient(135deg, var(--stat-green), var(--stat-green-2)); }
.stat-card.c-purple { background: linear-gradient(135deg, var(--stat-purple), var(--stat-purple-2)); }
.stat-card.c-red    { background: linear-gradient(135deg, var(--stat-red), var(--stat-red-2)); }
.stat-card.c-gold   { background: linear-gradient(135deg, #C1872E, #A06B1F); }

/* ---------- Action Required row ---------- */
.action-required-head {
    display: flex; align-items: center; gap: 8px;
    font-size: 13.5px; font-weight: 700; margin-bottom: 12px;
}
.action-required-head .count-badge {
    background: var(--color-danger); color: #fff;
    font-size: 11px; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.action-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    border: 1px solid transparent;
}
.action-item .a-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    flex-shrink: 0;
}
.action-item .a-value { font-size: 16px; font-weight: 700; display: block; }
.action-item .a-label { color: var(--color-text-muted); }

.action-item.warn { background: #FDF3E4; border-color: #F5E0BC; }
.action-item.warn .a-icon { background: rgba(193,135,46,0.18); color: #8A611F; }
.action-item.danger { background: #FBEBEB; border-color: #F2D2D2; }
.action-item.danger .a-icon { background: rgba(178,58,58,0.16); color: #8A2A2A; }
.action-item.info { background: #EAF1FB; border-color: #CFDFF5; }
.action-item.info .a-icon { background: rgba(59,120,216,0.16); color: #2E5FB0; }

/* ---------- Panels ---------- */
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}
.panel-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px;
}
.panel-head h3 { font-size: 15px; }
.panel-head .link { font-size: 12.5px; color: var(--color-teal); font-weight: 700; }

.snapshot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
}
.snapshot-card {
    border-radius: 10px;
    padding: 14px 16px;
}
.snapshot-card .s-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.snapshot-card .s-value { font-family: var(--font-display); font-size: 19px; font-weight: 700; margin-top: 4px; }
.snapshot-card .s-sub { font-size: 11.5px; margin-top: 6px; }
.snapshot-card .s-link { font-size: 11.5px; margin-top: 6px; font-weight: 700; }

.snapshot-card.sc-red    { background: #FBEBEB; }
.snapshot-card.sc-red .s-label,
.snapshot-card.sc-red .s-value { color: #8A2A2A; }
.snapshot-card.sc-blue   { background: #EAF1FB; }
.snapshot-card.sc-blue .s-label,
.snapshot-card.sc-blue .s-value { color: #2E5FB0; }
.snapshot-card.sc-gold   { background: #FDF3E4; }
.snapshot-card.sc-gold .s-label,
.snapshot-card.sc-gold .s-value { color: #8A611F; }
.snapshot-card .s-link { color: var(--color-teal); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--color-text);
}
.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 13.5px;
    font-family: var(--font-body);
    background: #fff;
    color: var(--color-text);
}
.form-control:focus {
    outline: none;
    border-color: var(--color-teal);
    box-shadow: 0 0 0 3px rgba(29,122,140,0.14);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-teal); color: #fff; }
.btn-primary:hover { background: #175F6E; box-shadow: 0 2px 8px rgba(29,122,140,0.25); }
.btn-secondary { background: var(--color-bg); color: var(--color-text); border: 1px solid var(--color-border); }
.btn-secondary:hover { background: #ECEEF4; }
.btn-danger { background: var(--color-danger); color: #fff; }
.btn-danger:hover { background: #8F2C2C; }

.alert {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.alert-danger { background: #FBECEC; color: var(--color-danger); border: 1px solid #F0CFCF; }
.alert-success { background: #EEF3EA; color: var(--color-success); border: 1px solid #D3E0CA; }

/* ---------- Tables ---------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
    text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--color-text-muted); padding: 10px 12px; border-bottom: 2px solid var(--color-border);
}
table.data-table td { padding: 11px 12px; border-bottom: 1px solid var(--color-border); }
table.data-table tr:hover td { background: #F9FAFD; }

.badge {
    display: inline-block; padding: 3px 10px; border-radius: 100px;
    font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-gold { background: rgba(193,135,46,0.15); color: #8A611F; }
.badge-green { background: rgba(63,145,66,0.15); color: #2E7532; }
.badge-red { background: rgba(178,58,58,0.15); color: #8A2A2A; }
.badge-blue { background: rgba(59,120,216,0.15); color: #2E5FB0; }
.badge-gray { background: #EEF0F5; color: var(--color-text-muted); }
.badge i { margin-right: 4px; font-size: 10px; }

/* ---------- Status Timeline (order detail page) ---------- */
.status-timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; position: relative; }
.tl-node {
    width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; color: #fff; z-index: 1;
}
.tl-line {
    position: absolute; left: 17px; top: 34px; bottom: -6px;
    width: 2px; background: var(--color-border);
}
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 22px; flex: 1; }
.tl-item:last-child .tl-body { padding-bottom: 4px; }
.tl-status { font-size: 13.5px; font-weight: 700; color: var(--color-text); display: flex; align-items: center; gap: 8px; }
.tl-meta { font-size: 11.5px; color: var(--color-text-muted); margin-top: 3px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-dot { opacity: 0.5; }
.tl-current-tag {
    font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
    background: rgba(29,122,140,0.14); color: var(--color-teal);
    padding: 2px 8px; border-radius: 100px;
}
.tl-item.tl-current .tl-node { box-shadow: 0 0 0 4px rgba(29,122,140,0.14); }

.tl-gray  { background: linear-gradient(135deg, #9AA3B5, #7C879E); }
.tl-blue  { background: linear-gradient(135deg, var(--stat-blue), var(--stat-blue-2)); }
.tl-gold  { background: linear-gradient(135deg, var(--color-accent), #8A611F); }
.tl-green { background: linear-gradient(135deg, var(--stat-green), var(--stat-green-2)); }
.tl-red   { background: linear-gradient(135deg, var(--stat-red), var(--stat-red-2)); }

/* ---------- Modal popup (reusable across pages) ---------- */
.rms-modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(20,25,40,0.55);
    z-index: 1000; align-items: center; justify-content: center; padding: 20px;
}
.rms-modal-overlay.open { display: flex; }
.rms-modal {
    background: var(--color-surface); border-radius: var(--radius); padding: 24px;
    width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-md); animation: rmsModalIn 0.15s ease;
}
@keyframes rmsModalIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.rms-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.rms-modal-head h3 { font-size: 16px; }
.rms-modal-close {
    background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 8px;
    width: 30px; height: 30px; cursor: pointer; color: var(--color-text-muted);
}
.rms-modal-close:hover { color: var(--color-danger); }

/* ---------- Shared: gradient page header banner (Stock/Suppliers/Purchasing style) ---------- */
.stock-header {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(120deg, var(--color-navy) 0%, var(--color-navy-2) 100%);
    color: #fff; border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; flex-wrap: wrap;
}
.stock-header .sth-icon { width: 44px; height: 44px; border-radius: 11px; background: rgba(255,255,255,0.16); display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; }
.stock-header .sth-text { flex: 1; min-width: 200px; }
.stock-header h2 { font-size: 19px; margin: 0 0 2px; color: #fff; }
.stock-header .sth-sub { font-size: 12.5px; color: rgba(255,255,255,0.8); }
.stock-header .sth-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.sth-btn { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.25); font-size: 12.5px; }
.sth-btn:hover { background: rgba(255,255,255,0.24); }

/* ---------- Shared: bordered mini stat cards ---------- */
.stat-mini-grid { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.stat-mini { flex: 1; min-width: 130px; background: #fff; border: 1.5px solid; border-radius: 10px; padding: 14px 12px; text-align: center; }
.stat-mini .sm-value { font-size: 22px; font-weight: 700; font-family: var(--font-display); }
.stat-mini .sm-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); font-weight: 700; margin-top: 2px; }
.sm-blue  { border-color: #B7CDEE; } .sm-blue .sm-value { color: var(--stat-blue-2); }
.sm-red   { border-color: #F0BEBE; } .sm-red .sm-value { color: var(--color-danger); }
.sm-gold  { border-color: #EAD3A0; } .sm-gold .sm-value { color: #8A611F; }
.sm-green { border-color: #C3DBB4; } .sm-green .sm-value { color: var(--color-success); }

/* ---------- Shared: alert chips ---------- */
.alert-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.alert-chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 100px; font-size: 12px; font-weight: 700; }
.ac-red { background: var(--color-danger); color: #fff; }
.ac-gold { background: var(--color-accent); color: #fff; }
.ac-blue { background: var(--stat-blue); color: #fff; }

/* ---------- Shared: quick action buttons row ---------- */
.quick-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.qa-btn {
    flex: 1; min-width: 140px; display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 14px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px;
    font-size: 12.5px; font-weight: 700; color: var(--color-text); box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qa-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--color-teal); }
.qa-btn i { color: var(--color-accent); }

/* ---------- Shared: filter bar ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 10px; padding: 10px 14px; }
.fb-search { display: flex; align-items: center; gap: 8px; background: var(--color-bg); border-radius: 8px; padding: 8px 12px; flex: 1; min-width: 180px; color: var(--color-text-muted); }
.fb-search input { border: none; background: transparent; outline: none; font-size: 13px; width: 100%; color: var(--color-text); }
.fb-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.fb-pill { padding: 7px 13px; border-radius: 100px; border: 1px solid var(--color-border); background: #fff; font-size: 12px; font-weight: 700; color: var(--color-text-muted); cursor: pointer; display: flex; align-items: center; gap: 5px; }
.fb-pill.active { background: var(--color-text); color: #fff; border-color: var(--color-text); }
.fb-pill.fp-green.active { background: var(--stat-green); border-color: var(--stat-green); }
.fb-pill.fp-gold.active { background: var(--color-accent); border-color: var(--color-accent); }
.fb-pill.fp-red.active { background: var(--color-danger); border-color: var(--color-danger); }

/* ---------- Shared: dark table header panel ---------- */
.dark-table-panel { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.dtp-head { background: #1C2333; color: #fff; padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; }
.dtp-count { background: rgba(255,255,255,0.15); font-size: 11px; padding: 3px 10px; border-radius: 100px; font-weight: 700; }
.dark-table-panel .data-table { margin: 0; background: #fff; }
.dark-table-panel .data-table th { background: #fff; }

/* ---------- Shared: stock level bar (Stock page) ---------- */
.stock-level-cell { display: flex; flex-direction: column; gap: 4px; min-width: 70px; }
.stock-bar { width: 100%; height: 5px; background: var(--color-border); border-radius: 4px; overflow: hidden; }
.stock-bar-fill { height: 100%; border-radius: 4px; }

/* ---------- Shared: compact colored icon buttons ---------- */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px;
    border: none; cursor: pointer; margin-right: 3px; font-size: 12.5px;
}
.icon-btn-blue { background: rgba(59,120,216,0.14); color: #2E5FB0; }
.icon-btn-gold { background: rgba(193,135,46,0.14); color: #8A611F; }
.icon-btn-teal { background: rgba(29,122,140,0.14); color: #1D7A8C; }
.icon-btn-red  { background: rgba(178,58,58,0.14); color: #8A2A2A; }
.icon-btn-gray { background: rgba(20,25,40,0.06); color: var(--color-text-muted); }
.icon-btn:hover { filter: brightness(0.92); }

/* ---------- Shared: history/movement rows (used in modals) ---------- */
.history-row { padding: 10px 0; border-bottom: 1px solid var(--color-border); font-size: 12.5px; }
.hr-top { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.hr-amount { margin-left: auto; color: var(--color-text-muted); font-size: 11.5px; }
.hr-meta { display: flex; gap: 14px; color: var(--color-text-muted); flex-wrap: wrap; margin-top: 2px; }

/* ============================================================
   Login page — split-screen, matches Kussiya/MJPOS reference
   ============================================================ */
.login-wrap {
    min-height: 100vh;
    display: flex;
    background: var(--color-surface);
}

.login-hero {
    flex: 1.1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px 44px;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(22,48,92,0.92) 0%, rgba(14,31,66,0.94) 60%, rgba(122,46,46,0.55) 100%),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 40px);
    overflow: hidden;
}

.login-hero .hero-icon {
    width: 52px; height: 52px; border-radius: 12px;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 22px;
}

.login-hero h1 {
    font-family: var(--font-display);
    font-size: 30px;
    margin-bottom: 10px;
}
.login-hero .hero-sub {
    font-size: 13.5px;
    color: rgba(255,255,255,0.78);
    line-height: 1.6;
    max-width: 380px;
    margin-bottom: 30px;
}

.hero-feature-list { display: flex; flex-direction: column; gap: 16px; }
.hero-feature {
    display: flex; align-items: flex-start; gap: 12px;
}
.hero-feature .f-icon {
    width: 34px; height: 34px; border-radius: 9px;
    background: rgba(255,255,255,0.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; flex-shrink: 0;
}
.hero-feature .f-title { font-size: 13.5px; font-weight: 700; }
.hero-feature .f-sub { font-size: 11.5px; color: rgba(255,255,255,0.68); margin-top: 1px; }

.login-form-side {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-family: var(--font-display); font-size: 25px; margin-bottom: 4px; }
.login-card .form-sub { font-size: 13px; color: var(--color-text-muted); margin-bottom: 26px; }

.input-icon-wrap { position: relative; }
.input-icon-wrap .field-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--color-text-muted); font-size: 14px; pointer-events: none;
}
.input-icon-wrap .form-control { padding-left: 36px; }
.input-icon-wrap .toggle-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    cursor: pointer; color: var(--color-text-muted); font-size: 14px; background: none; border: none;
}

.form-row-between { display: flex; justify-content: space-between; align-items: center; }
.forgot-link { font-size: 12.5px; color: var(--color-teal); font-weight: 600; }

.login-card .btn-signin {
    width: 100%; margin-top: 6px; background: var(--color-teal); color: #fff; padding: 12px;
}
.login-card .btn-signin:hover { background: #175F6E; }

.secure-divider {
    display: flex; align-items: center; gap: 10px;
    margin: 22px 0 14px;
    font-size: 10.5px; color: var(--color-text-muted);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.secure-divider::before, .secure-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--color-border);
}

.login-footer { text-align: center; font-size: 11.5px; color: var(--color-text-muted); }
.login-footer .protected { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 6px; }

@media (max-width: 900px) {
    .login-hero { display: none; }
}
@media (max-width: 780px) {
    .sidebar { display: none; }
    .content { padding: 18px; }
}
