/* ==========================================================================
   Al Roop Jewellers — Complete System Stylesheet
   Luxury Dark Navy & Gold Aesthetic
   ========================================================================== */

:root {
    --bg-main:         #0B0F1A;
    --bg-sidebar:      #080C15;
    --bg-card:         #111827;
    --bg-card-alt:     #0E1420;
    --bg-card-elevated:#141D2D;
    --bg-input:        rgba(255, 255, 255, 0.035);
    --gold:            #D4A24C;
    --gold-light:      #F3C978;
    --gold-hover:      #E6B95C;
    --gold-soft:       rgba(212, 162, 76, 0.12);
    --gold-soft-2:     rgba(212, 162, 76, 0.06);
    --gold-border:     rgba(212, 162, 76, 0.25);
    --gold-border-subtle: rgba(212, 162, 76, 0.15);
    --text-white:      #FFFFFF;
    --text-muted:      #8896A7;
    --text-dim:        #4E5D72;
    --border:          rgba(255, 255, 255, 0.07);
    --border-strong:   rgba(255, 255, 255, 0.12);
    --success:         #4CAF7D;
    --success-soft:    rgba(76, 175, 125, 0.14);
    --danger:          #E15B5B;
    --danger-soft:     rgba(225, 91, 91, 0.14);
    --warning:         #E0A93E;
    --warning-soft:    rgba(224, 169, 62, 0.14);
    --info:            #4C9FD4;
    --info-soft:       rgba(76, 159, 212, 0.14);
    --sidebar-w:       240px;
    --topbar-h:        64px;
    --font-h:          'Poppins', sans-serif;
    --font-b:          'Inter', sans-serif;
    --radius-lg:       14px;
    --radius-md:       10px;
    --radius-sm:       8px;
}

/* ---- Global Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; color-scheme: dark; }
body {
    font-family: var(--font-b);
    background: var(--bg-main);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: #08111F; }

/* ---- Custom Scrollbars ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-border); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }
* { scrollbar-width: thin; scrollbar-color: var(--gold-border) transparent; }

/* ==========================================================================
   LOGIN PAGE
   ========================================================================== */
.erp-shell {
    display: flex; align-items: stretch;
    width: 100%; min-height: 100vh;
    padding: 24px; background: var(--bg-main); position: relative;
}
@media (min-width: 992px) { .erp-shell { padding: 28px; } }
.erp-shell::before {
    content: ''; position: absolute; inset: 24px;
    border: 1px solid var(--gold-border); border-radius: 24px;
    pointer-events: none; z-index: 6;
}
@media (min-width: 992px) { .erp-shell::before { inset: 28px; } }
.brand-panel {
    flex: 0 0 52%; max-width: 52%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 4vh 4vw; overflow: hidden; border-radius: 24px 0 0 24px; position: relative;
}
.brand-panel__bg {
    position: absolute; inset: 0;
    background-image: url('../images/login_bg.png');
    background-size: cover; background-position: center;
}
.brand-panel__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(4,8,15,0.72) 0%, rgba(4,8,15,0.35) 22%, rgba(4,8,15,0.32) 60%, rgba(4,8,15,0.88) 100%);
}
.brand-panel__content { position: relative; z-index: 2; text-align: center; margin: 0 auto; }
.brand-panel__logo-wrap { display: inline-block; margin-bottom: 22px; }
.brand-panel__logo { width: min(300px, 26vw); height: auto; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,0.55)); }
.brand-panel__slogan { font-family: var(--font-b); font-weight: 500; font-size: 16px; letter-spacing: 2px; color: var(--gold); margin: 0 0 10vh; }

.feature-card {
    position: absolute; z-index: 2; left: 4vw; right: 4vw; bottom: 4vh;
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-radius: 18px; padding: 20px 24px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px;
}
.feature-card__item { display: flex; flex-direction: column; gap: 4px; }
.feature-card__icon {
    width: 34px; height: 34px; border-radius: 10px;
    background: var(--gold-soft); border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 14px; margin-bottom: 6px;
}
.feature-card h4 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-white); font-family: var(--font-h); }
.feature-card p { margin: 0; font-size: 11.5px; color: var(--text-muted); line-height: 1.4; }

