/* ============================================================
   F&B ERP — Design System v3
   Font: Inter (Google Fonts)
   Palette: Navy #1e3a5f / Gold #d4a017 / Neutral grays
============================================================ */


/* ── Reset ── */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.data-table-row-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 13px;
    border: 0;
    border-bottom: 1px solid var(--border-2, #e2e8f0);
    background: #fff;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.data-table-row-button:hover {
    background: var(--primary-pale, #eff6ff);
}

.data-table-row-button span {
    min-width: 0;
}

.data-table-row-button span:last-child {
    text-align: right;
}

.data-table-row-button small {
    display: block;
    margin-top: 3px;
    color: var(--n500, #64748b);
    font-size: 11px;
}

:root {
    /* Brand */
    --primary: #1e3a5f;
    --primary-hov: #254d7d;
    --primary-light: #2d5a9e;
    --primary-pale: #eef3fb;
    --accent: #c9920d;
    --accent-light: #f0b429;
    --accent-pale: #fef9ec;
    /* Semantic */
    --success: #16803c;
    --success-pale: #edfbf3;
    --danger: #d63031;
    --danger-pale: #fff1f0;
    --warning: #d97706;
    --warning-pale: #fffbeb;
    --info: #0369a1;
    --info-pale: #eff8ff;
    /* Neutrals — cool-toned */
    --n0: #ffffff;
    --n50: #f8f9fc;
    --n100: #f1f3f8;
    --n150: #e8ecf4;
    --n200: #dde2ee;
    --n300: #c5cce0;
    --n400: #a0abbc;
    --n500: #7a8499;
    --n600: #5a6277;
    --n700: #3d4460;
    --n800: #262d46;
    --n900: #141929;
    /* Surfaces */
    --bg: #f2f4f9;
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    /* Border */
    --border: #e2e7f2;
    --border-2: #edf0f8;
    /* Layout */
    --sidebar-w: 260px;
    --header-h: 56px;
    --r: 8px;
    --r-sm: 5px;
    --r-lg: 14px;
    --r-xl: 20px;
    /* Shadows */
    --sh-xs: 0 1px 2px rgba(20, 25, 41, .05);
    --sh-sm: 0 1px 6px rgba(20, 25, 41, .07), 0 1px 2px rgba(20, 25, 41, .04);
    --sh: 0 2px 12px rgba(20, 25, 41, .09), 0 1px 3px rgba(20, 25, 41, .05);
    --sh-md: 0 6px 24px rgba(20, 25, 41, .12), 0 2px 6px rgba(20, 25, 41, .06);
    --sh-lg: 0 16px 48px rgba(20, 25, 41, .18), 0 4px 12px rgba(20, 25, 41, .08);
    --ease: .17s ease;
}


/* ── Base ── */

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    background: var(--bg);
    color: var(--n800);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
    font-size: inherit;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

table {
    border-collapse: collapse;
    width: 100%;
}

ul {
    list-style: none;
}


/* ── Scrollbar ── */

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--n300);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--n400);
}


/* ======================================================
   LAYOUT
====================================================== */

#app {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    height: 100vh;
    overflow: hidden;
}


/* ======================================================
   SIDEBAR
====================================================== */

#sidebar {
    width: 100%;
    background: #0d1b2e;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width var(--ease);
    position: relative;
    z-index: 110;
    box-shadow: 3px 0 20px rgba(0, 0, 0, .22);
}

#sidebar.collapsed {
    width: 60px;
}

#sidebar::-webkit-scrollbar {
    width: 3px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .08);
}


/* Logo */

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 15px;
    min-height: var(--header-h);
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.sidebar-logo-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    background: linear-gradient(140deg, #3b82f6 0%, #1d4ed8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(59, 130, 246, .38);
}

.sidebar-logo .brand-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em;
    white-space: nowrap;
}

.sidebar-logo .brand-sub {
    color: rgba(255, 255, 255, .32);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 500;
    white-space: nowrap;
    margin-top: 1px;
}

#sidebar.collapsed .brand {
    display: none;
}


/* Nav */

.sidebar-nav {
    flex: 1;
    padding: 8px 0;
}

.nav-group {
    margin-bottom: 4px;
}

.nav-group-label {
    padding: 13px 17px 4px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .22);
    white-space: nowrap;
}

