/* ============================================
   Pluriscience - Complete Design System
   Dark Mode SaaS Platform for Lab Inventory
   ============================================

   TABLE OF CONTENTS
   -----------------
   1.  CSS Variables & Design Tokens
   2.  Reset & Base Styles
   3.  Typography
   4.  Landing Navigation
   5.  Buttons
   6.  Landing Hero
   7.  Landing Features
   8.  Footer
   9.  Modals (Auth)
   10. Forms
   11. App Shell Navigation
   12. Search Box in Nav
   13. Inventory Three-Panel Layout
       13a. Left Sidebar (Equipment Tree)
       13b. Tree Structure
       13c. Main Content Area
       13d. Welcome Panel
       13e. Grid Panel (Box View)
       13f. Tank & Rack Views
       13g. Right Sidebar (Details)
   14. Search Results Overlay
   15. Inventory Modals
   16. Toast Notifications
   17. Animations & Keyframes
   18. Accessibility
   19. Utility Classes
   20. Responsive - Tablet (<=1024px)
   21. Responsive - Mobile (<=768px)
   22. Responsive - Small Mobile (<=380px)
   30. Demo Banner
   31. Settings Modal
   ============================================ */


/* ============================================
   1. CSS Variables & Design Tokens
   ============================================ */
:root {
    /* Backgrounds */
    --bg-primary: #09090b;
    --bg-secondary: #0c0c0e;
    --bg-card: #111113;
    --bg-card-hover: #1a1a1d;
    --bg-input: #0a0a0c;
    --bg-tertiary: rgba(255, 255, 255, 0.04);

    /* Borders */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-color-hover: rgba(255, 255, 255, 0.12);

    /* Accent Colors */
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-yellow: #f59e0b;

    /* Gradients */
    --gradient-blue: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #06b6d4 100%);
    --gradient-purple: linear-gradient(135deg, #7c3aed 0%, #8b5cf6 50%, #a78bfa 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);

    /* Text */
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(59, 130, 246, 0.08);

    /* Glass Morphism */
    --glass-bg: rgba(17, 17, 19, 0.8);
    --glass-border: rgba(255, 255, 255, 0.08);

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s ease;

    /* Layout */
    --nav-height: 56px;

    /* Fonts */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', var(--font-sans);
}


/* ============================================
   2. Reset & Base Styles
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, select, textarea {
    font-family: inherit;
}

img, svg {
    display: block;
    max-width: 100%;
}

ul, ol {
    list-style: none;
}


/* ============================================
   3. Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
    line-height: 1.2;
}


/* ============================================
   4. Landing Navigation
   ============================================ */
.landing-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.landing-logo {
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.landing-nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}


/* ============================================
   5. Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 9999px;
    transition: all var(--transition-fast);
    white-space: nowrap;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.btn-md {
    padding: 10px 20px;
}

.btn-lg {
    padding: 12px 28px;
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--gradient-blue);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(59, 130, 246, 0.15);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.35),
                0 1px 3px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(59, 130, 246, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.btn-ghost {
    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-color);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color-hover);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-color-hover);
}

.btn-danger {
    color: var(--accent-red);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.btn-full {
    width: 100%;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

.btn svg {
    flex-shrink: 0;
}


/* ============================================
   6. Landing Hero
   ============================================ */
.landing-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100vh;
    padding: 120px 24px 80px;
    overflow: hidden;
}

/* Ambient radial glow */
.landing-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(
        ellipse at center,
        rgba(59, 130, 246, 0.08) 0%,
        rgba(139, 92, 246, 0.04) 35%,
        rgba(6, 182, 212, 0.02) 55%,
        transparent 70%
    );
    pointer-events: none;
    z-index: 0;
}

/* Subtle dot grid pattern */
.landing-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 40%, black 20%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

/* Badge: "Private beta" */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    margin-bottom: 32px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    letter-spacing: 0.03em;
}

.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.08;
    margin-bottom: 20px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}


/* ============================================
   7. Landing Features
   ============================================ */
.landing-features {
    position: relative;
    padding: 80px 24px 120px;
    max-width: 960px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    position: relative;
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    overflow: hidden;
}

/* Gradient overlay on hover */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(139, 92, 246, 0.03) 50%, transparent 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.feature-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow), var(--shadow-md);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    border-radius: var(--radius-sm);
    background: var(--gradient-subtle);
    color: var(--accent-blue);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
}

