/* =============================================
   DESIGN TOKENS — MODERN PREMIUM THEME
   ============================================= */
:root {
    --navy: #0B1121;
    --navy-light: #111827;
    --navy-lighter: #1F2937;
    --navy-muted: #374151;
    --accent: #10B981;
    --accent-hover: #059669;
    --accent-light: rgba(16, 185, 129, 0.08);
    --accent-glow: rgba(16, 185, 129, 0.15);
    --blue: #3B82F6;
    --blue-light: rgba(59, 130, 246, 0.1);
    --purple: #8B5CF6;
    --green: #10B981;
    --orange: #F59E0B;
    --red: #EF4444;
    --gray: #9CA3AF;
    --gray-dark: #6B7280;
    --bg: #F9FAFB;
    --bg-alt: #F3F4F6;
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.06);
    --text: #111827;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-accent: 0 4px 20px rgba(16, 185, 129, 0.25);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* =============================================
   BASE
   ============================================= */
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background: var(--accent);
    color: white;
}

/* =============================================
   APP NAVBAR
   ============================================= */
.app-navbar {
    background: var(--navy) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.market-ticker {
    position: sticky;
    top: 56px;
    z-index: 1029;
}
.app-navbar .container {
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}
.app-navbar .navbar-toggler-icon {
    filter: brightness(2);
}
.app-navbar .nav-link {
    color: rgba(255, 255, 255, 0.65) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 0.9rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}
.app-navbar .nav-link svg {
    opacity: 0.6;
    transition: var(--transition-fast);
}
.app-navbar .nav-link:hover svg {
    opacity: 1;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-inline-end: 8px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-lang {
    color: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 14px;
    border-radius: 8px !important;
    transition: var(--transition-fast);
    letter-spacing: 0.02em;
}
.btn-lang:hover {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.35) !important;
    background: rgba(255, 255, 255, 0.08);
}

/* =============================================
   BUTTONS
   ============================================= */
.btn-accent {
    background: linear-gradient(135deg, var(--accent), #059669) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-accent);
    letter-spacing: 0.01em;
}
.btn-accent:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(16, 185, 129, 0.35);
}
.btn-accent:active {
    transform: translateY(0);
}

.btn { border-radius: var(--radius-sm); }

.btn-outline-primary {
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
.btn-outline-primary:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}

.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}
.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
}

/* =============================================
   CARDS
   ============================================= */
.card {
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    background: var(--card-bg);
    transition: var(--transition);
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--card-border);
    font-weight: 600;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text);
}

/* =============================================
   KEY METRICS & ANALYST VIEWS
   ============================================= */
.key-metrics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.key-metric-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-fast);
}
.key-metric-item:hover {
    background: var(--bg-alt);
}
.key-metric-item:nth-child(odd) {
    border-inline-end: 1px solid var(--card-border);
}
.key-metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.key-metric-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    font-variant-numeric: tabular-nums;
}
.analyst-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-bottom: 1px solid var(--card-border);
    transition: var(--transition-fast);
}
.analyst-row:last-child { border-bottom: none; }
.analyst-row:hover { background: var(--bg-alt); }
.analyst-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.analyst-firm {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
}
.analyst-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.analyst-price {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--navy);
    background: var(--bg-alt);
    padding: 3px 10px;
    border-radius: 6px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.analyst-pct {
    font-size: 0.72rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .key-metrics-grid { grid-template-columns: 1fr; }
    .key-metric-item:nth-child(odd) { border-inline-end: none; }
}

/* =============================================
   RISK INDICATOR
   ============================================= */
.risk-indicator-card .card-header {
    flex-wrap: wrap;
    gap: 10px;
}
.risk-gauge {
    position: relative;
    width: 120px;
    height: 22px;
    background: linear-gradient(to right, #198754, #ffc107, #fd7e14, #dc3545);
    border-radius: 11px;
    overflow: hidden;
}
.risk-gauge-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 11px;
    opacity: 0;
}
.risk-gauge-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}
.risk-score-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.risk-score-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 100px;
    color: var(--text);
}
.risk-mini-bar {
    flex: 1;
    height: 10px;
    background: var(--bg-alt);
    border-radius: 5px;
    overflow: hidden;
}
.risk-mini-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease;
}
.risk-score-val {
    font-size: 0.78rem;
    font-weight: 700;
    min-width: 40px;
    text-align: end;
    font-variant-numeric: tabular-nums;
}
.risk-breakdown-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.risk-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.risk-pill:hover {
    transform: scale(1.08);
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.risk-pill-green {
    background: rgba(25,135,84,0.12);
    color: #198754;
}
.risk-pill-orange {
    background: rgba(253,126,20,0.12);
    color: #e67700;
}
.risk-pill-red {
    background: rgba(220,53,69,0.12);
    color: #dc3545;
}
.risk-pill-name {
    opacity: 0.8;
}
.risk-pill-score {
    font-weight: 800;
}
/* Risk modal */
.risk-modal-score-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    flex-shrink: 0;
}
.risk-scale-bar {
    position: relative;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #198754, #ffc107, #fd7e14, #dc3545);
    margin: 8px 0 4px;
}
.risk-scale-marker {
    position: absolute;
    top: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
    transform: translateX(-50%);
    transition: left 0.3s;
}
.risk-chart-container {
    position: relative;
}
.risk-chart-container canvas:first-child {
    height: 200px !important;
}
.risk-chart-container canvas:last-child {
    height: 100px !important;
    margin-top: -1px;
}

