/*
 * ============================================================
 * VEDIC FASHION - LUXURY ADMIN DESIGN SYSTEM
 * Custom MVC Admin Portal
 * Brand Colors: Obsidian #0B0B0B | Champagne Gold #D4AF37
 * ============================================================
 */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda:ital,opsz,wght@0,6..96,400..900;1,6..96,400..900&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --surface:                #0B0B0B;
    --surface-container:      #131316;
    --surface-container-high: #1a1a1f;
    --surface-card:           #141418;
    --outline-variant:        rgba(255, 255, 255, 0.08);
    --outline-hover:          rgba(212, 175, 55, 0.35);
    --border:                 rgba(255, 255, 255, 0.08); /* alias for --outline-variant */

    /* Layout Dimensions */
    --sidebar-width:          105px;
    --topbar-height:          44px;

    /* Luxury Brand Palette */
    --primary:          #d4af37;   /* Metallic Champagne Gold */
    --primary-hover:    #e5c158;
    --primary-dim:      #a88925;
    --primary-glow:     rgba(212, 175, 55, 0.16);
    --primary-bg:       rgba(212, 175, 55, 0.08);

    --on-surface:         #f4f4f5;
    --on-surface-variant: #a1a1aa;
    --on-surface-muted:   #71717a;

    --success:            #34d399;
    --success-bg:         rgba(52, 211, 153, 0.1);
    --danger:             #f87171;
    --danger-bg:          rgba(248, 113, 113, 0.1);
    --warning:            #eab308;
    --warning-bg:         rgba(234, 179, 8, 0.1);
    --info:               #60a5fa;
    --info-bg:            rgba(96, 165, 250, 0.1);

    --font-headline: 'Outfit', 'Inter', sans-serif;
    --font-brand:    'Bodoni Moda', Georgia, serif;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--surface);
    color: var(--on-surface);
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   GLOBAL & THEME-BASED LUXURY SCROLLBARS
   ============================================================ */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.45) rgba(255, 255, 255, 0.03);
}

/* Chrome, Edge, Safari (WebKit) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(18, 18, 20, 0.6);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(184, 146, 36, 0.5), rgba(212, 175, 55, 0.7));
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.85), rgba(243, 229, 171, 0.95));
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Utility to completely remove scrollbars while maintaining full scrollability */
.hide-scrollbar,
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

.hide-scrollbar::-webkit-scrollbar,
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ============================================================
   TYPOGRAPHY & ACCENTS
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headline);
    font-weight: 700;
    color: var(--on-surface);
    letter-spacing: -0.01em;
}

.text-gold {
    color: var(--primary) !important;
}

/* ============================================================
   LOGIN GATEWAY
   ============================================================ */
.login-gateway {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% -20%, rgba(212, 175, 55, 0.15) 0%, #0B0B0B 65%);
    padding: 2rem 1.25rem;
    position: relative;
    overflow: hidden;
}

.login-gateway::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface-container);
    border: 1px solid var(--outline-variant);
    border-radius: 12px;
    padding: 2.75rem 2.5rem;
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.8), 0 0 40px rgba(212, 175, 55, 0.04);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(12px);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    margin-bottom: 1.25rem;
    padding: 12px;
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.12);
}

.login-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, 0.3));
}

.login-header h2 {
    font-family: var(--font-headline);
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--on-surface);
    margin-bottom: 0.35rem;
}

.login-subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.88;
}

.form-group {
    margin-bottom: 1.35rem;
}

.form-group label {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: 0.5rem;
}

.form-label-icon {
    color: var(--primary);
    margin-right: 0.5rem;
    font-size: 0.85rem;
}

.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--surface-container-high);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    color: var(--on-surface);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all 0.2s var(--ease-standard);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
    background: #1e1e24;
}

.password-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field-wrapper .form-control {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--on-surface-muted);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.password-toggle-btn:hover {
    color: var(--primary);
}

.forgot-password-link {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: all 0.2s var(--ease-standard);
}

.forgot-password-link:hover {
    color: #F3E5AB;
    text-decoration: underline;
}

.btn-login,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: linear-gradient(135deg, #d4af37 0%, #b89224 100%);
    border: none;
    border-radius: 8px;
    color: #0B0B0B;
    font-family: var(--font-headline);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s var(--ease-standard);
    box-shadow: 0 8px 20px -4px rgba(212, 175, 55, 0.3);
    text-decoration: none;
}

.btn-login:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #e5c158 0%, #c9a334 100%);
    box-shadow: 0 12px 28px -4px rgba(212, 175, 55, 0.45);
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    color: var(--on-surface);
    font-family: var(--font-headline);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.login-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.login-footer-label {
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.login-footer-label::before,
.login-footer-label::after {
    content: "";
    display: inline-block;
    width: 24px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    vertical-align: middle;
    margin: 0 0.5rem;
}

.login-footer-label span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    opacity: 0.8;
}

.login-site-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.luxury-site-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.15rem 0.75rem 1rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(212, 175, 55, 0.06) 50%, rgba(18, 18, 22, 0.96) 100%);
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.luxury-site-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.15), transparent);
    transition: left 0.5s ease;
    pointer-events: none;
}

.luxury-site-card:hover::before {
    left: 100%;
}

.luxury-site-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.85);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.14) 0%, rgba(24, 24, 30, 0.98) 100%);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.3);
}

.site-card-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(130% 130% at 25% 20%, rgba(255, 255, 255, 0.98) 0%, rgba(244, 240, 230, 0.92) 100%);
    border: 1.5px solid rgba(212, 175, 55, 0.65);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 1), 0 0 14px rgba(212, 175, 55, 0.25);
    padding: 6px;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.luxury-site-card:hover .site-card-logo-wrap {
    transform: scale(1.08);
    border-color: rgba(212, 175, 55, 0.95);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6), 0 0 22px rgba(212, 175, 55, 0.45);
}

.site-card-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.15));
}

.site-card-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 0.65rem;
    width: 100%;
}

.site-card-name {
    font-family: var(--font-headline);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.luxury-site-card:hover .site-card-name {
    color: #ffd86b;
}

.site-card-url {
    font-size: 0.68rem;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 0.02em;
    margin-top: 0.3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: transform 0.2s ease;
}

.site-card-url i {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
}

.luxury-site-card:hover .site-card-url i {
    transform: translateX(3px);
}

@media (max-width: 360px) {
    .login-site-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .luxury-site-card {
        flex-direction: row;
        gap: 0.85rem;
        text-align: left;
        padding: 0.85rem 1rem;
    }
    .site-card-details {
        align-items: flex-start;
        margin-top: 0;
    }
}

/* Banners */
.error-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--danger-bg);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 8px;
    color: var(--danger);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