.feature-title {
    position: relative;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.feature-desc {
    position: relative;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}


/* ============================================
   8. Footer
   ============================================ */
.landing-footer {
    padding: 32px 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.8125rem;
}


/* ============================================
   9. Modals (Auth)
   ============================================ */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 80px rgba(59, 130, 246, 0.05);
    overflow: hidden;
    transform: translateY(10px) scale(0.97);
    transition: transform var(--transition-normal);
}

.modal-card-wide {
    max-width: 560px;
}

.modal.active .modal-card {
    transform: translateY(0) scale(1);
}

/* Smaller modal variant */
.modal-card-sm { max-width: 440px; }

/* Danger header (delete confirm) */
.modal-header-danger {
    border-bottom: 1px solid rgba(239,68,68,0.15);
    padding-bottom: 16px;
}
.modal-header-danger .modal-title {
    color: #ef4444;
}

/* Delete confirmation content */
.delete-confirm-warning {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 16px;
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.12);
    border-radius: 8px;
    margin-bottom: 20px;
}
.delete-confirm-warning svg { flex-shrink: 0; margin-top: 1px; }
.delete-confirm-warning p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}
.delete-confirm-warning strong { color: var(--text-primary); }

.delete-confirm-input-wrap { margin-bottom: 4px; }
.delete-confirm-input-wrap .form-label { font-size: 0.8125rem; margin-bottom: 8px; }
.delete-confirm-input-wrap strong {
    color: #ef4444;
    font-family: var(--font-display);
    letter-spacing: 0.03em;
    user-select: none;
}
.delete-confirm-input {
    font-family: var(--font-display) !important;
    letter-spacing: 0.05em;
}
.delete-confirm-input::placeholder {
    color: rgba(255,255,255,0.15);
    letter-spacing: 0.05em;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px 0;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    font-family: var(--font-display);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.modal-close svg {
    width: 18px;
    height: 18px;
}

.modal-body {
    padding: 24px 28px 28px;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 28px 24px;
}


/* ============================================
   10. Forms
   ============================================ */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

select.form-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

select.form-input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.form-error {
    display: none;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: 0.8125rem;
    color: var(--accent-red);
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
}

.form-error.visible {
    display: block;
}

.form-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.form-footer a,
.form-footer button {
    color: var(--accent-blue);
    font-size: inherit;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.form-footer a:hover,
.form-footer button:hover {
    color: #60a5fa;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}


/* ============================================
   11. App Shell Navigation
   ============================================ */
.app-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.app-nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.app-logo {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    flex-shrink: 0;
    font-family: var(--font-display);
}

.app-tabs {
    display: flex;
    align-items: center;
    gap: 2px;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.tab:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.tab.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.tab svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.tab.active svg {
    opacity: 1;
}

.app-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Org Badge */
.org-badge {
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: 9999px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px 4px 4px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.user-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
}

.user-avatar {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-blue);
    font-size: 0.6875rem;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
    font-family: var(--font-display);
}

.user-trigger > span:last-of-type {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-trigger > svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all var(--transition-fast);
    z-index: 200;
    overflow: hidden;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-header span:first-child {
    font-size: 0.8125rem;
    font-weight: 500;
}

.role-badge {
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0;
}

.user-dropdown button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    font-size: 0.8125rem;
    text-align: left;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.user-dropdown button:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.user-dropdown button svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.user-dropdown button.logout {
    color: var(--accent-red);
}

.user-dropdown button.logout:hover {
    background: rgba(239, 68, 68, 0.08);
}


/* ============================================
   12. Search Box in Nav
   ============================================ */
.nav-search {
    position: relative;
    width: 240px;
}

.nav-search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.nav-search-input {
    padding-left: 32px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
    font-size: 0.8125rem !important;
    border-radius: var(--radius-sm) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

.nav-search-input:focus {
    background: var(--bg-input) !important;
}

.nav-search-input::placeholder {
    color: var(--text-muted);
}


/* ============================================
   13. Inventory Three-Panel Layout
   ============================================ */

/* App Content Wrapper */
#app {
    min-height: 100vh;
}

.inv-layout {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
    position: relative;
}


/* ============================================
   13a. Left Sidebar (Equipment Tree)
   ============================================ */
.inv-sidebar {
    width: 280px;
    min-width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inv-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.inv-sidebar-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.inv-sidebar-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.inv-icon-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    flex-shrink: 0;
    cursor: pointer;
    background: none;
    border: none;
}

.inv-icon-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.inv-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.inv-sidebar-body::-webkit-scrollbar {
    width: 4px;
}

.inv-sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.inv-sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.inv-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.14);
}

.inv-tree-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 0.8125rem;
    text-align: center;
}

.inv-sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.inv-stats {
    display: flex;
    gap: 2px;
}

.inv-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 4px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-xs);
}

