/* ============================================
   ROYAL TRADING JOURNAL - ISLAMIC THEME CSS
   A majestic, dark-mode design with Islamic aesthetics
   ============================================ */

/* ============================================
   CSS VARIABLES - Royal Color Palette
   ============================================ */
:root {
    /* Primary Colors - Deep Royal Tones */
    --royal-navy: #1a1a2e;
    --royal-purple: #16213e;
    --royal-dark: #0f0f1a;
    --royal-gold: #d4af37;
    --royal-gold-light: #f0d78c;
    --royal-gold-dark: #a67c00;
    
    /* Accent Colors */
    --emerald: #0d9488;
    --ruby: #dc2626;
    --sapphire: #3b82f6;
    --amethyst: #8b5cf6;
    
    /* Status Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.15);
    
    /* Text Colors */
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-gold: var(--royal-gold);
    
    /* Background Colors */
    --bg-primary: var(--royal-dark);
    --bg-secondary: var(--royal-navy);
    --bg-tertiary: var(--royal-purple);
    --bg-card: rgba(26, 26, 46, 0.8);
    --bg-input: rgba(15, 15, 26, 0.6);
    
    /* Border Colors */
    --border-primary: rgba(212, 175, 55, 0.3);
    --border-secondary: rgba(255, 255, 255, 0.1);
    --border-gold: var(--royal-gold);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.2);
    
    /* Typography */
    --font-display: 'Cinzel', serif;
    --font-arabic: 'Amiri', serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* ============================================
   CSS RESET & BASE STYLES
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================
   ISLAMIC PATTERN OVERLAY
   ============================================ */
.islamic-pattern-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.03;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================
   NAVIGATION BAR
   ============================================ */
.royal-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-md) var(--spacing-xl);
    background: linear-gradient(135deg, var(--royal-navy) 0%, var(--royal-purple) 100%);
    border-bottom: 2px solid var(--border-primary);
    box-shadow: var(--shadow-lg);
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.brand-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    border-radius: 50%;
    font-size: 1.2rem;
    color: var(--royal-dark);
    box-shadow: var(--shadow-gold);
}

.brand-text {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--royal-gold);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--royal-gold);
    font-size: 1.5rem;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.nav-toggle:hover {
    background: rgba(212, 175, 55, 0.1);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    list-style: none;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

.nav-links a:hover {
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--border-primary);
}

.nav-links a.active {
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--royal-gold);
}

.nav-links a i {
    font-size: 1rem;
}

/* The account switcher / refresh / install controls live inside nav-links
   now (not as separate flex siblings of .royal-nav) specifically so they
   collapse behind the hamburger together with the page links on mobile,
   instead of always sitting exposed above the fold on every phone visit. */
.nav-links li.nav-extra {
    display: flex;
    align-items: center;
    list-style: none;
}

/* ── Inline notices (already-logged-today / draft-restore) ───────────────
   Shared across Report Card and Add/Edit Trade so both pages' "you have an
   unsaved draft" banners look and behave the same way. */
.inline-notice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .7rem;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.3);
    border-radius: 10px;
    padding: .8rem 1.1rem;
    margin-bottom: 1.4rem;
    font-size: .88rem;
    color: #cbd5e1;
}
.inline-notice i { color: var(--royal-gold, #d4af37); }
.inline-notice-draft {
    background: rgba(96,165,250,0.08);
    border-color: rgba(96,165,250,0.3);
}
.inline-notice-draft i { color: #60a5fa; }

/* ── Trade Log collapsible filters ────────────────────────────────────── */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--royal-gold);
    color: var(--royal-dark);
    font-size: .72rem;
    font-weight: 700;
    margin-left: .3rem;
}

.filter-toggle-chevron {
    transition: transform .15s;
    margin-left: .3rem;
    font-size: .8rem;
}

.filter-toggle-chevron.open {
    transform: rotate(180deg);
}

/* ── Keyboard shortcuts help overlay ─────────────────────────────────── */
.shortcuts-help-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: var(--spacing-lg);
}