.success-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.3);
    border-radius: 8px;
    color: var(--success);
    font-size: 0.8rem;
    margin-bottom: 1.5rem;
}

/* ============================================================
   ADMIN DASHBOARD LAYOUT
   ============================================================ */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface-container);
    border-right: 1px solid var(--outline-variant);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    transition: transform 0.25s var(--ease-standard);
}

body.sidebar-collapsed .admin-sidebar,
html.sidebar-collapsed body .admin-sidebar {
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 1.25rem 0.5rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--outline-variant);
}

.sidebar-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 50%;
    padding: 7px;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.1);
    text-decoration: none;
    transition: transform 0.2s var(--ease-standard);
}

.sidebar-logo-wrap:hover {
    transform: scale(1.06);
}

.sidebar-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sidebar-brand-name,
.sidebar-brand-sub {
    display: none;
}

.sidebar-nav-scroller {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-scroller::-webkit-scrollbar {
    display: none;
}

.admin-nav-item {
    width: 100%;
    text-decoration: none;
    color: var(--on-surface-variant);
    padding: 0.85rem 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s var(--ease-standard);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-headline);
    font-weight: 600;
    border: none;
    background: none;
    cursor: pointer;
    text-align: center;
}

.admin-nav-item i {
    font-size: 1.25rem;
    width: auto;
    color: var(--on-surface-muted);
    transition: color 0.2s, transform 0.2s;
}

.admin-nav-item:hover,
.admin-nav-item.active {
    color: var(--primary);
    background: rgba(212, 175, 55, 0.08);
}

.admin-nav-item:hover i,
.admin-nav-item.active i {
    color: var(--primary);
    transform: scale(1.08);
}

.sidebar-footer {
    padding: 0.75rem 0.35rem;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logout-action {
    color: var(--danger);
}

.logout-action i {
    color: var(--danger);
}

.logout-action:hover {
    background: var(--danger-bg);
    color: #ff8585;
}

/* ============================================================
   MAIN CONTENT & FIXED TOPBAR
   ============================================================ */
.admin-breadcrumb-strip {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    height: var(--topbar-height);
    z-index: 1000;
    background: var(--surface-container);
    border-bottom: 1px solid var(--outline-variant);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.75rem;
    transition: left 0.25s var(--ease-standard), width 0.25s var(--ease-standard);
}

body.sidebar-collapsed .admin-breadcrumb-strip,
html.sidebar-collapsed body .admin-breadcrumb-strip {
    left: 0;
    width: 100%;
}

.breadcrumb-left-cluster {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    flex: 1;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.breadcrumb-left-cluster::-webkit-scrollbar {
    display: none;
}

.sidebar-toggle-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.sidebar-toggle-btn:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.1);
}

.breadcrumb-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.breadcrumb-inner a {
    color: var(--primary);
    text-decoration: none;
    opacity: 0.75;
    transition: opacity 0.2s;
}

.breadcrumb-inner a:hover {
    opacity: 1;
}

.breadcrumb-inner span {
    color: var(--on-surface-variant);
    opacity: 0.6;
}

.breadcrumb-inner i {
    font-size: 0.6rem;
    color: var(--on-surface-muted);
}

.breadcrumb-right-cluster {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.topbar-help-btn {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.45);
    color: #e5c158;
    padding: 0.32rem 0.95rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.topbar-help-btn:hover {
    background: linear-gradient(135deg, #d4af37, #b89127);
    color: #0b0b0b;
    border-color: #ffd86b;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.35);
}

.topbar-help-btn:hover i {
    color: #0b0b0b;
}

.topbar-help-btn i {
    color: #d4af37;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.breadcrumb-inner {
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.breadcrumb-inner::-webkit-scrollbar {
    display: none;
}

.topbar-user-badge {
    color: var(--on-surface-variant);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.admin-main {
    margin-left: var(--sidebar-width);
    padding: calc(var(--topbar-height) + 1.25rem) 2rem 3rem;
    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    transition: margin-left 0.25s var(--ease-standard), width 0.25s var(--ease-standard);
}

body.sidebar-collapsed .admin-main,
html.sidebar-collapsed body .admin-main {
    margin-left: 0;
    width: 100%;
}

.admin-footer {
    margin-left: var(--sidebar-width);
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--outline-variant);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--on-surface-muted);
    transition: margin-left 0.25s var(--ease-standard);
}

body.sidebar-collapsed .admin-footer,
html.sidebar-collapsed body .admin-footer {
    margin-left: 0;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.75rem;
}

.dashboard-header h1 {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sub-label {
    font-size: 0.8rem;
    color: var(--on-surface-variant);
    margin-top: 0.25rem;
}

/* Welcome Banner */
.welcome-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(19, 19, 22, 0.9) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
}

.welcome-text h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
    color: #fff;
}

.welcome-text p {
    font-size: 0.85rem;
    color: var(--on-surface-variant);
}

.welcome-text code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.8rem;
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

/* ============================================================
   STAT CARDS GRID
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    width: 100%;
}

.stat-card {
    background: var(--surface-card);
    border: 1px solid var(--outline-variant);
    border-radius: 12px;
    padding: 1.35rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--outline-hover);
    box-shadow: 0 12px 24px -6px rgba(0, 0, 0, 0.6);
}

.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--on-surface-variant);
    margin-bottom: 0.35rem;
}

.stat-card-value {
    font-family: var(--font-headline);
    font-size: clamp(1.4rem, 2.2vw, 1.85rem);
    font-weight: 800;
    color: var(--on-surface);
    letter-spacing: -0.02em;
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    flex-wrap: wrap;
    word-break: break-word;
}

.stat-card-unit {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--on-surface-muted);
}

.visual-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 999px;
    overflow: hidden;
}

.visual-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #b89224, #d4af37);
    border-radius: 999px;
    transition: width 0.6s var(--ease-standard);
}

.stat-card-footer {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-surface-muted);
    border-top: 1px solid var(--outline-variant);
    padding-top: 0.75rem;
}

/* ============================================================
   SPLIT GRID (ACTIVITY + QUICK ACTIONS)
   ============================================================ */
.dashboard-split-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 1fr);
    gap: 1.5rem;
    align-items: start;
    width: 100%;
}