.inv-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-blue);
    font-family: var(--font-display);
    line-height: 1;
}

.inv-stat-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}


/* ============================================
   13b. Tree Structure
   ============================================ */
.inv-tree-item {
    margin-bottom: 2px;
}

.inv-tree-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    user-select: none;
}

.inv-tree-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.inv-tree-header.selected {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.inv-tree-header.selected .inv-tree-label {
    color: var(--accent-blue);
    font-weight: 500;
}

.inv-tree-expand {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform var(--transition-fast);
}

.inv-tree-expand.expanded {
    transform: rotate(90deg);
}

.inv-tree-expand svg {
    width: 12px;
    height: 12px;
}

/* Placeholder for items with no children / leaf nodes */
.inv-tree-expand-placeholder {
    width: 18px;
    flex-shrink: 0;
}

.inv-tree-leaf {
    padding-left: 18px;
}

.inv-tree-icon {
    flex-shrink: 0;
    font-size: 0.875rem;
    line-height: 1;
    width: 18px;
    text-align: center;
}

.inv-tree-label {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.inv-tree-count {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    flex-shrink: 0;
    font-family: var(--font-display);
}

.inv-tree-children {
    margin-left: 18px;
    padding-left: 10px;
    border-left: 1px solid var(--border-color);
    display: none;
}

.inv-tree-children.expanded {
    display: block;
}

/* Tree hover actions */
.inv-tree-actions {
    display: flex;
    gap: 2px;
    opacity: 0;
    transition: opacity var(--transition-fast);
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
}

.inv-tree-header:hover .inv-tree-actions {
    opacity: 1;
}

.inv-tree-action {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    background: transparent;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    padding: 0;
}

.inv-tree-action:hover {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
}

.inv-tree-action.delete:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}


/* ============================================
   13c. Main Content Area
   ============================================ */
.inv-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

/* Breadcrumb */
.inv-breadcrumb {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 42px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.inv-breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.inv-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.inv-breadcrumb-item button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    transition: color var(--transition-fast);
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
}

.inv-breadcrumb-item button:hover {
    color: var(--accent-blue);
}

.inv-breadcrumb-item.current button {
    color: var(--text-primary);
    font-weight: 500;
    cursor: default;
}

.inv-breadcrumb-item.current button:hover {
    color: var(--text-primary);
}

.inv-breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
    user-select: none;
}

/* Content Area */
#contentArea {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

#contentArea::-webkit-scrollbar {
    width: 6px;
}

#contentArea::-webkit-scrollbar-track {
    background: transparent;
}

#contentArea::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

/* Panels */
.inv-panel {
    display: none;
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

.inv-panel.active {
    display: block;
}

.inv-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    gap: 16px;
}

.inv-panel-title-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.inv-panel-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.inv-panel-icon-tank {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
}

.inv-panel-icon-rack {
    background: rgba(139, 92, 246, 0.1);
    color: var(--accent-purple);
}

.inv-panel-icon-box {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-cyan);
}

.inv-panel-title {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    font-family: var(--font-display);
}

.inv-panel-subtitle {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.inv-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}


/* ============================================
   13d. Dashboard
   ============================================ */
.dash {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
}

/* Search */
.dash-search {
    position: relative;
    flex: 1;
}

.dash-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.dash-search-input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    font-size: 0.9375rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
    font-family: var(--font-base);
}

.dash-search-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--bg-card);
}

.dash-search-input::placeholder {
    color: var(--text-muted);
}

/* Stat cards row */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.dash-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
}