.shortcuts-help-overlay.active {
    display: flex;
}

.shortcuts-help-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    max-width: 440px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--spacing-xl);
    animation: modalSlideIn 0.2s ease;
}

.shortcuts-help-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-lg);
}

.shortcuts-help-header h3 {
    font-family: var(--font-display);
    color: var(--royal-gold);
    display: flex;
    align-items: center;
    gap: .5rem;
}

.shortcuts-help-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-fast);
}

.shortcuts-help-close:hover {
    color: var(--royal-gold);
}

.shortcuts-help-grid {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.shortcuts-help-grid > div {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.shortcuts-help-grid kbd {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.18);
    border-bottom-width: 2px;
    border-radius: 5px;
    padding: .15rem .5rem;
    font-family: var(--font-body, inherit);
    font-size: .82rem;
    color: #e2e8f0;
    min-width: 1.6em;
    text-align: center;
}

.shortcuts-help-grid span {
    color: #94a3b8;
    font-size: .88rem;
}

/* ── Trade Log bulk actions ───────────────────────────────────────────── */
.bulk-actions-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: rgba(212,175,55,0.08);
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: 1.5rem;
}

.bulk-actions-count {
    font-weight: 600;
    color: var(--royal-gold);
    white-space: nowrap;
}

.bulk-select-all-link {
    color: var(--royal-gold);
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

.bulk-actions-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.bulk-actions-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.checkbox-col {
    width: 2.2rem;
    text-align: center;
}

.row-select-checkbox,
#selectAllCheckbox {
    cursor: pointer;
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--royal-gold);
}

/* ── Account switcher (nav) ─────────────────────────────────────────── */
#accountSwitcher {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.account-switcher-select {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-primary);
    color: var(--royal-gold);
    border-radius: var(--radius-md);
    padding: var(--spacing-sm) var(--spacing-md);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.account-switcher-gear {
    background: transparent;
    border: 1px solid var(--border-primary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    width: 2.2rem;
    height: 2.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.account-switcher-gear:hover {
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 260px;
    overflow-y: auto;
    margin-bottom: 1.2rem;
}

.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.9rem;
}

.account-row-name {
    color: var(--text-primary, #e2e8f0);
    font-weight: 500;
}

.account-row-actions {
    display: flex;
    gap: 0.4rem;
}

.accounts-empty-msg {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 1rem 0;
}

.account-add-row {
    display: flex;
    gap: 0.6rem;
}

.account-add-row input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-md);
    color: #e2e8f0;
    padding: 0.6rem 0.9rem;
    font-family: inherit;
}

.install-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    color: var(--royal-dark);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.install-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.refresh-app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    background: transparent;
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
    font-size: 1rem;
}

.refresh-app-btn:hover {
    color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
    min-height: calc(100vh - 200px);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl);
    position: relative;
}

.page-header h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--royal-gold);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.page-header h1 i {
    margin-right: var(--spacing-sm);
}

.header-subtitle {
    font-family: var(--font-arabic);
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-style: italic;
}

.header-decoration {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--royal-gold), transparent);
}

.header-decoration.left {
    left: 0;
}

.header-decoration.right {
    right: 0;
}

/* ============================================
   FORM STYLES
   ============================================ */
.royal-form {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.form-mode-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    color: var(--royal-gold);
    font-weight: 600;
}

.form-mode-indicator.edit-mode {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--sapphire);
    color: var(--sapphire);
}

.form-section {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-secondary);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--spacing-lg);
}

.section-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.section-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    border-radius: 50%;
    color: var(--royal-dark);
    font-size: 1rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 1.3rem;
    color: var(--royal-gold);
    font-weight: 600;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border-primary), transparent);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.form-group label i {
    color: var(--royal-gold);
    font-size: 0.85rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--royal-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23d4af37' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--royal-navy);
    color: var(--text-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Pricing Subsection */
.pricing-subsection {
    margin-bottom: var(--spacing-lg);
}

.pricing-subsection h3 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.pricing-subsection h3 i {
    color: var(--royal-gold);
}

/* Calculated Fields Display */
.calculated-fields {
    display: flex;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-lg);
    padding: var(--spacing-md);
    background: rgba(212, 175, 55, 0.05);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border-primary);
}