.admin-card {
    background: var(--surface-card);
    border: 1px solid var(--outline-variant);
    border-radius: 12px;
    padding: 1.5rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.admin-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.card-icon-wrap {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.admin-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
}

.card-subtitle {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
    margin-top: 0.15rem;
}

.badge-pill {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--outline-variant);
    border-radius: 6px;
    color: var(--on-surface-variant);
}

/* ============================================================
   RESPONSIVE DATA TABLES & LUXURY SCROLLBAR
   ============================================================ */
.inquiry-table-wrapper,
.table-responsive-wrapper,
.table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.45) rgba(255, 255, 255, 0.03);
}

/* Theme-based luxury scrollbars for table wrappers */
.inquiry-table-wrapper::-webkit-scrollbar,
.table-responsive-wrapper::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}

.inquiry-table-wrapper::-webkit-scrollbar-track,
.table-responsive-wrapper::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 999px;
}

.inquiry-table-wrapper::-webkit-scrollbar-thumb,
.table-responsive-wrapper::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, rgba(184, 146, 36, 0.5), rgba(212, 175, 55, 0.7));
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.inquiry-table-wrapper::-webkit-scrollbar-thumb:hover,
.table-responsive-wrapper::-webkit-scrollbar-thumb:hover,
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.85), rgba(243, 229, 171, 0.95));
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    min-width: 580px;
}

.data-table th {
    text-align: left;
    padding: 0.75rem 0.9rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--on-surface-muted);
    border-bottom: 1px solid var(--outline-variant);
    white-space: nowrap;
}

.data-table td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    vertical-align: middle;
    white-space: nowrap;
}

.data-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Specific table widths to prevent squeeze on complex tables */
.dashboard-table {
    min-width: 560px;
}

.inquiries-table {
    min-width: 780px;
}

.subscribers-table {
    min-width: 720px;
}

.roles-table {
    min-width: 680px;
}

.users-table {
    min-width: 680px;
}

.data-table td.cell-wrap,
.data-table td.message-cell {
    white-space: normal;
}

.contact-cell {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-weight: 600;
    color: var(--on-surface);
}

.contact-email {
    font-size: 0.7rem;
    color: var(--on-surface-muted);
}

.contact-phone {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.status-new {
    background: rgba(212, 175, 55, 0.12);
    color: var(--primary);
    border: 1px solid rgba(212, 175, 55, 0.25);
}

.status-reviewed {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.status-closed {
    background: rgba(161, 161, 170, 0.1);
    color: var(--on-surface-muted);
    border: 1px solid rgba(161, 161, 170, 0.2);
}

.time-cell {
    font-size: 0.7rem;
    color: var(--on-surface-muted);
    white-space: nowrap;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--on-surface-muted);
}

.admin-card-footer {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--outline-variant);
}

/* Table Action Buttons */
.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant);
    font-size: 0.75rem;
    text-decoration: none;
    transition: all 0.2s var(--ease-standard);
}

.action-btn:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    color: var(--primary);
}

.action-btn.danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* Activity Feed */
.activity-feed-card {
    min-height: 280px;
}

.activity-list-container {
    overflow: hidden;
}

/* Action Button Group (inline buttons in table rows) */
.action-btn-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Delete variant */
.action-delete {
    background: none;
    cursor: pointer;
}

.action-delete:hover,
.action-btn.action-delete:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

/* Status badge colour variants */
.status-active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.status-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid rgba(234, 179, 8, 0.3);
}

/* Quick Actions */
.quick-actions-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quick-action-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.command-action-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--outline-variant);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s var(--ease-standard);
}

.command-action-item:hover {
    background: var(--primary-bg);
    border-color: var(--primary);
    transform: translateX(4px);
}

.command-action-item .action-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.9rem;
}

.action-text {
    display: flex;
    flex-direction: column;
}

.action-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--on-surface);
}

.action-desc {
    font-size: 0.7rem;
    color: var(--on-surface-muted);
}

.logout-border:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
}

/* Guide Card */
.guide-card {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.03) 0%, rgba(20, 20, 24, 0.8) 100%);
}

.guide-steps {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

.guide-steps li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-steps code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    color: var(--primary);
}

/* ============================================================
   SECURITY PAGE (CHANGE PASSWORD & EMAIL)
   ============================================================ */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ============================================================
   FOOTER & MOBILE NAV
   ============================================================ */

.souls-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.souls-link:hover {
    color: var(--primary-hover);
}

.mobile-nav-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 68px;
    background: var(--surface-container);
    border-top: 1px solid var(--outline-variant);
    z-index: 1000;
    display: none;
    align-items: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

.mobile-nav-scroller {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    height: 100%;
    align-items: center;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-nav-scroller::-webkit-scrollbar {
    display: none;
}

.mobile-nav-link {
    flex: 0 0 auto;
    color: var(--on-surface-variant);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    height: 100%;
    padding: 0 1rem;
    white-space: nowrap;
    transition: all 0.2s var(--ease-standard);
}

.mobile-nav-link i {
    font-size: 1.1rem;
}

.mobile-nav-link span {
    font-size: 0.6rem;
    text-transform: uppercase;
    font-family: var(--font-headline);
    font-weight: 700;
    letter-spacing: 0.05em;
    opacity: 0.75;
}

.mobile-nav-link.active {
    color: var(--primary);
    background: transparent;
}

.mobile-nav-link.active span {
    opacity: 1;
}

.nav-scroll-btn {
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, var(--surface-container) 60%, transparent);
    border: none;
    color: var(--primary);
    font-size: 1.35rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 20;
    padding: 0;
    flex-shrink: 0;
    transition: opacity 0.2s ease, color 0.2s ease, transform 0.15s ease;
    opacity: 0.9;
}

.nav-scroll-btn.right {
    background: linear-gradient(to left, var(--surface-container) 60%, transparent);
}

.nav-scroll-btn:hover {
    color: #fff;
    opacity: 1;
}

