/* ============================================
   MODERN THEME - Clean 2025 SaaS Design
   No Gradients, Minimal, Sleek
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Primary Colors - Wonda Cyan */
    --primary-color: #0ea5e9;
    --primary-dark: #0284c7;
    --primary-light: #38bdf8;
    
    /* Neutral Colors - Clean & Minimal */
    --bg-main: #f8f9fa;
    --bg-sidebar: #ffffff;
    --bg-card: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Status Colors - Flat, No Gradients */
    --color-success: #10b981;
    --color-info: #3b82f6;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-primary: #0ea5e9;
    --color-secondary: #6c757d;
    
    /* Shadows - Subtle */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    
    /* Spacing - Compact */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.5rem;
    
    /* Border Radius - Minimal */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions - Quick */
    --transition: all 0.15s ease;
}

/* ============================================
   GLOBAL STYLES
   ============================================ */
/* Font size: controlled by class on html (set from Settings → General). Body uses 1rem so it scales. */
html.wonda-fs-small { font-size: 13px; }
html.wonda-fs-medium { font-size: 14px; }
html.wonda-fs-large { font-size: 16px; }
html:not([class*="wonda-fs-"]) { font-size: 14px; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

/* Remove all animations */
* {
    animation: none !important;
}

/* ============================================
   SIDEBAR - Clean & Minimal
   ============================================ */
.sidebar {
    background: var(--bg-sidebar) !important;
    box-shadow: var(--shadow-sm);
    border-right: 1px solid var(--border-color);
    overflow-x: hidden;
    min-height: 100vh;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    /* Fixed px so sidebar/content align regardless of font-size setting (overrides sb-admin 14rem) */
    width: 224px !important;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: width 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
}
.sidebar::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* Ensure nav items stay within sidebar */
.sidebar.navbar-nav {
    width: 100%;
}

/* Sidebar Brand */
.sidebar .sidebar-brand {
    height: 70px;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    transition: var(--transition);
}

.sidebar .sidebar-brand:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.sidebar .sidebar-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar .sidebar-brand-icon i {
    color: white;
    font-size: 1.25rem;
}

.sidebar .sidebar-brand-icon img.sidebar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

/* Main logo in sidebar (replaces icon + text) */
.sidebar .sidebar-brand img.sidebar-main-logo {
    max-width: 140px;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: opacity 0.2s ease;
}

.sidebar-brand-icon-only {
    transition: opacity 0.2s ease;
}

.sidebar .sidebar-brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    margin-left: var(--spacing-md);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Divider */
.sidebar .sidebar-divider {
    border-top: 1px solid var(--border-light);
    margin: var(--spacing-md) 0;
    transition: margin 0.2s ease;
}

/* Sidebar Heading */
.sidebar .sidebar-heading {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: var(--spacing-lg) var(--spacing-lg) var(--spacing-sm);
    transition: opacity 0.15s ease;
}

/* Nav Items - NO HOVER ANIMATIONS */
.sidebar .nav-item {
    margin: 2px var(--spacing-md);
}

.sidebar .nav-item .nav-link {
    padding: 0.65rem var(--spacing-lg);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 0.15s ease, color 0.15s ease, padding 0.2s ease;
    display: flex;
    align-items: center;
    line-height: 1.4;
    width: 100%;
}

.sidebar .nav-item .nav-link i {
    font-size: 1rem;
    margin-right: var(--spacing-md);
    min-width: 20px;
    text-align: center;
    color: var(--text-secondary);
    transition: margin-right 0.2s ease, font-size 0.2s ease;
    flex-shrink: 0;
}

.sidebar .nav-item .nav-link span {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.15s ease;
}

/* Active State - Clean */
.sidebar .nav-item.active .nav-link,
.sidebar .nav-item .nav-link.active {
    background: var(--primary-color);
    color: white !important;
}

.sidebar .nav-item.active .nav-link i,
.sidebar .nav-item .nav-link.active i {
    color: white !important;
}

/* Parent nav-item active when child collapse item is active */
.sidebar .nav-item.active > .nav-link[data-toggle="collapse"] {
    background: var(--primary-color);
    color: white !important;
}

.sidebar .nav-item.active > .nav-link[data-toggle="collapse"] i {
    color: white !important;
}

/* Hover State - NO TRANSFORM */
.sidebar .nav-item:hover .nav-link {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.sidebar .nav-item:hover .nav-link i {
    color: var(--text-primary);
}

.sidebar .nav-item.active:hover .nav-link {
    background: var(--primary-color);
    color: white !important;
}

.sidebar .nav-item.active:hover .nav-link i {
    color: white !important;
}

/* Collapse Items */
.sidebar .collapse-inner {
    background: transparent;
    padding: var(--spacing-sm) 0;
    margin-left: var(--spacing-sm);
}

.sidebar .collapse-item {
    padding: 0.5rem var(--spacing-lg);
    margin: 2px var(--spacing-sm) 2px var(--spacing-md);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.sidebar .collapse-item i {
    font-size: 0.875rem;
    min-width: 18px;
    text-align: center;
    margin-right: 0.5rem;
    color: var(--text-secondary);
}

.sidebar .collapse-item:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.sidebar .collapse-item:hover i {
    color: var(--text-primary);
}

.sidebar .collapse-item.active {
    background-color: rgba(14, 165, 233, 0.1);
    color: var(--primary-color) !important;
    font-weight: 600;
}

.sidebar .collapse-item.active i {
    color: var(--primary-color) !important;
}

/* Sidebar Toggle Button Container */
.sidebar .text-center {
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
}

/* Sidebar Toggle Button */
.sidebar #sidebarToggle {
    width: 45px;
    height: 45px;
    background-color: var(--bg-sidebar) !important;
    transition: var(--transition);
    border: 1px solid var(--border-color) !important;
    outline: none !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    position: relative;
    border-radius: 50%;
}

.sidebar #sidebarToggle:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.sidebar #sidebarToggle::after {
    color: var(--text-secondary);
    content: '\00AB';
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
}

.sidebar #sidebarToggle:hover::after {
    color: white;
}

.sidebar #sidebarToggle:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

/* Toggle button when sidebar is toggled */
.sidebar.toggled #sidebarToggle::after {
    content: '\00BB';
}

/* Collapsed Sidebar */
.sidebar.toggled {
    width: 70px !important;
    overflow-x: hidden;
    min-height: 100vh;
    height: 100%;
}

.sidebar.toggled .sidebar-brand-text,
.sidebar.toggled .nav-item .nav-link span,
.sidebar.toggled .sidebar-heading,
.sidebar.toggled .collapse-inner {
    display: none;
}

.sidebar.toggled .sidebar-brand {
    justify-content: center;
    padding: var(--spacing-lg) 0;
}

.sidebar.toggled .sidebar-brand-icon {
    margin: 0;
}

