/* Auto-extracted Tokens (Variables & Themes) */

/* --- From: Style_Global.html --- */
/* 
 * GLOBAL VARIABLES 
 * @compliance GOCA-ERP-STD-001: CSS Variables for all colors/fonts
 */
:root {
  /* Colors - Primitives */
  --white: #FFFFFF;
  --black: #000000;
  
  /* Colors - Branding (Mapped from Spec) */
  --primary: #25478B;       /* Brand Blue */
  --primary-hover: #1A3668;
  --primary-light: rgba(37, 71, 139, 0.08);
  --primary-shadow: rgba(37, 71, 139, 0.3);
  --secondary: #EFA72A;     /* Accent Orange */
  --secondary-hover: #D9951F;
  
  /* Colors - Semantic (Status) */
  --danger: #DC3545;
  --danger-hover: #C82333;
  --danger-bg: #FEE2E2;
  --danger-dark: #991B1B;
  --success: #28A745;
  --success-hover: #218838;
  --success-bg: #D1FAE5;
  --success-dark: #065F46;
  --info: #2563EB;
  --info-bg: #DBEAFE;
  --info-dark: #1E40AF;
  --warning: #D97706;
  --warning-bg: #FEF3C7;
  --warning-dark: #92400E;
  
  /* Colors - Extended Palette */
  --green-500: #059669;
  --green-600: #047857;
  --green-700: #065F46;
  --green-bg: #ECFDF5;
  --green-border: #A7F3D0;

  --red-500: #EF4444;
  --red-600: #DC2626;
  --red-700: #991B1B;
  --red-bg: #FEF2F2;
  --red-border: #FECACA;

  --amber-500: #F59E0B;
  --amber-600: #D97706;
  --amber-700: #92400E;
  --amber-bg: #FFFBEB;
  --amber-border: #FDE68A;

  --blue-500: #3B82F6;
  --blue-600: #2563EB;
  --blue-700: #1E40AF;
  --blue-bg: #EFF6FF;
  --blue-border: #BFDBFE;

  --purple-500: #8B5CF6;
  --purple-600: #7C3AED;
  --purple-700: #6D28D9;
  --purple-bg: #F5F3FF;
  --purple-border: #EDE9FE;

  /* Neutrals */
  --neutral-50: #F9FAFB;
  --neutral-100: #F3F4F6;
  --neutral-200: #E5E7EB;
  --neutral-300: #D1D5DB;
  --neutral-400: #9CA3AF;
  --neutral-500: #6B7280;
  --neutral-600: #4B5563;
  --neutral-700: #374151;
  --neutral-800: #1F2937;
  --neutral-900: #0F172A;

  /* Gradients (For popup headers) */
  --gradient-primary: linear-gradient(135deg, var(--primary), #3B5EA6);
  --gradient-green: linear-gradient(135deg, var(--green-500), #10B981);
  --gradient-red: linear-gradient(135deg, var(--red-600), var(--red-500));
  --gradient-purple: linear-gradient(135deg, var(--purple-600), var(--purple-500));
  --gradient-blue: linear-gradient(135deg, var(--blue-600), var(--blue-500));

  /* Brand Specific */
  --zalo-blue: #0068FF;
  --zalo-bg: #E8F5FE;

  /* PDF Template Colors (from OS.html) */
  --pdf-bg: #EFEFEF;              /* Info section background */
  --pdf-text-secondary: #434343;  /* Secondary text in PDF */
  --pdf-accent-red: #CC4125;      /* Red accent line */
  
  /* Backgrounds */
  --overlay: rgba(0, 0, 0, 0.45);
  --bg: #F4F5F7;            /* App Background */
  --surface: #FFFFFF;       /* Card/Panel Background */
  --surface-hover: #F8FAFC;
  --surface-alt: #F8FAFC;   /* Slightly off-white */
  
  /* Typography Colors */
  --text-main: #333333;     /* Primary Text */
  --text-light: #666666;    /* Secondary Text */
  --text-muted: #94A3B8;    /* Very light text */
  --text-inverse: #FFFFFF;  /* Text on Primary/Dark bg */
  
  --gray-200: #EEEEEE;
  --border: #DEE2E6;
  --border-light: #F1F5F9;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 24px 48px rgba(0,0,0,0.18);
  --shadow-popup: 0 24px 48px rgba(0,0,0,0.18);

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 16px;
  --radius-pill: 20px;

  /* Typography - STRICT: UTM AVO Only as per User Request */
  --font-main: 'UTM Avo', sans-serif;
  --font-size-base: 14px;
}

/* ═══════════════════════════════════════
   DARK MODE — Toggle via data-theme="dark" on <html>
   All components auto-adapt via CSS variables.
   ═══════════════════════════════════════ */
[data-theme="dark"] {
  /* Backgrounds */
  --bg: #0F1117;
  --surface: #1A1D27;
  --surface-hover: #22252F;
  --surface-alt: #1E2130;
  --overlay: rgba(0, 0, 0, 0.65);

  /* Typography */
  --text-main: #E4E6EB;
  --text-light: #A0A4B0;
  --text-muted: #6B7080;
  --text-inverse: #FFFFFF;

  /* Borders */
  --border: #2D3040;
  --border-light: #242738;
  --gray-200: #2D3040;

  /* Neutrals (inverted) */
  --neutral-50: #1A1D27;
  --neutral-100: #22252F;
  --neutral-200: #2D3040;
  --neutral-300: #3D4155;
  --neutral-700: #C5C8D4;
  --neutral-800: #E4E6EB;
  --neutral-900: #F4F5F7;

  /* Semantic keep hue but adjust brightness */
  --primary-light: rgba(37, 71, 139, 0.18);
  --danger-bg: rgba(220, 53, 69, 0.12);
  --success-bg: rgba(40, 167, 69, 0.12);
  --info-bg: rgba(37, 99, 235, 0.12);
  --warning-bg: rgba(217, 119, 6, 0.12);

  /* Extended palette bg (darker versions) */
  --green-bg: rgba(5, 150, 105, 0.1);
  --red-bg: rgba(239, 68, 68, 0.1);
  --amber-bg: rgba(245, 158, 11, 0.1);
  --blue-bg: rgba(59, 130, 246, 0.1);
  --purple-bg: rgba(139, 92, 246, 0.1);

  /* Shadows (stronger in dark) */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.3);
  --shadow-lg: 0 24px 48px rgba(0,0,0,0.4);
  --shadow-popup: 0 24px 48px rgba(0,0,0,0.5);

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #1E3A6A, #2C5AA0);
}

/* Dark mode overrides for specific components */
[data-theme="dark"] .app-sidebar {
  background-color: #141620;
  border-right-color: #2D3040;
}
[data-theme="dark"] .secondary-header {
  background: linear-gradient(180deg, #1A1D27 0%, #141620 100%);
  border-bottom-color: #2D3040;
}
[data-theme="dark"] .submenu-item:hover { background-color: rgba(37,71,139,0.12); }
[data-theme="dark"] .sub-child-item:hover { background: rgba(37,71,139,0.1); }
[data-theme="dark"] .submenu-trigger:hover { background-color: rgba(37,71,139,0.12); }
[data-theme="dark"] .noti-footer { background: #1A1D27; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background-color: #22252F; border-color: #2D3040; color: #E4E6EB;
}
[data-theme="dark"] .toast { background: #1A1D27; border-color: #2D3040; color: #E4E6EB; }
/* 
 * RESET & BASE 
 */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-main);
  background-color: var(--bg);
  color: var(--text-main);
  font-size: var(--font-size-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Ensure form elements inherit the font instead of browser defaults */
input, select, textarea, button {
  font-family: inherit;
}

/* ============================================================
 * TYPOGRAPHY HIERARCHY
 * Weight scale: 400 (body) → 500 (labels) → 600 (sub-headings) → 700 (headings) → 800 (page titles)
 * ============================================================ */

/* Level 1: Page Titles — Extra Bold (800) */
h1,
.page-title,
.noti-header {
  font-family: var(--font-main);
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* Level 2: Section Headings — Bold (700) */
h2,
.secondary-header,
.card-title,
.modal-title,
.popup-title {
  font-family: var(--font-main);
  font-weight: 700;
}

/* Level 3: Sub-headings — Semi-Bold (600) */
h3,
.section-title,
.form-section-label,
.tab-label {
  font-family: var(--font-main);
  font-weight: 600;
}

/* Level 4: Labels & Emphasis — Medium (500) */
h4, h5, h6,
.form-label,
.table th,
.stat-label,
.badge,
strong {
  font-weight: 500;
}

/* Level 5: Body Text — Regular (400) — inherited from body */

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; transition: 0.2s; }

/* 
 * UTILITIES 
 */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }

/* 
 * COMPONENTS 
 */
.card {
  background: var(--surface);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: var(--spacing-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-inverse);
}
.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--text-inverse);
}
.btn-secondary:hover {
  background-color: var(--secondary-hover);
}