.nav-scroll-btn:active {
    transform: scale(0.9);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 1180px) {
    .dashboard-split-grid {
        grid-template-columns: 1fr;
    }

    .quick-action-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 0.75rem;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        display: none !important;
    }

    .sidebar-toggle-btn {
        display: none !important;
    }

    .admin-breadcrumb-strip {
        left: 0 !important;
        width: 100% !important;
        padding: 0 0.85rem;
    }

    .topbar-role-badge {
        display: none !important;
    }

    .admin-main {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow-x: clip !important;
        padding: calc(var(--topbar-height) + 1.25rem) 1rem 5.5rem;
    }

    .admin-footer {
        margin-left: 0 !important;
        margin-bottom: 4rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .mobile-nav-bar {
        display: flex;
        align-items: center;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .welcome-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-card {
        padding: 1.25rem 1rem;
    }

    /* Stat grid: 2 columns on tablets */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }

    .stat-card {
        padding: 1.15rem 1rem;
    }

    /* Data tables: allow smooth horizontal scroll with custom theme scrollbar */
    .inquiry-table-wrapper,
    .table-responsive-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Security grid: single column */
    .security-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 580px) {
    .topbar-username {
        display: none !important;
    }

    .topbar-help-btn {
        padding: 0.28rem 0.65rem;
        font-size: 0.75rem;
    }

    /* Stat cards: single column on phones */
    .stat-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .quick-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-breadcrumb-strip {
        padding: 0 0.65rem;
    }

    .topbar-help-btn .help-btn-text {
        display: none !important;
    }

    .topbar-help-btn {
        padding: 0.28rem 0.5rem;
        min-width: 30px;
        height: 30px;
        justify-content: center;
    }

    .admin-main {
        padding-left: 0.65rem;
        padding-right: 0.65rem;
    }

    .admin-card {
        padding: 1rem 0.75rem;
    }

    .stat-card {
        padding: 1rem 0.85rem;
    }

    .data-table th {
        padding: 0.6rem 0.75rem;
        font-size: 0.64rem;
    }

    .data-table td {
        padding: 0.75rem;
        font-size: 0.78rem;
    }
}

/* ═══════════════════════════════════════════════════════════
   TOPBAR RESPONSIVE — Hide role badge on small screens
   ═══════════════════════════════════════════════════════════ */
.topbar-role-badge {
    color: var(--on-surface-muted);
    font-size: 0.7rem;
}
@media (max-width: 768px) {
    .topbar-role-badge,
    .topbar-username {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR GROUP LABEL
   ═══════════════════════════════════════════════════════════ */
.sidebar-group-label {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--primary);
    opacity: 0.55;
    padding: 0.85rem 0.75rem 0.2rem;
    margin: 0;
}
body.sidebar-collapsed .sidebar-group-label { display: none; }

/* ═══════════════════════════════════════════════════════════
   TABLE ACTION BUTTONS
   ═══════════════════════════════════════════════════════════ */
.btn-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--on-surface-muted);
    font-size: 0.72rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s;
}
.btn-table-action:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(180, 140, 60, 0.1);
}
.btn-table-action.delete:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* ═══════════════════════════════════════════════════════════
   ADMIN FORM — SECTIONS & GRIDS
   ═══════════════════════════════════════════════════════════ */
.admin-form { display: flex; flex-direction: column; gap: 0; }
.form-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--surface-2);
}
.form-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}
.required-star { color: #ef4444; font-size: 0.85em; }

/* ═══════════════════════════════════════════════════════════
   DETAIL VIEW SECTIONS & GRIDS
   ═══════════════════════════════════════════════════════════ */
.detail-section {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    background: var(--surface-2);
}
.detail-section-title {
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--primary);
    margin: 0 0 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    opacity: 0.85;
}
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}
.detail-item { display: flex; flex-direction: column; gap: 0.15rem; }
.detail-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--on-surface-muted);
}
.detail-value {
    font-size: 0.85rem;
    color: var(--on-surface);
    font-weight: 500;
}
.detail-value.highlight {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.95rem;
}

/* ═══════════════════════════════════════════════════════════
   DANGER BUTTON
   ═══════════════════════════════════════════════════════════ */
.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
}


/* ═══════════════════════════════════════════════════════════
   TABLE RESPONSIVE WRAPPER
   ═══════════════════════════════════════════════════════════ */
.table-responsive-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--surface-2);
}
.table-responsive-wrapper::-webkit-scrollbar { height: 5px; }
.table-responsive-wrapper::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════
   SHARED TABLE PAGE LAYOUT COMPONENTS
   ═══════════════════════════════════════════════════════════ */

/* Status badge: inactive / unsubscribed */
.status-inactive {
    background: rgba(161, 161, 170, 0.1);
    color: #a1a1aa;
    border: 1px solid rgba(161, 161, 170, 0.25);
}

/* Status badge: deleted / trashed */
.status-deleted {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── Page toolbar: header row (title + action buttons) ── */
.page-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Tab + search bar: sits directly below the toolbar ── */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* ── Tab bar: pill-style tab navigation ── */
.tab-bar {
    display: flex;
    gap: 0.35rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 6px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
    max-width: 100%;
}

.tab-item {
    padding: 0.35rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    color: var(--on-surface-muted);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    cursor: pointer;
    border: none;
    background: transparent;
}

.tab-item.tab-active {
    background: var(--primary);
    color: #000;
}

.tab-item.tab-trash {
    color: #f87171;
}

.tab-item.tab-trash.tab-active {
    background: #7f1d1d;
    color: #fca5a5;
}

.tab-badge {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.63rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

.tab-item.tab-active .tab-badge {
    background: rgba(0, 0, 0, 0.18);
}

.tab-badge-danger {
    background: #dc2626;
    color: #fff;
    border-radius: 10px;
    padding: 0 5px;
    font-size: 0.63rem;
    font-weight: 700;
    min-width: 16px;
    text-align: center;
}

/* ── Search form ── */
.table-search-form {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    max-width: 360px;
}

/* ── Export button ── */
.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary, #D4AF37);
    border: 1px solid rgba(212, 175, 55, 0.4);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: transparent;
    cursor: pointer;
}

.btn-export:hover {
    background: rgba(212, 175, 55, 0.08);
    border-color: var(--primary);
}

/* ── Trash warning banner ── */
.trash-warning {
    background: rgba(127, 29, 29, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #fca5a5;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.trash-warning i {
    color: #dc2626;
    flex-shrink: 0;
}

/* ── Generic Action Buttons / Mini Pagination Pills ── */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--on-surface, #e2e8f0);
    font-size: 0.74rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    box-sizing: border-box;
}

.btn-action:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.4);
    color: #f5d061;
}

.btn-action.active {
    background: linear-gradient(135deg, #d4af37, #996515) !important;
    color: #0b0b0b !important;
    border-color: rgba(212, 175, 55, 0.7) !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35);
}