/* Show icon when sidebar is toggled */
.sidebar.toggled .sidebar-brand img.sidebar-main-logo {
    max-width: 40px;
    max-height: 40px;
    margin: 0 auto;
    content: url('../logo/icon.svg');
}

.sidebar.toggled .nav-item {
    margin: 0.15rem auto;
    width: 100%;
    padding: 0;
}

.sidebar.toggled .nav-item .nav-link {
    justify-content: center;
    padding: 0.65rem 0;
    margin: 0;
    border-radius: 0;
}

.sidebar.toggled .nav-item .nav-link i {
    margin-right: 0;
    margin-left: 0;
    font-size: 1.25rem;
}

/* Hover state in toggled sidebar - NO MOVEMENT, just color */
.sidebar.toggled .nav-item:hover .nav-link {
    background-color: var(--border-light);
}

/* Active state in toggled sidebar - NO MOVEMENT, just color */
.sidebar.toggled .nav-item.active .nav-link,
.sidebar.toggled .nav-item .nav-link.active {
    background: var(--primary-color);
}

.sidebar.toggled .nav-item.active:hover .nav-link {
    background: var(--primary-color);
}

.sidebar.toggled .sidebar-divider {
    margin: 0.25rem 1rem;
}

/* Adjust content wrapper when sidebar is toggled */
.sidebar.toggled ~ #content-wrapper {
    margin-left: 70px;
}

/* ============================================
   TOPBAR - Clean Header
   ============================================ */
.topbar {
    background: var(--bg-card) !important;
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    height: 70px !important;
    padding: 0 var(--spacing-xl) !important;
}

/* Page Greeting */
.topbar h1,
.topbar .h5,
.topbar .h6 {
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.topbar h1.h5 {
    font-size: 1.125rem;
}

.topbar h1.h6 {
    font-size: 1rem;
}

.topbar .small {
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

/* Topbar Toggle Button */
.topbar #sidebarToggleTop {
    display: inline-block !important;
    width: 40px;
    height: 40px;
    background-color: transparent !important;
    border: none !important;
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
}

.topbar #sidebarToggleTop:hover {
    background-color: var(--border-light) !important;
    color: var(--text-primary);
}

.topbar #sidebarToggleTop:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

.topbar #sidebarToggleTop i {
    font-size: 1.25rem;
}

/* Topbar Nav Items */
.topbar .nav-item {
    margin: 0.5rem 0.25rem;
}

.topbar .nav-link {
    padding: 0.4rem 0.65rem;
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: var(--radius-md);
    position: relative;
}

.topbar .nav-link:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

.topbar .nav-link i {
    font-size: 1rem;
    color: var(--text-secondary);
}

.topbar .nav-link:hover i {
    color: var(--text-primary);
}

/* Notification Badge - Flat */
.topbar .badge-counter {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.25rem 0.4rem;
    border-radius: 10px;
    background: var(--color-danger);
    border: 2px solid white;
}

/* Dropdown Menus */
.topbar .dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 0.5rem 0;
    margin-top: 0.75rem;
    min-width: 280px;
}

.topbar .dropdown-header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    padding: 0.75rem 1rem 0.5rem;
    background: transparent;
}

.topbar .dropdown-item {
    padding: 0.65rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin: 2px 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.topbar .dropdown-item i {
    font-size: 0.875rem;
    width: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.topbar .dropdown-item:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
}

.topbar .dropdown-item:hover i {
    color: var(--text-primary);
}

.topbar .dropdown-divider {
    border-top: 1px solid var(--border-light);
    margin: 0.5rem 0;
}

/* Dropdown Item Link Color Override */
.topbar .dropdown-item.text-center {
    justify-content: center;
    font-weight: 500;
}

.topbar .dropdown-item.text-primary {
    color: var(--primary-color) !important;
}

.topbar .dropdown-item.text-primary:hover {
    color: var(--primary-dark) !important;
    background-color: rgba(14, 165, 233, 0.08);
}

/* Branch Selector */
.topbar #centerDropdown {
    background-color: var(--border-light);
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

.topbar #centerDropdown:hover {
    background-color: var(--border-color);
}

.branch-dropdown {
    min-width: 240px !important;
}

.center-button {
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
}

.center-button:hover {
    background-color: var(--border-light) !important;
    color: var(--text-primary) !important;
}

.center-button.active {
    background: rgba(14, 165, 233, 0.05) !important;
    font-weight: 500;
}

/* Branch Color Dots */
.branch-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.branch-dot-primary {
    background-color: #3b82f6;
}

.branch-dot-success {
    background-color: #10b981;
}

.branch-dot-danger {
    background-color: #ef4444;
}

.branch-dot-warning {
    background-color: #f59e0b;
}

.branch-dot-info {
    background-color: #06b6d4;
}

.branch-dot-secondary {
    background-color: #6b7280;
}

.branch-name {
    flex: 1;
}

.center-button .fa-check {
    font-size: 0.875rem;
    color: #10b981 !important;
}

/* Notifications Dropdown */
.topbar .notifications-dropdown {
    min-width: 350px;
    max-width: 400px;
}

.topbar .notifications-content {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.topbar .notifications-content::-webkit-scrollbar {
    width: 6px;
}

.topbar .notifications-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Topbar Divider */
.topbar-divider {
    width: 1px;
    height: 2.5rem;
    background-color: var(--border-color);
    margin: 0 1rem;
}

/* User Profile Dropdown */
.topbar .user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    margin: 0 0.5rem;
}

.topbar .user-dropdown:hover {
    background-color: var(--border-light);
    border-color: var(--primary-color);
    text-decoration: none;
}

.topbar .user-dropdown img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    object-fit: cover;
    flex-shrink: 0;
}

.topbar .user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
}

.topbar .user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}

.topbar .user-role {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.topbar .user-dropdown i.fa-chevron-down {
    color: var(--text-muted);
    font-size: 0.7rem;
    margin-left: 0.25rem;
}

/* ============================================
   CONTENT AREA
   ============================================ */
#wrapper {
    display: flex;
    min-height: 100vh;
}

#content-wrapper {
    background-color: var(--bg-main);
    width: 100%;
    /* Fixed px so topbar/sidebar meet regardless of font-size setting */
    margin-left: 224px !important;
    min-height: 100vh;
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

/* When sidebar is collapsed (desktop), shrink content area to match */
@media (min-width: 768px) {
    .sidebar.sidebar-collapsed ~ #content-wrapper,
    body.sidebar-collapsed-load #content-wrapper {
        margin-left: 72px !important;
    }
}

#content {
    padding-top: 0;
    flex: 1;
}

.container-fluid {
    padding: var(--spacing-xl);
}

/* Remove margin from first element after topbar */
.topbar + * {
    margin-top: 0 !important;
}

/* Page Content Wrapper */
.container-fluid {
    padding: var(--spacing-xl) var(--spacing-xl);
}

/* Page Headers - Compact */
.page-header h1,
.page-header h2,
.page-header h3,
h1, h2, h3 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