/* =============================================
   SIGNAL SYSTEM
   ============================================= */
.signal-green { color: var(--green); font-weight: 600; }
.signal-orange { color: var(--orange); font-weight: 600; }
.signal-red { color: var(--red); font-weight: 600; }
.signal-gray { color: var(--gray); }

.signal-badge-green { background: linear-gradient(135deg, #10B981, #059669); color: white; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.signal-badge-orange { background: linear-gradient(135deg, #F59E0B, #D97706); color: white; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.signal-badge-red { background: linear-gradient(135deg, #EF4444, #DC2626); color: white; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }
.signal-badge-gray { background: linear-gradient(135deg, #9CA3AF, #6B7280); color: white; padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; }

/* =============================================
   METRIC CARDS
   ============================================= */
.metric-card {
    border-left: 3px solid var(--card-border);
    padding: 14px 18px;
    margin-bottom: 10px;
    background: var(--card-bg);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    box-shadow: var(--shadow-xs);
    transition: var(--transition);
}
.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
    background: var(--bg);
}
.metric-card.green { border-left-color: var(--green); }
.metric-card.orange { border-left-color: var(--orange); }
.metric-card.red { border-left-color: var(--red); }
.metric-card.gray { border-left-color: var(--gray); }

[dir="rtl"] .metric-card {
    border-left: none;
    border-right: 3px solid var(--card-border);
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
[dir="rtl"] .metric-card:hover { transform: translateX(-4px); }
[dir="rtl"] .metric-card.green { border-right-color: var(--green); }
[dir="rtl"] .metric-card.orange { border-right-color: var(--orange); }
[dir="rtl"] .metric-card.red { border-right-color: var(--red); }
[dir="rtl"] .metric-card.gray { border-right-color: var(--gray); }

/* =============================================
   BUY SIGNAL BOX
   ============================================= */
.buy-signal-box {
    padding: 36px;
    border-radius: var(--radius);
    text-align: center;
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}
.buy-signal-box::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.04;
    background: radial-gradient(circle at 50% 0%, currentColor, transparent 70%);
}
.buy-signal-box.green { background: #ECFDF5; border: 1px solid rgba(16, 185, 129, 0.2); color: #065F46; }
.buy-signal-box.orange { background: #FFFBEB; border: 1px solid rgba(245, 158, 11, 0.2); color: #92400E; }
.buy-signal-box.red { background: #FEF2F2; border: 1px solid rgba(239, 68, 68, 0.2); color: #991B1B; }

/* =============================================
   STOCK HEADER
   ============================================= */
.stock-header {
    background: linear-gradient(135deg, var(--navy) 0%, #162044 50%, var(--navy-lighter) 100%);
    color: white;
    padding: 36px 40px;
    border-radius: var(--radius);
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}
.stock-header::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -50px;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    border-radius: 50%;
}
.stock-header::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: 20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}
.stock-header h2 {
    font-weight: 700;
    font-size: 1.6rem;
    margin-bottom: 6px;
}
.stock-header h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0;
}

/* =============================================
   SEARCH HERO
   ============================================= */
.search-hero {
    text-align: center;
    padding: 80px 0 60px;
}
.search-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--navy);
    letter-spacing: -0.02em;
}
.search-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}
.search-hero .input-group {
    box-shadow: var(--shadow-md);
    border-radius: var(--radius) !important;
    overflow: hidden;
}
.search-hero .form-control {
    border: 2px solid var(--card-border);
    border-right: none;
    padding: 0.8rem 1.2rem;
}
.search-hero .form-control:focus {
    border-color: var(--accent);
    box-shadow: none;
}

/* =============================================
   TOOLTIPS & POPOVERS
   ============================================= */
.info-tooltip {
    color: var(--gray);
    cursor: pointer;
    margin-inline-start: 6px;
    vertical-align: middle;
    transition: var(--transition-fast);
}
.info-tooltip:hover,
.info-tooltip:focus {
    color: var(--accent);
}

.metric-popover { max-width: 360px; }
.metric-popover .popover-header {
    font-weight: 600;
    background: var(--navy);
    color: white;
    border: none;
}
.metric-popover .popover-body {
    white-space: pre-line;
    font-size: 0.875rem;
    line-height: 1.6;
}
.metric-popover-rtl { direction: rtl; text-align: right; }
.metric-popover-rtl .popover-header { text-align: right; }
.metric-popover-rtl .popover-body { text-align: justify; }

/* =============================================
   TABLES
   ============================================= */
.table {
    font-size: 0.9rem;
    --bs-table-hover-bg: rgba(16, 185, 129, 0.04);
}
.table thead th {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom-width: 1px;
    padding: 0.9rem 1rem;
}
.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
}
.table-dark th {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* =============================================
   FORMS
   ============================================= */
.form-control,
.form-select {
    border: 1.5px solid #E5E7EB;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    font-size: 0.9rem;
    transition: var(--transition-fast);
    color: var(--text);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
}
.form-control-lg {
    padding: 0.75rem 1.1rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}
.form-label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

/* =============================================
   AUTH PAGES
   ============================================= */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F9FAFB 0%, #EEF2FF 50%, #F0FDF4 100%);
    padding: 2rem;
}
.auth-card {
    max-width: 440px;
    margin: 60px auto;
}
.auth-card .card {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 20px;
    overflow: hidden;
}
.auth-card .card-header {
    background: linear-gradient(135deg, var(--navy), #162044);
    color: white;
    text-align: center;
    padding: 2rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    position: relative;
    overflow: hidden;
}
.auth-card .card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.auth-card .card-body {
    padding: 2rem 2rem 2.5rem;
}
.auth-card .btn-accent {
    padding: 0.7rem;
    font-size: 1rem;
}

/* =============================================
   ALERTS & BADGES
   ============================================= */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.9rem;
}
.badge {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.35em 0.85em;
    border-radius: 8px;
}