/* ── Pagination bar ── */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(180deg, rgba(23, 23, 28, 0.95), rgba(16, 16, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.pagination-info {
    color: var(--on-surface-muted, #94a3b8);
    font-size: 0.78rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ============================================================
   ENHANCED ERP PAGINATION UI
   ============================================================ */
.erp-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(180deg, rgba(23, 23, 28, 0.95), rgba(16, 16, 20, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    font-size: 0.8rem;
    flex-wrap: wrap;
    gap: 1rem;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.erp-pagination-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.erp-pagination-info {
    color: var(--on-surface-muted, #94a3b8);
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.erp-pagination-info .gold-text {
    color: #f5d061;
    font-weight: 700;
}

.erp-pagination-limit-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.erp-limit-label {
    font-size: 0.74rem;
    color: var(--on-surface-muted, #94a3b8);
    margin: 0;
    font-weight: 500;
}

.erp-footer-limit-select {
    background: #18181f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--on-surface, #f8fafc);
    border-radius: 5px;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.erp-footer-limit-select:hover,
.erp-footer-limit-select:focus {
    border-color: var(--primary, #d4af37);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

.erp-pagination-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.erp-pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.erp-page-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.erp-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--on-surface, #e2e8f0);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    box-sizing: border-box;
}

.erp-page-btn:hover:not(.disabled):not(.active) {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.45);
    color: #f5d061;
    transform: translateY(-1px);
}

.erp-page-btn.active {
    background: linear-gradient(135deg, #d4af37, #996515);
    color: #0b0b0b !important;
    border-color: rgba(212, 175, 55, 0.7);
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.35);
    cursor: default;
}

.erp-page-btn.nav-btn {
    gap: 0.3rem;
    padding: 0 0.65rem;
    font-size: 0.75rem;
}

.erp-page-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.04);
    color: var(--on-surface-muted, #64748b);
    pointer-events: none;
}

.erp-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 32px;
    color: var(--on-surface-muted, #64748b);
    font-weight: 700;
    user-select: none;
    font-size: 0.85rem;
}

.erp-page-jump-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 2px 5px 2px 8px;
    border-radius: 7px;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.jump-label {
    font-size: 0.73rem;
    color: var(--on-surface-muted, #94a3b8);
    font-weight: 500;
}

.erp-jump-input {
    width: 44px;
    height: 26px;
    background: #18181f;
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--on-surface, #f8fafc);
    border-radius: 5px;
    padding: 0 0.25rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    outline: none;
    appearance: textfield;
    -moz-appearance: textfield;
}

.erp-jump-input::-webkit-outer-spin-button,
.erp-jump-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.erp-jump-input:focus {
    border-color: var(--primary, #d4af37);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.25);
}

.erp-jump-btn {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #f5d061;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.7rem;
    transition: all 0.18s ease;
}

.erp-jump-btn:hover {
    background: #d4af37;
    color: #0b0b0b;
    transform: scale(1.05);
}

@media (max-width: 900px) {
    .erp-pagination-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }
    .erp-pagination-left,
    .erp-pagination-right {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .erp-pagination-right {
        flex-direction: column;
        align-items: center;
        gap: 0.65rem;
    }
    .erp-pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    .erp-page-btn.prev-btn span,
    .erp-page-btn.next-btn span {
        display: none;
    }
}

/* ── Action button restore variant ── */
.action-restore {
    background: none;
    cursor: pointer;
}

.action-restore:hover,
.action-btn.action-restore:hover {
    background: rgba(74, 222, 128, 0.1);
    border-color: #4ade80;
    color: #4ade80;
}

/* Responsive: stack table-controls on narrow screens */
@media (max-width: 640px) {
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .table-search-form {
        max-width: 100%;
    }

    .page-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-toolbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .tab-bar {
        width: 100%;
    }

    .pagination-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   BULK ACTIONS FLOATING BAR
   ============================================================ */
.bulk-action-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #15151b;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.75), 0 0 15px rgba(212, 175, 55, 0.15);
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 1050;
    animation: bulkBarSlideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes bulkBarSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.bulk-bar-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bulk-count-badge {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.bulk-bar-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-bulk {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-decoration: none;
}

.btn-bulk-secondary {
    background: #202028;
    color: #e4e4e7;
    border-color: rgba(255, 255, 255, 0.12);
}
.btn-bulk-secondary:hover {
    background: #2a2a35;
    border-color: rgba(212, 175, 55, 0.4);
    color: #fff;
}

.btn-bulk-restore {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.35);
}
.btn-bulk-restore:hover {
    background: rgba(34, 197, 94, 0.25);
    color: #86efac;
}

.btn-bulk-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}
.btn-bulk-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.btn-bulk-cancel {
    background: transparent;
    color: #a1a1aa;
    border-color: transparent;
}
.btn-bulk-cancel:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.bulk-dropdown-wrap {
    position: relative;
}

.bulk-dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    background: #181822;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    min-width: 155px;
    z-index: 1060;
}

.bulk-dropdown-menu.show {
    display: block;
}

.bulk-dropdown-menu button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.55rem 0.9rem;
    font-size: 0.78rem;
    color: #e4e4e7;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease;
}
.bulk-dropdown-menu button:hover {
    background: rgba(212, 175, 55, 0.15);
    color: #ffffff;
}

/* ============================================================
   TEAM MANAGEMENT CARD-BASED GRID
   ============================================================ */
.team-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.team-card {
    background: #141419;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.team-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.team-card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.08));
    border: 2px solid rgba(212, 175, 55, 0.5);
    color: var(--primary);
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.team-card-identity {
    flex: 1;
    min-width: 0;
}

.team-card-name {
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-card-designation {
    font-size: 0.78rem;
    color: var(--on-surface-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-card-meta {
    font-size: 0.8rem;
    color: #a1a1aa;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.team-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-card-meta-item i {
    color: var(--primary);
    width: 14px;
    text-align: center;
    font-size: 0.75rem;
}

.team-card-badges {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.team-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ROLES & PERMISSIONS CARD GRID
   ============================================================ */
.roles-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.role-card {
    background: #141419;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.role-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.role-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-card-desc {
    font-size: 0.82rem;
    color: #a1a1aa;
    line-height: 1.5;
    margin-bottom: 1rem;
    min-height: 38px;
}

.role-card-chips {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    flex-wrap: wrap;
}

.role-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.75rem;
    color: #d4d4d8;
}

.role-chip-primary {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--primary);
}

.role-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================================
   ROLE EDIT - HIERARCHICAL PERMISSION CARDS
   ============================================================ */
.perm-modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
    margin: 1.25rem 0;
}

.perm-module-card {
    background: #141419;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 1.1rem;
    transition: border-color 0.2s ease;
}

.perm-module-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
}

.perm-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.perm-module-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: capitalize;
}

.perm-module-select-all {
    font-size: 0.72rem;
    color: var(--primary);
    cursor: pointer;
    text-decoration: none;
}
.perm-module-select-all:hover {
    text-decoration: underline;
}

.perm-item-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.perm-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    cursor: pointer;
    transition: background 0.15s ease;
}

.perm-item:hover {
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.2);
}

.perm-item input[type="checkbox"] {
    margin-top: 3px;
    width: 15px;
    height: 15px;
    accent-color: var(--primary);
    cursor: pointer;
}

.perm-item-text {
    flex: 1;
}

.perm-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #e4e4e7;
    margin-bottom: 0.1rem;
}

.perm-item-desc {
    font-size: 0.72rem;
    color: #71717a;
    line-height: 1.35;
}

.perm-item-sub {
    margin-left: 1.25rem;
    border-left: 2px solid rgba(212, 175, 55, 0.2);
}

/* ============================================================
   ERP ACTION TOOLBAR, ADAPTIVE FILTER BAR & 4 CORE ACTION BUTTONS
   ============================================================ */
.erp-toolbar-container {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.erp-toolbar-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
}

/* Single Filter Button */
.erp-filter-toggle-btn {
    background: #18181f;
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #e5c158;
    padding: 0.52rem 1.15rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.erp-filter-toggle-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.2);
}
.erp-filter-toggle-btn.active,
.erp-filter-toggle-btn.has-active {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.18);
    color: #ffffff;
}
.erp-filter-badge-pill {
    background: var(--primary);
    color: #0b0b0b;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 2px;
}
.erp-filter-caret {
    font-size: 0.72rem;
    transition: transform 0.25s ease;
    margin-left: 2px;
    opacity: 0.8;
}
.erp-filter-toggle-btn.open .erp-filter-caret {
    transform: rotate(180deg);
}

/* 4 Core Action Buttons */
.erp-core-actions-strip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.erp-core-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 1.05rem;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    white-space: nowrap;
}

/* 1. Add Entry Button */
.btn-erp-add {
    background: linear-gradient(135deg, #d4af37, #996515);
    color: #0b0b0b !important;
    font-weight: 700;
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 3px 12px rgba(212, 175, 55, 0.25);
}
.btn-erp-add:hover {
    filter: brightness(1.12);
    box-shadow: 0 5px 18px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

/* 2. Import CSV Button */
.btn-erp-import {
    background: #1c1c24;
    color: #e5c158 !important;
    border: 1px solid rgba(212, 175, 55, 0.4);
}
.btn-erp-import:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary);
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 3. CSV Template Button */
.btn-erp-template {
    background: #18181e;
    color: var(--on-surface-variant) !important;
    border: 1px solid var(--outline-variant);
}
.btn-erp-template:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--on-surface) !important;
    transform: translateY(-1px);
}

/* 4. Export CSV Button */
.btn-erp-export {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.35);
}
.btn-erp-export:hover {
    background: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(52, 211, 153, 0.25);
    transform: translateY(-1px);
}

/* Collapsible Filter Panel */
.erp-collapsible-filter-panel {
    display: none;
    background: #141419;
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    animation: erpSlideDown 0.22s ease-out;
}
.erp-collapsible-filter-panel.open {
    display: block;
}

@keyframes erpSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   ERP COMMAND STACK (Fixed Sticky Below Breadcrumbs)
   ============================================================ */
.erp-command-stack {
    position: sticky;
    top: var(--topbar-height, 44px);
    z-index: 980;
    margin-top: -1.25rem;
    margin-left: -2rem;
    margin-right: -2rem;
    padding: 0 2rem;
    background: rgba(14, 14, 18, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    margin-bottom: 1.5rem;
    min-width: 0;
    max-width: 100vw;
}

.success-banner + .erp-command-stack,
.error-banner + .erp-command-stack {
    margin-top: 0;
}

@media (max-width: 768px) {
    .erp-command-stack {
        margin-left: -1rem;
        margin-right: -1rem;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .erp-command-stack {
        margin-left: -0.65rem;
        margin-right: -0.65rem;
        padding: 0 0.65rem;
        margin-bottom: 1rem;
    }
}

/* ============================================================
   BAR 2: SCROLLABLE MODULE TABS & SEARCH
   ============================================================ */
.erp-stack-tabs-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    min-width: 0;
    position: relative;
}

.erp-tab-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-width: 0;
    padding: 2px 0;
    scrollbar-width: none;
}
.erp-tab-bar::-webkit-scrollbar {
    display: none;
}

.erp-tab-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    flex-shrink: 0;
    white-space: nowrap;
}
.erp-tab-item:hover {
    color: var(--on-surface);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}