.dash-stat-tanks::before { background: var(--gradient-blue); }
.dash-stat-racks::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.dash-stat-boxes::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.dash-stat-vials::before { background: linear-gradient(90deg, #10b981, #34d399); }

.dash-stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dash-stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.dash-stat-tanks .dash-stat-icon { background: rgba(59, 130, 246, 0.1); color: var(--accent-blue); }
.dash-stat-racks .dash-stat-icon { background: rgba(139, 92, 246, 0.1); color: #a78bfa; }
.dash-stat-boxes .dash-stat-icon { background: rgba(245, 158, 11, 0.1); color: #fbbf24; }
.dash-stat-vials .dash-stat-icon { background: rgba(16, 185, 129, 0.1); color: #34d399; }

.dash-stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dash-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    line-height: 1;
    color: var(--text-primary);
}

.dash-stat-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Capacity bar */
/* Two-column layout */
.dash-columns {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 18px;
}

.dash-col-main,
.dash-col-side {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

/* Cards */
.dash-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 0;
}

.dash-card-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.dash-card-action {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent-blue);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-family: var(--font-base);
}

.dash-card-action:hover {
    text-decoration: underline;
}

.dash-card-body {
    padding: 14px 18px 18px;
}

.dash-empty {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-style: italic;
}

/* --- Storage Overview: Interactive Equipment Hierarchy --- */

.so-tree { font-size: 0.8125rem; }

/* Empty state */
.so-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    text-align: center;
}
.so-empty p { font-size: 0.8125rem; color: var(--text-muted); margin: 0; }

/* Indentation per level */
.so-node { position: relative; }
.so-lvl0 { padding-left: 0; }
.so-lvl1 > .so-row { padding-left: 8px; }
.so-lvl2 > .so-row { padding-left: 16px; }

/* The row shared by every level */
.so-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 6px;
    border-radius: 5px;
    cursor: pointer;
    transition: background var(--transition-fast);
    min-height: 32px;
}
.so-row:hover { background: rgba(255,255,255,0.04); }

/* Tree lines (vertical connector) */
.so-lvl1::before,
.so-lvl2::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255,255,255,0.06);
}
.so-lvl2::before { left: 22px; }

/* Chevron */
.so-chev {
    width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); flex-shrink: 0;
    transition: transform 0.15s ease;
    border-radius: 3px; padding: 0;
}
.so-chev:hover { color: var(--text-primary); background: rgba(255,255,255,0.06); }
.so-chev-empty { visibility: hidden; }
.so-chev.so-rotated { transform: rotate(90deg); }
.so-chev-sm { width: 16px; height: 16px; }

/* Icon cell */
.so-icon-cell {
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    font-size: 0.875rem;
    line-height: 1;
}
.so-icon-rack, .so-icon-box { color: var(--text-muted); display: flex; align-items: center; justify-content: center; }

/* Label */
.so-label {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

/* Grid tag (e.g. 10x10) */
.so-tag {
    font-size: 0.5625rem;
    font-family: var(--font-display);
    color: var(--accent-blue);
    background: rgba(59,130,246,0.1);
    padding: 1px 5px;
    border-radius: 3px;
    flex-shrink: 0;
    letter-spacing: 0.02em;
}

/* Meta info (counts) */
.so-meta {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-family: var(--font-display);
    flex-shrink: 0;
    white-space: nowrap;
}

/* Mini usage bar on boxes */
.so-minibar {
    width: 32px; height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    flex-shrink: 0;
}
.so-minibar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--accent-blue);
    transition: width 0.3s ease;
}

/* ── Action buttons: always visible ── */
.so-btns {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
    margin-left: 4px;
}

.so-btn {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    cursor: pointer;
    color: var(--text-muted);
    border-radius: 4px;
    padding: 0;
    transition: all var(--transition-fast);
}
.so-btn:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); border-color: rgba(255,255,255,0.12); }
.so-btn-add { color: var(--accent-blue); border-color: rgba(59,130,246,0.15); }
.so-btn-add:hover { background: rgba(59,130,246,0.15); color: var(--accent-blue); border-color: rgba(59,130,246,0.3); }
.so-btn-del { color: rgba(239,68,68,0.5); border-color: rgba(239,68,68,0.1); }
.so-btn-del:hover { background: rgba(239,68,68,0.12); color: #ef4444; border-color: rgba(239,68,68,0.25); }
.so-btn-edit { color: var(--text-muted); }

/* Collapsible children */
.so-kids {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    margin-left: 10px;
    border-left: 1px solid rgba(255,255,255,0.04);
}
.so-kids.so-open {
    max-height: 3000px;
}

/* "+ Add Rack" / "+ Add Box" inline rows */
.so-row-add {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px 5px 14px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--accent-blue);
    cursor: pointer;
    border-radius: 4px;
    transition: background var(--transition-fast);
    opacity: 0.65;
}
.so-row-add:hover { background: rgba(59,130,246,0.08); opacity: 1; }