#sidebar.collapsed .nav-group-label {
    display: none;
}


/* Parent */

.nav-parent {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 11px 8px 15px;
    color: rgba(255, 255, 255, .55);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    border-left: 2.5px solid transparent;
    margin: 1px 5px 1px 0;
    border-radius: 0 7px 7px 0;
    transition: background var(--ease), color var(--ease);
    user-select: none;
}

.nav-parent:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .9);
}

.nav-parent.open,
.nav-parent.active {
    background: rgba(96, 165, 250, .12);
    color: #fff;
    border-left-color: #60a5fa;
    font-weight: 700;
}

.nav-parent.active .np-label,
.nav-parent.active .np-icon {
    color: #fff;
}

.nav-parent .np-icon {
    width: 18px;
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, .4);
    transition: color var(--ease);
}

.nav-parent:hover .np-icon,
.nav-parent.open .np-icon {
    color: #93c5fd;
}

.nav-parent .np-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-parent .np-badge,
.nav-single .ns-badge,
.nav-sub-item .sub-badge,
.np-badge {
    background-color: #ef4444 !important;
    background: #ef4444 !important;
    color: #ffffff !important;
    border-radius: 9999px !important;
    padding: 0 6px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    line-height: 18px !important;
    flex-shrink: 0 !important;
    margin-left: auto !important;
    min-width: 18px !important;
    height: 18px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.65) !important;
}

.nav-parent.has-badge .np-icon,
.nav-single.has-badge .ns-icon {
    color: #f87171 !important;
}

.nav-sub-item.has-badge::before {
    background: #ef4444 !important;
    box-shadow: 0 0 6px #ef4444 !important;
}

.nav-parent .np-arrow {
    font-size: 9px;
    color: rgba(255, 255, 255, .25);
    flex-shrink: 0;
    transition: transform .22s, color var(--ease);
}

.nav-parent:hover .np-arrow {
    color: rgba(255, 255, 255, .55);
}

.nav-parent.open .np-arrow {
    transform: rotate(180deg);
    color: #93c5fd;
}

#sidebar.collapsed .nav-parent {
    justify-content: center;
    padding: 9px;
    margin: 1px 4px;
    border-radius: 8px;
}

#sidebar.collapsed .nav-parent .np-label,
#sidebar.collapsed .nav-parent .np-badge,
#sidebar.collapsed .nav-parent .np-arrow {
    display: none;
}


/* Sub */

.nav-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height .28s cubic-bezier(.4, 0, .2, 1);
}

.nav-sub.open {
    max-height: 800px;
}

#sidebar.collapsed .nav-sub {
    display: none;
}

.nav-sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 12px 6px 40px;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, .44);
    cursor: pointer;
    border-left: 2px solid transparent;
    margin: 0 5px 0 0;
    border-radius: 0 5px 5px 0;
    position: relative;
    transition: background var(--ease), color var(--ease);
    white-space: nowrap;
}

.nav-sub-item::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 50%;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    transform: translateY(-50%);
    transition: background var(--ease);
}

.nav-sub-item:hover {
    background: rgba(255, 255, 255, .04);
    color: rgba(255, 255, 255, .85);
}

.nav-sub-item:hover::before {
    background: rgba(255, 255, 255, .5);
}

.nav-sub-item.active {
    color: #fff;
    font-weight: 600;
    background: rgba(59, 130, 246, .18);
    border-left-color: #60a5fa;
}

.nav-sub-item.active::before {
    background: #60a5fa;
    box-shadow: 0 0 5px #3b82f6;
}


/* Single */

.nav-single {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 15px;
    color: rgba(255, 255, 255, .55);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    border-left: 2.5px solid transparent;
    margin: 1px 5px 1px 0;
    border-radius: 0 7px 7px 0;
    transition: background var(--ease), color var(--ease);
}

.nav-single:hover {
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .9);
}

.nav-single.active {
    background: rgba(59, 130, 246, .18);
    color: #fff;
    border-left-color: #60a5fa;
    font-weight: 600;
}

.nav-single .ns-icon {
    width: 18px;
    font-size: 13px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, .4);
    transition: color var(--ease);
}

.nav-single:hover .ns-icon,
.nav-single.active .ns-icon {
    color: #93c5fd;
}