.auth-panel {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 4vh 5vw; background: var(--bg-card-alt); border-radius: 0 24px 24px 0; overflow-y: auto; position: relative;
}
.auth-card { width: 100%; max-width: 400px; }
.auth-card__icon-wrap { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.auth-card__rule { flex: 1; height: 1px; background: var(--border); }
.auth-card__icon-ring {
    width: 60px; height: 60px; border-radius: 50%;
    border: 1px solid var(--gold-border); background: var(--gold-soft);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.auth-card__icon { width: 36px; height: 36px; object-fit: contain; }
.auth-card__title { font-family: var(--font-h); font-size: 24px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-card__subtitle { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 28px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field__label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; }
.form-field__control { position: relative; display: flex; align-items: center; }
.form-field__icon { position: absolute; left: 14px; color: var(--text-muted); font-size: 13px; pointer-events: none; }
.form-field__input {
    width: 100%; background: var(--bg-input); border: 1px solid var(--border);
    border-radius: 12px; color: var(--text-white); padding: 13px 44px 13px 40px;
    font-size: 13.5px; font-family: var(--font-b); transition: all 0.25s; outline: none;
}
.form-field__input:focus { border-color: var(--gold); background: rgba(212,162,76,0.04); box-shadow: 0 0 0 3px rgba(212,162,76,0.08); }
.form-field__input::placeholder { color: rgba(136,150,167,0.5); }
.form-field__toggle { position: absolute; right: 12px; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 13px; padding: 4px; }

.auth-form__options { display: flex; align-items: center; justify-content: space-between; margin-top: -4px; }
.remember-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.remember-check input[type="checkbox"] { display: none; }
.remember-check__box { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid var(--gold-border); display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0; }
.remember-check__box i { font-size: 9px; color: #08111F; opacity: 0; }
.remember-check input:checked ~ .remember-check__box { background: var(--gold); border-color: var(--gold); }
.remember-check input:checked ~ .remember-check__box i { opacity: 1; }
.remember-check__label { font-size: 12.5px; color: var(--text-muted); }
.forgot-link { font-size: 12.5px; color: var(--gold); font-weight: 500; }

.btn-signin {
    width: 100%; padding: 14px 20px; margin-top: 4px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-hover) 100%);
    border: none; border-radius: 12px; color: #08111F;
    font-size: 14px; font-weight: 700; font-family: var(--font-h);
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-signin__arrow { width: 26px; height: 26px; background: rgba(0,0,0,0.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.auth-card__footer { margin-top: 28px; text-align: center; font-size: 11.5px; color: rgba(136,150,167,0.5); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ==========================================================================
   APP LAYOUT & WRAPPER
   ========================================================================== */
.app-wrapper { display: flex; min-height: 100vh; background: var(--bg-main); }

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    max-height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar__logo {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    flex-shrink: 0;
    background: var(--bg-sidebar);
}
.sidebar__logo-icon {
    width: 44px; height: 44px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-size: 20px;
    box-shadow: 0 4px 16px rgba(212, 162, 76, 0.15);
}
.sidebar__logo-text { text-align: center; }
.sidebar__logo-name {
    font-family: var(--font-h);
    font-size: 17px;
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 2.5px;
    line-height: 1.1;
}
.sidebar__logo-sub {
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar__nav {
    flex: 1 1 auto;
    min-height: 0;
    padding: 14px 12px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 162, 76, 0.2) transparent;
}
.sidebar__nav::-webkit-scrollbar {
    width: 4px;
}
.sidebar__nav::-webkit-scrollbar-thumb {
    background: rgba(212, 162, 76, 0.2);
    border-radius: 4px;
}
.sidebar__nav::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 162, 76, 0.4);
}

.nav-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-dim);
    padding: 16px 10px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 2px;
    text-decoration: none;
    position: relative;
}
.nav-item i { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }
.nav-item span { flex: 1; }
.nav-item .nav-arrow { font-size: 10px; color: var(--text-dim); transition: transform 0.2s ease; }

.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
}

.nav-item.active {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    font-weight: 600;
}
.nav-item.active i { color: var(--gold); }

/* Submenu */
.nav-group { margin-bottom: 4px; }
.nav-group.open .nav-arrow { transform: rotate(180deg); }
.nav-group .nav-sub {
    display: none;
    margin-left: 22px;
    padding: 6px 0 6px 12px;
    border-left: 1.5px solid var(--gold-border-subtle);
}
.nav-group.open .nav-sub { display: flex; flex-direction: column; gap: 3px; }

.nav-sub-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
}
.nav-sub-item .sub-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.nav-sub-item:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.04);
}
.nav-sub-item:hover .sub-dot {
    background: var(--gold-light);
    box-shadow: 0 0 6px rgba(212, 162, 76, 0.5);
}
.nav-sub-item.active {
    color: var(--gold);
    background: var(--gold-soft-2);
    font-weight: 600;
    border: 1px solid var(--gold-border-subtle);
}
.nav-sub-item.active .sub-dot {
    background: var(--gold);
    box-shadow: 0 0 8px rgba(212, 162, 76, 0.8);
}

/* Sidebar Footer (Fixed Bottom) */
.sidebar__footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 14px 12px 16px;
    border-top: 1px solid var(--border);
    background: var(--bg-sidebar);
}
.btn-quick-action {
    width: 100%;
    padding: 11px 16px;
    background: var(--gold);
    border: none;
    border-radius: var(--radius-md);
    color: #08111F;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-h);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(212, 162, 76, 0.25);
}
.btn-quick-action:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 162, 76, 0.35);
}
.sidebar__copy {
    font-size: 10.5px;
    color: var(--text-dim);
    text-align: center;
    margin-top: 12px;
    line-height: 1.4;
}

/* ==========================================================================
   TOPBAR HEADER & DROPDOWNS
   ========================================================================== */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card-alt);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 18px;
    position: fixed;
    top: 0;
    left: var(--sidebar-w);
    right: 0;
    z-index: 99;
    backdrop-filter: blur(8px);
}

.topbar__toggle {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    display: none;
}
.topbar__toggle:hover { color: var(--text-white); }

.topbar__search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 16px;
    width: 380px;
    transition: border-color 0.2s ease;
}
.topbar__search:focus-within {
    border-color: var(--gold-border);
    background: rgba(212, 162, 76, 0.04);
}
.topbar__search i { color: var(--text-muted); font-size: 13.5px; }
.topbar__search input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-white);
    font-size: 13px;
    font-family: var(--font-b);
    width: 100%;
}
.topbar__search input::placeholder { color: var(--text-muted); }

.topbar__spacer { flex: 1; }

.topbar__actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-dropdown-wrap {
    position: relative;
}

.topbar__icon-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.topbar__icon-btn:hover {
    border-color: var(--gold-border);
    color: var(--gold);
}
.topbar__badge {
    position: absolute;
    top: -4px; right: -4px;
    width: 17px; height: 17px;
    border-radius: 50%;
    background: var(--gold);
    color: #08111F;
    font-size: 10px;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--bg-card-alt);
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 14px 5px 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.topbar__user:hover {
    border-color: var(--gold-border);
    background: rgba(212, 162, 76, 0.05);
}
.topbar__avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--gold);
    color: #08111F;
    font-size: 12.5px;
    font-weight: 800;
    font-family: var(--font-h);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.topbar__user-info { line-height: 1.2; text-align: left; }