h1 {
    font-size: 1.5rem;
}

h2 {
    font-size: 1.25rem;
}

h3 {
    font-size: 1.125rem;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
}

h5 {
    font-size: 0.925rem;
    font-weight: 600;
}

.page-header .text-muted {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
}

/* Section Titles */
.d-flex.justify-content-between h3,
.d-flex.justify-content-between h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* ============================================
   TABLES - Neutral Bold Headers, No Dropdown Icons
   ============================================ */
table thead th {
    font-weight: 700 !important;
    background: white !important;
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

table thead.thead-light th {
    background: white !important;
    color: var(--text-primary) !important;
}

/* Remove dropdown icon from action buttons */
.btn.dropdown-toggle::after {
    display: none !important;
}

/* ============================================
   CARDS - Minimal, NO HOVER LIFT
   ============================================ */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
    /* NO TRANSFORM ON HOVER */
}

.card:hover {
    /* Remove transform */
    box-shadow: var(--shadow-sm);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: var(--spacing-lg) var(--spacing-xl);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.card-body {
    padding: var(--spacing-xl);
}

/* Metric Cards - Flat Design */
.metric-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    position: relative;
    /* NO HOVER EFFECT */
}

.metric-card:hover {
    /* NO TRANSFORM */
    box-shadow: var(--shadow-sm);
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.metric-card.border-left-primary::before {
    background: var(--primary-color);
}

.metric-card.border-left-success::before {
    background: var(--color-success);
}

.metric-card.border-left-info::before {
    background: var(--color-info);
}

.metric-card.border-left-warning::before {
    background: var(--color-warning);
}

.metric-card.border-left-danger::before {
    background: var(--color-danger);
}

.metric-card .text-xs {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-card .h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ============================================
   BUTTONS - Flat, Clean
   ============================================ */
.btn {
    border-radius: var(--radius-md);
    font-weight: 500;
    padding: 0.55rem 1rem;
    transition: var(--transition);
    font-size: 0.875rem;
    /* NO TRANSFORM */
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    /* NO TRANSFORM */
}

.btn-success {
    background: var(--color-success);
    border: none;
}

.btn-info {
    background: var(--color-info);
    border: none;
}

.btn-warning {
    background: var(--color-warning);
    border: none;
}

.btn-danger {
    background: var(--color-danger);
    border: none;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

.btn-circle {
    border-radius: 50%;
    width: 36px;
    height: 36px;
}

/* ============================================
   FORMS - Clean Input Fields
   ============================================ */
.form-control,
.form-control-sm {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
    transition: var(--transition);
    color: var(--text-primary);
    background-color: var(--bg-card);
    height: auto;
}

.form-control-sm {
    padding: 0.45rem 0.75rem;
    font-size: 0.8125rem;
}

.form-control:focus,
.form-control-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
    background-color: var(--bg-card);
}

.custom-select,
select.form-control {
    border-radius: var(--radius-md);
    border-color: var(--border-color);
    padding: 0.6rem 2rem 0.6rem 0.875rem;
    font-size: 0.875rem;
    height: auto;
    background-color: var(--bg-card);
}

.custom-select:focus,
select.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Form Labels */
label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

/* Input Groups */
.input-group-text {
    border-color: var(--border-color);
    background-color: var(--border-light);
    font-size: 0.875rem;
    border-radius: var(--radius-md);
}

/* ============================================
   TABLES - COMPACT, MINIMAL SPACING
   ============================================ */
.table {
    color: var(--text-primary);
    font-size: 0.875rem;
}

.table thead th {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 0.75rem; /* COMPACT PADDING */
    background-color: var(--bg-main);
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: var(--border-light);
}

.table td {
    padding: 0.65rem 0.75rem; /* COMPACT PADDING */
    vertical-align: middle;
    border-top: 1px solid var(--border-light);
}

/* Even more compact for data tables */
.table-sm td,
.table-sm th {
    padding: 0.5rem 0.75rem;
}

/* ============================================
   BADGES - Flat
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: var(--color-success);
}

.badge-warning {
    background: var(--color-warning);
}

.badge-danger {
    background: var(--color-danger);
}

.badge-info {
    background: var(--color-info);
}

/* ============================================
   ALERTS & NOTIFICATIONS
   ============================================ */
.pending-order-item,
.low-stock-item {
    transition: var(--transition);
    border-radius: var(--radius-md);
    margin: 2px var(--spacing-sm);
}

.pending-order-item:hover,
.low-stock-item:hover {
    background-color: var(--border-light) !important;
}

.icon-circle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.urgent-order {
    border-left: 3px solid var(--color-danger) !important;
    background: rgba(239, 68, 68, 0.05) !important;
}

/* Stock Items */
.stock-item {
    padding: 0.75rem; /* COMPACT */
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    margin: 2px 0;
}

.stock-item:hover {
    background-color: var(--border-light);
}

.stock-item.low-stock {
    border-left: 3px solid var(--color-danger);
    background: rgba(239, 68, 68, 0.05);
}

/* ============================================
   MOBILE NAVIGATION
   ============================================ */
#mobileBottomNav {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    color: var(--text-muted);
    transition: var(--transition);
}

.bottom-nav-item:hover,
.bottom-nav-item.active {
    color: var(--primary-color);
}

.bottom-nav-item.active {
    background: rgba(14, 165, 233, 0.05);
}

#mobileMoreMenu {
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
}

.more-menu-item {
    color: var(--text-secondary);
    transition: var(--transition);
    border-radius: var(--radius-md);
    margin: 2px var(--spacing-md);
}

.more-menu-item:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

/* ============================================
   SCROLLBAR - Minimal
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ============================================
   LOADING - Minimal
   ============================================ */
#globalLoader {
    background: transparent;
}

.loader-bar {
    background: var(--primary-color);
    height: 2px;
}

/* Branch Switch Notification */
.branch-notification {
    position: fixed;
    top: 90px;
    right: -400px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 4px solid;
    transition: right 0.3s ease;
    max-width: 350px;
}

.branch-notification.show {
    right: 20px;
}

.branch-notification-success {
    border-left-color: var(--color-success);
    color: var(--color-success);
}

.branch-notification-error {
    border-left-color: var(--color-danger);
    color: var(--color-danger);
}

.branch-notification-info {
    border-left-color: var(--color-info);
    color: var(--color-info);
}

/* ============================================
   PAGE HEADERS - Consistent Design
   ============================================ */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Compact page header - smaller icon, title, less vertical space (Sales, Dashboard, etc.) */
.compact-page-header {
    margin-bottom: 0.75rem !important;
    padding: 0.25rem 0;
}
.compact-page-header .page-header-content {
    gap: 0.5rem;
}
.compact-page-header .page-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1rem;
}
.compact-page-header h1,
.compact-page-header .page-title-wrapper h1 {
    font-size: 1.25rem !important;
    margin: 0;
}
.compact-page-header .page-title-wrapper p {
    display: none;
}
.compact-page-header .dashboard-subtitle,
.compact-page-header .dashboard-range {
    display: none;
}