.erp-tab-item.active {
    background: rgba(212, 175, 55, 0.14);
    color: var(--primary);
    border-color: rgba(212, 175, 55, 0.35);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.12);
}
.erp-tab-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-surface-variant);
    font-weight: 700;
    line-height: 1.2;
}
.erp-tab-item.active .erp-tab-badge {
    background: var(--primary);
    color: #0b0b0b;
}
.erp-tab-badge.badge-gold {
    background: rgba(212, 175, 55, 0.25);
    color: var(--primary);
}

/* Global Search Unit in Bar 2 */
.erp-search-unit {
    position: relative;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.erp-search-trigger-btn {
    background: rgba(19, 19, 24, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: #e5c158;
    padding: 0.42rem 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.erp-search-trigger-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary);
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.25);
}
.erp-search-trigger-btn.has-query {
    border-color: var(--primary);
    background: rgba(212, 175, 55, 0.12);
}
.search-active-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 6px var(--primary);
}

.erp-search-expand-bar {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleX(0.9);
    transform-origin: right center;
    width: clamp(260px, 35vw, 440px);
    max-width: 90vw;
    background: #18181d;
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    padding: 0.25rem 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(212, 175, 55, 0.25);
    opacity: 0;
    pointer-events: none;
    transition: all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 1005;
}
.erp-search-expand-bar.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scaleX(1);
}

.search-arrow-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--outline-variant);
    color: var(--primary);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.search-arrow-btn:hover {
    background: var(--primary);
    color: #0b0b0b;
}

