/* ============================================
   APOSYS — Design System & Global Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    /* Primary palette — Teal/Emerald */
    --primary-50: #f0fdfa;
    --primary-100: #ccfbf1;
    --primary-200: #99f6e4;
    --primary-300: #5eead4;
    --primary-400: #2dd4bf;
    --primary-500: #14b8a6;
    --primary-600: #0d9488;
    --primary-700: #0f766e;
    --primary-800: #115e59;
    --primary-900: #134e4a;

    /* Neutral */
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --gray-950: #020617;

    /* Semantic */
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.12);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.12);

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --topbar-height: 64px;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(20, 184, 166, 0.3);
    --shadow-glow-info: 0 0 20px rgba(59, 130, 246, 0.35);
    --shadow-glow-danger: 0 0 20px rgba(239, 68, 68, 0.35);
}

/* Dark theme (default) */
[data-theme="dark"] {
    --bg-body: #0a0e1a;
    --bg-surface: #111827;
    --bg-surface-2: #1a2332;
    --bg-surface-hover: #1e293b;
    --bg-glass: rgba(17, 24, 39, 0.8);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-strong: rgba(255, 255, 255, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-inverse: #0f172a;
    --scrollbar-thumb: #334155;
    --scrollbar-track: #1e293b;
    --code-bg: rgba(255, 255, 255, 0.06);
    --code-color: var(--primary-300);
}


/* Light theme */
[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-2: #f1f5f9;
    --bg-surface-hover: #e2e8f0;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-strong: rgba(0, 0, 0, 0.12);
    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    --scrollbar-thumb: #cbd5e1;
    --scrollbar-track: #f1f5f9;
    --primary-text-active: var(--primary-700);
    --code-bg: rgba(0, 0, 0, 0.05);
    --code-color: var(--primary-700);
}

/* Vibrant theme (Fullcolor) */
html[data-theme="vibrant"] {
    /* 
     * BACKGROUND: "Candy Fresh" Gradient 
     */
    --bg-body: linear-gradient(135deg, #FFDEE9 0%, #B5FFFC 100%);

    /* 
     * SURFACES: Glassmorphism effect.
     */
    --bg-surface: rgba(255, 255, 255, 0.85);
    /* Increased opacity for content legibility */
    --bg-surface-2: rgba(255, 255, 255, 0.6);
    --bg-surface-hover: rgba(255, 255, 255, 0.95);
    --bg-glass: rgba(255, 255, 255, 0.45);

    /* 
     * BORDERS: Darker borders for visibility on light background.
     */
    --border-color: rgba(30, 41, 59, 0.15);
    /* Slate 800 at 15% */
    --border-color-strong: rgba(30, 41, 59, 0.25);
    /* Slate 800 at 25% */

    /* 
     * TEXT: Dark slate for contrast.
     */
    --text-primary: #0f172a;
    /* Slate 900 - Darker for better contrast */
    --text-secondary: #334155;
    /* Slate 700 - Darker */
    --text-muted: #475569;
    /* Slate 600 */
    --text-inverse: #ffffff;
    --scrollbar-thumb: #94a3b8;
    --scrollbar-track: rgba(255, 255, 255, 0.5);
    --primary-text-active: #c026d3;

    /* 
     * ACCENTS: Vibrant Purple/Pink to pop against the pastel background.
     */
    --primary-500: #d946ef;
    /* Fuchsia 500 */
    --primary-600: #c026d3;
    /* Fuchsia 600 */
    --primary-400: #e879f9;
    /* Fuchsia 400 */
    --code-bg: rgba(255, 255, 255, 0.6);
    --code-color: #be185d;

    /* Shadows for depth */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Glassmorphism helpers for Vibrant theme */
[data-theme="vibrant"] .sidebar,
[data-theme="vibrant"] .topbar,
[data-theme="vibrant"] .card,
[data-theme="vibrant"] .stat-card,
[data-theme="vibrant"] .auth-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    background: var(--bg-surface);
    /* Ensure consistent background */
}

/* Ensure buttons and inputs are visible */
html[data-theme="vibrant"] .btn-primary {
    background: linear-gradient(135deg, #d946ef, #c026d3);
    color: #ffffff !important;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(217, 70, 239, 0.4);
}

html[data-theme="vibrant"] .btn-secondary {
    background: #ffffff;
    border: 1px solid var(--border-color-strong);
    color: var(--text-primary);
}

html[data-theme="vibrant"] input,
html[data-theme="vibrant"] select,
html[data-theme="vibrant"] textarea {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-color-strong);
    color: var(--text-primary);
}

html[data-theme="vibrant"] ::placeholder {
    color: var(--text-muted);
}

/* Elegant theme (Light Luxury Glass) */
html[data-theme="elegant"] {
    /*
     * BACKGROUND: Warm ivory/pearl gradient
     */
    --bg-body: #f5f0e8;

    /*
     * SURFACES: Frosted glass — high opacity for readability
     */
    --bg-surface: rgba(255, 255, 255, 0.92);
    --bg-surface-2: rgba(255, 255, 255, 0.75);
    --bg-surface-hover: rgba(255, 255, 255, 0.98);
    --bg-glass: rgba(255, 255, 255, 0.70);

    /*
     * BORDERS: Visible golden shimmer
     */
    --border-color: rgba(180, 150, 90, 0.22);
    --border-color-strong: rgba(180, 150, 90, 0.35);

    /*
     * TEXT: Warm dark tones — readable, NO pure black
     */
    --text-primary: #2c2418;
    --text-secondary: #4a3f33;
    --text-muted: #8a7d6d;
    --text-inverse: #fffcf7;

    /*
     * ACCENT: Soft Champagne Gold
     */
    --primary-500: #c9a96e;
    --primary-600: #b08f52;
    --primary-400: #dcc08a;
    --primary-300: #e8d4a6;
    --primary-text-active: #96722f;

    --scrollbar-thumb: #c8b89e;
    --scrollbar-track: #ece5d8;

    /*
     * SHADOWS: Warm & visible
     */
    --shadow-sm: 0 1px 4px rgba(100, 80, 40, 0.10);
    --shadow: 0 4px 16px rgba(100, 80, 40, 0.12), 0 1px 3px rgba(100, 80, 40, 0.08);
    --shadow-lg: 0 12px 40px rgba(100, 80, 40, 0.16), 0 2px 6px rgba(100, 80, 40, 0.10);
    --shadow-glow: 0 0 24px rgba(201, 169, 110, 0.25);

    --code-bg: rgba(195, 163, 105, 0.10);
    --code-color: #96722f;
}

/* Body gradient background for Elegant */
html[data-theme="elegant"] body {
    background: linear-gradient(160deg, #faf7f0 0%, #f0e8d8 40%, #f7f2ea 100%);
    background-attachment: fixed;
}

/* Glassmorphism helpers for Elegant theme */
[data-theme="elegant"] .sidebar {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color-strong);
    box-shadow: 2px 0 20px rgba(100, 80, 40, 0.06);
    background: rgba(255, 253, 248, 0.94);
}

[data-theme="elegant"] .topbar {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 12px rgba(100, 80, 40, 0.06);
    background: rgba(255, 253, 248, 0.92);
}

[data-theme="elegant"] .card,
[data-theme="elegant"] .stat-card {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    background: var(--bg-surface);
}

[data-theme="elegant"] .auth-card {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color-strong);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.95);
}