/* Compact dashboard header (Dashboard page) */
.compact-dashboard-header {
    margin-bottom: 0.75rem !important;
}
.compact-dashboard-header .dashboard-title {
    font-size: 1.25rem !important;
}
.compact-dashboard-header .dashboard-subtitle,
.compact-dashboard-header .dashboard-range {
    display: none !important;
}

/* Compact settings header */
.compact-settings-header h1 {
    font-size: 1.25rem !important;
    margin-bottom: 0 !important;
}
.compact-settings-header p {
    display: none !important;
}
.compact-settings-header {
    margin-bottom: 1rem !important;
}

.page-header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.page-icon.primary { background: rgba(14, 165, 233, 0.1); color: var(--primary-color); }
.page-icon.success { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.page-icon.info { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.page-icon.warning { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }

.page-title-wrapper h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-title-wrapper p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0 0;
}

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

/* Modern Card */
.card-modern {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: none;
    margin-bottom: 1.5rem;
}

.card-modern .card-body {
    padding: 1.5rem;
}

/* Modern Buttons */
.btn-modern {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-modern:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-modern.btn-primary {
    background: var(--primary-color);
    color: white;
}

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

.btn-modern.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

/* ============================================
   UTILITIES
   ============================================ */
.text-gradient {
    color: var(--primary-color);
}

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

.bg-gradient-primary,
.bg-primary-orange {
    background: var(--primary-color);
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.rounded-modern {
    border-radius: var(--radius-lg);
}

.font-weight-600 {
    font-weight: 600;
}

.font-weight-500 {
    font-weight: 500;
}

/* Spacing Utilities */
.mb-0 {
    margin-bottom: 0 !important;
}

.py-0 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* Text Sizes */
.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

/* Content Container Spacing */
.container-fluid > .row:first-child {
    margin-top: 0;
}

/* ============================================
   STANDARDIZED SPACING & SIZING SYSTEM
   ============================================ */

/* Standard Page Layout */
.container-fluid {
    padding: 1.5rem; /* 24px - consistent main container padding */
}

/* Standard Card Spacing */
.card {
    margin-bottom: 1.5rem; /* 24px between cards */
}

.card-body {
    padding: 1.5rem; /* 24px inside cards */
}

.card-header {
    padding: 1rem 1.5rem; /* 16px top/bottom, 24px sides */
}

/* Standard Form Elements */
.form-group {
    margin-bottom: 1rem; /* 16px between form groups */
}

label {
    font-size: 0.8125rem; /* 13px */
    margin-bottom: 0.5rem; /* 8px */
}

.form-control,
select.form-control,
textarea.form-control {
    font-size: 0.875rem; /* 14px */
    padding: 0.625rem 0.875rem; /* 10px 14px */
    height: auto;
    min-height: 38px;
}

/* Standard Button Sizing */
.btn {
    font-size: 0.875rem; /* 14px */
    padding: 0.5rem 1rem; /* 8px 16px */
    min-height: 38px;
}

.btn-sm {
    font-size: 0.8125rem; /* 13px */
    padding: 0.375rem 0.75rem; /* 6px 12px */
    min-height: 32px;
}

.btn-lg {
    font-size: 1rem; /* 16px */
    padding: 0.75rem 1.5rem; /* 12px 24px */
    min-height: 44px;
}

/* Standard Table Spacing */
.table thead th {
    padding: 0.75rem; /* 12px */
    font-size: 0.75rem; /* 12px */
}

.table tbody td {
    padding: 0.75rem; /* 12px */
    font-size: 0.875rem; /* 14px */
}

.table-sm thead th,
.table-sm tbody td {
    padding: 0.5rem 0.75rem; /* 8px 12px */
}

/* Standard Typography */
body {
    font-size: 0.875rem; /* 14px - base font size */
    line-height: 1.5;
}

h1 { font-size: 1.75rem; } /* 28px */
h2 { font-size: 1.5rem; }  /* 24px */
h3 { font-size: 1.25rem; } /* 20px */
h4 { font-size: 1.125rem; } /* 18px */
h5 { font-size: 1rem; }    /* 16px */
h6 { font-size: 0.875rem; } /* 14px */

.text-xs { font-size: 0.75rem; }   /* 12px */
.text-sm { font-size: 0.8125rem; } /* 13px */
.text-base { font-size: 0.875rem; } /* 14px */
.text-lg { font-size: 1rem; }      /* 16px */

/* Standard Section Spacing */
.mb-section { margin-bottom: 1.5rem; } /* 24px between sections */
.mb-card { margin-bottom: 1.5rem; }    /* 24px between cards */
.mb-form { margin-bottom: 1rem; }      /* 16px between form elements */

/* Standard Filter Bar */
.filter-bar,
.search-bar {
    padding: 1rem 1.5rem; /* 16px 24px */
    margin-bottom: 1.5rem; /* 24px */
}

/* Standard Stat Cards */
.stat-card,
.metric-card {
    margin-bottom: 1.5rem; /* 24px */
}

.stat-card .card-body,
.metric-card .card-body {
    padding: 1.25rem; /* 20px */
}

/* Standard Modal Spacing */
.modal-header {
    padding: 1.25rem 1.5rem; /* 20px 24px */
}

.modal-body {
    padding: 1.5rem; /* 24px */
}

.modal-footer {
    padding: 1rem 1.5rem; /* 16px 24px */
}

/* Standard Badge Sizing */
.badge {
    font-size: 0.75rem; /* 12px */
    padding: 0.25rem 0.5rem; /* 4px 8px */
}

.badge-sm {
    font-size: 0.65rem; /* 10.4px */
    padding: 0.2rem 0.4rem; /* 3.2px 6.4px */
}

/* Standard Icon Sizes */
.icon-sm { font-size: 0.875rem; } /* 14px */
.icon-base { font-size: 1rem; }   /* 16px */
.icon-lg { font-size: 1.25rem; }  /* 20px */
.icon-xl { font-size: 1.5rem; }   /* 24px */

/* Standard Dropdown Sizing */
.dropdown-menu {
    font-size: 0.875rem; /* 14px */
    padding: 0.5rem 0; /* 8px 0 */
}

.dropdown-item {
    padding: 0.5rem 1rem; /* 8px 16px */
    font-size: 0.875rem; /* 14px */
}

/* Standard Input Group */
.input-group-text {
    font-size: 0.875rem; /* 14px */
    padding: 0.625rem 0.875rem; /* 10px 14px */
}

/* ============================================
   MOBILE RESPONSIVE STANDARDS
   ============================================ */
@media (max-width: 768px) {
    /* Mobile Container */
    .container-fluid {
        padding: 1rem; /* 16px on mobile */
    }
    
    /* Mobile Cards */
    .card {
        margin-bottom: 1rem; /* 16px between cards on mobile */
    }
    
    .card-body {
        padding: 1rem; /* 16px inside cards on mobile */
    }
    
    .card-header {
        padding: 0.75rem 1rem; /* 12px 16px on mobile */
    }
    
    /* Mobile Typography */
    body {
        font-size: 0.875rem; /* Keep 14px on mobile */
    }
    
    h1 { font-size: 1.5rem; }   /* 24px on mobile */
    h2 { font-size: 1.25rem; }  /* 20px on mobile */
    h3 { font-size: 1.125rem; } /* 18px on mobile */
    h4 { font-size: 1rem; }     /* 16px on mobile */
    h5 { font-size: 0.9375rem; } /* 15px on mobile */
    h6 { font-size: 0.875rem; }  /* 14px on mobile */
    
    /* Mobile Buttons */
    .btn {
        font-size: 0.875rem; /* 14px - keep same */
        padding: 0.5rem 1rem; /* 8px 16px - keep same */
        min-height: 38px;
    }
    
    .btn-sm {
        font-size: 0.8125rem; /* 13px */
        padding: 0.375rem 0.75rem; /* 6px 12px */
        min-height: 32px;
    }
    
    /* Mobile Forms */
    .form-control,
    select.form-control,
    textarea.form-control {
        font-size: 0.875rem; /* 14px */
        padding: 0.5rem 0.75rem; /* 8px 12px on mobile */
        min-height: 38px;
    }
    
    label {
        font-size: 0.8125rem; /* 13px */
        margin-bottom: 0.375rem; /* 6px on mobile */
    }
    
    .form-group {
        margin-bottom: 0.875rem; /* 14px on mobile */
    }
    
    /* Mobile Tables */
    .table thead th {
        padding: 0.5rem; /* 8px on mobile */
        font-size: 0.7rem; /* 11.2px on mobile */
    }
    
    .table tbody td {
        padding: 0.5rem; /* 8px on mobile */
        font-size: 0.8125rem; /* 13px on mobile */
    }
    
    /* Mobile Stat Cards */
    .stat-card .card-body,
    .metric-card .card-body {
        padding: 0.875rem; /* 14px on mobile */
    }
    
    .stat-card .text-xs,
    .metric-card .text-xs {
        font-size: 0.65rem; /* 10.4px on mobile */
    }
    
    .stat-card .h5,
    .metric-card .h5 {
        font-size: 1.25rem; /* 20px on mobile */
    }
    
    /* Mobile Modals */
    .modal-header {
        padding: 1rem 1.25rem; /* 16px 20px on mobile */
    }
    
    .modal-body {
        padding: 1.25rem; /* 20px on mobile */
    }
    
    .modal-footer {
        padding: 0.875rem 1.25rem; /* 14px 20px on mobile */
    }
    
    /* Mobile Badges */
    .badge {
        font-size: 0.7rem; /* 11.2px on mobile */
        padding: 0.2rem 0.4rem; /* 3.2px 6.4px on mobile */
    }
    
    /* Mobile Topbar: compact branch selector; gap from logo so it never touches */
    .topbar {
        height: 56px;
        padding: 0 0.5rem 0 0.75rem;
        flex-wrap: nowrap;
    }
    .topbar .navbar-nav.ml-auto {
        flex: 1;
        justify-content: flex-end;
        min-width: 0;
        gap: 0;
        margin-left: 8px;
    }
    .topbar .navbar-nav.ml-auto .nav-item {
        margin: 0;
    }
    .topbar-left {
        flex-shrink: 0;
        max-width: 120px;
    }
    .topbar .branch-selector-pill {
        width: max-content;
        max-width: 165px;
        min-width: 0;
        padding-left: 12px !important;
        padding-right: 12px !important;
        padding-top: 8px !important;
        padding-bottom: 8px !important;
        gap: 6px;
        box-sizing: border-box;
        overflow: hidden;
    }
    .topbar .branch-selector-pill .branch-pill-dot {
        display: none !important;
    }
    .topbar .branch-selector-pill {
        border-width: 2px !important;
        border-color: #e5e7eb !important;
    }
    .topbar .branch-selector-pill .branch-name-line {
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }
    .topbar .branch-selector-pill .branch-selector-compact-inner .branch-selector-company {
        max-width: 100%;
        min-width: 0;
    }
    .topbar .branch-selector-pill .branch-name-dot {
        width: 6px;
        height: 6px;
        min-width: 6px;
        min-height: 6px;
        border-radius: 50%;
        flex-shrink: 0;
        margin-right: 0;
    }
    .topbar .branch-selector-pill .branch-pill-chevron {
        font-size: 0.5rem !important;
    }
    .topbar .branch-selector-pill .branch-selector-compact-inner {
        min-width: 0;
        max-width: 14ch;
        overflow: hidden;
    }
    .topbar .branch-selector-pill .branch-selector-company,
    .topbar .branch-selector-pill .branch-name {
        max-width: 10ch;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: inline-block;
    }
    
    /* Mobile: hide sidebar by default (overlay when toggled); content full width */
    .sidebar {
        transform: translateX(-100%);
        z-index: 1050;
        transition: transform 0.25s ease;
        position: fixed;
    }
    .sidebar.toggled {
        transform: translateX(0);
    }
    body.sidebar-collapsed-load .sidebar {
        transform: translateX(-100%);
    }
    #content-wrapper {
        margin-left: 0 !important;
    }
    .sidebar-collapse-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }
    
    /* Bottom nav (mobile only) - bigger, cleaner */
    .bottom-nav {
        position: fixed !important;
        bottom: 0;
        left: 0;
        right: 0;
        /* Use content-box so padding-bottom (safe area) doesn't shrink the 64px hit area */
        height: 64px;
        box-sizing: content-box;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #fff;
        border-top: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-around;
        z-index: 1040;
        padding-left: 8px;
        padding-right: 8px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
        /* Force GPU layer — prevents iOS Safari scroll-jank on fixed elements */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        will-change: transform;
    }
    .bottom-nav-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        min-width: 0;
        padding: 8px 6px;
        color: var(--text-secondary, #6b7280);
        font-size: 0.7rem;
        font-weight: 500;
        text-decoration: none;
        border: none;
        background: none;
        cursor: pointer;
        transition: color 0.15s;
    }
    .bottom-nav-item i {
        font-size: 1.3rem;
        margin-bottom: 3px;
    }
    .bottom-nav-item span {
        display: block;
        text-align: center;
    }
    .bottom-nav-item.active,
    .bottom-nav-item:hover {
        color: var(--primary-color, #0ea5e9);
    }
    .bottom-nav-more-trigger {
        position: relative;
    }
    /* Content padding so main area is not behind bottom nav (includes iOS safe area) */
    #content-wrapper {
        padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    }
    
    /* More Drawer — 2026 SaaS: compact header (company · branch) + nav */
    .more-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 88vw;
        max-width: 320px;
        background: #fff;
        z-index: 1060;
        transform: translateX(100%);
        transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
        box-shadow: -8px 0 40px rgba(0,0,0,0.14);
        display: flex;
        flex-direction: column;
    }
    .more-drawer.open {
        transform: translateX(0);
    }
    .more-drawer-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 1055;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }
    .more-drawer-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }
    .more-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 1rem 1.25rem;
        border-bottom: 1px solid #e5e7eb;
        flex-shrink: 0;
    }
    .more-drawer-header h6 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        flex: 1;
    }
    .more-drawer-context {
        flex: 1;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        font-size: 0.8125rem;
        color: #374151;
    }
    .more-drawer-company {
        font-weight: 600;
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .more-drawer-dot {
        color: #9ca3af;
        flex-shrink: 0;
        font-weight: 400;
    }
    .more-drawer-branch {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #6b7280;
    }
    .more-drawer-close {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: none;
        background: #f3f4f6;
        color: #6b7280;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
        flex-shrink: 0;
        font-size: 0.875rem;
        -webkit-tap-highlight-color: transparent;
    }
    .more-drawer-close:hover {
        background: #e5e7eb;
        color: #111827;
    }
    .more-drawer-content {
        flex: 1;
        overflow-y: auto;
        padding: 0.75rem 0;
        -webkit-overflow-scrolling: touch;
    }
    /* Section grouping + label */
    .more-drawer-section {
        padding: 0 0 0.5rem 0;
    }
    .more-drawer-section + .more-drawer-section {
        border-top: 1px solid #f3f4f6;
        padding-top: 0.5rem;
    }
    .more-drawer-label {
        padding: 0.25rem 1.25rem 0.375rem;
        font-size: 0.6875rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #9ca3af;
    }
    /* Company info inside drawer */
    .more-drawer-company-info {
        display: flex;
        flex-direction: column;
        gap: 0.125rem;
        padding: 0.25rem 1.25rem 0.5rem;
    }
    .company-name-mobile {
        font-size: 0.9375rem;
        font-weight: 600;
        color: #111827;
        line-height: 1.3;
    }
    .branch-name-mobile {
        font-size: 0.8125rem;
        color: #6b7280;
        line-height: 1.3;
    }
    .more-drawer-nav {
        display: flex;
        flex-direction: column;
        padding: 0.25rem 0;
    }
    .more-drawer-divider {
        height: 1px;
        background: #e5e7eb;
        margin: 0.375rem 1rem;
    }
    .more-drawer-item {
        display: flex;
        align-items: center;
        gap: 0.875rem;
        padding: 0.875rem 1.25rem;
        color: #374151;
        text-decoration: none;
        font-size: 0.9375rem;
        font-weight: 500;
        transition: background 0.12s, color 0.12s;
        -webkit-tap-highlight-color: transparent;
        min-height: 52px;
    }
    .more-drawer-item:hover {
        background: #f9fafb;
        color: #111827;
        text-decoration: none;
    }
    .more-drawer-item:active {
        background: #f3f4f6;
    }
    .more-drawer-item.active {
        background: rgba(14, 165, 233, 0.06);
        color: #c0392b;
    }
    .more-drawer-item i {
        width: 20px;
        text-align: center;
        font-size: 1rem;
        color: #9ca3af;
        flex-shrink: 0;
    }
    .more-drawer-item:hover i,
    .more-drawer-item.active i {
        color: #6b7280;
    }
    .more-drawer-item.active i {
        color: #c0392b;
    }
    .more-drawer-item span {
        flex: 1;
        min-width: 0;
    }
    .more-drawer-item.text-danger {
        color: #dc2626 !important;
    }
    .more-drawer-item.text-danger i {
        color: #dc2626 !important;
    }
    .more-drawer-item.text-danger:hover {
        background: #fef2f2;
        color: #b91c1c !important;
    }
    .more-drawer-signout {
        color: #dc2626;
        margin-top: 0.25rem;
    }
    .more-drawer-signout i {
        color: #dc2626;
    }
    .more-drawer-signout:hover {
        background: #fef2f2;
        color: #b91c1c;
    }
    .more-drawer-signout:hover i {
        color: #b91c1c;
    }
    
    
    /* Mobile Page Header - title and buttons on same line (like dashboard/sales) */
    .page-header {
        margin-bottom: 1.25rem;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }
    
    .page-header-content {
        min-width: 0;
        flex-shrink: 0;
    }
    
    .page-header h1,
    .page-header .page-title-wrapper h1 {
        font-size: 1.25rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .page-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .page-actions {
        flex-shrink: 0;
        flex-wrap: nowrap;
    }
    
    .page-actions .btn {
        white-space: nowrap;
    }
    
    /* Mobile Filters */
    .filter-bar,
    .search-bar {
        padding: 0.875rem 1rem; /* 14px 16px on mobile */
        margin-bottom: 1rem; /* 16px on mobile */
    }
    
    /* Mobile Dropdown */
    .dropdown-menu {
        font-size: 0.8125rem; /* 13px on mobile */
    }
    
    .dropdown-item {
        padding: 0.5rem 0.875rem; /* 8px 14px on mobile */
        font-size: 0.8125rem; /* 13px on mobile */
    }
}

/* Extra Small Mobile (< 576px) */
@media (max-width: 576px) {
    .container-fluid {
        padding: 0.875rem; /* 14px on very small screens */
    }
    
    .card-body {
        padding: 0.875rem; /* 14px on very small screens */
    }
    
    h1 { font-size: 1.375rem; } /* 22px */
    h2 { font-size: 1.125rem; } /* 18px */
    h3 { font-size: 1rem; }     /* 16px */
}

/* ============================================
   REMOVE ALL UNWANTED ANIMATIONS
   ============================================ */
.sidebar .nav-item .nav-link,
.card,
.btn,
.metric-card,
.stock-item,
.quick-action-btn {
    transform: none !important;
}

/* NO FADE IN ANIMATIONS */
@keyframes fadeInUp {
    from, to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   COMPACT TIME FILTERS
   ============================================ */
.time-filter .btn {
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.45rem 0.875rem;
}

.time-filter .btn-outline-primary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.time-filter .btn-outline-primary:hover {
    background-color: var(--border-light);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.time-filter .btn-outline-primary.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* ============================================
   BRANCH SELECTOR STYLING
   ============================================ */
.branch-selector-link {
    padding: 0.5rem 1rem !important;
    display: flex;
    align-items: center;
    height: auto !important;
}

.branch-selector-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.branch-company-name {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.15rem;
}

.branch-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.branch-name i {
    font-size: 0.65rem;
    color: var(--text-secondary);
}

/* Branch selector hover state */
.branch-selector-link:hover {
    background-color: var(--bg-main) !important;
}

.branch-selector-link:hover .branch-selector-content {
    opacity: 1;
}

/* Fix notification and user dropdown heights to match */
.topbar .nav-item .nav-link {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    height: auto;
}

.topbar .nav-item.dropdown .nav-link {
    height: auto !important;
}

/* Ensure consistent height for all topbar items */
.topbar .navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

/* ============================================
   MOBILE STYLES - Bottom Navigation
   ============================================ */

/* Mobile Bottom Navigation */
#mobileBottomNav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
}

#mobileBottomNav .nav-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
    gap: 0.25rem;
    padding: 0 0.5rem;
}

#mobileBottomNav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 0.5rem 0.25rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    transition: var(--transition);
    border-radius: var(--radius-md);
    font-weight: 500;
}