.erp-search-expand-form {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    flex: 1;
    min-width: 0;
}
.erp-search-expand-input {
    background: transparent;
    border: none;
    color: var(--on-surface);
    font-size: 0.82rem;
    width: 100%;
    padding: 0.35rem 0.5rem;
    outline: none;
}
.erp-search-expand-input::placeholder {
    color: var(--on-surface-muted);
}
.search-expand-submit {
    background: var(--primary);
    border: none;
    color: #0b0b0b;
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.78rem;
    flex-shrink: 0;
    transition: opacity 0.2s;
}
.search-expand-submit:hover {
    opacity: 0.9;
}
.search-expand-clear {
    color: var(--on-surface-muted);
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}
.search-expand-clear:hover {
    color: #f87171;
}

@media (max-width: 640px) {
    .erp-search-expand-bar {
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 6px;
    }
    .erp-search-trigger-btn .search-btn-txt {
        display: none;
    }
    .erp-search-trigger-btn {
        padding: 0.42rem 0.65rem;
    }
}

/* ============================================================
   BAR 3: SINGLE FILTER BUTTON STRIP & ADAPTIVE PANEL
   Large Screens (> 768px): Inline Horizontally Scrollable Bar with Reset All Button
   Small Screens (<= 768px): Collapsible Dropdown Drawer
   ============================================================ */
.erp-stack-filter-bar {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 0;
}

.erp-filter-strip-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-right: 0.15rem;
}

.erp-filter-select,
.erp-filter-input,
.erp-filter-date {
    font-size: 0.78rem !important;
    height: 32px !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 6px !important;
    background: #181820 !important;
    border: 1px solid var(--outline-variant) !important;
    color: var(--on-surface) !important;
    flex-shrink: 0;
}

.erp-filter-select:focus,
.erp-filter-input:focus,
.erp-filter-date:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15) !important;
}

.erp-filter-apply-btn {
    width: auto !important;
    height: 32px !important;
    padding: 0 0.85rem !important;
    font-size: 0.78rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    flex-shrink: 0 !important;
}

.erp-filter-reset-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--outline-variant);
    color: var(--on-surface-variant) !important;
    height: 32px;
    padding: 0 0.85rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
    box-sizing: border-box;
}

.erp-filter-reset-pill:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5 !important;
    transform: translateY(-1px);
}

.erp-filter-reset-pill.has-active {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--primary) !important;
}

.erp-filter-reset-pill.has-active:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ffffff !important;
}

/* Large Screens (> 768px): Inline Horizontally Scrollable Filters */
@media (min-width: 769px) {
    .erp-filter-bar-header.mobile-only-filter-header {
        display: none !important;
    }
    .erp-stack-filter-panel {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 2px 0;
        max-height: none !important;
        overflow: visible !important;
        animation: none !important;
    }
    .erp-filter-form-inline {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex: 1;
        min-width: 0;
        padding: 2px 0;
    }
    .erp-filter-form-inline::-webkit-scrollbar {
        display: none;
    }
    .erp-filter-form-inline > * {
        flex-shrink: 0;
    }
    .erp-filter-meta-desktop {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }
}

/* Small Screens (<= 768px): Collapsible Dropdown Drawer */
@media (max-width: 768px) {
    .erp-filter-bar-header.mobile-only-filter-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        flex-wrap: nowrap;
    }
    .erp-filter-meta-desktop {
        display: none !important;
    }
    .erp-stack-filter-panel {
        display: none;
        padding: 0.75rem 0 0.5rem;
        animation: erpSlideDown 0.2s ease-out;
        max-height: 55vh;
        overflow-y: auto;
    }
    .erp-stack-filter-panel.open {
        display: block !important;
    }
    .erp-filter-form-inline {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: center;
    }
    .erp-filter-strip-label {
        width: 100%;
        margin-bottom: 0.25rem;
    }
    .erp-filter-form-inline > .form-control {
        flex: 1 1 calc(50% - 0.5rem) !important;
        max-width: 100% !important;
        min-width: 130px !important;
    }
    .erp-filter-form-inline > button,
    .erp-filter-form-inline > a {
        flex: 0 0 auto !important;
    }
}

@media (max-width: 480px) {
    .erp-filter-bar-header.mobile-only-filter-header {
        gap: 0.35rem;
    }
    .erp-filter-toggle-btn {
        padding: 0.42rem 0.8rem;
        font-size: 0.75rem;
    }
    .erp-filter-meta-right .status-badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    .erp-filter-form-inline > .form-control {
        flex: 1 1 100% !important;
        width: 100% !important;
    }
    .erp-filter-reset-pill {
        width: 100%;
        justify-content: center;
    }
    .erp-filter-apply-btn {
        width: 100% !important;
        justify-content: center;
    }
}

/* ============================================================
   BAR 4: THE 4 ACTIONS IN ONE UNIFIED HORIZONTAL BAR
   ============================================================ */
.erp-stack-actions-bar {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 7px 0;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.erp-stack-actions-bar::-webkit-scrollbar {
    display: none;
}

/* Action Pills */
.erp-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.48rem 1rem;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 34px;
    box-sizing: border-box;
}

/* 1. Add Entry Pill */
.btn-pill-add {
    background: linear-gradient(135deg, #d4af37, #996515);
    color: #0b0b0b !important;
    font-weight: 700;
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 3px 10px rgba(212, 175, 55, 0.25);
}
.btn-pill-add:hover {
    filter: brightness(1.12);
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

/* 2. Import CSV Pill */
.btn-pill-import {
    background: #1c1c24;
    color: #e5c158 !important;
    border: 1px solid rgba(212, 175, 55, 0.4);
}
.btn-pill-import:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--primary);
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 3. CSV Template Pill */
.btn-pill-template {
    background: #18181e;
    color: var(--on-surface-variant) !important;
    border: 1px solid var(--outline-variant);
}
.btn-pill-template:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--on-surface) !important;
    transform: translateY(-1px);
}

/* 4. Export CSV Pill */
.btn-pill-export {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399 !important;
    border: 1px solid rgba(52, 211, 153, 0.35);
}
.btn-pill-export:hover {
    background: rgba(52, 211, 153, 0.2);
    border-color: #34d399;
    color: #ffffff !important;
    box-shadow: 0 3px 12px rgba(52, 211, 153, 0.25);
    transform: translateY(-1px);
}