.topbar__user-name { font-size: 13px; font-weight: 600; color: var(--text-white); }
.topbar__user-role { font-size: 11px; color: var(--text-muted); }
.topbar__user i.user-arrow { color: var(--text-muted); font-size: 11px; margin-left: 2px; transition: transform 0.25s ease; }

/* Dropdown Menus */
.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: linear-gradient(135deg, rgba(20, 29, 47, 0.98) 0%, rgba(11, 16, 26, 0.98) 100%);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6), 0 0 20px rgba(212, 162, 76, 0.12);
    backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1100;
}
.header-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 1. Notifications Menu */
.notif-menu {
    width: 360px;
    overflow: hidden;
}
.notif-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}
.notif-header__title {
    font-family: var(--font-h);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 6px;
}
.notif-count-pill {
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    color: var(--gold);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 20px;
    font-weight: 700;
}
.notif-mark-read {
    font-size: 11.5px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s ease;
}
.notif-mark-read:hover {
    color: var(--gold);
}
.notif-list {
    max-height: 320px;
    overflow-y: auto;
    padding: 6px 0;
}
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 18px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
}
.notif-item:hover {
    background: rgba(212, 162, 76, 0.05);
}
.notif-item.unread {
    background: rgba(212, 162, 76, 0.04);
}
.notif-item__icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    margin-top: 2px;
}
.notif-item__icon.alert { background: rgba(224, 86, 96, 0.15); color: var(--danger); }
.notif-item__icon.gold { background: var(--gold-soft); color: var(--gold); }
.notif-item__icon.success { background: rgba(76, 175, 125, 0.15); color: var(--success); }
.notif-item__content { flex: 1; min-width: 0; }
.notif-item__title { font-size: 12.5px; font-weight: 600; color: var(--text-white); margin-bottom: 2px; }
.notif-item__desc { font-size: 11px; color: var(--text-muted); line-height: 1.4; }
.notif-item__time { font-size: 10px; color: var(--text-dim); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
.notif-footer {
    padding: 10px 18px;
    text-align: center;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}
.notif-footer a {
    font-size: 12px;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
}

/* 2. User Profile Menu */
.user-menu {
    width: 280px;
    padding: 8px 0;
}
.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
}
.user-dropdown-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: #08111F;
    font-size: 15px;
    font-weight: 800;
    font-family: var(--font-h);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-dropdown-meta { line-height: 1.3; }
.user-dropdown-name { font-size: 13.5px; font-weight: 700; color: var(--text-white); font-family: var(--font-h); }
.user-dropdown-email { font-size: 11px; color: var(--text-muted); }
.user-dropdown-badge {
    display: inline-block;
    font-size: 9.5px;
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-border);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-top: 4px;
}
.dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 6px 0;
}
.user-dropdown-links {
    padding: 4px 8px;
}
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}
.user-dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--gold);
}
.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}
.user-dropdown-item.logout {
    background: rgba(224, 86, 96, 0.08);
    color: #E05660;
    border: 1px solid rgba(224, 86, 96, 0.2);
}
.user-dropdown-item.logout i {
    color: #E05660;
}
.user-dropdown-item.logout:hover {
    background: rgba(224, 86, 96, 0.18);
    color: #FFF;
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.main-area {
    margin-left: var(--sidebar-w);
    margin-top: var(--topbar-h);
    min-height: calc(100vh - var(--topbar-h));
    width: calc(100% - var(--sidebar-w));
    background: var(--bg-main);
    display: flex;
    flex-direction: column;
}

.page-content {
    padding: 28px 32px 40px;
    flex: 1;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.page-title {
    font-family: var(--font-h);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}
.page-subtitle {
    font-size: 13px;
    color: var(--text-muted);
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Primary Button */
.btn-gold {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--gold);
    color: #08111F;
    font-size: 13.5px;
    font-weight: 700;
    font-family: var(--font-h);
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(212, 162, 76, 0.25);
    white-space: nowrap;
}
.btn-gold:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(212, 162, 76, 0.35);
    color: #08111F;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-outline-dark:hover {
    border-color: var(--gold-border);
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.04);
}

/* ==========================================================================
   MAIN DASHBOARD STYLES
   ========================================================================== */
.date-range-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.date-range-btn:hover {
    border-color: var(--gold-border);
    color: var(--text-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.25s ease;
}
.stat-card:hover {
    border-color: var(--gold-border);
    background: var(--bg-card-elevated);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.stat-card__icon {
    width: 50px; height: 50px;
    border-radius: 14px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 20px;
    flex-shrink: 0;
}

.stat-card__body { flex: 1; min-width: 0; }
.stat-card__label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.stat-card__value {
    font-family: var(--font-h);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
    margin-bottom: 4px;
}
.stat-card__change {
    font-size: 11.5px;
    color: var(--success);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}
.stat-card__change span {
    color: var(--text-dim);
    font-weight: 400;
}

/* Dashboard Grids */
.dash-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 20px;
}

.dash-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Panels */
.panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
}

.panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}
.panel__title {
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
}
.panel__filter {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
}
.panel__link {
    font-size: 12px;
    color: var(--gold);
    font-weight: 600;
    transition: color 0.15s;
}
.panel__link:hover { color: var(--gold-hover); }

/* Top Selling Item Row */
.top-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    transition: all 0.15s ease;
}
.top-item:last-child { border-bottom: none; }
.top-item:hover { transform: translateX(3px); }

