/* =============================================================================
   DL Equity - Shared Styles
   ============================================================================= */

/* CSS Variables */
:root {
    /* New Color Palette */
    --primary: #005C53;
    --primary-dark: #042940;
    --primary-hover: #004a43;
    --primary-light: #E3F5F3;
    --success: #9FC131;
    --success-bg: #F4F9E6;
    --accent: #DBF227;
    --muted: #D6D58E;

    /* Background & Text */
    --bg: #FAFBFC;
    --white: #FFFFFF;
    --text-primary: #1C2D38;
    --text-secondary: #5C6C75;
    --text-muted: #889397;

    /* Borders */
    --border: #E8EDEB;
    --border-light: #F0F2F1;
    --border-dark: #C1C7C6;

    /* Status Colors */
    --error: #DC3545;
    --error-bg: #FCEAEA;
    --warning: #944F01;
    --warning-bg: #FEF7E3;

    /* Shadows */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Layout */
    --sidebar-width: 240px;
    --bottom-nav-height: 56px;
}

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

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* =============================================================================
   Layout
   ============================================================================= */

.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    height: 48px;
    width: auto;
    border-radius: 8px;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
    margin-bottom: 2px;
}

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

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

.nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border);
}

.sidebar-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.sidebar-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
}

.sidebar-action-btn:hover {
    background: var(--border);
    color: var(--text-primary);
}

.sidebar-action-btn svg {
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.user-details { flex: 1; }
.user-name { font-size: 13px; font-weight: 500; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-btn { color: var(--text-secondary); text-decoration: none; font-size: 12px; padding: 6px 10px; background: var(--bg); border-radius: 4px; }
.logout-btn:hover { background: var(--border); color: var(--text-primary); }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px 40px;
}

.page-header {
    margin-bottom: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: 4px;
}

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

/* =============================================================================
   Components
   ============================================================================= */

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.connected { background: var(--success-bg); color: var(--success); }
.status-badge.disconnected { background: var(--error-bg); color: var(--error); }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.btn-secondary {
    background: var(--white);
    color: var(--text-secondary);
    border: 1px solid var(--border-dark);
}

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

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:disabled {
    background: var(--text-muted);
    border-color: var(--text-muted);
    cursor: not-allowed;
}

.btn-danger {
    background: var(--error);
    color: white;
    border: 1px solid var(--error);
}

.btn-danger:hover {
    background: #c92020;
}

/* Cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
}

.card-label {
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.card-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.card-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Section */
.section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
}

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

.section-title {
    font-size: 16px;
    font-weight: 600;
}

.section-content {
    padding: 20px 24px;
}

.section-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--primary-light);
    color: var(--primary);
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* =============================================================================
   NAV Hero Section
   ============================================================================= */

.nav-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
}

.nav-hero-label {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-hero-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 42px;
    font-weight: 600;
    letter-spacing: -1px;
}

.nav-hero-sub {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 8px;
}

.nav-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.nav-hero-stat-label {
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.nav-hero-stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 18px;
    font-weight: 500;
}

/* =============================================================================
   Margin Section
   ============================================================================= */

.margin-section {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
}

.margin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.margin-title {
    font-size: 16px;
    font-weight: 600;
}

.margin-ratio {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 24px;
    font-weight: 600;
}

.margin-bar-container {
    height: 12px;
    background: var(--bg);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.margin-bar {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.margin-bar.safe { background: var(--success); }
.margin-bar.warning { background: var(--warning); }
.margin-bar.danger { background: var(--error); }

.margin-details {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.margin-detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.margin-detail-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 14px;
    font-weight: 500;
    margin-top: 4px;
}

/* =============================================================================
   Tables
   ============================================================================= */

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

th:last-child, td:last-child { text-align: right; }

td {
    padding: 14px 16px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }
tr:hover { background: var(--bg); }

.symbol-cell {
    font-weight: 600;
    color: var(--primary);
}

.mono {
    font-family: 'IBM Plex Mono', monospace;
}

.positive { color: var(--success); }
.negative { color: var(--error); }

/* =============================================================================
   Allocation Chart
   ============================================================================= */

.allocation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.allocation-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.allocation-symbol {
    font-weight: 600;
    font-size: 13px;
    width: 40px;
    color: var(--primary);
}

.allocation-bar-bg {
    flex: 1;
    height: 24px;
    background: var(--bg);
    border-radius: 4px;
    overflow: hidden;
}

.allocation-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding-left: 8px;
    min-width: 40px;
}

.allocation-bar-text {
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.allocation-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    width: 80px;
    text-align: right;
}

/* =============================================================================
   Derivatives Stats
   ============================================================================= */

.deriv-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.deriv-stat {
    padding: 16px;
    background: var(--bg);
    border-radius: 6px;
}

.deriv-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.deriv-stat-value {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 16px;
    font-weight: 600;
}

/* =============================================================================
   Loading Overlay
   ============================================================================= */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-video {
    width: 300px;
    height: 300px;
    object-fit: contain;
}

/* =============================================================================
   Alerts
   ============================================================================= */

.alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 24px;
    font-size: 14px;
}

.alert.error {
    background: var(--error-bg);
    border: 1px solid var(--error);
    color: var(--error);
}

.alert.success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert.warning {
    background: var(--warning-bg);
    border: 1px solid var(--warning);
    color: var(--warning);
}

/* =============================================================================
   OTP Modal
   ============================================================================= */

.otp-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.otp-modal.active {
    display: flex;
}

.otp-modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.otp-modal-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.otp-modal-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary);
}