#mobileBottomNav .nav-item:hover {
    background-color: var(--border-light);
    color: var(--text-primary);
}

#mobileBottomNav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
    color: inherit;
}

#mobileBottomNav .nav-item.active {
    background: var(--primary-color);
    color: white;
}

#mobileBottomNav .nav-item.active i {
    color: white;
}

#mobileBottomNav .nav-item span {
    font-weight: 500;
    white-space: nowrap;
}

/* Mobile Topbar Adjustments */
@media (max-width: 768px) {
    /* Hide sidebar on mobile */
    .sidebar {
        display: none !important;
    }
    
    /* Show mobile bottom nav */
    #mobileBottomNav {
        display: block;
    }
    
    /* Adjust content wrapper */
    #content-wrapper {
        margin-left: 0 !important;
        /* padding-bottom is set in the primary mobile block above with env(safe-area-inset-bottom) */
    }
    
    /* Mobile Topbar */
    .topbar {
        padding: 0.75rem 1rem;
        box-shadow: var(--shadow-md);
        position: sticky;
        top: 0;
        z-index: 999;
    }
    
    /* Force hide hamburger menu button on mobile - not needed with bottom nav */
    .topbar #sidebarToggleTop {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Hide company name on mobile */
    .company-name-section {
        display: none !important;
    }
    
    /* Mobile topbar layout: Logo | Branch + User */
    .topbar ul.navbar-nav {
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    /* Logo left aligned */
    .sidebar-brand-mobile {
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        margin-right: auto;
    }
    
    .sidebar-brand-mobile img {
        max-height: 28px;
        width: auto;
    }
    
    /* Branch selector next to user (no extra margin) */
    .topbar .nav-item.dropdown:has(#centerDropdown) {
        margin-left: auto;
        margin-right: 0;
    }
    
    #centerDropdown {
        display: flex !important;
    }
    
    .branch-selector-link {
        padding: 0.35rem 0.75rem !important;
        border-radius: var(--radius-md);
        background: var(--bg-main);
    }
    
    .branch-company-name {
        font-size: 0.6rem !important;
        color: var(--text-secondary);
    }
    
    .branch-name {
        font-size: 0.75rem !important;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .branch-name i {
        font-size: 0.6rem !important;
        margin-left: 0.25rem;
    }
    
    /* Hide company name and branch on mobile */
    .mobile-company-branch {
        display: none !important;
    }
    
    /* Hide hamburger and company name section on mobile */
    .topbar .company-name-section {
        display: none !important;
    }
    
    /* User dropdown on right - sibling of branch selector */
    .user-dropdown {
        padding: 0.35rem 0.75rem !important;
        position: relative;
    }
    
    .user-dropdown img {
        width: 32px !important;
        height: 32px !important;
    }
    
    .user-dropdown .user-info,
    .user-dropdown > .fa-chevron-down {
        display: none !important;
    }
    
    /* Notification badge on user icon */
    .mobile-notification-badge {
        position: absolute;
        top: 0;
        right: 0;
        background: var(--color-danger);
        color: white;
        border-radius: 50%;
        width: 16px;
        height: 16px;
        font-size: 0.65rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        border: 2px solid white;
    }
    
    /* Hide desktop elements on mobile */
    .topbar .topbar-divider,
    .d-none.d-sm-block {
        display: none !important;
    }
    
    /* Mobile user dropdown menu */
    .user-dropdown + .dropdown-menu {
        right: 0 !important;
        left: auto !important;
        min-width: 200px;
    }
    
    /* Add notifications to user dropdown on mobile */
    .mobile-notification-section {
        display: block;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .mobile-notification-section .dropdown-item {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }
    
    /* Adjust page header for mobile */
    .page-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    /* Mobile card adjustments */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile table responsiveness */
    .table-responsive {
        border: none;
    }
    
    /* Keep branch selector and user dropdown visible on mobile (do not hide .nav-item.dropdown globally) */
    
    /* Hide desktop notification dropdown on mobile */
    #notificationsNav {
        display: none !important;
    }
    
    /* Show notifications in mobile user dropdown */
    .mobile-notification-section {
        display: block !important;
    }
    
    /* Hide footer on mobile — bottom nav handles navigation/branding */
    .app-footer {
        display: none !important;
    }
}