/* Stat card top bar gold accent */
[data-theme="elegant"] .stat-primary::before {
    background: linear-gradient(90deg, var(--primary-400), var(--primary-600));
}

/* Nav link styling for Elegant */
[data-theme="elegant"] .nav-link {
    color: var(--text-secondary);
}

[data-theme="elegant"] .nav-link.active {
    background: linear-gradient(135deg, rgba(201, 169, 110, 0.15), rgba(201, 169, 110, 0.05));
    color: var(--primary-text-active);
}

[data-theme="elegant"] .nav-link:hover {
    background: rgba(201, 169, 110, 0.08);
}

/* Login shapes softened */
[data-theme="elegant"] .shape-1 {
    background: var(--primary-400);
    opacity: 0.15;
}

[data-theme="elegant"] .shape-2 {
    background: #c9a96e;
    opacity: 0.10;
}

[data-theme="elegant"] .shape-3 {
    background: var(--primary-300);
    opacity: 0.12;
}

/* Button overrides for Elegant */
html[data-theme="elegant"] .btn-primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: var(--text-inverse) !important;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 4px 12px rgba(176, 143, 82, 0.35);
}

html[data-theme="elegant"] .btn-secondary {
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border-color-strong);
    color: var(--text-primary);
}

/* Input overrides for Elegant */
html[data-theme="elegant"] input,
html[data-theme="elegant"] select,
html[data-theme="elegant"] textarea {
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid var(--border-color-strong);
    color: var(--text-primary);
}