#sidebar.collapsed .nav-single {
    justify-content: center;
    padding: 9px;
    margin: 1px 4px;
    border-radius: 8px;
}

#sidebar.collapsed .nav-single span:not(.ns-icon) {
    display: none;
}


/* Footer */

.sidebar-footer {
    flex-shrink: 0;
    padding: 8px 10px;
    border-top: 1px solid rgba(255, 255, 255, .05);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background var(--ease);
}

.user-card:hover {
    background: rgba(255, 255, 255, .06);
}

.avatar {
    width: 33px;
    height: 33px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(59, 130, 246, .3);
}

.user-info {
    flex: 1;
    overflow: hidden;
}

.user-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, .38);
    font-size: 10.5px;
    font-weight: 400;
    white-space: nowrap;
    margin-top: 1px;
}

.user-menu-btn {
    color: rgba(255, 255, 255, .28);
    font-size: 12px;
    padding: 4px;
    border-radius: 4px;
    transition: color var(--ease);
    flex-shrink: 0;
}

.user-menu-btn:hover {
    color: #fff;
}

#sidebar.collapsed .user-info,
#sidebar.collapsed .user-menu-btn {
    display: none;
}

#sidebar.collapsed .user-card {
    justify-content: center;
}


/* ======================================================
   MAIN / HEADER
====================================================== */

#main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#header {
    height: var(--header-h);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(4px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
    flex-shrink: 0;
    box-shadow: var(--sh-xs);
    position: sticky;
    top: 0;
    left: 0;
    z-index: 90;
}

#toggle-sidebar {
    width: 33px;
    height: 33px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--n500);
    transition: background var(--ease), color var(--ease);
}

#toggle-sidebar:hover {
    background: var(--n100);
    color: var(--primary);
}

.breadcrumb {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.breadcrumb>span {
    color: var(--n400);
}

.breadcrumb .current {
    color: var(--n800);
    font-weight: 600;
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-btn {
    width: 34px;
    height: 34px;
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--n500);
    position: relative;
    transition: background var(--ease), color var(--ease);
}

.header-btn:hover {
    background: var(--n100);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    font-size: 8.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px var(--surface);
}

.role-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 13px;
    border: 1.5px solid var(--border);
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--n700);
    cursor: pointer;
    background: var(--surface);
    transition: all var(--ease);
}

.role-switcher:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}

.role-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}


/* ======================================================
   CONTENT
====================================================== */

#content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 22px;
    position: relative;
    z-index: 1;
}


/* ======================================================
   PAGE HEADER
====================================================== */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -.02em;
    display: flex;
    align-items: center;
    gap: 9px;
    line-height: 1.25;
}

.page-subtitle {
    font-size: 12.5px;
    color: var(--n500);
    margin-top: 3px;
    font-weight: 400;
}

.page-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}


/* ======================================================
   BUTTONS
====================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6.5px 14px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    font-weight: 600;
    transition: all var(--ease);
    cursor: pointer;
    border: 1.5px solid transparent;
    letter-spacing: -.005em;
    line-height: 1.4;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 1px 4px rgba(30, 58, 95, .25);
}

.btn-primary:hover {
    background: var(--primary-hov);
    box-shadow: 0 3px 10px rgba(30, 58, 95, .3);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 1px 4px rgba(22, 128, 60, .25);
}

.btn-success:hover {
    background: #157a38;
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    box-shadow: 0 1px 4px rgba(214, 48, 49, .25);
}

.btn-danger:hover {
    background: #c42020;
    transform: translateY(-1px);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 1px 4px rgba(217, 119, 6, .25);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 4px rgba(201, 146, 13, .25);
}

.btn-outline {
    background: var(--surface);
    color: var(--n700);
    border-color: var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-pale);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11.5px;
}

.btn-xs {
    padding: 2.5px 8px;
    font-size: 11px;
    border-radius: 4px;
}

.sales-cart-table .sales-quantity-heading,
.sales-cart-table .sales-quantity-cell {
    width: 92px;
    min-width: 92px;
}

.quantity-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.quantity-controls .btn {
    flex: 0 0 28px;
    width: 28px;
    min-width: 28px;
    height: 28px;
    padding: 0;
    line-height: 26px;
}

.quantity-value {
    display: inline-block;
    min-width: 16px;
    text-align: center;
    line-height: 28px;
}


/* ======================================================
   CARDS
====================================================== */