/* Extra small devices (portrait phones) */
@media (max-width: 576px) {
    .topbar {
        padding: 0.5rem 0.75rem;
    }
    
    .sidebar-brand-mobile img {
        max-height: 24px;
    }
    
    .user-dropdown img {
        width: 32px !important;
        height: 32px !important;
    }
}

/* ============================================
   FOOTER - Minimal, faded, centered
   ============================================ */
.app-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8125rem;
    flex-shrink: 0;
}

.app-footer-inner {
    text-align: center;
    color: #9ca3af;
    font-size: 0.75rem;
}

.app-footer-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* ============================================
   TABLE VIBE (Reference: user.php)
   Badge, action button, bordering, search, entries, pagination
   ============================================ */
.table-vibe-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.table-vibe-card .card-body {
    padding: 1rem 1.25rem;
}

/* Table base - NO vertical borders, horizontal only */
.table-vibe,
.table.table-vibe {
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table-vibe th,
.table-vibe td,
.table.table-vibe th,
.table.table-vibe td {
    border-left: none !important;
    border-right: none !important;
}

.table-vibe thead th,
.table.table-vibe thead th {
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: var(--text-secondary);
    padding: 0.75rem;
    vertical-align: middle;
}

/* Sortable column headers: click to sort (DataTables classes + manual .th-sortable) */
.table-vibe thead th.sorting,
.table-vibe thead th.sorting_asc,
.table-vibe thead th.sorting_desc,
.table-vibe thead th.th-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}
.table-vibe thead th.th-sortable:hover {
    color: var(--primary-color, #0ea5e9);
}
.table-vibe thead th.th-sortable.th-sort-asc::after {
    content: " \2191";
    font-size: 0.75em;
    opacity: 0.8;
}
.table-vibe thead th.th-sortable.th-sort-desc::after {
    content: " \2193";
    font-size: 0.75em;
    opacity: 0.8;
}

.table-vibe tbody td,
.table.table-vibe tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light) !important;
}