/* "+ Add Tank" at bottom — root level */
.so-row-add-root {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    margin-top: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-blue);
    cursor: pointer;
    border: 1px dashed rgba(59,130,246,0.25);
    border-radius: 6px;
    transition: all var(--transition-fast);
}
.so-row-add-root:hover {
    background: rgba(59,130,246,0.06);
    border-color: rgba(59,130,246,0.4);
}

/* --- Gauge --- */
.dash-gauge {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto;
}

.dash-gauge-ring {
    width: 100%;
    height: 100%;
}

.dash-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dash-gauge-pct {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-primary);
    line-height: 1;
}

.dash-gauge-sub {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* --- Activity Feed --- */
.dash-activity-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dash-activity-item:last-child { border-bottom: none; }

.dash-activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.dash-activity-dot.create { background: var(--accent-green); }
.dash-activity-dot.update { background: var(--accent-blue); }
.dash-activity-dot.delete { background: var(--accent-red); }
.dash-activity-dot.withdraw { background: #f59e0b; }

.dash-activity-content {
    flex: 1;
    min-width: 0;
}

.dash-activity-text {
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.dash-activity-text strong {
    font-weight: 600;
}

.dash-activity-time {
    font-size: 0.6875rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* --- Team List --- */
.dash-team-member {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.dash-team-member:last-child { border-bottom: none; }

.dash-team-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 600;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.dash-team-name {
    font-size: 0.8125rem;
    color: var(--text-primary);
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-team-role {
    font-size: 0.625rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 9999px;
    text-transform: capitalize;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    flex-shrink: 0;
}

/* --- Quick Actions --- */
.dash-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-base);
}

.dash-action:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--accent-blue);
}

.dash-action svg {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: color var(--transition-fast);
}

.dash-action:hover svg {
    color: var(--accent-blue);
}


/* ============================================
   13e. Grid Panel (Box View) - THE HERO FEATURE
   ============================================ */

/* Occupancy Badge */
.inv-occupancy-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9999px;
    font-family: var(--font-display);
    margin-left: 10px;
}

/* Legend */
.inv-grid-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 0 4px;
}

.inv-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.inv-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.inv-legend-occupied {
    background: var(--gradient-blue);
}

.inv-legend-empty {
    border: 1.5px dashed rgba(255, 255, 255, 0.12);
    background: transparent;
}

.inv-legend-selected {
    background: var(--accent-green);
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.3);
}

/* Slot Grid Container */
.inv-slot-grid {
    display: inline-grid;
    gap: 3px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

/* Grid Row/Column Headers */
.inv-grid-row-header,
.inv-grid-col-header {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--text-muted);
    min-width: 30px;
    font-family: var(--font-display);
    user-select: none;
}

.inv-grid-col-header {
    min-height: 24px;
}

.inv-grid-corner {
    min-width: 30px;
    min-height: 24px;
}

/* Individual Slots */
.inv-grid-slot {
    position: relative;
    min-width: 68px;
    min-height: 68px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 6px 4px;
    gap: 2px;
}

/* Empty Slots */
.inv-grid-slot.empty {
    border: 1.5px dashed rgba(255, 255, 255, 0.08);
    background: transparent;
}

.inv-grid-slot.empty:hover {
    border-color: rgba(34, 197, 94, 0.3);
    background: rgba(34, 197, 94, 0.04);
}

.inv-grid-slot.empty .inv-slot-plus {
    display: none;
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--accent-green);
    line-height: 1;
}

.inv-grid-slot.empty:hover .inv-slot-plus {
    display: block;
}