/* =============================================
   PAGE HEADERS
   ============================================= */
.page-header {
    margin-bottom: 2rem;
}
.page-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}
.page-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* =============================================
   EMPTY STATES
   ============================================= */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}
.empty-state-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.empty-state h5 {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 360px;
    margin: 0 auto 20px;
}

/* =============================================
   DROPDOWN
   ============================================= */
.dropdown-menu {
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}
.dropdown-item {
    border-radius: var(--radius-xs);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition-fast);
}
.dropdown-item:hover {
    background: var(--bg-alt);
}

/* =============================================
   LANDING PAGE
   ============================================= */
.landing-page {
    background: var(--navy);
    overflow-x: hidden;
}

.landing-nav {
    background: rgba(11, 17, 33, 0.8) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

/* Hero Section */
.landing-hero {
    padding: 140px 0 100px;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 0%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 60%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}
.landing-hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 60%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite reverse;
    pointer-events: none;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}

.min-vh-75 { min-height: 70vh; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.15);
    backdrop-filter: blur(10px);
}
.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -0.03em;
}
.text-accent { color: var(--accent) !important; }

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 480px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}
.hero-stat {
    display: flex;
    flex-direction: column;
}
.hero-stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.02em;
}
.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
    margin-top: 2px;
}

/* Hero Visual Card */
.hero-visual {
    perspective: 1200px;
    position: relative;
    z-index: 1;
}
.hero-card {
    background: rgba(17, 24, 39, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transform: rotateY(-6deg) rotateX(3deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}
.hero-card:hover {
    transform: rotateY(0deg) rotateX(0deg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3), 0 0 40px rgba(16, 185, 129, 0.1);
}
[dir="rtl"] .hero-card {
    transform: rotateY(6deg) rotateX(3deg);
}
[dir="rtl"] .hero-card:hover {
    transform: rotateY(0deg) rotateX(0deg);
}
.hero-card-header {
    padding: 14px 18px;
    display: flex;
    gap: 7px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.hero-card-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.hero-card-dot.green { background: #34D399; }
.hero-card-dot.orange { background: #FBBF24; }
.hero-card-dot.red { background: #F87171; }

.hero-card-body { padding: 24px; }
.hero-stock-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.hero-stock-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.01em;
}
.hero-stock-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    flex-grow: 1;
}
.hero-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}
.hero-metric {
    background: rgba(255, 255, 255, 0.04);
    padding: 14px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.04);
}
.hero-metric-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    font-weight: 500;
}
.hero-metric-value {
    font-weight: 700;
    font-size: 0.95rem;
}

.hero-chart-svg {
    width: 100%;
    height: 60px;
    opacity: 0.8;
}

/* Features Section */
.landing-features {
    background: var(--bg);
    padding: 120px 0;
    position: relative;
}
.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto;
}
.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 36px 28px;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--blue));
    opacity: 0;
    transition: var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
}
.feature-card:hover::before {
    opacity: 1;
}
.feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-light), rgba(59, 130, 246, 0.06));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.feature-card h5 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
    font-size: 1.05rem;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.7;
}

