/* ==========================================================================
   EduSmart Pro - Enterprise Design System (Flipkart & SmartBill Pro DNA)
   Ultra-Compact High-Density Layout: Permanent Dark Sidebar + Crisp Light Canvas
   ========================================================================== */

:root {
    /* CRISP LIGHT CONTENT THEME */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-alt: #f1f5f9;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --border-color-focus: #0284c7;
    
    --text-primary: #0f172a;
    --text-main: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    
    --primary: #0284c7;
    --primary-hover: #0369a1;
    --primary-light: #e0f2fe;
    --accent-cyan: #0284c7;
    
    --success: #10b981;
    --success-bg: #dcfce7;
    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --purple: #8b5cf6;
    --purple-bg: #ede9fe;
    
    /* PERMANENT DARK SIDEBAR (SLIM COMPACT HIGH-DENSITY) */
    --sidebar-bg: #0b1329;
    --sidebar-header: #070d1e;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-text: #94a3b8;
    --sidebar-text-hover: #ffffff;
    --sidebar-nav-hover: rgba(255, 255, 255, 0.06);
    --sidebar-active-bg: linear-gradient(90deg, #0284c7, #2563eb);
    --sidebar-active-text: #ffffff;
    
    --sidebar-width: 240px;
    --topbar-height: 52px;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', Consolas, monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.45;
    font-size: 13px;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ================= APP LAYOUT ================= */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* PERMANENT DARK SIDEBAR (COMPACT 220PX) */
.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: all 0.2s ease;
}

.sidebar-header {
    height: var(--topbar-height);
    background-color: var(--sidebar-header);
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 8px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

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

.brand-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.2px;
    color: #ffffff;
    line-height: 1.15;
}

.brand-subtitle {
    font-size: 8.5px;
    color: #38bdf8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 6px;
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

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

.nav-section-title {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #64748b;
    padding: 10px 10px 3px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    color: var(--sidebar-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.nav-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    color: var(--sidebar-text-hover);
    background: var(--sidebar-nav-hover);
}

.nav-link.active {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.35);
}

.nav-link i {
    width: 16px;
    text-align: center;
    font-size: 12.5px;
}

.nav-badge {
    margin-left: auto;
    font-size: 9px;
    padding: 1px 5px;
    border-radius: 8px;
    font-weight: 800;
    background: rgba(2, 132, 199, 0.2);
    color: #38bdf8;
}

/* ========================================================
   MENU & SUB-MENU ACCORDION NAVIGATION
   ======================================================== */
.nav-group {
    margin-bottom: 2px;
}

.nav-group-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 7px 10px;
    border-radius: var(--radius-md);
    color: #94a3b8;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
}

.nav-group-header:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-group.open .nav-group-header {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.04);
}

.nav-group.active-parent .nav-group-header {
    color: #38bdf8;
    background: rgba(2, 132, 199, 0.12);
}

.nav-group-header i.menu-icon {
    width: 16px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
    transition: color 0.15s;
    flex-shrink: 0;
}

.nav-group:hover .nav-group-header i.menu-icon,
.nav-group.open .nav-group-header i.menu-icon {
    color: #94a3b8;
}

.nav-group.active-parent .nav-group-header i.menu-icon {
    color: #38bdf8;
}

.nav-group-header .menu-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-group-header .menu-arrow {
    font-size: 10px;
    color: #64748b;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.15s ease;
    margin-left: auto;
}

.nav-group.open .nav-group-header .menu-arrow {
    transform: rotate(180deg);
    color: #38bdf8;
}

/* Sub-Menu Container */
.sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    padding-left: 8px;
    margin-left: 14px;
    border-left: 1.5px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5px;
}

.nav-group.open .sub-menu {
    max-height: 600px;
    padding-top: 4px;
    padding-bottom: 4px;
}

.sub-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border-radius: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 500;
    font-size: 11.5px;
    transition: all 0.12s ease;
    white-space: nowrap;
}

.sub-nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    padding-left: 11px;
}