/* Occupied Slots - THE STAR */
.inv-grid-slot.occupied {
    background: var(--gradient-blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.inv-grid-slot.occupied:hover {
    transform: scale(1.05);
    box-shadow:
        0 4px 16px rgba(59, 130, 246, 0.3),
        0 0 24px rgba(59, 130, 246, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* Selected Slot */
.inv-grid-slot.selected {
    background: linear-gradient(135deg, #16a34a 0%, #22c55e 50%, #4ade80 100%);
    border: 1px solid rgba(34, 197, 94, 0.4);
    color: white;
    transform: scale(1.05);
    box-shadow:
        0 4px 16px rgba(34, 197, 94, 0.3),
        0 0 24px rgba(34, 197, 94, 0.15),
        0 1px 3px rgba(0, 0, 0, 0.3);
    z-index: 3;
}

.inv-slot-name {
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.inv-slot-cell-type {
    font-size: 0.6rem;
    opacity: 0.8;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Slot Tooltip */
.inv-slot-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    font-size: 0.75rem;
    color: var(--text-primary);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 10;
}

.inv-slot-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--border-color);
}

.inv-grid-slot:hover .inv-slot-tooltip {
    opacity: 1;
}


/* ============================================
   13f. Tank & Rack Panel Views
   ============================================ */
.inv-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.inv-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    overflow: hidden;
}

.inv-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm), 0 0 20px rgba(59, 130, 246, 0.06);
}

.inv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.inv-card-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.inv-card-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.inv-card-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Progress bar for box cards */
.inv-card-progress {
    height: 4px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 12px;
}

.inv-card-progress-fill {
    height: 100%;
    background: var(--gradient-blue);
    border-radius: 2px;
    transition: width var(--transition-normal);
}

.inv-card-count {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
}

.inv-card-count span {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.inv-card-count strong {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-blue);
    font-family: var(--font-display);
}


/* ============================================
   13g. Right Sidebar (Vial Details)
   ============================================ */
.inv-details {
    width: 320px;
    min-width: 320px;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.inv-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.inv-details-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.inv-details-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.inv-details-body::-webkit-scrollbar {
    width: 4px;
}

.inv-details-body::-webkit-scrollbar-track {
    background: transparent;
}

.inv-details-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.inv-detail-field {
    margin-bottom: 16px;
}

.inv-detail-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.inv-detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.5;
    word-break: break-word;
}

.inv-detail-value.empty {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.875rem;
}

.inv-detail-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.inv-detail-empty-slot {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.inv-detail-empty-slot p {
    margin-bottom: 16px;
    color: var(--text-muted);
}

.inv-details-actions {
    display: flex;
    gap: 8px;
    padding: 14px 18px;
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}


/* ============================================
   14. Search Results Overlay
   ============================================ */
.search-overlay {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    z-index: 200;
    padding: 0 16px;
}

.search-overlay-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-height: 480px;
    display: flex;
    flex-direction: column;
}

.search-overlay-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.search-overlay-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-overlay-title svg {
    color: var(--text-muted);
}

.search-overlay-body {
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.08) transparent;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    transition: background var(--transition-fast);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-goto {
    flex-shrink: 0;
}

.search-empty {
    padding: 32px 18px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}


/* ============================================
   15. Inventory Modals
   ============================================ */
/* These reuse the standard .modal pattern */
/* Additional inventory-specific modal styling */

.inv-modal-content {
    background: var(--bg-card);
    max-width: 500px;
    width: 100%;
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    overflow: hidden;
}

.inv-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.inv-modal-body {
    padding: 20px 24px 24px;
}

.inv-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 0 24px 20px;
}


/* ============================================
   16. Toast Notifications
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease, fadeOutRight 0.3s ease 3.7s forwards;
    border-left: 3px solid var(--border-color);
}

.toast.success {
    border-left-color: var(--accent-green);
}

.toast.error {
    border-left-color: var(--accent-red);
}

.toast.info {
    border-left-color: var(--accent-blue);
}

.toast.warning {
    border-left-color: var(--accent-yellow);
}

.toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.info .toast-icon {
    color: var(--accent-blue);
}

.toast-message {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.toast-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border-radius: var(--radius-xs);
    transition: all var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}


/* ============================================
   17. Animations & Keyframes
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Staggered hero animations */
.hero-content > * {
    animation: slideUp 0.6s ease both;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.2s; }
.hero-content > *:nth-child(3) { animation-delay: 0.3s; }
.hero-content > *:nth-child(4) { animation-delay: 0.4s; }

/* Staggered feature card animations */
.feature-card {
    animation: slideUp 0.5s ease both;
}

.feature-card:nth-child(1) { animation-delay: 0.5s; }
.feature-card:nth-child(2) { animation-delay: 0.6s; }
.feature-card:nth-child(3) { animation-delay: 0.7s; }


/* ============================================
   18. Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}


/* ============================================
   19. Utility Classes
   ============================================ */