/* Dynamic Selection Action Cluster (Positioned directly BEFORE the 4 Inputs) */
.erp-selection-action-cluster {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    padding: 2px 7px 2px 8px;
    border-radius: 8px;
    animation: fadeInSlideLeft 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

@keyframes fadeInSlideLeft {
    from {
        opacity: 0;
        transform: translateX(-8px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.selection-count-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #fca5a5;
    padding: 0.25rem 0.55rem;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 6px;
    letter-spacing: 0.01em;
}

/* Delete Selected Action Pill */
.btn-pill-danger {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff !important;
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}
.btn-pill-danger:hover {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.55);
    transform: translateY(-1px);
}

/* Download Selected Action Pill */
.btn-pill-download-selected {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399 !important;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.btn-pill-download-selected:hover {
    background: #10b981;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
    transform: translateY(-1px);
}

/* Dismiss / Cancel Selection Pill */
.btn-pill-cancel-select {
    background: rgba(255, 255, 255, 0.06);
    color: var(--on-surface-muted) !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.45rem 0.65rem;
    min-width: 30px;
    justify-content: center;
}
.btn-pill-cancel-select:hover {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff !important;
    transform: scale(1.05);
}

.erp-actions-divider {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.14);
    margin: 0 0.2rem;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .erp-stack-actions-bar {
        gap: 0.45rem;
        padding: 6px 0;
    }
    .erp-action-pill {
        padding: 0.42rem 0.8rem;
        font-size: 0.74rem;
        gap: 0.35rem;
    }
}

/* ============================================================
   DIMENSION SLICES SUB-TABS (Inside Main Workspace Card)
   ============================================================ */
.erp-subtabs-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    flex-wrap: wrap;
}
.erp-subtabs-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}
.erp-subtabs-list {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}
.erp-subtabs-list::-webkit-scrollbar {
    display: none;
}
.erp-subtab-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.32rem 0.75rem;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.erp-subtab-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-surface);
    border-color: rgba(255, 255, 255, 0.15);
}
.erp-subtab-pill.active {
    background: rgba(212, 175, 55, 0.16);
    color: var(--primary);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.15);
}

/* Main Workspace Card */
.erp-main-workspace-card {
    margin-top: 0;
    position: relative;
}

/* ==========================================================================
   DIRECTOR-GRADE EXECUTIVE PRINT STYLESHEET (@media print)
   ========================================================================== */
.erp-print-only-header {
    display: none;
}

@media print {
    /* Hide all web browser navigation, chrome, sidebars, buttons, and tools */
    nav.admin-sidebar,
    .admin-sidebar,
    .mobile-nav-bar,
    .sidebar-header,
    .admin-header,
    .admin-footer,
    #vedicPageLoader,
    .erp-command-stack,
    .erp-filters-panel,
    .erp-selection-actions-cluster,
    .erp-view-pill-group,
    .btn-action,
    .btn-action-danger,
    .btn-primary,
    .btn-secondary,
    .erp-print-btn,
    .erp-chart-btn,
    .erp-chart-mini-btn,
    .row-checkbox,
    .row-checkbox-cell,
    .th-checkbox,
    #selectAllCheckbox,
    .erp-modal-overlay,
    .alert-banner,
    .error-banner,
    .success-banner,
    .pagination-bar,
    .erp-search-results-box,
    .erp-filter-toggle-btn,
    .erp-quick-filters-ribbon,
    .import-notice-box,
    .stock-badge-box,
    form,
    button {
        display: none !important;
    }

    /* Reset background and typography for crisp high-contrast paper print */
    html, body {
        background: #ffffff !important;
        color: #111827 !important;
        font-size: 8.5pt !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .admin-main,
    .erp-main-workspace-card,
    .admin-card {
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: #ffffff !important;
        color: #111827 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    /* Print Header display */
    .erp-print-only-header {
        display: block !important;
        margin-bottom: 1.25rem !important;
        border-bottom: 2px solid #111827 !important;
        padding-bottom: 0.75rem !important;
    }

    /* Executive KPI Grid printing */
    .erp-kpi-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem !important;
        margin-bottom: 1rem !important;
        page-break-inside: avoid !important;
    }
    .erp-kpi-card {
        background: #f9fafb !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        padding: 0.6rem 0.75rem !important;
        color: #111827 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
    .erp-kpi-title {
        color: #4b5563 !important;
        font-size: 7.5pt !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
    }
    .erp-kpi-value {
        color: #111827 !important;
        font-size: 12pt !important;
        font-weight: 800 !important;
    }
    .erp-kpi-meta {
        color: #6b7280 !important;
        font-size: 7pt !important;
    }

    /* Executive Charts Grid printing */
    .erp-charts-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
        margin-bottom: 1.25rem !important;
        page-break-inside: avoid !important;
    }
    .erp-chart-card {
        background: #f9fafb !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        padding: 0.65rem !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }
    .erp-chart-title {
        color: #111827 !important;
        font-size: 8.5pt !important;
        font-weight: 700 !important;
    }
    .erp-chart-subtitle {
        color: #6b7280 !important;
        font-size: 7pt !important;
    }

    /* Bottom Widgets (Top Stores & Top Vendors) */
    .erp-bottom-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem !important;
        margin-top: 1rem !important;
        page-break-inside: avoid !important;
    }
    .erp-table-widget {
        background: #f9fafb !important;
        border: 1px solid #d1d5db !important;
        border-radius: 6px !important;
        padding: 0.65rem !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
    }

    /* Tables printing */
    table, .erp-table, .erp-mini-table {
        width: 100% !important;
        border-collapse: collapse !important;
        font-size: 7.5pt !important;
        color: #111827 !important;
        background: #ffffff !important;
        border: 1px solid #d1d5db !important;
        page-break-inside: auto !important;
    }
    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }
    thead {
        display: table-header-group !important; /* Repeats table header on every printed page */
    }
    th {
        background: #f3f4f6 !important;
        color: #111827 !important;
        font-weight: 700 !important;
        border: 1px solid #d1d5db !important;
        padding: 4px 6px !important;
        text-transform: uppercase !important;
        font-size: 7pt !important;
    }
    td {
        border: 1px solid #e5e7eb !important;
        padding: 4px 6px !important;
        color: #1f2937 !important;
    }
    tr:nth-child(even) td {
        background: #f9fafb !important;
    }

    /* Hide First (checkbox) and Last (action) columns in report tables when printing */
    .erp-table th:first-child,
    .erp-table td:first-child,
    .erp-table th:last-child,
    .erp-table td:last-child {
        display: none !important;
    }

    /* Clean links on printout */
    a {
        text-decoration: none !important;
        color: #111827 !important;
    }
}