.btn-icon-sm {
    width: 32px; height: 32px;
    border-radius: 4px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--text-light);
}
.btn-icon-sm:hover { background: var(--bg); color: var(--text-main); }
.btn-icon-sm span { font-size: 20px; }


.btn-block {
  width: 100%;
}

.form-group {
  margin-bottom: var(--spacing-md);
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  transition: border-color 0.2s;
}
.form-control:focus {
  border-color: var(--primary);
  outline: none;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
}
.toast {
  background: var(--surface);
  padding: 12px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 10px;
  border-left: 4px solid var(--primary);
  animation: slideIn 0.3s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--success); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ★ Global spinner class — controls ALL loading spinners system-wide */
.spin { animation: spin 1.5s linear infinite; }
.dash-spinner { animation: spin 1.5s linear infinite; margin-right: 8px; }
.gpl-spin { animation: gocaSpin 1.5s linear infinite; }
@keyframes gocaSpin { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 
 * APP LAYOUT STRUCTURE (REFACTORED)
 */
.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
    background-color: var(--bg);
    overflow: hidden; /* Prevent body scroll */
}

/* ═══════════════════════════════════════
   SINGLE SIDEBAR — Accordion Style
   Expanded: 260px. Collapsed/Rail: 56px.
   ═══════════════════════════════════════ */