.otp-modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.otp-modal-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.otp-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 24px;
    font-family: 'IBM Plex Mono', monospace;
    text-align: center;
    letter-spacing: 8px;
    border: 2px solid var(--border);
    border-radius: 8px;
    margin-bottom: 16px;
    outline: none;
    transition: border-color 0.2s;
}

.otp-input:focus {
    border-color: var(--primary);
}

.otp-input::placeholder {
    letter-spacing: 4px;
    color: var(--text-muted);
}

.otp-error {
    color: var(--error);
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.otp-error.show {
    display: block;
}

.otp-buttons {
    display: flex;
    gap: 12px;
}

.otp-buttons .btn {
    flex: 1;
    justify-content: center;
}

.otp-step {
    display: none;
}

.otp-step.active {
    display: block;
}

/* =============================================================================
   Mobile Menu
   ============================================================================= */

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg);
    border: none;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* =============================================================================
   Tabs
   ============================================================================= */

.tabs-container {
    margin-top: 20px;
}

.tabs-header {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -2px;
    font-size: 14px;
    font-family: inherit;
}

.tab-button:hover {
    color: var(--primary);
}

.tab-button.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* =============================================================================
   Charts
   ============================================================================= */

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 16px;
}

.two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Time Pills */
.time-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.time-pill {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    background: var(--bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    transition: all 0.15s;
}

.time-pill:hover {
    background: var(--white);
    color: var(--text-primary);
}

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

/* =============================================================================
   Spinner Animation
   ============================================================================= */

.spinner {
    animation: spin 1s linear infinite;
}

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

/* =============================================================================
   Forms
   ============================================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* =============================================================================
   Privacy Blur
   ============================================================================= */

.sensitive {
    transition: filter 0.3s ease;
}

body.blurred .sensitive {
    filter: blur(12px);
    user-select: none;
}

/* =============================================================================
   Bottom Navigation (Mobile Only)
   ============================================================================= */

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--white);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1000;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 8px 0;
    color: var(--text-muted);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
    position: relative;
}

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

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

.bottom-nav-item.active .bottom-nav-indicator {
    opacity: 1;
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
}

.bottom-nav-indicator {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* =============================================================================
   Bottom Sheet
   ============================================================================= */

.bottom-sheet-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
}

.bottom-sheet-overlay.open {
    display: block;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 1002;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto;
}

.bottom-sheet-content {
    padding: 8px 16px 24px;
}

.sheet-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: background 0.15s ease;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.sheet-menu-item:hover,
.sheet-menu-item:active {
    background: var(--bg);
}

.sheet-menu-icon {
    width: 22px;
    height: 22px;
    color: var(--text-secondary);
}

.sheet-menu-danger {
    color: var(--error);
}

.sheet-menu-danger .sheet-menu-icon {
    color: var(--error);
}

.sheet-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

/* =============================================================================
   Responsive Breakpoints
   ============================================================================= */

@media (max-width: 1200px) {
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col { grid-template-columns: 1fr; }
    .two-column-grid { grid-template-columns: 1fr; }
    .nav-hero-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Hide sidebar and show bottom nav on mobile */
    .sidebar { display: none !important; }
    .mobile-menu-btn { display: none !important; }
    .sidebar-overlay { display: none !important; }
    .sidebar-close { display: none !important; }

    .bottom-nav { display: flex; }

    /* Hide reveal button on mobile - use FaceID in side menu instead */
    #revealBtn { display: none !important; }

    .main-content {
        margin-left: 0;
        padding: 24px 16px calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 20px) 16px;
    }
    .cards-grid { grid-template-columns: 1fr; }
    .margin-details { grid-template-columns: repeat(2, 1fr); }
    /* Mobile Header Banner */
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: -24px -16px 24px -16px;
        padding: 0;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
        border-radius: 0;
    }
    .page-header > div:first-child {
        padding: 20px 16px 16px 16px;
    }
    .page-title {
        font-size: 24px;
        font-weight: 700;
        color: var(--white);
        letter-spacing: -0.3px;
    }
    .page-subtitle {
        color: rgba(255, 255, 255, 0.7);
        margin-top: 4px;
    }
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.08);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        gap: 8px;
    }
    .header-actions .status-badge {
        background: rgba(255, 255, 255, 0.15);
    }
    .header-actions .status-badge.connected {
        background: rgba(159, 193, 49, 0.2);
        color: var(--accent);
    }
    .header-actions .status-badge.disconnected {
        background: rgba(220, 53, 69, 0.2);
        color: #ff6b6b;
    }
    .header-actions .btn-secondary {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }
    .header-actions .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    .header-actions .btn-primary {
        background: var(--primary);
        border-color: var(--primary);
    }
    .btn { padding: 10px 16px; }
    .loading-video { width: 200px; height: 200px; }
    .nav-hero-value { font-size: 28px; }
}

@media (max-width: 480px) {
    .main-content { padding: 16px 12px 16px 12px; }
    .page-header {
        margin: -16px -12px 20px -12px;
    }
    .page-header > div:first-child {
        padding: 16px 12px 12px 12px;
    }
    .header-actions {
        padding: 10px 12px;
    }
    .page-title { font-size: 20px; }
    .card { padding: 16px; }
    .card-value { font-size: 18px; }
    .nav-hero-value { font-size: 24px; }
    .margin-details { grid-template-columns: 1fr; }
    .header-actions { gap: 8px; }
    .btn { padding: 10px 12px; font-size: 12px; }
}