.muted {
    color: var(--text-muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 0.6875rem;
    font-weight: 500;
    border-radius: 9999px;
}

.text-center {
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Admin-only elements */
.admin-only {
    display: none;
}

/* Empty state (generic) */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.empty-state h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.empty-state .muted {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-top: 4px;
}

/* Tab content (legacy - for non-inventory tabs) */
.tab-content {
    display: none;
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

#appContent {
    padding-top: var(--nav-height);
    min-height: 100vh;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.04) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-sm);
}


/* ============================================
   20. Responsive - Tablet (<=1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Right sidebar slides in from right */
    .inv-details {
        position: fixed;
        top: var(--nav-height);
        right: -320px;
        bottom: 0;
        z-index: 90;
        transition: right var(--transition-normal);
        box-shadow: none;
    }

    .inv-details.open {
        right: 0;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    }

    /* Overlay behind right sidebar */
    .inv-details-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.4);
        z-index: 85;
    }

    .inv-details-overlay.active {
        display: block;
    }
}


/* ============================================
   21. Responsive - Mobile (<=768px)
   ============================================ */
@media (max-width: 768px) {
    /* Landing Hero */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        width: 100%;
    }

    /* Landing Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .feature-card {
        padding: 24px 20px;
    }

    /* Landing Nav */
    .landing-nav {
        padding: 0 16px;
    }

    .landing-features {
        padding: 40px 16px 80px;
    }

    /* App Nav Mobile */
    .app-nav {
        padding: 0 12px;
    }

    .app-nav-left {
        gap: 12px;
    }

    .app-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .app-tabs::-webkit-scrollbar {
        display: none;
    }

    .org-badge {
        display: none;
    }

    .user-trigger > span:last-of-type {
        display: none;
    }

    .user-dropdown {
        right: -8px;
    }

    /* Search box full width on mobile */
    .nav-search {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        width: 100%;
        padding: 8px 12px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        z-index: 99;
        display: none;
    }

    .nav-search.mobile-open {
        display: block;
    }

    .nav-search-input {
        width: 100% !important;
    }

    /* Mobile search toggle button */
    .mobile-search-toggle {
        display: inline-flex;
    }

    /* Left sidebar slides in from left */
    .inv-sidebar {
        position: fixed;
        top: var(--nav-height);
        left: -280px;
        bottom: 0;
        z-index: 90;
        transition: left var(--transition-normal);
        box-shadow: none;
    }

    .inv-sidebar.open {
        left: 0;
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
    }

    /* Overlay behind left sidebar */
    .inv-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        top: var(--nav-height);
        background: rgba(0, 0, 0, 0.4);
        z-index: 85;
    }

    .inv-sidebar-overlay.active {
        display: block;
    }

    /* Right sidebar also slides */
    .inv-details {
        position: fixed;
        top: var(--nav-height);
        right: -320px;
        bottom: 0;
        z-index: 90;
        transition: right var(--transition-normal);
    }

    .inv-details.open {
        right: 0;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
    }

    /* Content area adjustments */
    .inv-panel {
        padding: 16px;
    }

    .inv-breadcrumb {
        padding: 0 16px;
    }

    /* Slot grid adjustments */
    .inv-slot-grid {
        padding: 12px;
    }

    .inv-grid-slot {
        min-width: 52px;
        min-height: 52px;
    }

    .inv-slot-name {
        font-size: 0.6rem;
    }

    .inv-slot-cell-type {
        font-size: 0.55rem;
    }

    /* Form row single column */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Modal mobile */
    .modal {
        padding: 12px;
    }

    .modal-card {
        max-width: 100%;
    }

    .modal-card-wide {
        max-width: 100%;
    }

    .modal-header {
        padding: 20px 20px 0;
    }

    .modal-body {
        padding: 20px;
    }

    .modal-footer {
        padding: 0 20px 20px;
    }

    /* Tab content */
    .tab-content {
        padding: 24px 16px;
    }

    /* Dashboard responsive */
    .dash-columns {
        grid-template-columns: 1fr;
    }

    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash {
        padding: 16px;
        gap: 14px;
    }

    .dash-actions-grid {
        grid-template-columns: 1fr;
    }

    /* Card grid single column on small screens */
    .inv-card-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile sidebar toggle button (FAB) */
    .mobile-sidebar-toggle {
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gradient-blue);
        color: white;
        border: none;
        border-radius: 50%;
        box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3),
                    0 2px 4px rgba(0, 0, 0, 0.2);
        z-index: 80;
        cursor: pointer;
        transition: all var(--transition-fast);
    }

    .mobile-sidebar-toggle:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 24px rgba(59, 130, 246, 0.4),
                    0 2px 4px rgba(0, 0, 0, 0.2);
    }

    .mobile-sidebar-toggle:active {
        transform: scale(0.95);
    }

    .mobile-sidebar-toggle svg {
        width: 20px;
        height: 20px;
    }

    /* Toast container on mobile */
    .toast-container {
        bottom: 80px;
        right: 12px;
        left: 12px;
    }

    .toast {
        min-width: auto;
        max-width: 100%;
    }

    /* Dashboard mobile */
    .dash-stat-card {
        padding: 14px 12px;
        gap: 10px;
    }

    .dash-stat-value {
        font-size: 1.25rem;
    }
}