.app-sidebar {
    width: 260px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 50;
    height: 100vh;
    transition: width 0.25s cubic-bezier(0.4,0,0.2,1);
    overflow: hidden;
    outline: none;
}

/* --- Sidebar Header: Brand + Collapse Button --- */
.sidebar-header {
    height: 52px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, #f8f9fb 0%, var(--surface) 100%);
    flex-shrink: 0;
    overflow: hidden;
}
[data-theme="dark"] .sidebar-header {
    background: linear-gradient(180deg, #1A1D27 0%, #141620 100%);
    border-bottom-color: #2D3040;
}
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-brand-text {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.3px;
}
.sidebar-collapse-btn {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    flex-shrink: 0;
}
.sidebar-collapse-btn:hover {
    background: rgba(37,71,139,0.08);
    color: var(--primary);
}
.sidebar-collapse-btn .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.25s ease;
}

/* --- Module Header (Accordion Toggle) --- */
.sidebar-module-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid transparent;
}
.sidebar-module-header:hover {
    background: rgba(37,71,139,0.05);
    color: var(--primary);
}
.sidebar-module-header.active {
    color: var(--primary);
    background: rgba(37,71,139,0.06);
}
.sidebar-module-header.active::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 4px;
    background: var(--secondary);
    border-radius: 0 4px 4px 0;
}
.sidebar-module-icon {
    font-size: 20px;
    min-width: 20px;
    opacity: 0.7;
}
.sidebar-module-header:hover .sidebar-module-icon,
.sidebar-module-header.active .sidebar-module-icon {
    opacity: 1;
}
.sidebar-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-chevron {
    font-size: 18px !important;
    color: var(--text-light);
    opacity: 0.5;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}
.sidebar-module-header.active .sidebar-chevron {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary);
}

/* --- Module Body (Accordion Content) --- */
.sidebar-module-body {
    display: none;
    padding: 2px 0 6px 0;
    overflow: hidden;
}
.sidebar-module-body.open {
    display: block;
    animation: fadeSlideIn 0.2s ease;
}