.calc-field {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.calc-label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.calc-value {
    color: var(--royal-gold);
    font-weight: 600;
}

/* Toggle Switch */
.toggle-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.toggle-input {
    display: none;
}

.toggle-label {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-normal);
}

.toggle-switch {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: var(--transition-normal);
}

.toggle-input:checked + .toggle-label {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
}

.toggle-input:checked + .toggle-label .toggle-switch {
    left: 33px;
    background: var(--success);
}

.toggle-text {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Range Slider */
.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    outline: none;
    border: 1px solid var(--border-secondary);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: var(--spacing-xs);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-secondary);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--royal-gold) 0%, var(--royal-gold-dark) 100%);
    color: var(--royal-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-secondary);
}

.btn-secondary:hover {
    color: var(--royal-gold);
    border-color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-small {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
}

/* ============================================
   CONTROL PANEL (Trade Log)
   ============================================ */
.control-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.control-row:last-child {
    margin-bottom: 0;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-box i {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: var(--spacing-md);
    padding-left: 40px;
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--royal-gold);
}

.filter-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-select {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 32px;
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%23d4af37' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.filter-select:focus {
    outline: none;
    border-color: var(--royal-gold);
}

.date-range {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.date-range label {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.date-range input {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.date-range input:focus {
    outline: none;
    border-color: var(--royal-gold);
}

.import-export {
    display: flex;
    gap: var(--spacing-sm);
    margin-left: auto;
    flex-wrap: wrap;
}

/* ============================================
   QUICK STATS
   ============================================ */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.15);
    border-radius: var(--radius-md);
    color: var(--royal-gold);
    font-size: 1.3rem;
}

.stat-icon.win {
    background: var(--success-bg);
    color: var(--success);
}

.stat-icon.loss {
    background: var(--danger-bg);
    color: var(--danger);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================
   TABLE STYLES
   ============================================ */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

.royal-table {
    width: 100%;
    border-collapse: collapse;
}

.royal-table th {
    background: rgba(212, 175, 55, 0.1);
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: left;
    font-weight: 600;
    color: var(--royal-gold);
    border-bottom: 2px solid var(--border-primary);
    white-space: nowrap;
}

.royal-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition-fast);
}

.royal-table th.sortable:hover {
    background: rgba(212, 175, 55, 0.2);
}

.royal-table th i {
    margin-left: var(--spacing-sm);
    font-size: 0.8rem;
}

.royal-table td {
    padding: var(--spacing-md) var(--spacing-lg);
    border-bottom: 1px solid var(--border-secondary);
    color: var(--text-primary);
}

.royal-table tbody tr {
    transition: var(--transition-fast);
}

.royal-table tbody tr:hover {
    background: rgba(212, 175, 55, 0.05);
}

.royal-table tbody tr.win {
    background: rgba(16, 185, 129, 0.05);
}

.royal-table tbody tr.win:hover {
    background: rgba(16, 185, 129, 0.1);
}

.royal-table tbody tr.loss {
    background: rgba(239, 68, 68, 0.05);
}

.royal-table tbody tr.loss:hover {
    background: rgba(239, 68, 68, 0.1);
}

.royal-table .pnl-positive {
    color: var(--success);
    font-weight: 600;
}

.royal-table .pnl-negative {
    color: var(--danger);
    font-weight: 600;
}

.royal-table .pnl-zero {
    color: var(--text-muted);
}

.table-actions {
    display: flex;
    gap: var(--spacing-sm);
}

.table-actions .btn-icon {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-long {
    background: var(--success-bg);
    color: var(--success);
}

.badge-short {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-yes {
    background: var(--success-bg);
    color: var(--success);
}

.badge-no {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
}

.empty-state i {
    font-size: 4rem;
    color: var(--royal-gold);
    opacity: 0.5;
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    font-family: var(--font-display);
    color: var(--royal-gold);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    border-top: 1px solid var(--border-secondary);
}

.page-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
    border-color: var(--royal-gold);
    color: var(--royal-gold);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================
   MODAL STYLES
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding: var(--spacing-xl);
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

.modal-content.modal-small {
    max-width: 400px;
    text-align: center;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close:hover {
    color: var(--royal-gold);
}

.modal-content h2 {
    font-family: var(--font-display);
    color: var(--royal-gold);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.modal-body {
    margin-bottom: var(--spacing-lg);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

.modal-content.modal-small .modal-actions {
    justify-content: center;
}

/* Trade Detail Modal Content */
.trade-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.trade-detail-item {
    padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-secondary);
}

.trade-detail-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.trade-detail-item span {
    font-weight: 500;
    color: var(--text-primary);
}

/* ============================================
   ANALYTICS PAGE STYLES
   ============================================ */
.analytics-filter {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.filter-row label {
    color: var(--text-secondary);
    font-weight: 500;
}

.filter-row input[type="date"] {
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-md);
    color: var(--text-primary);
}

.filter-row span {
    color: var(--text-muted);
}

.analytics-section {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
}

.stat-box {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.stat-box:hover {
    border-color: var(--royal-gold);
    transform: translateY(-2px);
}

.stat-box.win {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.stat-box.loss {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
}

.stat-box.highlight {
    border-color: var(--royal-gold);
    background: rgba(212, 175, 55, 0.1);
}

.stat-box.neutral {
    border-color: rgba(148, 163, 184, 0.3);
}

.stat-box-icon {
    font-size: 1.5rem;
    color: var(--royal-gold);
    margin-bottom: var(--spacing-sm);
}

.stat-box.win .stat-box-icon {
    color: var(--success);
}

.stat-box.loss .stat-box-icon {
    color: var(--danger);
}

.stat-box-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.stat-box-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container.large {
    height: 400px;
}

.chart-container.medium {
    height: 250px;
}

.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Dual View (Table + Chart) */
.dual-view {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

@media (max-width: 1024px) {
    .dual-view {
        grid-template-columns: 1fr;
    }
}

/* Analytics Table */
.analytics-table {
    font-size: 0.9rem;
}

.analytics-table th,
.analytics-table td {
    padding: var(--spacing-sm) var(--spacing-md);
}

/* Discipline Grid */
.discipline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.discipline-card {
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.discipline-card h3 {
    font-size: 1rem;
    color: var(--royal-gold);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.discipline-stats {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.discipline-stat {
    display: flex;
    justify-content: space-between;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
}

.discipline-stat .label {
    color: var(--text-muted);
}

.discipline-stat .value {
    font-weight: 600;
}

.discipline-stat .value.win {
    color: var(--success);
}

.discipline-stat .value.loss {
    color: var(--danger);
}

/* ============================================
   INSIGHTS PAGE STYLES
   ============================================ */
.insights-overview {
    margin-bottom: var(--spacing-xl);
}

.insight-summary {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.insight-summary .insight-icon {
    font-size: 2rem;
    color: var(--royal-gold);
}

.insight-summary p {
    color: var(--text-secondary);
    font-style: italic;
}

.insights-section {
    margin-bottom: var(--spacing-xl);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: var(--transition-normal);
}

.insight-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.insight-card.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.insight-card.success .insight-card-header {
    background: var(--success-bg);
}

.insight-card.success .insight-card-header i,
.insight-card.success .insight-card-header h3 {
    color: var(--success);
}

.insight-card.danger {
    border-color: rgba(239, 68, 68, 0.3);
}

.insight-card.danger .insight-card-header {
    background: var(--danger-bg);
}

.insight-card.danger .insight-card-header i,
.insight-card.danger .insight-card-header h3 {
    color: var(--danger);
}

.insight-card.warning {
    border-color: rgba(245, 158, 11, 0.3);
}

.insight-card.warning .insight-card-header {
    background: var(--warning-bg);
}

.insight-card.warning .insight-card-header i,
.insight-card.warning .insight-card-header h3 {
    color: var(--warning);
}

.insight-card-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(212, 175, 55, 0.1);
}

.insight-card-header i {
    font-size: 1.2rem;
    color: var(--royal-gold);
}

.insight-card-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--royal-gold);
}

.insight-card-body {
    padding: var(--spacing-lg);
}

.insight-main {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.insight-details {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.insight-details span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.insight-recommendation {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-secondary);
}

.insight-recommendation i {
    color: var(--royal-gold);
    margin-top: 2px;
}

.insight-recommendation p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Flags Container */
.flags-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.no-flags {
    text-align: center;
    padding: var(--spacing-2xl);
    background: var(--success-bg);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
}

.no-flags i {
    font-size: 3rem;
    color: var(--success);
    margin-bottom: var(--spacing-md);
}

.no-flags h3 {
    color: var(--success);
    margin-bottom: var(--spacing-sm);
}

.no-flags p {
    color: var(--text-muted);
}

.warning-flag {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg);
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--radius-lg);
}

.warning-flag i {
    font-size: 2rem;
    color: var(--warning);
}

.warning-flag-content h4 {
    color: var(--warning);
    margin-bottom: var(--spacing-xs);
}

.warning-flag-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Patterns Container */
.patterns-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.pattern-loading {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
}

.pattern-loading i {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--royal-gold);
}

.pattern-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
}

.pattern-item i {
    font-size: 1.5rem;
    color: var(--royal-gold);
}

.pattern-item.positive i {
    color: var(--success);
}

.pattern-item.negative i {
    color: var(--danger);
}

.pattern-content h4 {
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.pattern-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Recommendations Container */
.recommendations-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.recommendation-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.recommendation-item .rec-number {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--royal-gold);
    color: var(--royal-dark);
    border-radius: 50%;
    font-weight: 700;
    flex-shrink: 0;
}

.recommendation-item h4 {
    color: var(--royal-gold);
    margin-bottom: var(--spacing-xs);
    font-size: 0.95rem;
}

.recommendation-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Trend Grid */
.trend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
}

.trend-card {
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.trend-card h3 {
    font-size: 1rem;
    color: var(--royal-gold);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    animation: toastSlideIn 0.3s ease;
    min-width: 300px;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.toast-out {
    animation: toastSlideOut 0.3s ease forwards;
}

@keyframes toastSlideOut {
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.toast-icon {
    font-size: 1.2rem;
}

.toast.success {
    border-color: var(--success);
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error {
    border-color: var(--danger);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.warning {
    border-color: var(--warning);
}

.toast.warning .toast-icon {
    color: var(--warning);
}

.toast.info {
    border-color: var(--info);
}

.toast.info .toast-icon {
    color: var(--info);
}

.toast-message {
    flex: 1;
    color: var(--text-primary);
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition-fast);
}

.toast-close:hover {
    color: var(--text-primary);
}

/* ============================================
   FOOTER
   ============================================ */
.royal-footer {
    background: linear-gradient(135deg, var(--royal-navy) 0%, var(--royal-purple) 100%);
    border-top: 2px solid var(--border-primary);
    padding: var(--spacing-xl);
    text-align: center;
    margin-top: auto;
    position: relative;
}

.footer-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, 
        transparent, 
        var(--royal-gold) 20%, 
        var(--royal-gold) 80%, 
        transparent
    );
}

.royal-footer p {
    color: var(--royal-gold);
    font-family: var(--font-display);
    margin-bottom: var(--spacing-sm);
}

.royal-footer .fa-star {
    font-size: 0.7rem;
    margin: 0 var(--spacing-sm);
}

.footer-quote {
    font-family: var(--font-arabic);
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .main-content {
        padding: var(--spacing-lg);
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .header-decoration {
        display: none;
    }
    
    .trend-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .royal-nav {
        padding: var(--spacing-md);
    }
    
    .nav-toggle {
        display: block;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: var(--royal-purple);
        border-radius: var(--radius-md);
        padding: var(--spacing-md);
        margin-top: var(--spacing-md);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        width: 100%;
        justify-content: center;
    }

    .nav-links li.nav-extra {
        width: 100%;
        justify-content: center;
        margin-top: var(--spacing-sm);
        padding-top: var(--spacing-sm);
        border-top: 1px solid var(--border-primary);
    }

    .nav-links #accountSwitcher {
        width: 100%;
        justify-content: center;
    }

    .nav-links .account-switcher-select {
        flex: 1;
    }

    .nav-links .refresh-app-btn {
        width: 100%;
        border-radius: var(--radius-md);
    }

    .brand-text {
        font-size: 1.1rem;
    }

    .install-btn {
        display: none;
    }
    
    .main-content {
        padding: var(--spacing-md);
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .control-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        min-width: 100%;
    }
    
    .filter-group {
        justify-content: stretch;
    }
    
    .filter-select {
        flex: 1;
    }
    
    .date-range {
        flex-direction: column;
        align-items: stretch;
    }
    
    .date-range input {
        width: 100%;
    }
    
    .import-export {
        margin-left: 0;
        flex-direction: column;
    }
    
    .import-export .btn {
        width: 100%;
        justify-content: center;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .discipline-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .recommendations-container {
        grid-template-columns: 1fr;
    }
    
    .toast-container {
        left: var(--spacing-md);
        right: var(--spacing-md);
        bottom: var(--spacing-md);
    }
    
    .toast {
        min-width: auto;
    }
    
    .calculated-fields {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .modal-content {
        margin: var(--spacing-md);
        padding: var(--spacing-lg);
    }
    
    .trade-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-box-value {
        font-size: 1.2rem;
    }
    
    .insight-main {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.1rem;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--royal-gold);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--royal-gold-light);
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--royal-gold) var(--bg-primary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-gold { color: var(--royal-gold) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-success { background: var(--success-bg) !important; }
.bg-danger { background: var(--danger-bg) !important; }
.bg-warning { background: var(--warning-bg) !important; }

.hidden { display: none !important; }
.visible { display: block !important; }

/* ============================================
   LOADING SPINNER
   ============================================ */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-secondary);
    border-top-color: var(--royal-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .royal-nav,
    .royal-footer,
    .control-panel,
    .form-actions,
    .table-actions,
    .pagination,
    .modal,
    .toast-container {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .main-content {
        max-width: 100%;
        padding: 0;
    }
    
    .royal-table {
        border: 1px solid #ccc;
    }
    
    .royal-table th,
    .royal-table td {
        border: 1px solid #ccc;
    }
}

/* ============================================
   OPTIONAL ENHANCEMENTS
   ============================================ */

/* Date/Time Input Styling for Webkit Browsers */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(0.8) sepia(1) saturate(5) hue-rotate(10deg);
    cursor: pointer;
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
    color: var(--text-primary);
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--royal-gold);
    outline-offset: 2px;
}

/* Selection Styling */
::selection {
    background: var(--royal-gold);
    color: var(--royal-dark);
}

::-moz-selection {
    background: var(--royal-gold);
    color: var(--royal-dark);
}

/* Smooth Fade-in Animation for Page Load */
.main-content {
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse Animation for Important Elements */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Skeleton Loading Placeholder */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-input) 25%,
        rgba(212, 175, 55, 0.1) 50%,
        var(--bg-input) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Glow Effect for Gold Elements */
.glow-gold {
    box-shadow: 
        0 0 5px var(--royal-gold),
        0 0 10px var(--royal-gold),
        0 0 20px rgba(212, 175, 55, 0.5);
}

/* Additional Badge Variants */
.badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

.badge-gold {
    background: rgba(212, 175, 55, 0.15);
    color: var(--royal-gold);
}

/* Card Hover Lift Effect */
.lift-on-hover {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.lift-on-hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Disabled State */
.disabled,
[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Truncate Text */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Line Clamp for Multi-line Truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Flex Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

/* Spacing Utilities */
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-sm { padding: var(--spacing-sm); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }

/* Border Utilities */
.border { border: 1px solid var(--border-secondary); }
.border-gold { border: 1px solid var(--border-primary); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 50%; }

/* Width Utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

/* Transition for Interactive Elements */
.interactive {
    transition: all var(--transition-fast);
}

.interactive:hover {
    transform: scale(1.02);
}

.interactive:active {
    transform: scale(0.98);
}

/* Warning Flag Severity Variants */
.warning-flag.danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
}

.warning-flag.danger i {
    color: var(--danger);
}

.warning-flag.danger .warning-flag-content h4 {
    color: var(--danger);
}

/* Subtle Shake Animation for Errors */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Success Checkmark Animation */
.checkmark {
    animation: checkmark 0.5s ease-in-out;
}

@keyframes checkmark {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Number Counter Animation */
.counter {
    animation: countUp 1s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--royal-navy);
    color: var(--text-primary);
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-primary);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

/* iOS Safari Fix for 100vh */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}
/* ============================================
   ADVANCED OPTIONS ADDITIONS
   ============================================ */
.wide-filters {
    flex: 1;
}

.quick-stats-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stats-grid-extended {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.badge-neutral {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-bg);
    color: var(--warning);
}

.badge-info {
    background: var(--info-bg);
    color: var(--info);
}

.badge-instrument {
    background: rgba(212, 175, 55, 0.12);
    color: var(--royal-gold);
}

.badge-stock {
    background: rgba(59, 130, 246, 0.15);
    color: var(--sapphire);
}

.badge-option {
    background: rgba(139, 92, 246, 0.15);
    color: var(--amethyst);
}

.modal-large {
    max-width: 950px;
}

.detail-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.detail-card-section {
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 1px solid var(--border-secondary);
}

.detail-card-section h3 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--royal-gold);
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

.legs-detail-list {
    display: grid;
    gap: var(--spacing-md);
}

.leg-detail-card {
    background: var(--bg-input);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
}

.leg-detail-top {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-sm);
}

.leg-detail-title {
    color: var(--text-primary);
    font-weight: 600;
}

.leg-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.warning-flag.danger {
    background: var(--danger-bg);
    border-color: rgba(239, 68, 68, 0.3);
}

.warning-flag.danger i,
.warning-flag.danger h4 {
    color: var(--danger);
}

.warning-flag.warning {
    background: var(--warning-bg);
    border-color: rgba(245, 158, 11, 0.3);
}

.warning-flag.warning i,
.warning-flag.warning h4 {
    color: var(--warning);
}

.pattern-item.neutral i {
    color: var(--info);
}

.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

@media (max-width: 768px) {
    .modal-large {
        max-width: 100%;
    }

    .detail-section-grid,
    .leg-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   ADVANCED ENTRY FORM EXTENSIONS
   ============================================ */
.calc-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--spacing-md);
}

.hidden-panel {
    display: none;
}

.callout-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid var(--border-primary);
    border-radius: var(--radius-lg);
}

.callout-banner i {
    color: var(--royal-gold);
    margin-top: 0.2rem;
}

.legs-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    margin: var(--spacing-xl) 0 var(--spacing-lg);
}

.legs-toolbar-title h3 {
    font-size: 1.05rem;
    color: var(--royal-gold-light);
    margin-bottom: 0.15rem;
}

.muted-text {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.leg-count-chip {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-primary);
    background: rgba(212, 175, 55, 0.12);
    color: var(--royal-gold-light);
    font-weight: 600;
}

.legs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
}

.leg-card {
    background: rgba(15, 15, 26, 0.55);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.leg-card-active {
    border-color: var(--royal-gold);
    box-shadow: var(--shadow-gold);
}

.leg-card-inactive {
    opacity: 0.65;
}

.leg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-secondary);
}

.leg-card-header h4 {
    color: var(--royal-gold);
    font-family: var(--font-display);
    font-size: 1rem;
}

.leg-card-body {
    padding: var(--spacing-lg);
}

.compact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-md);
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.checkbox-inline input[type="checkbox"] {
    accent-color: var(--royal-gold);
}