.card {
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    overflow: hidden;
    border: 1px solid var(--border-2);
}

.card-header {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: var(--n50);
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--n800);
    display: flex;
    align-items: center;
    gap: 7px;
    letter-spacing: -.01em;
}

.card-title i {
    color: var(--primary);
    font-size: 13px;
}

.card-body {
    padding: 16px;
}


/* ======================================================
   STAT CARDS
====================================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--r);
    padding: 15px 16px;
    box-shadow: var(--sh-sm);
    display: flex;
    align-items: center;
    gap: 13px;
    cursor: pointer;
    border: 1px solid var(--border-2);
    transition: transform var(--ease), box-shadow var(--ease);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--primary-pale);
    color: var(--primary);
}

.stat-icon.gold {
    background: var(--accent-pale);
    color: var(--accent);
}

.stat-icon.green {
    background: var(--success-pale);
    color: var(--success);
}

.stat-icon.red {
    background: var(--danger-pale);
    color: var(--danger);
}

.stat-icon.purple {
    background: #f5f0ff;
    color: #7c3aed;
}

.stat-icon.teal {
    background: #f0fdfc;
    color: #0f766e;
}

.stat-icon.warning {
    background: var(--warning-pale);
    color: var(--warning);
}

.stat-value {
    font-size: 21px;
    font-weight: 800;
    color: var(--n900);
    letter-spacing: -.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: 11.5px;
    color: var(--n500);
    margin-top: 2px;
    font-weight: 400;
}

.stat-change {
    font-size: 11px;
    margin-top: 3px;
    font-weight: 500;
}

.stat-change.up {
    color: var(--success);
}

.stat-change.down {
    color: var(--danger);
}


/* ======================================================
   GRIDS
====================================================== */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 14px;
}

.grid-12 {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
}

.grid-21 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 14px;
}

@media(max-width:900px) {
    .grid-2,
    .grid-3,
    .grid-12,
    .grid-21 {
        grid-template-columns: 1fr;
    }
}


/* ======================================================
   TABLES
====================================================== */

.table-wrap {
    overflow-x: auto;
}

.data-table thead th {
    padding: 9px 13px;
    background: var(--n50);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--n500);
    border-bottom: 1.5px solid var(--border);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 9px 13px;
    border-bottom: 1px solid var(--border-2);
    font-size: 12.5px;
    color: var(--n700);
    vertical-align: middle;
    line-height: 1.45;
}

.data-table tbody tr:hover td {
    background: var(--primary-pale);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .td-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}


/* ======================================================
   TAGS / BADGES
====================================================== */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .01em;
}

.tag-primary {
    background: var(--primary-pale);
    color: var(--primary);
}

.tag-success {
    background: var(--success-pale);
    color: var(--success);
}

.tag-warning {
    background: var(--warning-pale);
    color: var(--warning);
}

.tag-danger {
    background: var(--danger-pale);
    color: var(--danger);
}

.tag-info {
    background: var(--info-pale);
    color: var(--info);
}

.tag-gray {
    background: var(--n100);
    color: var(--n600);
}

.tag-purple {
    background: #f5f0ff;
    color: #6d28d9;
}

.tag-gold {
    background: var(--accent-pale);
    color: var(--accent);
}


/* ======================================================
   FORMS
====================================================== */

.form-group {
    margin-bottom: 13px;
}

.form-label {
    display: block;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--n700);
    margin-bottom: 5px;
    letter-spacing: -.005em;
}

.form-label .req {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 7.5px 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--r-sm);
    font-size: 12.5px;
    color: var(--n800);
    background: var(--surface);
    transition: border-color var(--ease), box-shadow var(--ease);
    line-height: 1.4;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, .08);
}

.form-control::placeholder {
    color: var(--n400);
}

.form-control:disabled {
    background: var(--n50);
    color: var(--n400);
    cursor: not-allowed;
}