.top-item__img {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 15px;
    flex-shrink: 0;
}
.top-item__info { flex: 1; min-width: 0; }
.top-item__name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-white);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-item__sold {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 1px;
}
.top-item__price {
    font-family: var(--font-h);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
}

/* Donut Chart Wrap */
.donut-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0 16px;
    height: 190px;
}
.donut-center {
    position: absolute;
    text-align: center;
    pointer-events: none;
}
.donut-center__num {
    font-family: var(--font-h);
    font-size: 24px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.1;
}
.donut-center__lbl {
    font-size: 10.5px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Donut Legend */
.legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}
.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
}
.legend-item__dot-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}
.legend-item__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-item__pct {
    font-weight: 600;
    color: var(--text-white);
    font-size: 12px;
}
.btn-view-details {
    width: 100%;
    padding: 9px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-view-details:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-soft);
}

/* Recent Transaction Item */
.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.txn-item:last-child { border-bottom: none; }
.txn-item__icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.txn-item__icon.sale { background: var(--success-soft); color: var(--success); }
.txn-item__icon.purchase { background: var(--info-soft); color: var(--info); }
.txn-item__icon.payment { background: var(--gold-soft); color: var(--gold); }
.txn-item__icon.expense { background: var(--danger-soft); color: var(--danger); }

.txn-item__info { flex: 1; min-width: 0; }
.txn-item__name { font-size: 12.5px; font-weight: 600; color: var(--text-white); }
.txn-item__id { font-size: 11px; color: var(--text-dim); }
.txn-item__right { text-align: right; }
.txn-item__amount { font-family: var(--font-h); font-size: 13px; font-weight: 700; color: var(--text-white); }
.txn-item__date { font-size: 10.5px; color: var(--text-dim); }

/* Low Stock Item */
.stock-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.stock-item:last-child { border-bottom: none; }
.stock-item__img {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 14px;
    flex-shrink: 0;
}
.stock-item__info { flex: 1; min-width: 0; }
.stock-item__name { font-size: 12.5px; font-weight: 600; color: var(--text-white); }
.stock-item__stock { font-size: 11px; color: var(--text-dim); }
.badge-low {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10.5px;
    font-weight: 600;
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(225, 91, 91, 0.3);
}

/* ==========================================================================
   SUMMARY STAT CARDS (STOCK LIST - 6 CARDS)
   ========================================================================== */
.stats-grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 22px;
}

.stat-card-stock {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
}
.stat-card-stock:hover {
    border-color: var(--gold-border);
    background: var(--bg-card-elevated);
    transform: translateY(-2px);
}
.stat-card-stock__icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 18px;
    flex-shrink: 0;
}
.stat-card-stock__icon.silver {
    background: rgba(136, 150, 167, 0.12);
    border-color: rgba(136, 150, 167, 0.25);
    color: #CBD5E1;
}
.stat-card-stock__icon.diamond {
    background: rgba(76, 159, 212, 0.12);
    border-color: rgba(76, 159, 212, 0.25);
    color: var(--info);
}
.stat-card-stock__icon.warning {
    background: var(--warning-soft);
    border-color: rgba(224, 169, 62, 0.25);
    color: var(--warning);
}
.stat-card-stock__icon.value {
    background: var(--gold-soft);
    border-color: var(--gold-border);
    color: var(--gold);
}

.stat-card-stock__body { flex: 1; min-width: 0; }
.stat-card-stock__label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 2px;
    white-space: nowrap;
}
.stat-card-stock__value {
    font-family: var(--font-h);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-white);
    line-height: 1.2;
    white-space: nowrap;
}
.stat-card-stock__desc {
    font-size: 10.5px;
    color: var(--text-dim);
    margin-top: 3px;
    white-space: nowrap;
}

/* ==========================================================================
   FILTER & SEARCH SECTION
   ========================================================================== */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 22px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1.2fr auto;
    gap: 12px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.filter-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.filter-input-wrap i {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 12.5px;
    pointer-events: none;
}
.filter-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 8px 12px 8px 34px;
    font-size: 12.5px;
    font-family: var(--font-b);
    outline: none;
    transition: all 0.2s ease;
}
.filter-input:focus {
    border-color: var(--gold-border);
    background: rgba(212, 162, 76, 0.04);
}

.filter-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 8px 28px 8px 12px;
    font-size: 12.5px;
    font-family: var(--font-b);
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238896A7' stroke-width='1.5' stroke-linecap='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-select:focus {
    border-color: var(--gold-border);
}
.filter-select option {
    background: #0E1420;
    color: #FFFFFF;
}

.filter-actions {
    display: flex;
    gap: 8px;
}
.btn-filter-apply {
    padding: 8px 18px;
    background: var(--gold);
    color: #08111F;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn-filter-apply:hover { background: var(--gold-hover); }

.btn-filter-reset {
    padding: 8px 14px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-filter-reset:hover { border-color: var(--border-strong); color: var(--text-white); }

/* ==========================================================================
   JEWELLERY STOCK TABLE
   ========================================================================== */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    overflow: hidden;
}

.table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.table-card__title {
    font-family: var(--font-h);
    font-size: 16px;
    font-weight: 700;
    color: var(--text-white);
}

.stock-table-wrap {
    overflow-x: auto;
}

.stock-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.stock-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.stock-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text-white);
    vertical-align: middle;
    white-space: nowrap;
}
.stock-table tbody tr {
    transition: background 0.15s ease;
}
.stock-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}
.stock-table tbody tr:last-child td {
    border-bottom: none;
}