/* --- Scrollable Menu Area --- */
.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 8px;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.sidebar-menu::-webkit-scrollbar-thumb:hover { background: var(--text-light); }

/* --- Bottom Section --- */
.sidebar-bottom-section {
    border-top: 1px solid var(--border);
    padding: 4px 8px 8px;
    flex-shrink: 0;
}
.sidebar-help-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-help-link:hover {
    background: rgba(37,71,139,0.05);
    color: var(--primary);
}
.sidebar-help-link .material-symbols-outlined { font-size: 20px; opacity: 0.6; }

/* Main Area (Header + Content Wrapper) */
.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Flexbox text overflow fix */
    height: 100vh;
}

/* Header */
.app-header {
    height: 64px;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.page-title { font-size: 18px; font-weight: 700; color: var(--primary); }
.header-right { display: flex; align-items: center; gap: 16px; }

/* User Icon */
.header-icon-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px; cursor: pointer; color: var(--text-main);
    transition: background 0.2s;
}
.header-icon-btn:hover { background-color: var(--bg); }
.header-badge {
    position: absolute; top: 2px; right: 0px;
    min-width: 18px; height: 18px; padding: 0 5px;
    background-color: var(--danger);
    border-radius: 9px;
    font-size: 10px; font-weight: 700; line-height: 18px;
    color: #fff; text-align: center;
    pointer-events: none;
}

