/* ============================================
   DESIGN TOKENS (merged from styles-tokens.css)
   ============================================ */
:root {
    /* Brand - modern SaaS blue scale */
    --color-brand-50: #eff6ff;
    --color-brand-100: #dbeafe;
    --color-brand-200: #bfdbfe;
    --color-brand-500: #3b82f6;
    --color-brand-600: #2563eb;
    --color-brand-700: #1d4ed8;
    --color-brand-800: #1e40af;
    --color-brand: var(--color-brand-600);

    /* Neutrals - expanded scale for subtle depth */
    --color-neutral-50: #f9fafb;
    --color-neutral-100: #f3f4f6;
    --color-neutral-200: #e5e7eb;
    --color-neutral-300: #d1d5db;
    --color-neutral-400: #9ca3af;
    --color-neutral-500: #6b7280;
    --color-neutral-600: #4b5563;
    --color-neutral-700: #374151;
    --color-neutral-800: #1f2937;
    --color-neutral-900: #111827;

    /* App layout - no background color, pure white */
    --color-app-bg: #ffffff;
    --color-header-bg: #ffffff;

    /* Surfaces - subtle depth via borders, not color */
    --color-surface: #ffffff;
    --color-surface-muted: #fafbfc;
    --color-surface-elevated: #ffffff;
    --color-surface-hover: #f9fafb;

    /* Text - refined hierarchy */
    --color-text: #0f172a;
    --color-text-secondary: #475569;
    --color-text-muted: #94a3b8;
    --color-text-inverse: #ffffff;
    
    /* State colors - flat, no gradients */
    --color-danger: #ef4444;
    --color-danger-hover: #dc2626;
    --color-warning: #f59e0b;
    --color-success: #10b981;
    --color-success-hover: #059669;
    --color-info: #0ea5e9;

    /* Borders & effects - modern, subtle */
    --color-border: #e2e8f0;
    --color-border-strong: #cbd5e1;
    --color-border-muted: #f1f5f9;
    
    /* Focus & interaction */
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, 0.15);
    --focus-ring-danger: 0 0 0 3px rgba(239, 68, 68, 0.15);
    --glow-brand: 0 0 0 1px rgba(37, 99, 235, 0.1), 0 4px 16px rgba(37, 99, 235, 0.08);
    --glow-brand-strong: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 8px 24px rgba(37, 99, 235, 0.12);
    
    /* Shadows - subtle depth */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-soft: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-medium: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-strong: 0 16px 48px rgba(15, 23, 42, 0.12);

    /* Spacing (8px scale) */
    --space-0: 0;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-7: 32px;
    --space-8: 40px;
    --space-10: 48px;
    --space-12: 56px;
    --space-16: 64px;

    /* Radii - slightly larger for modern feel */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Typography */
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    
    /* Line heights for better readability */
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    --leading-loose: 2;
}

/* Safe-area utilities (for devices with notches) */
.pad-top-safe { padding-top: max(var(--space-3), env(safe-area-inset-top)); }
.pad-bottom-safe { padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }

/* Dark mode disabled to keep desktop styling everywhere */

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff !important;
    color: var(--color-text, #0f172a);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container Styles */
.container {
    width: 100%;
    max-width: 500px;
}

/* Login Container */
.login-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 18px);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-container h1 {
    color: var(--color-text);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: center;
    letter-spacing: -0.02em;
}

.login-container h2 {
    color: var(--color-text);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: -0.01em;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    z-index: 10;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text-muted);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.tab-btn:hover:not(.active) {
    color: var(--color-text-secondary);
}

.tab-btn.active {
    color: var(--color-brand);
    border-bottom-color: var(--color-brand);
}

.tab-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    font-size: 16px;
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:hover:not(:focus) {
    border-color: var(--color-border-strong);
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--focus-ring);
}

/* Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md, 10px);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: var(--color-brand);
    color: var(--color-text-inverse);
    width: 100%;
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover:not(:disabled) {
    background: var(--color-brand-700);
    box-shadow: var(--shadow-sm);
}

.btn-primary:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-primary:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Button Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: rotate 2s linear infinite;
}

.spinner .path {
    stroke: currentColor;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }
    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }
    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-brand);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--color-surface-hover);
    border-color: var(--color-border-strong);
}

.btn-secondary:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Error Message */
.error-message {
    color: var(--color-danger);
    font-size: 14px;
    margin-top: 15px;
    padding: 10px 12px;
    background: rgba(239, 68, 68, 0.05);
    border-radius: var(--radius-sm, 6px);
    border-left: 3px solid var(--color-danger);
}

/* Tech Dashboard */
.tech-dashboard {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 18px);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    animation: slideUp 0.3s ease-out;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 15px;
}

.dashboard-header h1 {
    color: var(--color-text);
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: var(--color-text-secondary);
    font-size: 14px;
}

/* Support Code Section */
.support-code-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 14px);
    padding: 30px;
    margin-bottom: 30px;
}