/* Image Thumbnail in Table */
.stock-thumb {
    width: 40px; height: 40px;
    border-radius: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-size: 16px;
    overflow: hidden;
    flex-shrink: 0;
}
.stock-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* Stock Badges */
.tag-badge {
    font-family: 'Courier New', monospace;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.5px;
}
.design-badge {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.price-text {
    font-weight: 700;
    color: var(--gold);
}
.cost-text {
    color: var(--text-muted);
    font-weight: 500;
}

/* Status Badges */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.badge-status.in-stock {
    background: var(--success-soft);
    color: var(--success);
    border: 1px solid rgba(76, 175, 125, 0.3);
}
.badge-status.low-stock {
    background: var(--warning-soft);
    color: var(--warning);
    border: 1px solid rgba(224, 169, 62, 0.3);
}
.badge-status.reserved {
    background: var(--info-soft);
    color: var(--info);
    border: 1px solid rgba(76, 159, 212, 0.3);
}
.badge-status.sold {
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid rgba(225, 91, 91, 0.3);
}

/* Action Buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-action-icon {
    width: 30px; height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.btn-action-icon:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-soft);
}

/* Table Pagination */
.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 18px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
    font-size: 12.5px;
    color: var(--text-muted);
}
.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}
.page-btn {
    min-width: 32px; height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0 6px;
}
.page-btn:hover { color: var(--text-white); border-color: var(--border-strong); }
.page-btn.active {
    background: var(--gold);
    color: #08111F;
    border-color: var(--gold);
    font-weight: 700;
}
.page-size-select {
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    padding: 5px 24px 5px 10px;
    font-size: 12px;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%238896A7' stroke-width='1.5' stroke-linecap='round' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    cursor: pointer;
}

/* ==========================================================================
   ADD NEW STOCK FORM UI
   ========================================================================== */

/* Breadcrumb Header */
.breadcrumb-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.breadcrumb-wrap a { color: var(--text-muted); transition: color 0.15s; }
.breadcrumb-wrap a:hover { color: var(--gold); }
.breadcrumb-wrap i { font-size: 10px; color: var(--text-dim); }

/* Step Indicator Bar */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 22px;
    margin-bottom: 24px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--text-muted);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 8px;
}
.step-item:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.03);
}

.step-circle {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid var(--border);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.step-item.active {
    color: var(--gold-light);
    font-weight: 700;
}
.step-item.active .step-circle {
    background: var(--gold);
    color: #08111F;
    border-color: var(--gold);
    box-shadow: 0 0 12px rgba(212, 162, 76, 0.45);
    transform: scale(1.06);
}

.step-item.completed {
    color: var(--text-white);
}
.step-item.completed .step-circle {
    background: rgba(76, 175, 125, 0.2);
    color: #4ade80;
    border-color: #4ade80;
}

.step-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 10px;
    transition: background 0.3s ease;
    border-radius: 2px;
}
.step-line.active {
    background: linear-gradient(90deg, var(--gold) 0%, rgba(212, 162, 76, 0.2) 100%);
}
.step-line.completed {
    background: #4ade80;
}

/* Two Column Form Layout: Main Form | Summary + Images + Stock Info */
.form-layout-2col {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 22px;
    align-items: start;
    margin-bottom: 80px;
}

.form-left-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.form-right-col {
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: calc(var(--topbar-h) + 20px);
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.summary-card__header {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border);
}
.summary-card__tag-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.summary-badge {
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 800;
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.summary-badge i {
    font-size: 12px;
    color: var(--gold);
}
.summary-status-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.summary-card__body {
    padding: 18px 20px;
}

.summary-card__tag {
    font-family: var(--font-h);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
    margin-bottom: 2px;
}

.summary-card__meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 0;
}

.summary-section-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-dim);
    margin: 14px 0 8px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.summary-section-label:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 4px 0;
}
.summary-row b {
    color: var(--text-white);
    font-weight: 600;
    font-size: 12.5px;
}

.summary-row.total {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
    font-size: 13.5px;
    color: var(--text-white);
    font-weight: 600;
}
.summary-row.total b {
    color: var(--gold);
    font-size: 15px;
}

.summary-price-highlight {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(212,162,76,0.08);
    border: 1px solid rgba(212,162,76,0.3);
    text-align: center;
}
.summary-price-highlight .label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.summary-price-highlight .value {
    font-family: var(--font-h);
    font-size: 22px;
    font-weight: 800;
    color: var(--gold-light);
}

.summary-progress-note {
    font-size: 11px;
    color: var(--text-dim);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}

/* Card Section */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 26px;
}

.form-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}
.form-card__title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 700;
    color: var(--text-white);
}
.form-card__title i {
    color: var(--gold);
    font-size: 16px;
}

/* Form Controls & Inputs */
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.form-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.input-group-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.input-group-label .required { color: var(--danger); }

.form-ctrl {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 10px 14px;
    font-size: 13px;
    font-family: var(--font-b);
    outline: none;
    transition: all 0.2s ease;
}
.form-ctrl:focus {
    border-color: var(--gold);
    background: rgba(212, 162, 76, 0.04);
    box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.08);
}
.form-ctrl.highlighted {
    border-color: var(--gold);
    background: rgba(212, 162, 76, 0.06);
    font-weight: 700;
    color: var(--gold);
}

.form-ctrl-with-btn {
    display: flex;
    gap: 8px;
}
.btn-addon {
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--gold);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex; align-items: center; justify-content: center;
}
.btn-addon:hover {
    background: var(--gold-soft);
    border-color: var(--gold-border);
}