html[data-theme="elegant"] ::placeholder {
    color: var(--text-muted);
}


*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 1.75rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.15rem;
}

h4 {
    font-size: 1rem;
}

a {
    color: var(--primary-text-active, var(--primary-400));
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-text-active, var(--primary-300));
    text-decoration: underline;
}

code {
    background: var(--code-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--code-color);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary-text-active, var(--primary-400));
}

.logo i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-500);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-surface-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(20, 184, 166, 0.05));
    color: var(--primary-text-active, var(--primary-400));
}

.nav-link.active::before {
    transform: scaleY(1);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(12px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-item {
    display: flex;
    align-items: center;
}

.btn-logout {
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0.4rem;
    border-radius: var(--radius-xs);
    transition: var(--transition-fast);
}

.btn-logout:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

.role-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-administrator {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.05));
    color: #9333ea;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

[data-theme="dark"] .role-administrator {
    color: #c084fc;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(168, 85, 247, 0.1));
}

.role-admin {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: #2563eb;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .role-admin {
    color: #60a5fa;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
}

.role-kasir {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

[data-theme="dark"] .role-kasir {
    color: #4ade80;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
}

.content-wrapper {
    padding: 1.5rem;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 90;
    backdrop-filter: blur(4px);
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-body {
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.auth-container {
    position: relative;
    width: 100%;
    max-width: 420px;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    position: relative;
    z-index: 2;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    overflow: hidden;
}

.auth-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
}

.password-toggle:hover {
    color: var(--text-primary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-footer p {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Background shapes */
.auth-bg-shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-500);
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: -50px;
    left: -50px;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-400);
    top: 50%;
    left: 50%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ============================================
   ERROR PAGES
   ============================================ */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    min-height: 50vh;
}

.error-icon {
    font-size: 4rem;
    color: var(--primary-400);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.error-page h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .dashboard-row {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .content-wrapper {
        padding: 1rem;
    }

    .topbar {
        padding: 0 1rem;
    }

    .page-title {
        font-size: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .filter-bar {
        flex-direction: column !important;
    }

    .filter-bar input,
    .filter-bar select {
        width: 100% !important;
    }

    .info-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Logo Styling */
.logo-img {
    height: 47px !important;
    width: auto !important;
    object-fit: contain !important;
}

.auth-logo-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.preview-logo {
    max-height: 100px !important;
    max-width: 100% !important;
    border-radius: 4px;
    background: #f8f9fa;
    padding: 5px;
    border: 1px solid #ddd;
    object-fit: contain !important;
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 101;
    /* Above sidebar overlay */
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    flex: 1;
    transition: all 0.2s ease;
}

.mobile-bottom-nav .nav-item.active {
    color: var(--primary-500);
    background: rgba(20, 184, 166, 0.05);
}

.mobile-bottom-nav .nav-item i {
    font-size: 1.25rem;
    margin-bottom: 2px;
}

/* Helper for Desktop to hide mobile elements */
@media (min-width: 1025px) {
    .d-lg-none {
        display: none !important;
    }
}

/* Helper for Mobile to hide desktop elements */
@media (max-width: 1024px) {
    body {
        padding-bottom: 70px !important;
    }

    .d-none-mobile {
        display: none !important;
    }
}

/* ---- Simple Grid System ---- */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

[class*="col-"] {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    width: 100%;
}

@media (min-width: 768px) {
    .col-md-1 {
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }

    .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }

    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-md-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-md-11 {
        flex: 0 0 91.666667%;
        max-width: 91.666667%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}