/* Notification Header Dropdown */
.notification-dropdown {
    position: absolute; top: 70px; right: 24px; width: 320px;
    background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); z-index: 100;
    display: none; flex-direction: column;
}
.notification-dropdown.active { display: flex; }
.noti-header { padding: 16px; font-weight: 700; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.noti-list { max-height: 300px; overflow-y: auto; }
.noti-footer { padding: 12px; text-align: center; border-top: 1px solid var(--border); background: #fafafa; }

/* Notification Action Buttons */
.noti-btn-approve, .noti-btn-reject {
    padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: 600;
    cursor: pointer; border: 1px solid var(--border); background: var(--surface);
    transition: all 0.15s;
}
.noti-btn-approve { color: var(--success); border-color: var(--success); }
.noti-btn-approve:hover { background: var(--success); color: #fff; }
.noti-btn-reject { color: var(--danger); border-color: var(--danger); }
.noti-btn-reject:hover { background: var(--danger); color: #fff; }


/* Content Wrapper (Secondary Sidebar + Body) */
.app-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden; /* Contains scroll */
    position: relative;
    height: 100%;
}

/* (Secondary sidebar removed — merged into .app-sidebar accordion) */

/* (Secondary header/menu removed — merged into .app-sidebar) */

/* --- L2 Menu Item --- */
.submenu-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 13.5px; font-weight: 500;
    cursor: pointer;
    margin-bottom: 2px;
    transition: all 0.15s ease;
    overflow: hidden;
}
.submenu-item:hover {
    background-color: rgba(37,71,139,0.05);
    color: var(--primary);
}
.submenu-item.active {
    background-color: rgba(37,71,139,0.08);
    color: var(--primary);
    font-weight: 600;
    position: relative;
}
.submenu-item.active::before {
    content: '';
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 20px; border-radius: 0 3px 3px 0;
    background: var(--secondary);
}
.submenu-item span.material-symbols-outlined { font-size: 20px; min-width: 20px; opacity: 0.7; }
.submenu-item:hover span.material-symbols-outlined,
.submenu-item.active span.material-symbols-outlined { opacity: 1; }

/* --- L3 Dropdown Group --- */
.submenu-group { margin-bottom: 2px; }

.submenu-trigger {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 13.5px; font-weight: 500;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.15s ease;
}
.submenu-trigger:hover { background-color: rgba(37,71,139,0.05); }
.submenu-trigger span.material-symbols-outlined { font-size: 20px; min-width: 20px; opacity: 0.7; }
.submenu-trigger:hover span.material-symbols-outlined { opacity: 1; }

.chevron { font-size: 16px !important; transition: transform 0.2s ease; color: var(--text-light); opacity: 0.6; }
.submenu-group.open .chevron { transform: rotate(90deg); opacity: 1; color: var(--primary); }

/* --- Dropdown Children — Tree-line style --- */
.submenu-children {
    display: none;
    padding-left: 24px;
    margin-top: 2px;
    margin-left: 22px;
    border-left: 1.5px solid var(--border);
    margin-bottom: 4px;
}
.submenu-group.open .submenu-children {
    display: block;
    animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.sub-child-item {
    display: block;
    padding: 7px 12px;
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    position: relative;
}
.sub-child-item::before {
    content: '';
    position: absolute; left: -24px; top: 50%;
    width: 16px; height: 1.5px;
    background: var(--border);
}
.sub-child-item:hover {
    color: var(--primary);
    background: rgba(37,71,139,0.04);
}
.sub-child-item.active {
    color: var(--primary);
    font-weight: 600;
    background: rgba(37,71,139,0.07);
}
.sub-child-item.active::before {
    background: var(--secondary);
}

/* --- Group separator --- */
.submenu-group + .submenu-group { margin-top: 4px; }
.submenu-group + .submenu-item,
.submenu-item + .submenu-group { margin-top: 4px; }

/* --- Module Section Label (optional) --- */
.menu-group-label {
    font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.8px; color: var(--text-light); opacity: 0.5;
    padding: 16px 14px 6px; margin-top: 4px;
}

/* ═══════════════════════════════════════
   RAIL MODE — Collapsed (56px icon strip)
   ═══════════════════════════════════════ */
.app-sidebar.collapsed {
    width: 56px;
}

/* Header: hide text, keep logo + collapse btn */
.app-sidebar.collapsed .sidebar-brand-text { display: none; }
.app-sidebar.collapsed .sidebar-collapse-btn .material-symbols-outlined {
    transform: rotate(180deg); /* Arrow points right → expand */
}
.app-sidebar.collapsed .sidebar-header {
    height: auto;
    padding: 8px 0;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.app-sidebar.collapsed .sidebar-brand {
    gap: 0;
    justify-content: center;
}
.app-sidebar.collapsed .sidebar-collapse-btn {
    width: 24px; height: 24px;
}

/* Module headers: icon-only centered */
.app-sidebar.collapsed .sidebar-module-header {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
    opacity: 0.6;
}
.app-sidebar.collapsed .sidebar-module-header:hover {
    opacity: 1;
}
.app-sidebar.collapsed .sidebar-module-header.active {
    opacity: 1;
}
.app-sidebar.collapsed .sidebar-module-header.active::before {
    content: '';
    position: absolute;
    left: 0; top: 4px; bottom: 4px;
    width: 4px;
    background: var(--secondary);
    border-radius: 0 4px 4px 0;
}
.app-sidebar.collapsed .sidebar-label { display: none; }
.app-sidebar.collapsed .sidebar-chevron { display: none; }
.app-sidebar.collapsed .sidebar-module-icon {
    font-size: 22px;
    opacity: 1;
}

/* Hide all module bodies in rail */
.app-sidebar.collapsed .sidebar-module-body {
    display: none !important;
}

/* Menu: tighter padding */
.app-sidebar.collapsed .sidebar-menu {
    padding: 4px;
}

/* Bottom: icon-only */
.app-sidebar.collapsed .sidebar-bottom-section {
    padding: 4px;
}
.app-sidebar.collapsed .sidebar-help-link {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
    font-size: 0;
}
.app-sidebar.collapsed .sidebar-help-link .material-symbols-outlined {
    font-size: 22px;
    opacity: 0.6;
}
.app-sidebar.collapsed .sidebar-help-link:hover .material-symbols-outlined {
    opacity: 1;
}

/* Module separator in rail */
.app-sidebar.collapsed .sidebar-module-header + .sidebar-module-body + .sidebar-module-header {
    border-top: 1px solid var(--border);
}

/* BODY Content */
.app-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background-color: var(--bg);
    max-width: 100%;
}

/* UTILS */
.user-avatar-circle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background-color: var(--secondary);
    background-size: cover; background-position: center;
    color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 2px solid white;
}