/* Radio Button Group */
.radio-pills {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}
.radio-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}
.radio-pill input[type="radio"] { display: none; }
.radio-pill-circle {
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.15s ease;
}
.radio-pill-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: transparent;
    transition: all 0.15s ease;
}
.radio-pill input[type="radio"]:checked ~ .radio-pill-circle {
    border-color: var(--gold);
}
.radio-pill input[type="radio"]:checked ~ .radio-pill-circle .radio-pill-dot {
    background: var(--gold);
}
.radio-pill input[type="radio"]:checked ~ span {
    color: var(--text-white);
    font-weight: 600;
}

/* Get Weight Action Button */
.btn-get-weight {
    padding: 10px 16px;
    background: var(--gold-soft);
    border: 1px solid var(--gold-border);
    color: var(--gold);
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-get-weight:hover {
    background: var(--gold);
    color: #08111F;
}

/* Stone Details Dynamic Table */
.stone-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
    margin-bottom: 14px;
}
.stone-table th {
    padding: 8px 10px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
.stone-table td {
    padding: 8px 6px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.stone-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-white);
    padding: 6px 8px;
    font-size: 12px;
    outline: none;
}
.stone-input:focus {
    border-color: var(--gold);
}
.btn-remove-stone {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 14px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.15s;
}
.btn-remove-stone:hover {
    background: var(--danger-soft);
}

.stone-summary-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    font-size: 12.5px;
    color: var(--text-muted);
    padding: 10px 4px 0;
}
.stone-summary-row b {
    color: var(--success);
    font-weight: 700;
}

/* Photo Uploader Modern Grid & 4-Angle Gallery */
.photo-preview-container {
    background: rgba(14, 20, 32, 0.6);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.primary-photo-preview {
    width: 100%;
    height: 140px;
    border-radius: var(--radius-sm);
    background: rgba(0, 0, 0, 0.4);
    border: 1.5px dashed rgba(212, 162, 76, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transition: all 0.2s ease;
}
.primary-photo-preview:hover {
    border-color: var(--gold);
    background: rgba(212, 162, 76, 0.03);
}
.primary-photo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.6));
}
.photo-actions-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.image-placeholder-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 10px;
    gap: 3px;
}
.image-placeholder-box i {
    font-size: 26px;
    color: rgba(212, 162, 76, 0.4);
    margin-bottom: 2px;
}
.image-placeholder-box span {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
}
.image-placeholder-box small {
    font-size: 10px;
    color: var(--text-dim);
}

.thumbnail-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
.thumbnail-box {
    height: 60px;
    background: #080C14;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}
.thumbnail-box:hover, .thumbnail-box.active {
    border-color: var(--gold);
    box-shadow: 0 0 10px rgba(212, 162, 76, 0.3);
}
.thumbnail-box img {
    width: 100%; height: 100%; object-fit: cover;
}
.thumbnail-box.add-more {
    border: 1.5px dashed rgba(212, 162, 76, 0.35);
    color: var(--text-dim);
    flex-direction: column;
    font-size: 10.5px;
    font-weight: 600;
    gap: 2px;
    background: rgba(255, 255, 255, 0.01);
}
.thumbnail-box.add-more:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(212, 162, 76, 0.06);
}

/* Bottom Sticky Action Bar */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-w);
    right: 0;
    height: 70px;
    background: rgba(14, 20, 32, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 98;
}

.bottom-action-bar__left {
    display: flex;
    gap: 12px;
}
.bottom-action-bar__right {
    display: flex;
    gap: 12px;
}

.btn-action-cancel {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-cancel:hover {
    border-color: var(--border-strong);
    color: var(--text-white);
}

.btn-action-draft {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-action-draft:hover {
    border-color: var(--gold-border);
    color: var(--gold);
}

.btn-action-save {
    padding: 10px 24px;
    background: var(--gold);
    border: none;
    border-radius: var(--radius-md);
    color: #08111F;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(212, 162, 76, 0.3);
}
.btn-action-save:hover {
    background: var(--gold-hover);
    transform: translateY(-1px);
}

.btn-action-print {
    padding: 10px 22px;
    background: var(--bg-card);
    border: 1px solid var(--gold);
    border-radius: var(--radius-md);
    color: var(--gold);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}
.btn-action-print:hover {
    background: var(--gold-soft);
    color: var(--gold-light);
}

/* ==========================================================================
   JEWELLERY TAG MODAL / PREVIEW
   ========================================================================== */
.tag-preview-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tag-preview-modal.show {
    display: flex;
}

.tag-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 440px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
}

.tag-card-physical {
    background: #FFFDF8;
    color: #1A1A1A;
    border: 2px dashed #C8A45D;
    border-radius: 12px;
    padding: 18px 20px;
    font-family: 'Inter', sans-serif;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    margin: 16px 0;
}
.tag-card-physical::before {
    content: '';
    position: absolute;
    top: 12px; left: 12px;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #E5E5E5;
    border: 2px solid #999;
}
.tag-header {
    text-align: center;
    border-bottom: 1px solid #E5D5B5;
    padding-bottom: 8px;
    margin-bottom: 12px;
}
.tag-brand {
    font-family: var(--font-h);
    font-size: 14px;
    font-weight: 800;
    color: #8C6D23;
    letter-spacing: 1.5px;
}
.tag-sub {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #666;
}

.tag-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    font-size: 11px;
}
.tag-item-line {
    display: flex;
    justify-content: space-between;
}
.tag-lbl { color: #666; }
.tag-val { font-weight: 700; color: #111; }
.tag-price-row {
    grid-column: span 2;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #DDD;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}
.tag-price-row .tag-val {
    font-size: 15px;
    font-weight: 800;
    color: #8C6D23;
}
.tag-barcode-wrap {
    text-align: center;
    margin-top: 10px;
    padding-top: 6px;
}
.tag-barcode-lines {
    height: 32px;
    background: repeating-linear-gradient(
        90deg,
        #111 0px,
        #111 2px,
        transparent 2px,
        transparent 4px,
        #111 4px,
        #111 7px,
        transparent 7px,
        transparent 8px,
        #111 8px,
        #111 11px,
        transparent 11px,
        transparent 13px
    );
    width: 80%;
    margin: 0 auto 4px;
}
.tag-barcode-num {
    font-family: monospace;
    font-size: 10px;
    color: #444;
    letter-spacing: 2px;
}

/* ==========================================================================
   LEGACY-STYLE QUICK TOOLBAR & ADVANCED STOCK STYLES
   ========================================================================== */
.legacy-toolbar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    overflow-x: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
}
.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-h);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    color: var(--text-white);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.toolbar-btn:hover {
    border-color: var(--gold-border);
    background: var(--gold-soft);
    color: var(--gold-light);
    transform: translateY(-1px);
}
.toolbar-btn.primary {
    background: var(--gold);
    color: #08111F;
    border-color: var(--gold);
    font-weight: 700;
}
.toolbar-btn.primary:hover {
    background: var(--gold-hover);
    color: #08111F;
}
.toolbar-btn.danger {
    color: #FF7B7B;
}
.toolbar-btn.danger:hover {
    background: rgba(225, 91, 91, 0.15);
    border-color: rgba(225, 91, 91, 0.4);
    color: #FFA5A5;
}
.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 4px;
}