.form-row {
    display: grid;
    gap: 10px;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.form-hint {
    font-size: 11px;
    color: var(--n500);
    margin-top: 3px;
}

.input-group {
    display: flex;
}

.input-group .form-control {
    border-radius: 5px 0 0 5px;
    flex: 1;
}

.input-group .btn {
    border-radius: 0 5px 5px 0;
}


/* ======================================================
   FILTER BAR
====================================================== */

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.filter-bar .form-control {
    max-width: 200px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--n400);
    font-size: 12px;
}

.search-box input {
    padding-left: 30px;
}


/* ======================================================
   FLOW DIAGRAM
====================================================== */

.flow-box {
    border: 1.5px solid var(--border);
    border-radius: var(--r);
    padding: 15px;
    background: var(--n50);
}

.flow-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.flow-step {
    display: flex;
    align-items: center;
}

.flow-node {
    padding: 6px 13px;
    border: 1.5px solid var(--primary);
    border-radius: var(--r-sm);
    background: var(--surface);
    font-size: 11.5px;
    color: var(--primary);
    font-weight: 600;
    white-space: nowrap;
}

.flow-node.active {
    background: var(--primary);
    color: #fff;
}

.flow-node.current {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.flow-arrow {
    padding: 0 5px;
    color: var(--n400);
    font-size: 15px;
}

.flow-down {
    text-align: center;
    color: var(--n400);
    font-size: 16px;
    padding: 3px;
    width: 100%;
}


/* ======================================================
   TABS
====================================================== */

.tabs {
    border-bottom: 1.5px solid var(--border);
    display: flex;
    margin-bottom: 16px;
    overflow-x: auto;
    gap: 0;
}

.tabs::-webkit-scrollbar {
    height: 0;
}

.tab-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--n500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1.5px;
    transition: all var(--ease);
    white-space: nowrap;
}

.tab-item:hover {
    color: var(--primary);
    background: var(--primary-pale);
}

.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 700;
}

.tab-content>div {
    display: none;
}

.tab-content>div.active {
    display: block;
    animation: fadeUp .14s ease;
}