.table-vibe tbody tr:last-child td,
.table.table-vibe tbody tr:last-child td {
    border-bottom: none !important;
}

.table-vibe tbody tr:hover,
.table.table-vibe tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Badge status (shared across tables) */
.badge-status {
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 12px;
}

.badge-status.badge-active,
.badge-status.badge-success {
    background-color: var(--color-success);
    color: white;
    border: none;
}

.badge-status.badge-disabled,
.badge-status.badge-secondary {
    background-color: var(--color-secondary);
    color: white;
    border: none;
}

.badge-status.badge-warning {
    background-color: var(--color-warning);
    color: #000;
}

.badge-status.badge-danger {
    background-color: var(--color-danger);
    color: white;
}

.badge-status.badge-invited {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
}

.badge-status.badge-pending,
.badge-status.badge-info {
    background-color: var(--color-info);
    color: white;
}

.badge-status.badge-verified {
    background-color: transparent;
    color: var(--color-success);
    border: 1px solid var(--color-success);
}

.badge-status.badge-admin,
.badge-status.badge-manager,
.badge-status.badge-staff,
.badge-status.badge-owner {
    background-color: transparent;
    border: 1px solid currentColor;
}

.badge-status.badge-admin { color: #4e73df; border-color: #4e73df; }
.badge-status.badge-manager { color: #36b9cc; border-color: #36b9cc; }
.badge-status.badge-staff { color: #6c757d; border-color: #6c757d; }
.badge-status.badge-owner { color: #5a5c69; border-color: #5a5c69; }

/* Action menu (3-dot dropdown) - consistent across all pages */
.action-menu {
    position: relative;
    display: inline-block;
}

.action-menu-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    color: #6c757d;
    transition: all 0.2s;
    border-radius: 6px;
}

.action-menu-btn:hover {
    color: var(--primary-color);
    background: rgba(14, 165, 233, 0.08);
}

.action-menu-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12), 0 2px 4px rgba(0,0,0,0.08);
    min-width: 200px;
    z-index: 1060;
    overflow: hidden;
}

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

.action-menu-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1f2937;
    transition: all 0.15s;
    font-size: 0.875rem;
    text-decoration: none;
}