/* Bulk toggle badge */
.bulk-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    user-select: none;
}
.bulk-check-wrap input[type="checkbox"] {
    accent-color: var(--gold);
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Live Gold Rates Table */
.rates-grid-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.5px;
}
.rates-grid-table th {
    background: rgba(255,255,255,0.04);
    color: var(--gold);
    font-weight: 700;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gold-border);
}
.rates-grid-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--text-white);
}
.rates-grid-table tr:hover td {
    background: rgba(212, 162, 76, 0.05);
}

/* Real-time webcam styles */
.webcam-live-box {
    position: relative;
    width: 100%;
    height: 260px;
    background: #02050A;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold-border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.webcam-video-el {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.webcam-status-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.75);
    border: 1px solid var(--gold-border);
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    color: var(--gold);
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 5;
}
.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4CAF7D;
    box-shadow: 0 0 8px #4CAF7D;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* Toast notification */
.toast-notice {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card-elevated);
    border: 1px solid var(--gold);
    color: var(--text-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), 0 0 15px rgba(212,162,76,0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 99999;
    font-size: 13.5px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-notice.show {
    transform: translateY(0);
    opacity: 1;
}

/* Top Action Toolbar on Add/Edit */
.action-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 8px 12px;
}
.btn-tool {
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    text-decoration: none;
}
.btn-tool:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-soft);
}
.btn-tool.primary {
    background: var(--gold);
    color: #08111F;
    border-color: var(--gold);
    font-weight: 700;
}
.btn-tool.primary:hover {
    background: var(--gold-hover);
    color: #08111F;
}
.btn-tool.danger:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: var(--danger-soft);
}

/* Ensure all select options render with dark background */
select, select option {
    background-color: #0E1420 !important;
    color: #FFFFFF !important;
}

/* Rates Matrix Modal */
.rates-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 16px 0;
}
.rate-box {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
}
.rate-box.gold {
    border-color: var(--gold-border);
    background: var(--gold-soft);
}
.rate-box__label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
}
.rate-box__val {
    font-size: 16px;
    font-weight: 700;
    color: var(--gold);
    margin-top: 4px;
}

/* ==========================================================================
   COMPREHENSIVE RESPONSIVE SYSTEM (MOBILE, TABLET, LAPTOP, DESKTOP)
   ========================================================================== */

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 20, 0.75);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1190;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* 1. Large Laptops & Desktops (<= 1400px) */
@media (max-width: 1400px) {
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
    .filter-grid { grid-template-columns: repeat(4, 1fr); }
    .form-layout-2col { grid-template-columns: 1fr 340px; }
    .bullion-ticker-grid { grid-template-columns: repeat(2, 1fr); }
}

/* 2. Medium Laptops & Tablets Landscape (<= 1200px) */
@media (max-width: 1200px) {
    .stats-grid-6 { grid-template-columns: repeat(3, 1fr); }
    .filter-grid { grid-template-columns: repeat(3, 1fr); }
    .form-layout-2col { grid-template-columns: 1fr; }
    .form-right-col { position: static; }
    .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dash-grid { grid-template-columns: 1fr; }
    .dash-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

/* 3. Tablets Portrait & Mobile Devices (<= 991px) */
@media (max-width: 991px) {
    /* Sidebar Drawer */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1200;
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.7);
    }
    .sidebar.open {
        transform: translateX(0);
    }

    /* Main Area Full Width */
    .main-area {
        margin-left: 0;
        width: 100%;
    }

    /* Topbar Full Width */
    .topbar {
        left: 0;
        padding: 0 18px;
    }
    .topbar__toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* Page Content Spacing */
    .page-content {
        padding: 20px 18px 60px;
    }

    /* Bottom Action Bar */
    .bottom-action-bar {
        left: 0;
    }

    /* Stats Grid */
    .stats-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dash-grid-3 {
        grid-template-columns: 1fr;
    }
}