/* Steps Section */
.landing-steps {
    background: white;
    padding: 120px 0;
    position: relative;
}
.step-card {
    text-align: center;
    padding: 36px 28px;
    position: relative;
}
.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 20px;
    box-shadow: var(--shadow-accent);
}
.step-card h5 {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}
.step-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* CTA Section */
.landing-cta {
    background: linear-gradient(135deg, var(--navy) 0%, #0F1629 40%, #111D33 100%);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}
.landing-cta::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
}
.cta-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    position: relative;
    letter-spacing: -0.02em;
}
.cta-subtitle {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    margin-bottom: 36px;
    position: relative;
}

/* Footer */
.landing-footer {
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 36px 0;
}
.footer-text {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.85rem;
}

/* =============================================
   DASHBOARD SPECIFIC
   ============================================= */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.stat-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}
.stat-card-icon.green { background: rgba(16, 185, 129, 0.1); }
.stat-card-icon.blue { background: rgba(59, 130, 246, 0.1); }
.stat-card-icon.purple { background: rgba(139, 92, 246, 0.1); }
.stat-card-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 4px;
}
.stat-card-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* =============================================
   MARKET TICKER BAR
   ============================================= */
.market-ticker {
    background: var(--navy-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    /* sticky positioning is set above in APP NAVBAR section */
}
.market-ticker::-webkit-scrollbar { display: none; }
.market-ticker-inner {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 40px;
    padding: 0 16px;
}
.market-ticker-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
}
.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    white-space: nowrap;
    cursor: pointer;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-fast);
}
.ticker-item:last-child { border-inline-end: none; }
.ticker-item:hover {
    background: rgba(255, 255, 255, 0.05);
}
.ticker-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.ticker-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
}
.ticker-value {
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: -0.01em;
}
.ticker-change {
    font-size: 0.75rem;
    font-weight: 700;
}

/* Full market page cards */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.market-card {
    border: 1.5px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
    background: var(--card-bg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.market-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.market-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.market-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.market-info-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: var(--transition-fast);
}
.market-info-btn:hover {
    color: var(--accent);
    background: var(--accent-light);
}
.market-card-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.market-card-value {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 6px;
}
.market-card-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 14px;
}
.market-card-chart {
    margin-top: 4px;
}
.market-mini-chart {
    width: 100%;
    height: 40px;
    display: block;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 991px) {
    .landing-hero { padding: 100px 0 60px; }
    .hero-title { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-stats { gap: 28px; }
    .hero-stat-number { font-size: 1.3rem; }
    .hero-card { transform: none; }
    [dir="rtl"] .hero-card { transform: none; }
    .landing-hero { padding: 90px 0 50px; }
    .landing-features,
    .landing-steps { padding: 70px 0; }
    .landing-cta { padding: 60px 0; }
    .section-title { font-size: 1.6rem; }
    .cta-title { font-size: 1.6rem; }
    .hero-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stock-header { padding: 24px; }
    .stock-header h2 { font-size: 1.3rem; }
    .stock-header h3 { font-size: 1.5rem; }
    .search-hero { padding: 50px 0 30px; }
    .search-hero h1 { font-size: 1.8rem; }
    .auth-card { margin: 30px auto; }
}

@media (max-width: 576px) {
    .hero-stats { flex-direction: column; gap: 16px; }
    .dashboard-stats { grid-template-columns: 1fr; }
    .market-grid { grid-template-columns: 1fr; }
}

/* Floating Contact Button */
.floating-contact-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1050;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0088cc;
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 136, 204, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.floating-contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 136, 204, 0.5);
    color: #fff;
}
[dir="rtl"] .floating-contact-btn {
    right: auto;
    left: 24px;
}
@media (max-width: 576px) {
    .floating-contact-btn span { display: none; }
    .floating-contact-btn { padding: 14px; border-radius: 50%; }
}