@keyframes fadeUp {
    from {
        opacity: .3;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}


/* ======================================================
   MODAL
====================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .24s cubic-bezier(.16, 1, .3, 1);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 65px -10px rgba(30, 58, 95, 0.25), 0 10px 30px -5px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(.94) translateY(-14px);
    transition: transform .28s cubic-bezier(.34, 1.45, .64, 1);
    border: none;
}

.modal-overlay.open .modal {
    transform: scale(1) translateY(0);
}

.modal-lg {
    max-width: 900px;
}

.modal-xl {
    max-width: 1100px;
}

.modal-header {
    padding: 20px 26px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 20;
}

.modal-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.modal-icon-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.modal-title-text {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.02em;
    line-height: 1.25;
}

.modal-subtitle-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 400;
    margin-top: 2px;
}

.modal-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.18);
    transition: all .2s;
    border: none;
    cursor: pointer;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    padding: 24px;
    background: #f8fafc;
}

.account-modal-header {
    padding: 22px 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #102b4d 0%, #1e3a5f 62%, #2563a8 100%);
    color: #fff;
}

.account-modal-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-modal-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    color: #bfdbfe;
    font-size: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18);
}

.account-modal-kicker {
    color: rgba(255, 255, 255, .62);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.account-modal-title {
    margin-top: 2px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.account-modal-header .modal-close {
    background: rgba(255, 255, 255, .12);
}

.account-modal-body {
    padding: 22px 24px 24px;
    background: #f8fafc;
}

.account-profile {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid #dce8f5;
    border-radius: 14px;
    background: linear-gradient(135deg, #f0f7ff 0%, #fff 100%);
}

.account-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1e3a5f);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 5px 13px rgba(37, 99, 235, .22);
}

.account-profile-copy {
    min-width: 0;
    flex: 1;
}

.account-name {
    color: var(--n800);
    font-size: 14px;
    font-weight: 800;
}

.account-username {
    margin-top: 2px;
    color: var(--n500);
    font-size: 11px;
}

.account-status {
    align-self: flex-start;
    padding: 5px 8px;
    border-radius: 20px;
    background: var(--success-pale);
    color: var(--success);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.account-status i {
    margin-right: 4px;
    font-size: 7px;
    vertical-align: 1px;
}

.account-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 14px 0;
}

.account-detail {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #fff;
}

.account-detail-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-pale);
    color: var(--primary);
    font-size: 11px;
}

.account-detail span:last-child {
    min-width: 0;
}

.account-detail small,
.account-detail strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-detail small {
    color: var(--n500);
    font-size: 10px;
}

.account-detail strong {
    margin-top: 2px;
    color: var(--n700);
    font-size: 11.5px;
}

.account-logout-panel {
    margin-top: 18px;
    padding: 14px 14px 12px;
    border: 1px solid #fecaca;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7);
}

.account-logout-copy {
    margin-bottom: 10px;
}

.account-logout-title {
    font-size: 12px;
    font-weight: 800;
    color: #7f1d1d;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-logout-note {
    margin-top: 4px;
    font-size: 11px;
    color: #991b1b;
    opacity: .8;
    line-height: 1.5;
}

.account-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px 14px;
    border: 1px solid #fca5a5;
    border-radius: 12px;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
    color: #b91c1c;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(185, 28, 28, 0.08);
    transition: all var(--ease);
}

.account-logout i:first-child {
    font-size: 13px;
}

.account-logout i:last-child {
    margin-left: auto;
    font-size: 10px;
    opacity: .7;
}

.account-logout:hover {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #f87171;
    transform: translateY(-1px);
    box-shadow: 0 12px 18px rgba(239, 68, 68, 0.12);
}

.bom-ingredient-row .form-control {
    min-width: 0;
}

@media (max-width: 560px) {
    .bom-ingredient-row {
        grid-template-columns: minmax(0, 1fr) 34px !important;
    }
    .bom-ingredient-row .bom-nvl {
        grid-column: 1 / -1;
    }
    .bom-ingredient-row .bom-quantity {
        grid-column: 1;
    }
    .bom-ingredient-row .bom-unit {
        grid-column: 1;
    }
    .bom-ingredient-row>.btn {
        grid-column: 2;
        grid-row: 2 / span 2;
        height: 34px;
    }
}

@media (max-width: 520px) {
    .account-modal-body {
        padding: 18px;
    }
    .account-details {
        grid-template-columns: 1fr;
    }
    .account-status {
        display: none;
    }
    .account-logout-panel {
        padding: 12px;
    }
}

.modal-footer {
    padding: 18px 26px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    background: #ffffff;
    border-radius: 0 0 20px 20px;
}


/* Form Section Cards */

.modal-form-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.modal-form-card:last-child {
    margin-bottom: 0;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px dashed #cbd5e1;
}

.form-section-header .section-tag {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.form-section-header .section-title {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #1e293b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.form-grid-1 {
    grid-template-columns: 1fr;
}

.form-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media(max-width:680px) {
    .form-grid,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
}

.field-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-label .req {
    color: #ef4444;
    font-weight: 700;
    margin-left: 2px;
}


/* Input Icon Group Wrapper */

.input-icon-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-icon-group>i {
    position: absolute;
    left: 14px;
    color: #2563eb;
    font-size: 14px;
    pointer-events: none;
    transition: color .2s;
    z-index: 2;
}

.input-icon-group .form-control {
    padding-left: 42px !important;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 13.5px;
    color: #0f172a;
    font-weight: 500;
    background: #ffffff;
    transition: all .2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.input-icon-group .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
    outline: none;
}

.input-icon-group .form-control[readonly] {
    background: #f1f5f9;
    color: #1e293b;
    border-color: #e2e8f0;
    font-weight: 700;
}

textarea.form-control {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 13px;
    line-height: 1.5;
}

textarea.form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.form-hint {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-weight: 400;
    line-height: 1.35;
}


/* Enhanced Modal Buttons */

.modal-footer .btn {
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    transition: all .2s;
    cursor: pointer;
}

.modal-footer .btn-outline {
    border: 1.5px solid #cbd5e1;
    color: #475569;
    background: #ffffff;
}

.modal-footer .btn-outline:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.modal-footer .btn-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.32);
}

.modal-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.42);
}

.modal-footer .btn-success {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.32);
}

.modal-footer .btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.42);
}

.modal-footer .btn-danger {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.32);
}

.modal-footer .btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.42);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 18px;
    font-size: 13px;
    color: var(--n800);
}

.detail-grid strong {
    color: var(--n600);
    font-weight: 600;
    display: inline-block;
    min-width: 90px;
}