@media (max-width: 768px) {
    .compact-grid {
        grid-template-columns: 1fr;
    }

    .legs-toolbar {
        align-items: flex-start;
    }
}
/* ── FILE INPUT WRAPPER ──────────────────────────────────────────────────────── */
.image-upload-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Hide the native input; the label is the visual target */
.image-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── UPLOAD LABEL (drop-zone) ────────────────────────────────────────────────── */
.image-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    border: 2px dashed rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted, #9aa0b0);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    text-align: center;
}

.image-upload-label i {
    font-size: 1.6rem;
    color: var(--gold, #d4af37);
    opacity: 0.75;
}

.image-upload-label span {
    font-size: 0.92rem;
    font-weight: 500;
}

.image-upload-label small {
    font-size: 0.78rem;
    opacity: 0.65;
}

.image-upload-label:hover,
.image-upload-label:focus-within {
    border-color: var(--gold, #d4af37);
    background: rgba(212, 175, 55, 0.06);
    color: var(--text-primary, #e8e8f0);
}

/* ── PREVIEW CONTAINER ───────────────────────────────────────────────────────── */
.image-preview-container {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    flex-wrap: wrap;
}

.image-preview {
    width: 160px;
    height: 100px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    background: #0f0f1a;
}

/* ── SYNC STATUS BADGE ───────────────────────────────────────────────────────── */
.image-sync-badge {
    display: flex;
    align-items: center;
    flex: 1;
    font-size: 0.8rem;
}

.image-sync-badge [class^="sync-"] {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.sync-loading,
.sync-uploading {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.sync-pending {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.sync-synced {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.sync-offline {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

/* Remove button — aligns itself to the right */
.image-remove-btn {
    margin-left: auto;
    align-self: flex-start;
    flex-shrink: 0;
    font-size: 0.78rem;
    padding: 0.3rem 0.7rem;
}

/* ── TRADE DETAIL MODAL — CHART THUMBNAIL ────────────────────────────────────── */
.chart-screenshot-section { margin-top: 0.5rem; }

.chart-screenshot-wrapper {
    position: relative;
    display: inline-block;
    cursor: zoom-in;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.chart-screenshot-thumb {
    display: block;
    max-width: 100%;
    max-height: 260px;
    object-fit: contain;
    background: #0f0f1a;
    border-radius: 8px;
    transition: opacity 0.2s;
}

.chart-screenshot-wrapper:hover .chart-screenshot-thumb { opacity: 0.88; }

.chart-expand-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(15, 15, 26, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold, #d4af37);
    border-radius: 6px;
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.15s, color 0.15s;
    line-height: 1;
}

.chart-expand-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    color: #fff;
}

/* img-badge inline with section heading */
.img-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    vertical-align: middle;
    margin-left: 0.5rem;
}

.img-badge.synced  { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.img-badge.pending { background: rgba(245, 158, 11, 0.15);  color: #fbbf24; }

.img-load-error {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted, #9aa0b0);
    font-size: 0.85rem;
    padding: 1rem;
}

/* ── LIGHTBOX OVERLAY ────────────────────────────────────────────────────────── */
.img-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    background: rgba(5, 5, 15, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.22s ease;
    cursor: zoom-out;
}

.img-lightbox.active { opacity: 1; }

.lightbox-img {
    max-width: min(95vw, 1400px);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.75);
    cursor: default;
    /* Slight scale-up entrance */
    transform: scale(0.96);
    transition: transform 0.22s ease;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.img-lightbox.active .lightbox-img { transform: scale(1); }

.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(15, 15, 26, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--gold, #d4af37);
    border-radius: 50%;
    width: 2.4rem;
    height: 2.4rem;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    z-index: 9001;
}

.lightbox-close:hover {
    background: rgba(212, 175, 55, 0.25);
    color: #fff;
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .image-preview-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .image-preview {
        width: 100%;
        height: 140px;
    }

    .image-remove-btn { margin-left: 0; }

    .lightbox-img {
        max-width: 98vw;
        max-height: 85vh;
    }
}