.sub-nav-link.active {
    color: #ffffff;
    background: var(--sidebar-active-bg);
    font-weight: 700;
    box-shadow: 0 1px 4px rgba(2, 132, 199, 0.3);
}

.sub-nav-link i {
    font-size: 10px;
    width: 14px;
    text-align: center;
    opacity: 0.75;
    flex-shrink: 0;
}

.sub-nav-link.active i {
    opacity: 1;
}

.sub-nav-link .nav-badge {
    margin-left: auto;
    font-size: 8.5px;
    padding: 1px 4px;
}

/* MAIN CONTENT AREA */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    width: calc(100% - var(--sidebar-width));
    max-width: calc(100% - var(--sidebar-width));
}

/* TOPBAR (COMPACT 52PX) */
.app-topbar {
    height: var(--topbar-height);
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    flex-shrink: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.session-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 800;
    padding: 3.5px 10px;
    border-radius: 16px;
    border: 1px solid #bae6fd;
    white-space: nowrap;
}

.search-input-box {
    position: relative;
    width: 290px;
}

.search-input-box input {
    width: 100%;
    padding: 5.5px 52px 5.5px 32px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: #f1f5f9;
    font-size: 11.5px;
    outline: none;
    transition: all 0.15s;
}

.search-input-box input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

.search-input-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 11px;
}

.search-kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 9px;
    font-family: var(--font-mono);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 1.5px 5px;
    border-radius: 4px;
    color: #64748b;
    pointer-events: none;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    font-size: 12.5px;
    transition: all 0.12s;
}

.icon-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.icon-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: var(--danger);
    color: white;
    font-size: 8px;
    font-weight: 800;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 10px 3px 6px;
    border-radius: 18px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    cursor: pointer;
    height: 30px;
    transition: all 0.12s;
}

.user-profile-menu:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.user-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #2563eb);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 10px;
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* PAGE CONTENT CONTAINER */
.page-content {
    flex: 1;
    padding: 18px 22px;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.2px;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.2;
}

.page-subtitle {
    font-size: 11.5px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 3px;
    display: block;
}

/* ================= KPI STATS CARDS ================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 13px 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border-color: rgba(2, 132, 199, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0284c7, #38bdf8);
}

.stat-card.primary::before { background: linear-gradient(90deg, #0284c7, #38bdf8); }
.stat-card.success::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.purple::before  { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.stat-card.danger::before  { background: linear-gradient(90deg, #ef4444, #f87171); }
.stat-card.warning::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.stat-value {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.4px;
    line-height: 1.1;
    font-family: var(--font-sans);
}

.stat-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.stat-icon.primary { background: #e0f2fe; color: #0284c7; }
.stat-icon.success { background: #dcfce7; color: #10b981; }
.stat-icon.warning { background: #fef3c7; color: #f59e0b; }
.stat-icon.danger  { background: #fee2e2; color: #ef4444; }
.stat-icon.purple  { background: #ede9fe; color: #8b5cf6; }

/* QUICK SUITE LAUNCHER BAR */
.quick-suite-bar {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}

.quick-suite-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.6px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-right: 4px;
}

.quick-suite-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4.5px 11px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.quick-suite-pill:hover {
    background: #e0f2fe;
    border-color: #bae6fd;
    color: #0284c7;
    transform: translateY(-1px);
}

/* CARDS & CONTAINERS */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 18px;
}

.card-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    gap: 8px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 7px;
}

.card-body {
    padding: 14px;
}

/* ================= MODERN DATA TABLES ================= */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table,
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    text-align: left;
}

.table th,
.data-table th {
    background: #f8fafc;
    padding: 9px 12px;
    font-weight: 800;
    color: #475569;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td,
.data-table td {
    padding: 9.5px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-secondary);
    vertical-align: middle;
    line-height: 1.35;
}

.table tr:hover td,
.data-table tr:hover td {
    background: #f8fafc;
}