@media(max-width:600px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.modal-step-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.modal-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.modal-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s;
}

.modal-step-item.active .modal-step-circle {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(30, 58, 95, .18);
}

.modal-step-item.done .modal-step-circle {
    background: var(--success);
    color: #fff;
}

.modal-step-item.rejected .modal-step-circle {
    background: var(--danger);
    color: #fff;
}

.modal-step-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--n700);
}

.modal-step-sub {
    font-size: 10px;
    color: var(--n500);
}


/* Price Comparison Cards */

.quote-compare-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.quote-supplier-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    transition: all var(--ease);
    position: relative;
}

.quote-supplier-card.best-price {
    border-color: var(--success);
    background: var(--success-pale);
    box-shadow: 0 4px 14px rgba(22, 128, 60, .12);
}

.quote-supplier-card .supplier-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--n800);
    margin-bottom: 6px;
}

.quote-supplier-card .supplier-price {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.quote-supplier-card.best-price .supplier-price {
    color: var(--success);
}


/* ======================================================
   ALERTS
====================================================== */

.alert {
    padding: 10px 13px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.5;
}

.alert i {
    flex-shrink: 0;
    margin-top: 1px;
    font-size: 13px;
}

.alert-info {
    background: var(--info-pale);
    color: var(--info);
    border-left: 3px solid var(--info);
}

.alert-warning {
    background: var(--warning-pale);
    color: var(--warning);
    border-left: 3px solid var(--warning);
}

.alert-success {
    background: var(--success-pale);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.alert-danger {
    background: var(--danger-pale);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}


/* ======================================================
   PROGRESS
====================================================== */

.progress {
    height: 5px;
    background: var(--n150);
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 10px;
    background: var(--primary);
    transition: width .35s;
}

.progress-bar.success {
    background: var(--success);
}

.progress-bar.warning {
    background: var(--warning);
}

.progress-bar.danger {
    background: var(--danger);
}


/* ======================================================
   EMPTY STATE
====================================================== */

.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-state i {
    font-size: 40px;
    color: var(--n300);
    margin-bottom: 12px;
    display: block;
}

.empty-state p {
    color: var(--n500);
    font-size: 13.5px;
}


/* ======================================================
   CHART
====================================================== */

.chart-area {
    height: 200px;
    background: var(--n50);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-area canvas {
    width: 100% !important;
}


/* ======================================================
   NOTIFICATION PANEL
====================================================== */

.notif-panel {
    position: absolute;
    top: calc(var(--header-h) + 6px);
    right: 14px;
    width: 320px;
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--sh-lg);
    z-index: 500;
    overflow: hidden;
    display: none;
    border: 1px solid var(--border);
}

.notif-panel.open {
    display: block;
    animation: fadeUp .14s ease;
}

.notif-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-2);
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--n50);
}

.notif-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-2);
    display: flex;
    gap: 10px;
    cursor: pointer;
    transition: background var(--ease);
}

.notif-item:hover {
    background: var(--n50);
}

.notif-item.unread {
    background: var(--primary-pale);
}

.notif-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 13px;
}

.notif-text {
    font-size: 12px;
    color: var(--n700);
    line-height: 1.45;
}

.notif-time {
    font-size: 10.5px;
    color: var(--n400);
    margin-top: 2px;
}


/* ======================================================
   TIMELINE
====================================================== */

.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 0;
    bottom: 0;
    width: 1.5px;
    background: var(--border);
}

.tl-item {
    position: relative;
    padding-bottom: 14px;
}

.tl-dot {
    position: absolute;
    left: -18px;
    top: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--surface);
    box-shadow: 0 0 0 2px var(--primary);
}

.tl-dot.success {
    background: var(--success);
    box-shadow: 0 0 0 2px var(--success);
}

.tl-dot.warning {
    background: var(--warning);
    box-shadow: 0 0 0 2px var(--warning);
}

.tl-dot.danger {
    background: var(--danger);
    box-shadow: 0 0 0 2px var(--danger);
}

.tl-time {
    font-size: 10.5px;
    color: var(--n400);
    font-weight: 500;
}

.tl-content {
    font-size: 12.5px;
    color: var(--n700);
    margin-top: 1px;
}