.action-menu-item:last-child {
    border-bottom: none;
}

.action-menu-item:hover {
    background-color: #f8f9fa;
}

.action-menu-item i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.action-menu-item.danger {
    color: #dc3545;
}

.action-menu-item.danger:hover {
    background-color: rgba(220, 53, 69, 0.08);
}

.action-menu-item.success {
    color: #28a745;
}

.action-menu-item.success:hover {
    background-color: rgba(40, 167, 69, 0.08);
}

.action-menu-item.warning {
    color: #d97706;
}

.action-menu-item.warning:hover {
    background-color: rgba(217, 119, 6, 0.08);
}

.action-menu-item.info {
    color: #17a2b8;
}

.action-menu-item.info:hover {
    background-color: rgba(23, 162, 184, 0.08);
}

.action-dropdown-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: var(--bg-sidebar) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.action-dropdown-btn:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Table action dropdown: always on top (fix single-row dropdown sinking into table) */
.table td .dropdown,
.table th .dropdown {
    position: relative;
    z-index: 2;
}
.table td .dropdown.show,
.table th .dropdown.show {
    z-index: 1060;
}
.table .dropdown-menu {
    z-index: 1060;
}

/* DataTables wrapper (search, entries, pagination) */
div.dataTables_wrapper {
    font-size: 0.875rem;
}

div.dataTables_wrapper div.dataTables_length,
div.dataTables_wrapper div.dataTables_filter {
    padding: 0.5rem 0;
}

div.dataTables_wrapper div.dataTables_length select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
}

div.dataTables_wrapper div.dataTables_filter input {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.25rem 0.5rem;
}

div.dataTables_wrapper div.dataTables_info {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

div.dataTables_wrapper div.dataTables_paginate .page-link {
    border-color: var(--border-color);
    color: var(--text-primary);
}

div.dataTables_wrapper div.dataTables_paginate .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Custom pagination (non-DataTables) - match vibe */
.table-vibe-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.table-vibe-pagination .table-vibe-info {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

.table-vibe-pagination .pagination {
    margin-bottom: 0;
}

.table-vibe-pagination .pagination .page-link {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.table-vibe-pagination .pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* ============================================
   IMPERSONATION STRIP (fixed at ultimate top, subtle, never scrolls away)
   ============================================ */
.impersonation-strip {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fefce8;
    color: #854d0e;
    border-bottom: 1px solid #fde68a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
/* Reserve space so content doesn't sit under the fixed strip */
body:has(.impersonation-strip) {
    padding-top: 36px;
}
/* Sidebar: pin from below strip to viewport bottom so it stays on screen and can scroll */
body:has(.impersonation-strip) .sidebar,
body:has(.impersonation-strip) #accordionSidebar {
    top: 36px;
    bottom: 0;
    height: auto;
    min-height: 0;
}
.impersonation-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 1rem;
    flex-wrap: wrap;
    max-width: 100%;
}
.impersonation-strip-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.impersonation-strip-text > i {
    font-size: 0.875rem;
    flex-shrink: 0;
    opacity: 0.85;
}
.impersonation-strip-title {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.impersonation-strip-detail {
    display: block;
    font-size: 0.6875rem;
    opacity: 0.9;
    line-height: 1.3;
}
.impersonation-strip-company,
.impersonation-strip-admin {
    white-space: nowrap;
}
.impersonation-strip-btn {
    background: #fff;
    color: #b45309;
    border: 1px solid #fde68a;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.6875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
    white-space: nowrap;
}
.impersonation-strip-btn:hover {
    background: #fef9c3;
    color: #075985;
    border-color: #facc15;
}
.impersonation-strip-btn i {
    font-size: 0.65rem;
}
@media (max-width: 767px) {
    body:has(.impersonation-strip) {
        padding-top: 52px;
    }
    body:has(.impersonation-strip) .sidebar,
    body:has(.impersonation-strip) #accordionSidebar {
        top: 52px;
        bottom: 0;
        height: auto;
        min-height: 0;
    }
    .impersonation-strip-inner {
        padding: 0.4rem 0.75rem;
        flex-direction: row;
        align-items: center;
    }
    .impersonation-strip-text {
        gap: 0.4rem;
        flex: 1;
        min-width: 0;
    }
    .impersonation-strip-title {
        font-size: 0.625rem;
    }
    .impersonation-strip-detail {
        font-size: 0.625rem;
    }
    .impersonation-strip-company,
    .impersonation-strip-admin {
        display: inline;
        white-space: nowrap;
    }
    .impersonation-strip-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }
    .impersonation-strip-btn-text {
        display: inline;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .topbar,
    .impersonation-strip,
    #mobileBottomNav,
    .app-footer {
        display: none !important;
    }
    
    #content-wrapper {
        margin-left: 0 !important;
        padding-bottom: 0 !important;
    }
}