/* Hide mobile-only elements on desktop */
@media (min-width: 769px) {
    .mobile-sidebar-toggle {
        display: none;
    }

    .mobile-search-toggle {
        display: none;
    }
}

@media (min-width: 1025px) {
    .inv-details-overlay {
        display: none !important;
    }

    .inv-sidebar-overlay {
        display: none !important;
    }
}


/* ============================================
   22. Responsive - Small Mobile (<=380px)
   ============================================ */
@media (max-width: 380px) {
    .hero-badge {
        font-size: 0.6875rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .app-logo {
        font-size: 0.875rem;
    }

    .tab {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .tab svg {
        display: none;
    }

    .inv-grid-slot {
        min-width: 40px;
        min-height: 40px;
    }

    .inv-slot-name {
        font-size: 0.55rem;
    }

    .inv-slot-cell-type {
        display: none;
    }

    .inv-panel-title {
        font-size: 1.1rem;
    }

    .inv-panel {
        padding: 12px;
    }

    .inv-card-grid {
        gap: 10px;
    }

    .inv-card {
        padding: 14px;
    }

    .dash-stats {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .dash-stat-icon {
        width: 32px;
        height: 32px;
    }

    .dash-stat-icon svg {
        width: 16px;
        height: 16px;
    }

    .modal-header {
        padding: 16px 16px 0;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-footer {
        padding: 0 16px 16px;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}


/* ============================================
   31. Settings Modal
   ============================================ */

/* Tab bar */
.settings-tabs {
    display: flex;
    gap: 0;
    padding: 16px 28px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-tab {
    padding: 10px 20px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: -1px;
}

.settings-tab:hover {
    color: var(--text-secondary);
}

.settings-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-blue);
}

/* Invite form row */
.settings-invite-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.settings-invite-form .form-group {
    flex: 1 1 120px;
    min-width: 0;
}

.settings-invite-form .form-input {
    font-size: 0.8125rem;
    padding: 8px 10px;
}

/* Role select matching dark theme */
.settings-role-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2352525b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}

/* Members list container */
.settings-members-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Individual member row */
.settings-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.settings-member:hover {
    background: var(--bg-tertiary);
}

/* Avatar circle */
.settings-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient-subtle);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Name + email column */
.settings-member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.settings-member-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.settings-member-email {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Role badge */
.settings-member-role {
    font-size: 0.6875rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: capitalize;
}

/* Member action buttons */
.settings-member-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

/* Org settings fields */
.settings-org-field {
    margin-bottom: 18px;
}

/* Read-only display values */
.settings-readonly {
    font-size: 0.875rem;
    color: var(--text-muted);
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    user-select: all;
}

/* Panel visibility helper */
.settings-panel {
    /* inherits modal-body padding */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-invite-form {
        flex-direction: column;
    }

    .settings-invite-form .form-group {
        flex: 1 1 auto;
        width: 100%;
    }

    .settings-member {
        flex-wrap: wrap;
        gap: 8px;
    }

    .settings-member-info {
        flex: 1 1 60%;
    }
}


/* ============================================
   30. Demo Banner
   ============================================ */
.demo-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.97) 100%);
    border-top: 1px solid rgba(59, 130, 246, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 12px 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
}

.demo-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.demo-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.demo-banner-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 3px 10px;
    border-radius: 9999px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
    white-space: nowrap;
}

.demo-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.demo-banner-actions a {
    text-decoration: none;
}

/* Push app content up so banner doesn't overlap */
body.demo-mode .inv-layout {
    padding-bottom: 60px;
}

@media (max-width: 768px) {
    .demo-banner-inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .demo-banner-text {
        flex-direction: column;
        gap: 6px;
    }

    .demo-banner-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
}