/* ======================================================
   CHIPS
====================================================== */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 11px;
    background: var(--n100);
    color: var(--n700);
    font-weight: 500;
    border: 1px solid var(--border);
}


/* ======================================================
   RACI
====================================================== */

.raci-table th,
.raci-table td {
    text-align: center;
}

.raci-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.raci-r {
    background: var(--danger-pale);
    color: var(--danger);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
}

.raci-a {
    background: var(--warning-pale);
    color: var(--warning);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
}

.raci-c {
    background: var(--info-pale);
    color: var(--info);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
}

.raci-i {
    background: var(--success-pale);
    color: var(--success);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
}


/* ======================================================
   ROLE BAR
====================================================== */

.role-bar {
    padding: 5px 20px;
    font-size: 11.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.role-bar.bod {
    background: var(--primary);
    color: #fff;
}

.role-bar.kt-nvl {
    background: #1565c0;
    color: #fff;
}

.role-bar.kt-noi-bo {
    background: #1b5e20;
    color: #fff;
}

.role-bar.am-sm {
    background: #4a148c;
    color: #fff;
}


/* ======================================================
   MISC UTILITIES
====================================================== */

.sep {
    height: 1px;
    background: var(--border-2);
    margin: 14px 0;
}

.text-muted {
    color: var(--n500);
    font-size: 11.5px;
}

.fw-600 {
    font-weight: 600;
}

.mt-12 {
    margin-top: 12px;
}

.mt-16 {
    margin-top: 16px;
}

.w-100 {
    width: 100%;
}

.text-right {
    text-align: right;
}

.text-end {
    text-align: right;
}

.flex-center {
    display: flex;
    align-items: center;
}

.gap-8 {
    gap: 8px;
}

.gap-12 {
    gap: 12px;
}


/* ======================================================
   DASHBOARD LAYOUT
====================================================== */

.db-kpi-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 11px;
    margin-bottom: 18px;
}

@media(max-width:1200px) {
    .db-kpi-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media(max-width:700px) {
    .db-kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.db-kpi {
    background: var(--surface);
    border-radius: var(--r);
    box-shadow: var(--sh-sm);
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border: 1px solid var(--border-2);
    transition: transform var(--ease), box-shadow var(--ease);
    cursor: default;
}

.db-kpi:hover {
    transform: translateY(-2px);
    box-shadow: var(--sh-md);
}

.db-kpi-left {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.db-kpi-left.blue {
    background: var(--primary-pale);
    color: var(--primary);
}

.db-kpi-left.red {
    background: var(--danger-pale);
    color: var(--danger);
}

.db-kpi-left.green {
    background: var(--success-pale);
    color: var(--success);
}

.db-kpi-left.gold {
    background: var(--accent-pale);
    color: var(--accent);
}

.db-kpi-left.purple {
    background: #f5f0ff;
    color: #7c3aed;
}

.db-kpi-left.teal {
    background: #f0fdfc;
    color: #0f766e;
}

.db-kpi-val {
    font-size: 19px;
    font-weight: 800;
    color: var(--n900);
    letter-spacing: -.02em;
    line-height: 1.1;
}

.db-kpi-unit {
    font-size: 11.5px;
    color: var(--n500);
    font-weight: 400;
    margin-left: 1px;
}

.db-kpi-label {
    font-size: 11px;
    color: var(--n500);
    margin-top: 2px;
    font-weight: 400;
}

.db-kpi-sub {
    font-size: 11px;
    margin-top: 2px;
    font-weight: 500;
}

.db-kpi-sub.up {
    color: var(--success);
}

.db-kpi-sub.down {
    color: var(--danger);
}

.db-main-row {
    display: grid;
    grid-template-columns: 1fr 310px;
    gap: 12px;
    margin-bottom: 12px;
}

.db-chart-card {
    min-height: 0;
}

.db-side-col {
    display: flex;
    flex-direction: column;
}

.db-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.db-empty {
    padding: 14px 16px;
    font-size: 12px;
    color: var(--n400);
    display: flex;
    align-items: center;
    gap: 6px;
}

@media(max-width:960px) {
    .db-main-row {
        grid-template-columns: 1fr;
    }
}

@media(max-width:800px) {
    .db-bottom-row {
        grid-template-columns: 1fr;
    }
}