.support-code-section h2 {
    color: var(--color-text);
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.code-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.code-value {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: 8px;
    padding: 20px 40px;
    background: var(--color-brand-50);
    color: var(--color-brand);
    border: 1px solid var(--color-brand-200);
    border-radius: var(--radius-lg, 14px);
    min-width: 280px;
    text-align: center;
    font-family: var(--font-mono);
}

.code-value.active {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.code-info {
    color: var(--color-text-secondary);
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* Waiting Section */
.waiting-section {
    text-align: center;
    padding: 30px;
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    margin-bottom: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-brand);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.waiting-section p {
    color: var(--color-text-secondary);
    font-size: 16px;
}

/* Session Log */
.session-log {
    margin-top: 30px;
}

.session-log h3 {
    color: var(--color-text);
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
}

.session-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-data {
    color: var(--color-text-muted);
    text-align: center;
    padding: 40px;
    font-style: italic;
}

/* Session Table */
.session-table {
    width: 100%;
    border-collapse: collapse;
}

.session-table th {
    background: var(--color-surface-muted);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-secondary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 1px solid var(--color-border);
}

.session-table td {
    padding: 12px;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
    color: var(--color-text);
}

.session-table tr:hover {
    background: var(--color-surface-hover);
}

.status {
    padding: 4px 12px;
    border-radius: var(--radius-full, 9999px);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
}

.status.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--color-warning);
}

/* Permission Screen */
.permission-screen {
    width: 100vw;
    min-height: 100vh;
    background: var(--color-app-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.permission-container {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 18px);
    box-shadow: var(--shadow-soft);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

.permission-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.permission-container h1 {
    color: var(--color-text);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

.permission-container > p {
    color: var(--color-text-secondary);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Permission Status Display */
.permission-status {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg, 14px);
    padding: 20px;
    margin-bottom: 30px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    text-align: left;
}

.status-item:last-child {
    margin-bottom: 0;
}

.status-icon {
    font-size: 24px;
    min-width: 24px;
}

.status-text {
    flex: 1;
    color: var(--color-text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.status-text span {
    font-weight: 600;
    color: var(--color-text);
}

/* Button Styles for Permission Screen */
.btn-large {
    width: 100%;
    padding: 16px 24px;
    font-size: 18px;
    margin-bottom: 15px;
}

.btn-icon {
    font-size: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

.btn-success {
    background: var(--color-success);
    color: var(--color-text-inverse);
    box-shadow: var(--shadow-xs);
}

.btn-success:hover:not(:disabled) {
    background: var(--color-success-hover);
    box-shadow: var(--shadow-sm);
}

.btn-success:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

/* Permission Help Section */
.permission-help {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-lg, 14px);
    padding: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.permission-help p {
    margin-bottom: 10px;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.permission-help strong {
    color: var(--color-text);
    font-size: 16px;
    font-weight: 600;
}

.permission-help ol {
    margin: 10px 0 15px 20px;
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.8;
}

.permission-help ol li {
    margin-bottom: 5px;
}

/* Call Container - Full Screen */
.call-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh; /* Fallback */
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    background: #000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: none; /* Prevent pull-to-refresh on mobile */
}

body:has(.call-container) {
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Video Container - Takes all available space */
.video-container {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Remote video fills the container */
#remote-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1a1a1a;
}

/* Frozen canvas should match video styling to preserve aspect ratio */
#frozen-canvas {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #1a1a1a;
    display: block;
}

/* Remote Video Off Overlay */
.remote-video-off-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}

.remote-video-off-overlay .overlay-content {
    text-align: center;
    color: white;
}

.remote-video-off-overlay .overlay-logo {
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.remote-video-off-overlay .overlay-text {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Remote Audio Muted Indicator */
.remote-audio-muted {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 15;
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Local video - Picture in Picture */
.local-video-pip {
    position: absolute;
    top: 20px;
    right: 20px;
    width: clamp(120px, 25vw, 200px);
    height: clamp(90px, 18.75vw, 150px);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 10;
    border: 3px solid rgba(255, 255, 255, 0.2);
    background: #1a1a1a;
    transition: all 0.3s ease;
}

#local-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    pointer-events: none;
}

/* Bottom Toolbar */
.toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 12px 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom)); /* Safe area for iPhone notch */
    z-index: 100;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 60px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    color: white;
}

/* Hide tech-only buttons by default - only shown via JavaScript for tech users */
.toolbar-btn.tech-only {
    display: none !important;
}

.toolbar-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.2);
}

/* Muted/Off state - Red background */
.toolbar-btn.muted,
.toolbar-btn.off {
    background: rgba(255, 59, 48, 0.3);
    border-color: rgba(255, 59, 48, 0.5);
}

.toolbar-btn.muted:hover,
.toolbar-btn.off:hover {
    background: rgba(255, 59, 48, 0.4);
}

.toolbar-btn.muted:active,
.toolbar-btn.off:active {
    background: rgba(255, 59, 48, 0.5);
    transform: scale(0.95);
}

/* Flashlight button states */
.toolbar-btn.flashlight-on {
    background: rgba(255, 204, 0, 0.3);
    border-color: rgba(255, 204, 0, 0.6);
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.5);
}

.toolbar-btn.flashlight-on:hover {
    background: rgba(255, 204, 0, 0.4);
}

.toolbar-btn.flashlight-on:active {
    background: rgba(255, 204, 0, 0.5);
}

.toolbar-btn.flashlight-off {
    opacity: 0.6;
}

.toolbar-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.toolbar-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toolbar-btn.muted,
.toolbar-btn.off {
    background: rgba(239, 68, 68, 0.8);
}

.toolbar-btn.leave-btn {
    background: rgba(239, 68, 68, 0.9);
}

.toolbar-btn.leave-btn:active {
    background: rgba(220, 38, 38, 1);
}

/* Chat Badge */
.chat-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #ef4444;
    color: white;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 5px;
}

/* Status Header Bar */
.status-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.85));
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    padding-top: max(12px, env(safe-area-inset-top));
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 110;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-label {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.header-code {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 2px;
    font-family: 'Courier New', monospace;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-name {
    font-weight: 600;
    color: white;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.header-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
    font-size: 18px;
    transition: all 0.2s;
}

.header-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.header-link:active {
    transform: scale(0.95);
}

/* Connection Status */
.connection-status {
    position: absolute;
    top: 70px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border-radius: 20px;
    z-index: 20;
    pointer-events: none;
}

/* Video Overlay Controls */
.video-overlay-btn {
    position: absolute;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 25;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.video-overlay-btn:active {
    transform: scale(0.9);
    background: rgba(0, 0, 0, 0.85);
}

.video-overlay-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    transform: scale(1.05);
}

.video-overlay-left {
    left: 20px;
}

.video-overlay-right {
    right: 20px;
}

.overlay-icon {
    font-size: 28px;
    line-height: 1;
}

/* When flashlight is on */
.video-overlay-btn.flashlight-on {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}


/* Chat Window */
.chat-window {
    position: fixed;
    background: rgba(20, 20, 20, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    z-index: 105;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.chat-window.open {
    transform: translateY(0);
}

/* Default: Bottom drawer for mobile */
.chat-window {
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    max-height: 50vh;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
}

.chat-title {
    color: white;
    font-weight: 600;
    font-size: 16px;
}

.chat-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.chat-close:active {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 12px;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.mine {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.message-avatar.remote {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-text {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    border-radius: 16px;
    color: white;
    word-wrap: break-word;
    font-size: 14px;
    line-height: 1.4;
}

.chat-message.mine .message-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message-time {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    padding: 0 4px;
}

/* Chat Error Notification */
.chat-error-notification {
    padding: 8px 12px;
    background: rgba(255, 59, 48, 0.2);
    border: 1px solid rgba(255, 59, 48, 0.4);
    border-radius: 8px;
    color: #ff3b30;
    font-size: 13px;
    text-align: center;
    margin: 8px 0;
    transition: opacity 0.3s ease;
}

.chat-input-container {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    align-items: flex-end;
}

#chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 10px 16px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    max-height: 150px;
    line-height: 1.4;
}

#chat-input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.15);
}

#chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.chat-send-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    align-self: flex-end;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.chat-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#chat-input:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Chat Notification Bubble */
.chat-bubble {
    position: fixed;
    bottom: 100px;
    right: 20px;
    max-width: 280px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 102;
    animation: bubbleSlide 0.3s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-bubble.bubble-animate {
    animation: bubblePulse 0.5s ease;
}

.chat-bubble:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

@keyframes bubbleSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bubblePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.bubble-content {
    font-size: 14px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fbbf24;
    animation: blink 1.5s infinite;
}

.status-dot.connected {
    background: #10b981;
    animation: none;
}

.status-dot.error {
    background: #ef4444;
}

.status-dot.warning {
    background: #fbbf24;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.status-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* ============================================
   WAITING MODAL - User Disconnected
   ============================================ */
.waiting-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.waiting-modal-content {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.3s ease-out;
}

.waiting-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.waiting-modal h2 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.waiting-modal p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-bottom: 30px;
}

.waiting-code {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 30px;
}

.waiting-code-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.waiting-code-value {
    color: white;
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 4px;
    font-family: 'Courier New', monospace;
}

.btn-danger {
    background: var(--color-danger);
    color: var(--color-text-inverse);
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md, 10px);
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-xs);
}

.btn-danger:hover:not(:disabled) {
    background: var(--color-danger-hover);
    box-shadow: var(--shadow-sm);
}

.btn-danger:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-danger:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring-danger);
}

/* ============================================
   SMS INVITATION MODAL STYLES
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl, 18px);
    box-shadow: var(--shadow-strong);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    color: var(--color-text);
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.modal-close:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    font-size: 16px;
    background: var(--color-surface);
    color: var(--color-text);
    transition: all 0.2s ease;
}

.form-input:hover:not(:focus) {
    border-color: var(--color-border-strong);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-brand);
    box-shadow: var(--focus-ring);
}

.form-group small {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-top: 6px;
}

.sms-preview {
    background: var(--color-surface-muted);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md, 10px);
    padding: 16px;
    margin-top: 20px;
}

.sms-preview strong {
    display: block;
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.preview-text {
    color: var(--color-text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--color-border);
    justify-content: flex-end;
}

.btn-success:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Code actions container */
.code-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Manual Instructions (when SMS is disabled) */
.manual-instructions {
    background: #f8f9fa;
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    margin-top: 10px;
    text-align: left;
}

.manual-instructions p {
    margin-bottom: 12px;
    color: #333;
}

.manual-instructions ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.manual-instructions ol li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.6;
}

.manual-instructions .quick-copy {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #e0e0e0;
}

.manual-instructions .copy-box {
    background: #e8f4fd;
    border-left: 4px solid #667eea;
    padding: 12px 16px;
    margin-top: 10px;
    border-radius: 4px;
}

.manual-instructions .copy-box p {
    margin: 0;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
}

/* Phone input with +1 prefix */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.phone-prefix {
    font-size: 16px;
    font-weight: 600;
    color: #667eea;
    padding: 12px 12px 12px 0;
    white-space: nowrap;
}

.phone-input {
    flex: 1;
}

/* SMS Status messages */
.sms-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sms-status-sending {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    color: #1565c0;
}

.sms-status-success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.sms-status-error {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

/* Email status styles */
.email-status {
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 14px;
    font-weight: 500;
}

.email-status-sending {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    color: #1565c0;
}

.email-status-success {
    background: #e8f5e9;
    border: 2px solid #4caf50;
    color: #2e7d32;
}

.email-status-error {
    background: #ffebee;
    border: 2px solid #f44336;
    color: #c62828;
}

/* ============================================
   RESPONSIVE STYLES
   Note: Mobile and Desktop styles are loaded
   dynamically from styles-mobile.css or 
   styles-desktop.css based on device detection
   ============================================ */





/* OR Divider shared styles */
.or-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.or-divider-line {
    border-top: 1px solid var(--color-border, #e2e8f0);
    position: relative;
    margin: 20px 0;
}

.or-divider-label {
    background: var(--color-surface, #ffffff);
    padding: 0 12px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--color-text-muted, #6b7280);
    font-size: 13px;
}

/* Google button shared baseline (refined by theme/mobile) */
.google-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

/* Forgot link wrapper */
.forgot-wrapper {
    text-align: center;
    margin-top: 15px;
}

.forgot-wrapper a {
    color: var(--color-brand, #2563eb);
    text-decoration: none;
    font-size: 14px;
}




/* ============================================
   THEME STYLES (merged from styles-theme.css)
   ============================================ */
.btn,
.header-btn,
.plan-cta,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-white,
.btn-outline-white {
    font-family: var(--font-body);
    border-radius: var(--radius-md);
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.btn:focus-visible,
.header-btn:focus-visible,
.plan-cta:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.btn-danger:focus-visible,
.btn-success:focus-visible,
.btn-white:focus-visible,
.btn-outline-white:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.btn:active,
.header-btn:active { transform: scale(0.98); }

.btn-primary,
.btn.btn-primary { background: var(--color-brand); color: var(--color-text-inverse); box-shadow: var(--shadow-xs); }
.btn-primary:hover:not(:disabled),
.btn.btn-primary:hover:not(:disabled) { background: var(--color-brand-700); box-shadow: var(--shadow-sm); }

.btn-secondary,
.btn.btn-secondary { background: var(--color-surface); color: var(--color-brand); border: 1px solid var(--color-border); }
.btn-secondary:hover:not(:disabled),
.btn.btn-secondary:hover:not(:disabled) { background: var(--color-surface-hover); border-color: var(--color-border-strong); }

.btn-danger,
.btn.btn-danger { background: var(--color-danger); color: var(--color-text-inverse); box-shadow: var(--shadow-xs); }
.btn-danger:hover:not(:disabled),
.btn.btn-danger:hover:not(:disabled) { background: var(--color-danger-hover); box-shadow: var(--shadow-sm); }

.btn-success,
.btn.btn-success { background: var(--color-success); color: var(--color-text-inverse); box-shadow: var(--shadow-xs); }
.btn-success:hover:not(:disabled),
.btn.btn-success:hover:not(:disabled) { background: var(--color-success-hover); box-shadow: var(--shadow-sm); }

.btn:disabled,
.header-btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }

.tab-navigation { border-bottom: 1px solid var(--color-border); }
.tab-btn { color: var(--color-text-muted); font-weight: 500; transition: color 0.15s ease, border-color 0.15s ease; }
.tab-btn:hover:not(.active) { color: var(--color-text-secondary); }
.tab-btn.active { color: var(--color-brand); border-bottom-color: var(--color-brand); }

.form-group label { color: var(--color-text-secondary); font-weight: 500; font-size: 14px; }
.form-group input,
.form-input,
textarea#chat-input { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text); transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.form-group input:hover:not(:focus),
.form-input:hover:not(:focus) { border-color: var(--color-border-strong); }
.form-group input:focus,
.form-input:focus,
textarea#chat-input:focus { border-color: var(--color-brand); box-shadow: var(--focus-ring); outline: none; }

.error-message { color: var(--color-danger); background: rgba(239, 68, 68, 0.05); border-left: 3px solid var(--color-danger); border-radius: var(--radius-sm); }

.login-container,
.tech-dashboard,
.profile-card,
.transaction-list,
.modal-content { background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--shadow-soft); border-radius: var(--radius-lg); }

.session-table th { background: var(--color-surface-muted); color: var(--color-text-secondary); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
.session-table td { color: var(--color-text); }
.session-table tr:nth-child(even) td { background: var(--color-surface-muted); }
.session-table tbody tr:hover td { background: var(--color-surface-hover); }

.site-header { background: var(--color-header-bg) !important; border-bottom: 1px solid var(--color-border) !important; }

.support-code-section { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.code-value { background: var(--color-brand-50); color: var(--color-brand); border: 1px solid var(--color-brand-200); font-family: var(--font-mono); }
.current-plan-card { background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border); box-shadow: var(--shadow-soft); }

body.page-index { background: var(--color-app-bg); min-height: 100vh; }
body.page-index .login-container { background: var(--color-surface); border: 1px solid var(--color-border); box-shadow: var(--glow-brand), var(--shadow-soft); border-radius: var(--radius-xl); padding: var(--space-8) var(--space-6); max-width: 480px; margin: 0 auto; }
body.page-index .tab-navigation { margin-bottom: var(--space-6); gap: var(--space-2); }
body.page-index .tab-btn { padding: var(--space-4) var(--space-3); font-size: 15px; border-bottom-width: 2px; }
body.page-index .tab-content h2 { font-size: 24px; font-weight: 600; color: var(--color-text); margin-bottom: var(--space-6); letter-spacing: -0.02em; }
body.page-index .form-group { margin-bottom: var(--space-5); }
body.page-index .form-group label { font-size: 14px; color: var(--color-text-secondary); margin-bottom: var(--space-2); display: block; }
body.page-index .form-group input { height: 50px; padding: var(--space-3) var(--space-4); background: var(--color-surface); border: 1px solid var(--color-border); font-size: 15px; }
body.page-index .form-group input:hover:not(:focus) { border-color: var(--color-border-strong); }
body.page-index .form-group input:focus { outline: none; border-color: var(--color-brand); box-shadow: var(--focus-ring); }
body.page-index .btn.btn-primary { height: 50px; font-size: 16px; font-weight: 600; width: 100%; }
body.page-index .or-divider { margin: var(--space-6) 0; }
body.page-index .or-divider-line { border-top-color: var(--color-border); }
body.page-index .or-divider-label { background: var(--color-surface) !important; color: var(--color-text-muted); font-size: 13px; }
body.page-index .google-btn { height: 50px; border: 1px solid var(--color-border); background: var(--color-surface); }
body.page-index .google-btn:hover:not(:disabled) { border-color: var(--color-border-strong); background: var(--color-surface-hover); }
body.page-index .container > div:last-child { margin-top: var(--space-6); }
body.page-index .container > div:last-child p { color: var(--color-text-muted) !important; }
body.page-index .container > div:last-child a { color: var(--color-brand) !important; text-decoration: none; font-weight: 600; transition: color 0.15s ease; }
body.page-index .container > div:last-child a:hover { color: var(--color-brand-700) !important; text-decoration: underline; }

.site-name { letter-spacing: -0.02em; font-weight: 600; }
#header-support-code { border: 1px solid var(--color-border); background: var(--color-brand-50); color: var(--color-brand); }

.chat-bubble { background: var(--color-brand); box-shadow: var(--shadow-medium); border: 1px solid rgba(255, 255, 255, 0.1); }
.chat-message .message-text { backdrop-filter: blur(8px); }
.chat-window { border: 1px solid var(--color-border); }

.toolbar-btn,
.video-overlay-btn { background: var(--color-surface); border: 1px solid var(--color-border); color: var(--color-text); }
.toolbar-btn:focus-visible,
.video-overlay-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.toolbar-btn:hover:not(:disabled),
.video-overlay-btn:hover { background: var(--color-surface-hover); border-color: var(--color-border-strong); }
.toolbar-btn.muted,
.toolbar-btn.off { background: rgba(239, 68, 68, 0.1); border-color: var(--color-danger); color: var(--color-danger); }
.toolbar-btn.muted .toolbar-icon,
.toolbar-btn.off .toolbar-icon { filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.4)); }
.video-overlay-btn.flashlight-on { background: rgba(251, 191, 36, 0.2); border-color: var(--color-warning); box-shadow: 0 0 16px rgba(251, 191, 36, 0.4), var(--shadow-soft); }
.toolbar-btn.leave-btn { background: var(--color-danger); border-color: var(--color-danger); color: var(--color-text-inverse); }
.toolbar-btn.leave-btn:hover:not(:disabled) { background: var(--color-danger-hover); }

.chat-messages { -webkit-overflow-scrolling: touch; }
.chat-badge { background: var(--color-danger); color: var(--color-text-inverse); font-weight: 700; }

.modal { backdrop-filter: blur(4px); }
.modal-content { border: 1px solid var(--color-border); }
.modal-header { border-bottom-color: var(--color-border); }
.modal-footer { border-top-color: var(--color-border); }

.status { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px; border-radius: var(--radius-full); }
.status.completed { background: rgba(16, 185, 129, 0.1); color: var(--color-success); }
.status.active { background: rgba(245, 158, 11, 0.1); color: var(--color-warning); }

.u-safe-bottom { padding-bottom: max(var(--space-3), env(safe-area-inset-bottom)); }
.u-safe-top { padding-top: max(var(--space-3), env(safe-area-inset-top)); }

@media (prefers-reduced-motion: reduce) {
    .btn, .header-btn, .plan-cta, * { transition: none !important; animation: none !important; }
}

/* ============================================
   DESKTOP OVERRIDES (merged from styles-desktop.css)
   ============================================ */
.chat-window { top: 0; bottom: 0; left: auto; right: 0; width: 400px; height: 100%; max-height: 100%; border-radius: 0; border-left: 1px solid var(--color-border, rgba(0,0,0,0.1)); border-top-left-radius: 0; border-top-right-radius: 0; transform: translateX(100%); }
.chat-window.open { transform: translateX(0); }
.chat-header::before { display: none; }
.chat-header { cursor: default; touch-action: auto; }
.video-container.chat-active { margin-right: 400px; }
.toolbar.chat-active { right: 400px; left: 0; width: calc(100% - 400px); }
.chat-bubble { bottom: 120px; right: 20px; }
.local-video-pip { top: 20px; right: 20px; left: auto; width: clamp(120px, 25vw, 200px); height: clamp(90px, 18.75vw, 150px); }
.connection-status { top: 20px; left: 20px; right: auto; }
.video-overlay-btn { width: 56px; height: 56px; bottom: 20px; }
.video-overlay-left { left: 20px; }
.video-overlay-right { right: 20px; }
.overlay-icon { font-size: 28px; }
.status-header { padding: 12px 20px; padding-top: max(12px, env(safe-area-inset-top)); font-size: 14px; background: var(--color-header-bg, #ffffff); border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.1)); color: var(--color-text, #111827); }
.header-code { font-size: 16px; padding: 4px 12px; letter-spacing: 2px; }
.header-name { max-width: 150px; }
.header-link { width: 32px; height: 32px; }
.toolbar { padding: 12px 8px; padding-bottom: max(12px, env(safe-area-inset-bottom)); background: var(--color-header-bg, #ffffff); border-top: 1px solid var(--color-border, rgba(0,0,0,0.1)); }
.toolbar-btn { padding: 12px 16px; min-width: 60px; }
.toolbar-icon { font-size: 24px; margin-bottom: 4px; }
.toolbar-label { font-size: 11px; }
.toolbar-btn.muted, .toolbar-btn.off { background: rgba(255, 59, 48, 0.3); border-color: rgba(255, 59, 48, 0.5); }
.toolbar-btn.muted:hover, .toolbar-btn.off:hover { background: rgba(255, 59, 48, 0.4); }
.toolbar-btn.muted:active, .toolbar-btn.off:active { background: rgba(255, 59, 48, 0.5); transform: scale(0.95); }
.chat-messages { padding: 16px; gap: 12px; }
.message-avatar { width: 32px; height: 32px; font-size: 14px; }
.message-text { font-size: 14px; padding: 10px 14px; border-radius: 16px; }
.message-time { font-size: 11px; }
.chat-input-container { padding: 16px; gap: 12px; }
#chat-input { font-size: 14px; min-height: 60px; border-radius: 16px; padding: 10px 16px; }
.chat-send-btn { width: 48px; height: 48px; font-size: 20px; }
.chat-title { font-size: 16px; }
.chat-close { width: 32px; height: 32px; font-size: 20px; }
.login-container, .tech-dashboard { padding: 40px; border-radius: 16px; min-height: auto; }
.dashboard-header { flex-direction: row; align-items: center; }
.code-value { font-size: 48px; letter-spacing: 8px; padding: 20px 40px; }
.permission-container { padding: 40px; border-radius: 16px; }
.permission-icon { font-size: 72px; }
.permission-container h1 { font-size: 28px; }
.permission-help { padding: 20px; }
.permission-help ol { font-size: 14px; }
.session-table { font-size: 14px; }
.session-table th, .session-table td { padding: 12px; }

/* ============================================
   MOBILE OVERRIDES (merged from styles-mobile.css)
   ============================================ */
@media (max-width: 768px) {
html, body { overflow: hidden; position: fixed; width: 100%; height: 100%; -webkit-overflow-scrolling: touch; margin: 0; padding: 0; background: var(--color-app-bg, #ffffff) !important; }
body:has(.call-container) { overflow: hidden; position: fixed; width: 100%; height: 100%; }
html:has(body.page-index) { overflow: auto; position: static; height: auto; }
html:has(body.page-profile) { overflow-x: hidden; overflow-y: auto; position: static; height: auto; }
html:has(body.page-billing) { overflow-x: hidden; overflow-y: auto; position: static; height: auto; }
html:has(body.page-tech) { overflow-x: hidden; overflow-y: auto; position: static; height: auto; }
body.page-index { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow: auto; position: static; height: auto; background: var(--color-app-bg, #ffffff) !important; }
body.page-index .container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; padding-top: calc(70px + env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); width: 100%; box-sizing: border-box; background: var(--color-app-bg, #ffffff) !important; }
body.page-index .login-container, body.page-index .tech-dashboard { width: 100%; max-width: 100%; margin: 0; box-sizing: border-box; background: var(--color-surface, #ffffff) !important; border: 1px solid var(--color-border, #e2e8f0); border-radius: var(--radius-xl, 18px); box-shadow: var(--glow-brand), var(--shadow-soft); padding: var(--space-7, 32px) var(--space-6, 24px); }
/* Tech page safe areas and spacing */
body.page-tech { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; position: static; height: auto; background: var(--color-app-bg, #ffffff) !important; }
body.page-tech .container { flex: 1; display: flex; flex-direction: column; gap: 16px; padding: 16px; padding-top: calc(70px + env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); width: 100%; box-sizing: border-box; }
body.page-profile { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; position: static; height: auto; background: var(--color-app-bg, #ffffff) !important; }
body.page-billing { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; overflow-x: hidden; overflow-y: auto; position: static; height: auto; background: var(--color-app-bg, #ffffff) !important; }
@media (max-height: 700px) { body.page-index .login-container { padding: 16px !important; } body.page-index .tab-navigation { margin-bottom: 12px !important; } .tab-btn { padding: 10px 8px !important; font-size: 15px !important; } #support-tab .form-group, #tech-tab .form-group { margin-bottom: 10px !important; } #support-tab .btn.btn-primary, #tech-tab .btn.btn-primary { height: 44px !important; font-size: 15px !important; padding: 10px 12px !important; } #tech-tab .or-divider { margin: 8px 0 !important; } #tech-tab .google-btn { height: 40px !important; font-size: 13px !important; gap: 6px !important; padding: 0 10px !important; } }
.status-header { position: fixed; top: 0; left: 0; right: 0; padding: 12px 16px; padding-top: max(12px, env(safe-area-inset-top)); font-size: 13px; background: var(--color-surface, #ffffff); border-bottom: 1px solid var(--color-border, #e2e8f0); box-shadow: var(--shadow-xs); z-index: 100; display: flex; justify-content: space-between; align-items: center; color: var(--color-text, #0f172a); }
.header-left { display: flex; align-items: center; gap: 6px; }
.header-label { font-size: 11px; color: var(--color-text-muted, #94a3b8); }
.header-code { font-size: 16px; font-weight: 700; padding: 4px 10px; background: var(--color-brand-50, #eff6ff); color: var(--color-brand, #2563eb); border: 1px solid var(--color-brand-200, #bfdbfe); border-radius: var(--radius-md, 10px); letter-spacing: 2px; font-family: var(--font-mono); }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-name { max-width: 100px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-text, #0f172a); }
.header-link { width: 32px; height: 32px; font-size: 18px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--color-surface-muted, #f9fafb); border: 1px solid var(--color-border, #e2e8f0); color: var(--color-text, #0f172a); transition: background 0.2s ease; }
.header-link:hover { background: var(--color-surface-hover, #f3f4f6); }
.local-video-pip { position: fixed; top: 60px; right: 12px; left: auto; width: 100px; height: 140px; border-radius: 12px; border: 2px solid var(--color-border, #e2e8f0); box-shadow: var(--shadow-soft); z-index: 50; overflow: hidden; background: var(--color-surface-muted, #f9fafb); }
.local-video-pip video { width: 100%; height: 100%; object-fit: cover; }
.local-label { font-size: 10px; padding: 3px 8px; background: var(--color-surface, #ffffff); color: var(--color-text, #0f172a); border: 1px solid var(--color-border, #e2e8f0); }
.connection-status { position: fixed; top: 60px; left: 12px; right: auto; font-size: 12px; padding: 6px 10px; background: var(--color-surface, #ffffff); border: 1px solid var(--color-border, #e2e8f0); border-radius: var(--radius-md, 10px); box-shadow: var(--shadow-sm); color: var(--color-text, #0f172a); z-index: 40; }
.video-overlay-btn { position: fixed !important; width: 52px; height: 52px; bottom: 85px; background: var(--color-surface); backdrop-filter: blur(10px); border: 1px solid var(--color-border); border-radius: 50%; color: var(--color-text); display: flex !important; align-items: center; justify-content: center; cursor: pointer; z-index: 100 !important; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; box-shadow: var(--shadow-soft); pointer-events: auto !important; }
.video-overlay-left { left: 16px; }
.video-overlay-right { right: 16px; }
.overlay-icon { font-size: 28px; }
.video-overlay-btn:active { transform: scale(0.9); background: var(--color-surface-hover); border-color: var(--color-border-strong); }
.video-overlay-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.video-overlay-btn.flashlight-on { background: rgba(251, 191, 36, 0.2) !important; border-color: var(--color-warning, #f59e0b) !important; color: var(--color-warning, #f59e0b) !important; box-shadow: 0 0 16px rgba(251, 191, 36, 0.4), var(--shadow-soft); }
.video-overlay-btn.flashlight-on:active { background: rgba(251, 191, 36, 0.25) !important; }
.video-overlay-btn.flashlight-off { opacity: 0.6; }
.video-overlay-btn.flashlight-off .overlay-icon { opacity: 0.5; }
.video-overlay-btn.camera-flipped { background: rgba(37, 99, 235, 0.15) !important; border-color: var(--color-brand, #2563eb) !important; color: var(--color-brand, #2563eb) !important; box-shadow: 0 0 16px rgba(37, 99, 235, 0.4), var(--shadow-soft); }
.video-overlay-btn.camera-flipped:active { background: rgba(37, 99, 235, 0.2) !important; }
.toolbar { position: fixed !important; bottom: 0 !important; left: 0 !important; right: 0 !important; padding: 12px 8px !important; padding-bottom: max(12px, env(safe-area-inset-bottom)) !important; background: var(--color-surface, #ffffff) !important; border-top: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05); display: flex !important; justify-content: space-around; align-items: center; gap: 4px; z-index: 150 !important; pointer-events: auto !important; }
.toolbar-btn { display: flex !important; flex-direction: column; align-items: center; justify-content: center; min-width: 50px !important; padding: 8px 3px !important; flex: 1; max-width: 65px !important; background: var(--color-surface, #fff); border: 1px solid var(--color-border, #e2e8f0); border-radius: var(--radius-md, 10px); color: var(--color-text, #0f172a); cursor: pointer; transition: all 0.2s ease; -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; position: relative; z-index: 151 !important; pointer-events: auto !important; }
.toolbar-btn:active { transform: scale(0.92); background: var(--color-surface-hover, #f9fafb); }
.toolbar-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.toolbar-icon { font-size: 20px; margin-bottom: 2px; line-height: 1; }
.toolbar-label { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.toolbar-btn.muted, .toolbar-btn.off { background: rgba(239, 68, 68, 0.1) !important; border-color: var(--color-danger, #ef4444) !important; color: var(--color-danger, #ef4444) !important; }
.toolbar-btn.muted:active, .toolbar-btn.off:active { background: rgba(239, 68, 68, 0.15) !important; transform: scale(0.92); }
.toolbar-btn.flashlight-on { background: rgba(251, 191, 36, 0.15) !important; border-color: var(--color-warning, #f59e0b) !important; color: var(--color-warning, #f59e0b) !important; box-shadow: 0 0 12px rgba(251, 191, 36, 0.3); }
.toolbar-btn.flashlight-on:active { background: rgba(251, 191, 36, 0.2) !important; }
.toolbar-btn.flashlight-off { opacity: 0.6; }
.toolbar-btn.camera-flipped { background: rgba(37, 99, 235, 0.1) !important; border-color: var(--color-brand, #2563eb) !important; color: var(--color-brand, #2563eb) !important; box-shadow: 0 0 12px rgba(37, 99, 235, 0.3); }
.toolbar-btn.camera-flipped:active { background: rgba(37, 99, 235, 0.15) !important; }
.leave-btn { background: var(--color-danger, #ef4444) !important; color: var(--color-text-inverse, #fff) !important; border-color: var(--color-danger, #ef4444) !important; }
.leave-btn:active { background: var(--color-danger-hover, #dc2626) !important; }
.chat-window { position: fixed !important; top: auto !important; bottom: 0 !important; left: 0 !important; right: 0 !important; height: 50vh !important; max-height: 50vh !important; background: var(--color-surface, #ffffff) !important; backdrop-filter: blur(20px); border-top-left-radius: 20px; border-top-right-radius: 20px; border-top: 1px solid var(--color-border, #e2e8f0); box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1); transform: translateY(calc(100% + env(safe-area-inset-bottom))) !important; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); z-index: 200 !important; display: flex !important; flex-direction: column; pointer-events: auto !important; -webkit-transform: translateY(calc(100% + env(safe-area-inset-bottom))) !important; will-change: transform; }
.toolbar.chat-active { left: 0 !important; right: 0 !important; width: auto !important; }
.chat-window.open { transform: translateY(0) !important; -webkit-transform: translateY(0) !important; }
.chat-header::before { content: ""; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 40px; height: 4px; background: var(--color-border, #e2e8f0); border-radius: 2px; }
.chat-header { padding: 20px 16px 12px; cursor: grab; touch-action: none; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--color-border, #e2e8f0); background: var(--color-surface-muted, #fafbfc); }
.chat-header:active { cursor: grabbing; }
.chat-title { font-size: 16px; font-weight: 600; color: var(--color-text, #0f172a); }
.chat-close { width: 32px; height: 32px; font-size: 20px; background: var(--color-surface, #ffffff); border: 1px solid var(--color-border, #e2e8f0); border-radius: 8px; color: var(--color-text, #0f172a); display: flex; align-items: center; justify-content: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; gap: 10px; display: flex; flex-direction: column; background: var(--color-app-bg, #ffffff); }
.message-avatar { width: 32px; height: 32px; font-size: 13px; flex-shrink: 0; }
.message-text { font-size: 14px; padding: 10px 14px; border-radius: 16px; max-width: 75%; color: var(--color-text, #0f172a); }
.chat-message.mine .message-text { background: var(--color-brand, #2563eb); color: var(--color-text-inverse, #ffffff); }
.chat-message:not(.mine) .message-text { background: var(--color-surface-muted, #f3f4f6); color: var(--color-text, #0f172a); }
.message-time { font-size: 10px; color: var(--color-text-muted, #94a3b8); }
.chat-input-container { padding: 12px; background: var(--color-surface, #ffffff); border-top: 1px solid var(--color-border, #e2e8f0); display: flex; gap: 10px; align-items: flex-end; }
#chat-input { flex: 1; font-size: 16px; min-height: 44px; max-height: 120px; border-radius: 16px; padding: 10px 14px; background: var(--color-surface-muted, #f9fafb); border: 1px solid var(--color-border, #e2e8f0); color: var(--color-text, #0f172a); resize: none; }
#chat-input::placeholder { color: var(--color-text-muted, #94a3b8); }
#chat-input:focus { outline: none; border-color: var(--color-brand, #2563eb); background: var(--color-surface, #ffffff); box-shadow: var(--focus-ring); }
.chat-send-btn { width: 44px; height: 44px; font-size: 20px; border-radius: 50%; background: var(--color-brand); color: var(--color-text-inverse); border: none; box-shadow: var(--shadow-xs); display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.2s ease; }
.chat-send-btn:active:not(:disabled) { transform: scale(0.92); background: var(--color-brand-700); }
.chat-send-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chat-bubble { position: fixed; bottom: 90px; right: 12px; max-width: 260px; padding: 12px 16px; font-size: 13px; background: var(--color-brand); color: var(--color-text-inverse); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: var(--radius-xl, 18px); box-shadow: var(--shadow-medium); z-index: 105; }
.chat-badge { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; background: #ff3b30; border-radius: 9px; font-size: 11px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.video-container { position: fixed !important; top: 60px !important; left: 0 !important; right: 0 !important; bottom: 80px !important; transition: all 0.3s ease; z-index: 1 !important; pointer-events: none !important; background: var(--color-surface-muted, #f9fafb); }
.video-container video { pointer-events: auto; width: 100%; height: 100%; object-fit: contain; background: var(--color-app-bg, #ffffff); }
.video-container.chat-active { bottom: 0 !important; margin-right: 0 !important; }
#remote-video { width: 100%; height: 100%; object-fit: contain; background: var(--color-app-bg, #ffffff); }
.remote-video-off-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: var(--color-surface-muted, #f9fafb); z-index: 5; }
.remote-video-off-overlay .overlay-content { color: var(--color-text, #0f172a); }
.remote-video-off-overlay .overlay-logo { margin-bottom: 15px; }
.remote-video-off-overlay .overlay-logo svg { width: 80px; height: 80px; }
.remote-video-off-overlay .overlay-text { font-size: 16px; color: var(--color-text-secondary, #475569); }
.remote-audio-muted { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); padding: 10px 20px; font-size: 13px; max-width: 90%; text-align: center; background: var(--color-danger, #ef4444); color: var(--color-text-inverse, #ffffff); border-radius: var(--radius-lg, 14px); box-shadow: var(--shadow-medium); z-index: 15; }
.waiting-modal { background: rgba(0, 0, 0, 0.5) !important; }
.waiting-modal-content { background: var(--color-surface, #ffffff) !important; border: 1px solid var(--color-border, #e2e8f0) !important; box-shadow: var(--shadow-strong) !important; }
.waiting-modal h2 { color: var(--color-text, #0f172a) !important; }
.waiting-modal p { color: var(--color-text-secondary, #475569) !important; }
.waiting-code-label { color: var(--color-text-muted, #94a3b8) !important; }
.waiting-code-value { color: var(--color-brand, #2563eb) !important; background: var(--color-brand-50, #eff6ff); padding: 12px 20px; border-radius: var(--radius-md, 10px); border: 1px solid var(--color-brand-200, #bfdbfe); }
.waiting-spinner { border-color: var(--color-border, #e2e8f0) !important; border-top-color: var(--color-brand, #2563eb) !important; }
.container { max-width: 100%; padding: 0; }
.dashboard-header { flex-direction: column; align-items: flex-start; gap: 12px; }
.code-value { font-size: 36px; letter-spacing: 6px; padding: 15px 30px; min-width: 240px; text-align: center; background: var(--color-brand-50); color: var(--color-brand); border: 1px solid var(--color-brand-200); font-family: var(--font-mono); }
.permission-container { padding: 30px 20px; border-radius: 0; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
#tech-tab h2 { margin-bottom: 12px; }
#tech-tab .form-group { margin-bottom: 12px !important; }
#tech-tab .btn.btn-primary { padding: 10px 16px; font-size: 15px; }
#tech-tab .or-divider { margin: 12px 0 !important; }
#tech-tab .or-divider-label { background: var(--color-surface, #ffffff) !important; font-size: 12px !important; padding: 0 8px !important; }
#tech-tab .google-btn { height: 44px; font-size: 14px; gap: 8px !important; padding: 0 12px !important; }
#tech-tab .google-btn svg { width: 16px; height: 16px; }
#tech-tab a[href="forgot_password.php"] { display: inline-block; font-size: 13px !important; }
.permission-icon { font-size: 56px; margin-bottom: 16px; }
.permission-container h1 { font-size: 24px; margin-bottom: 12px; }
.permission-help { padding: 15px; font-size: 14px; }
.permission-help ol { font-size: 13px; padding-left: 20px; }
.permission-help li { margin-bottom: 8px; }
.session-table { font-size: 12px; overflow-x: auto; }
.session-table th, .session-table td { padding: 8px 4px; font-size: 11px; }
.session-table .hide-mobile { display: none; }
}

/* ============================================
   ADMIN STYLES (merged from admin/styles.css)
   ============================================ */
body.admin { background: #f5f7fa; color: #333; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: linear-gradient(180deg, #667eea 0%, #764ba2 100%); color: white; display: flex; flex-direction: column; position: fixed; height: 100vh; overflow-y: auto; }
.sidebar-header { padding: 30px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.logo { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; }
.logo img { width: 40px; height: 40px; border-radius: 8px; }
.sidebar-nav { padding: 20px 0; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: rgba(255, 255, 255, 0.8); text-decoration: none; transition: all 0.2s; }
.nav-item:hover { background: rgba(255, 255, 255, 0.1); color: white; }
.nav-item.active { background: rgba(255, 255, 255, 0.2); color: white; border-left: 4px solid white; }
.nav-item .icon { font-size: 20px; }
.main-content { flex: 1; margin-left: 260px; padding: 40px; max-width: 1400px; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.page-header h1 { font-size: 32px; color: #1a1a1a; margin-bottom: 5px; }
.subtitle { color: #666; font-size: 14px; }
.admin-user { background: white; padding: 10px 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); font-weight: 600; color: #667eea; }
.loading-screen { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 400px; }
.spinner { width: 50px; height: 50px; border: 4px solid #f3f3f3; border-top: 4px solid #667eea; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 20px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 40px; }
.stat-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); display: flex; align-items: center; gap: 20px; }
.stat-icon { width: 60px; height: 60px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: white; }
.stat-details { flex: 1; }
.stat-label { font-size: 14px; color: #666; margin-bottom: 8px; }
.stat-value { font-size: 32px; font-weight: 700; color: #1a1a1a; margin-bottom: 5px; }
.stat-change { font-size: 12px; font-weight: 600; }
.stat-change.positive { color: #4ade80; }
.stat-change.negative { color: #f87171; }
.charts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-bottom: 40px; }
.chart-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.chart-card h3 { margin-bottom: 20px; color: #1a1a1a; }
.activity-section { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); margin-bottom: 30px; }
.activity-section h3 { margin-bottom: 20px; color: #1a1a1a; }
.activity-list { display: flex; flex-direction: column; gap: 15px; }
.activity-item { display: flex; align-items: center; gap: 15px; padding: 15px; background: #f8f9fa; border-radius: 8px; }
.activity-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; }
.activity-details { flex: 1; }
.activity-text { color: #333; margin-bottom: 5px; }
.activity-time { font-size: 12px; color: #999; }
.filters-section { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); margin-bottom: 30px; display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 300px; }
.search-box input { width: 100%; padding: 12px 40px 12px 16px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; }
.search-box input:focus { outline: none; border-color: #667eea; }
.search-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.filter-controls { display: flex; gap: 15px; align-items: center; }
.filter-controls label { font-size: 14px; font-weight: 600; color: #666; }
.filter-controls select { padding: 10px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; cursor: pointer; }
.filter-controls select:focus { outline: none; border-color: #667eea; }
.stats-summary { display: flex; gap: 30px; padding: 20px 0; margin-bottom: 20px; }
.stat-item { display: flex; flex-direction: column; gap: 5px; }
.stat-number { font-size: 28px; font-weight: 700; color: #667eea; }
.stat-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.user-table { background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); overflow: hidden; }
.user-table table { width: 100%; border-collapse: collapse; }
.user-table thead { background: #f8f9fa; }
.user-table th { padding: 15px; text-align: left; font-weight: 600; font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; }
.user-table td { padding: 15px; border-top: 1px solid #f0f0f0; }
.user-table tr:hover { background: #f8f9fa; }
.badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-gray { background: #e0e0e0; color: #666; }
.badge-purple { background: #ede9fe; color: #7c3aed; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.btn-small { padding: 6px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; }
.btn-primary { background: #667eea; color: white; }
.btn-primary:hover { background: #5568d3; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin-bottom: 30px; }
.detail-card { background: white; padding: 25px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); }
.detail-card h3 { margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #f0f0f0; color: #1a1a1a; }
.detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f8f9fa; }
.detail-row:last-child { border-bottom: none; }
.detail-label { font-weight: 600; color: #666; font-size: 14px; }
.detail-value { color: #1a1a1a; font-size: 14px; }
.stat-card-small { background: white; padding: 20px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); display: flex; align-items: center; gap: 15px; }
.stat-icon-small { font-size: 32px; }
.stat-value-small { font-size: 24px; font-weight: 700; color: #1a1a1a; }
@media (max-width: 1024px) { .sidebar { width: 80px; } .sidebar-header .logo span, .nav-item span:not(.icon) { display: none; } .main-content { margin-left: 80px; } .sidebar-header { padding: 20px 10px; } .nav-item { justify-content: center; padding: 15px 10px; } }
@media (max-width: 768px) { .sidebar { position: fixed; transform: translateX(-100%); z-index: 1000; } .main-content { margin-left: 0; padding: 20px; } .page-header { flex-direction: column; gap: 20px; } .stats-grid { grid-template-columns: 1fr; } .charts-grid { grid-template-columns: 1fr; } .filters-section { flex-direction: column; align-items: stretch; } .search-box { min-width: 100%; } .filter-controls { flex-wrap: wrap; } .detail-grid { grid-template-columns: 1fr; } }