/* BADGES (CLEAN PILL) */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2.5px 8px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }
.badge-primary { background: #e0f2fe; color: #0369a1; }
.badge-purple  { background: #ede9fe; color: #6d28d9; }
.badge-gray    { background: #f1f5f9; color: #475569; }

/* BUTTONS (COMPACT) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: var(--radius-md);
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.12s ease;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

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

.btn-secondary {
    background: #ffffff;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.btn-success {
    background: #10b981;
    color: #ffffff;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    padding: 3px 7px;
    font-size: 10.5px;
}

.btn-lg {
    padding: 8px 16px;
    font-size: 12.5px;
}

/* FORMS (COMPACT) */
.form-group {
    margin-bottom: 10px;
}

.form-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #334155;
    margin-bottom: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.form-control, .form-select {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 11.5px;
    background: #ffffff;
    color: var(--text-primary);
    outline: none;
    transition: all 0.15s;
    font-family: inherit;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.12);
}

/* GRID HELPERS */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

/* ==========================================================================
   ERP MOBILE THREE-LINE HAMBURGER, SIDEBAR DRAWER & MOBILE BOTTOM DOCK
   ========================================================================== */

/* 1. Dedicated Three-Line Hamburger Button in Topbar */
.erp-hamburger-toggle {
    display: none;
    background: #f1f5f9;
    border: 1px solid var(--border-color);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4.5px;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.erp-hamburger-toggle:hover {
    background: #e2e8f0;
}
.erp-hamburger-toggle:active {
    transform: scale(0.92);
    background: #cbd5e1;
}
.erp-hamburger-toggle .erp-bar {
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* Mobile brand badge in topbar */
.topbar-mobile-brand {
    display: none;
    align-items: center;
    gap: 7px;
}
.topbar-brand-crest {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 5px rgba(2, 132, 199, 0.3);
}
.topbar-brand-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.3px;
}

/* 2. ERP Sidebar Backdrop Overlay */
.erp-sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: rgba(11, 19, 41, 0.65);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.erp-sidebar-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

body.sidebar-open-locked {
    overflow: hidden;
}

/* 3. Close Button in Sidebar Header */
.sidebar-header {
    justify-content: space-between;
}
.brand-brand-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-close-erp-sidebar {
    display: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #cbd5e1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s ease;
}
.btn-close-erp-sidebar:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}
.btn-close-erp-sidebar:active {
    transform: scale(0.9);
}

/* Sidebar Mobile Bottom User Info */
.sidebar-mobile-user-card {
    display: none;
    margin-top: auto;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    gap: 10px;
}
.sidebar-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}
.sidebar-user-details {
    flex: 1;
    min-width: 0;
}
.sidebar-user-name {
    font-size: 12.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 10px;
    color: #94a3b8;
}
.btn-sidebar-logout {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.15s ease;
}
.btn-sidebar-logout:active {
    transform: scale(0.92);
}

/* 4. ERP Mobile Bottom Navigation Dock (Visible ONLY on Mobile <= 768px) */
.erp-mobile-bottom-dock {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid #e2e8f0;
    z-index: 950;
    align-items: center;
    justify-content: space-around;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.07);
}

.mob-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: all 0.15s ease;
    padding: 4px 0;
}
.mob-dock-item:active {
    transform: scale(0.92);
}
.mob-dock-item.active {
    color: #0284c7;
}
.mob-dock-item.active .mob-dock-icon {
    transform: translateY(-1px);
    color: #0284c7;
}
.mob-dock-icon {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease;
}
.mob-dock-text {
    line-height: 1.1;
    white-space: nowrap;
}

/* Center Elevated FAB inside Bottom Dock */
.mob-dock-item.center-fab-wrap {
    overflow: visible;
}
.mob-center-fab {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-top: -18px;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
    border: 3px solid #ffffff;
    transition: transform 0.15s ease;
}
.mob-dock-item.center-fab-wrap:active .mob-center-fab {
    transform: scale(0.92);
}
.mob-dock-item.center-fab-wrap .mob-dock-text {
    color: #0284c7;
    font-weight: 800;
    margin-top: 1px;
}