/* 4. Small Tablets & Mobile Landscape (<= 768px) */
@media (max-width: 768px) {
    /* Topbar Layout */
    .topbar {
        padding: 0 14px;
        gap: 10px;
    }
    .topbar__search {
        width: auto;
        flex: 1;
        min-width: 0;
        padding: 7px 12px;
    }
    .topbar__user-role {
        display: none;
    }
    .topbar__user {
        padding: 4px 10px 4px 5px;
    }

    /* Dropdown Menus on Mobile */
    .header-dropdown-menu.notif-menu {
        width: calc(100vw - 28px);
        max-width: 350px;
        right: -50px;
    }
    .header-dropdown-menu.user-menu {
        width: calc(100vw - 28px);
        max-width: 280px;
        right: 0;
    }

    /* Page Header Stack */
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .page-header__actions {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }
    .page-header__actions > * {
        flex: 1 1 auto;
        justify-content: center;
        text-align: center;
    }

    /* Form Layouts */
    .form-grid-3, .form-grid-4, .form-grid-2 {
        grid-template-columns: 1fr;
    }
    .filter-grid {
        grid-template-columns: 1fr;
    }
    .bullion-ticker-grid {
        grid-template-columns: 1fr;
    }

    /* Step Indicator Scroll */
    .step-indicator {
        overflow-x: auto;
        padding: 10px 14px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
    }
    .step-item {
        flex-shrink: 0;
    }
    .step-line {
        width: 24px;
        flex-shrink: 0;
    }

    /* Sticky Bottom Bar */
    .bottom-action-bar {
        padding: 12px 16px;
        flex-direction: column;
        gap: 10px;
        border-radius: 16px 16px 0 0;
    }
    .bottom-action-bar__left, .bottom-action-bar__right {
        width: 100%;
        justify-content: space-between;
    }
    .bottom-action-bar__right button,
    .bottom-action-bar__left a,
    .bottom-action-bar__left button {
        flex: 1;
        justify-content: center;
    }

    /* Floating Bulk Action Bar */
    .floating-bulk-bar {
        width: 92%;
        flex-direction: column;
        border-radius: 18px;
        padding: 12px 18px;
        gap: 10px;
        text-align: center;
    }
    .floating-bulk-bar button {
        width: 100%;
        justify-content: center;
    }

    /* Table Card */
    .table-card__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .table-card__footer {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 5. Mobile Portrait (<= 480px) */
@media (max-width: 480px) {
    .page-content {
        padding: 16px 12px 60px;
    }
    .page-title {
        font-size: 20px;
    }
    .page-subtitle {
        font-size: 12px;
    }

    /* Single Column Stats */
    .stats-grid-6, .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .topbar__user-name {
        display: none;
    }
    .topbar__user i.user-arrow {
        display: none;
    }
    .topbar__user {
        border-radius: 50%;
        padding: 2px;
        border: none;
        background: none;
    }

    /* Radio pills wrap */
    .radio-pills {
        flex-direction: column;
        gap: 6px;
    }
    .radio-pill {
        width: 100%;
    }

    /* Tag modal mobile */
    .tag-modal-content {
        padding: 16px 14px;
        width: 96%;
    }
}

/* ==========================================================================
   KPI STATS CARDS, DATA TABLES, SEARCH BOX & BADGES (ORDERS / SALES / CUSTOMERS)
   ========================================================================== */

/* KPI Metric Grid & Cards */
.kpi-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}
.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}
.kpi-card:hover {
    border-color: var(--gold-border);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 15px rgba(212, 162, 76, 0.1);
}
.kpi-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.kpi-card__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.kpi-card__icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.kpi-card__value {
    font-family: var(--font-h);
    font-size: 22px;
    font-weight: 800;
    color: var(--text-white);
    line-height: 1.1;
    margin-bottom: 4px;
}
.kpi-card__sub {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-dim);
}

/* Data Table & Table Container */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.table-card__header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.015);
}
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    text-align: left;
}
.data-table th {
    background: rgba(14, 20, 32, 0.95);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    vertical-align: middle;
}
.data-table tbody tr {
    transition: background 0.15s ease;
}
.data-table tbody tr:hover {
    background: rgba(212, 162, 76, 0.04);
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Search Box in Table Header */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 13px;
    pointer-events: none;
}
.search-box input {
    width: 100%;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 9px 14px 9px 38px;
    color: var(--text-white);
    font-size: 13px;
    font-family: var(--font-b);
    outline: none;
    transition: all 0.2s ease;
}
.search-box input:focus {
    border-color: var(--gold);
    background: rgba(212, 162, 76, 0.04);
    box-shadow: 0 0 0 3px rgba(212, 162, 76, 0.08);
}

/* Action Icons & Badges */
.btn-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
}
.btn-action-icon:hover {
    background: var(--gold-soft);
    color: var(--gold);
    border-color: var(--gold-border);
}
.badge-gold {
    background: var(--gold-soft);
    color: var(--gold);
    border: 1px solid var(--gold-border);
}
.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.badge-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.badge-info {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Order Status Interactive Select */
.order-status-select {
    background: rgba(14, 20, 32, 0.9);
    border: 1px solid var(--border);
    color: var(--text-white);
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}
.order-status-select.Booked { color: var(--gold); border-color: var(--gold); }
.order-status-select.InWorkshop { color: #3b82f6; border-color: #3b82f6; }
.order-status-select.Ready { color: #10b981; border-color: #10b981; }
.order-status-select.Delivered { color: var(--text-muted); }
.order-status-select.Cancelled { color: #ef4444; border-color: #ef4444; }

/* Modal Global Fix */
.tag-preview-modal {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(5, 11, 20, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999 !important;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tag-preview-modal.show {
    display: flex !important;
}
.tag-modal-content {
    background: #0E1420 !important;
    border: 1px solid var(--gold-border) !important;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    position: relative;
    z-index: 100000 !important;
}