/* 5. Executive Dashboard Custom Components */
.dashboard-hero-card {
    background: linear-gradient(135deg, #0b1329 0%, #172554 50%, #0f172a 100%);
    border-radius: 16px;
    padding: 18px 22px;
    color: #ffffff;
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px -10px rgba(11, 19, 41, 0.35);
    position: relative;
    overflow: hidden;
}
.dashboard-hero-card::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.dash-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}
.dash-greeting-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}
.dash-avatar-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #0284c7, #38bdf8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}
.dash-greeting-title {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.3px;
    line-height: 1.2;
}
.dash-greeting-sub {
    font-size: 11.5px;
    color: #94a3b8;
    margin-top: 2px;
}
.dash-status-capsules {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.dash-capsule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
}
.dash-capsule.live-dot::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    display: inline-block;
}

/* Quick Action Row inside Hero */
.dash-action-ribbon {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding-top: 6px;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.btn-dash-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 10px;
    font-size: 11.5px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transition: all 0.15s ease;
    flex-shrink: 0;
}
.btn-dash-action:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}
.btn-dash-action:active {
    transform: scale(0.95);
}
.btn-dash-action.primary {
    background: linear-gradient(135deg, #0284c7, #2563eb);
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(2, 132, 199, 0.35);
}
.btn-dash-action.success {
    background: linear-gradient(135deg, #059669, #10b981);
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}
.btn-dash-action.warning {
    background: linear-gradient(135deg, #d97706, #f59e0b);
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.35);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (992px, 768px, 480px)
   ========================================================================== */
@media (max-width: 992px) {
    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 86vw;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.45);
    }
    .app-sidebar.show {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    .erp-hamburger-toggle {
        display: flex !important;
    }
    .topbar-mobile-brand {
        display: flex !important;
    }
    .btn-close-erp-sidebar {
        display: flex !important;
    }
    .sidebar-mobile-user-card {
        display: flex !important;
    }
    .search-input-box {
        display: none !important;
    }
    .session-badge {
        display: none !important;
    }
    .grid-4, .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Pinned Bottom Nav visible ONLY on mobile */
    .erp-mobile-bottom-dock {
        display: flex !important;
    }
    /* Safe padding so bottom nav doesn't cover content */
    .page-content {
        padding: 14px 12px 76px !important;
    }
    .app-topbar {
        padding: 0 12px !important;
        height: 48px !important;
    }
    /* Topbar items streamlining */
    .topbar-right .btn-primary,
    .topbar-right .btn-outline-info,
    .topbar-right > div[style*="background: rgba(16, 185, 129"] {
        display: none !important;
    }
    .user-meta {
        display: none !important;
    }
    .user-profile-menu {
        padding: 2px !important;
        border: none !important;
        background: transparent !important;
    }
    
    /* Stats Grid -> 2x2 Clean Layout */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
    }
    .stat-card {
        padding: 10px 12px !important;
    }
    .stat-value {
        font-size: 17px !important;
    }
    .stat-icon {
        width: 30px !important;
        height: 30px !important;
        font-size: 13px !important;
    }

    /* Grids & Cards */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .card {
        border-radius: 12px !important;
        margin-bottom: 14px !important;
    }
    .card-header {
        padding: 10px 12px !important;
    }
    .card-title {
        font-size: 12.5px !important;
    }

    /* Hero Banner Mobile Adjustments */
    .dashboard-hero-card {
        padding: 14px 14px !important;
        border-radius: 14px !important;
        margin-bottom: 14px !important;
    }
    .dash-greeting-title {
        font-size: 15px !important;
    }
    .dash-greeting-sub {
        font-size: 10.5px !important;
    }
    .dash-avatar-badge {
        width: 36px !important;
        height: 36px !important;
        font-size: 16px !important;
        border-radius: 9px !important;
    }
    .dash-status-capsules {
        margin-top: 6px;
    }

    /* Tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table th, .data-table td {
        padding: 7px 9px !important;
        font-size: 11.5px !important;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        gap: 8px !important;
    }
    .stat-card {
        padding: 8px 10px !important;
    }
    .stat-label {
        font-size: 9px !important;
    }
    .stat-value {
        font-size: 15px !important;
    }
    .stat-meta {
        font-size: 9px !important;
    }
}
