/* =====================================================
   BorsaVizyon - Main Stylesheet
   Dark theme financial data platform
   ===================================================== */

:root {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-tertiary: #242833;
    --bg-card: #1e2130;
    --bg-hover: #282c3a;
    --bg-input: #1a1d27;

    --text-primary: #e8eaed;
    --text-secondary: #9aa0b0;
    --text-muted: #6b7280;
    --text-link: #818cf8;

    --border-color: #2d3148;
    --border-light: #363b50;

    --accent-primary: #6C5CE7;
    --accent-secondary: #00D2D3;

    --success: #00C48C;
    --danger: #FF4757;
    --warning: #FFA502;
    --info: #3742fa;

    --positive: #00C48C;
    --negative: #FF4757;
    --neutral: #9aa0b0;

    --sidebar-width: 220px;
    --header-height: 56px;
    --ticker-height: 36px;
    --footer-height: auto;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --shadow-sm: 0 1px 2px 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);

    --transition: all 0.2s ease;
}

/* =====================================================
   RESET & BASE
   ===================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-primary);
}

img {
    max-width: 100%;
    height: auto;
}

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

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =====================================================
   TICKER BAR
   ===================================================== */
.ticker-bar {
    height: var(--ticker-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    overflow: hidden;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.ticker-wrapper {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    align-items: center;
    height: 100%;
    animation: ticker-scroll 40s linear infinite;
    width: max-content;
    gap: 30px;
    padding: 0 20px;
}

.ticker-track:hover {
    animation-play-state: paused;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.ticker-item:hover {
    background: var(--bg-hover);
}

.ticker-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.ticker-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-mono);
}

.ticker-change {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--font-mono);
    padding: 1px 6px;
    border-radius: 4px;
}

.ticker-change.positive {
    color: var(--positive);
    background: rgba(0, 196, 140, 0.12);
}

.ticker-change.negative {
    color: var(--negative);
    background: rgba(255, 71, 87, 0.12);
}

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: var(--ticker-height);
    z-index: 999;
}

.header-inner {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    gap: 16px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.header-search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0 12px;
    height: 36px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

.search-box i {
    color: var(--text-muted);
    font-size: 14px;
    margin-right: 8px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

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

.search-box kbd {
    font-size: 11px;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: var(--font-family);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 1100;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    gap: 10px;
}

.search-result-item:hover {
    background: var(--bg-hover);
}

.search-result-item .result-code {
    font-weight: 600;
    min-width: 60px;
}

.search-result-item .result-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 18px;
}

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

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

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

.header-login-btn {
    font-size: 13px;
}

/* =====================================================
   SIDEBAR
   ===================================================== */
.main-wrapper {
    display: flex;
    min-height: calc(100vh - var(--header-height) - var(--ticker-height));
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: calc(var(--header-height) + var(--ticker-height));
    height: calc(100vh - var(--header-height) - var(--ticker-height));
    overflow-y: auto;
    flex-shrink: 0;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-nav {
    padding: 8px 0;
}

.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin: 1px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(108, 92, 231, 0.12);
    color: var(--accent-primary);
}

.nav-link i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.submenu-arrow {
    margin-left: auto;
    font-size: 10px;
    transition: transform 0.2s;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 16px;
}

.submenu {
    list-style: none;
    padding: 0 0 0 42px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.has-submenu.open .submenu {
    max-height: 200px;
}

.has-submenu.open .submenu-arrow {
    transform: rotate(180deg);
}

.submenu a {
    display: block;
    padding: 6px 12px;
    font-size: 12px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    text-decoration: none;
}

.submenu a:hover,
.submenu a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */
.main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
    max-width: 100%;
}

/* =====================================================
   CARDS & WIDGETS
   ===================================================== */
.card, .widget {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.card-header, .widget-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
}

.card-header h3, .widget-header h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.card-body, .widget-body {
    padding: 16px;
}

.card-footer, .widget-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.view-all-link {
    font-size: 12px;
    color: var(--text-link);
    font-weight: 500;
}

/* =====================================================
   DATA TABLE
   ===================================================== */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-card);
    text-align: left;
    white-space: nowrap;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody td {
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.data-table .col-code {
    font-weight: 600;
    color: var(--text-primary);
}

.data-table .col-name {
    color: var(--text-secondary);
    font-size: 12px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-table .col-price {
    font-family: var(--font-mono);
    font-weight: 500;
}

.data-table .col-change {
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 12px;
}

/* =====================================================
   PERCENT / PRICE COLORS
   ===================================================== */
.text-success, .positive {
    color: var(--positive) !important;
}

.text-danger, .negative {
    color: var(--negative) !important;
}

.text-muted, .neutral {
    color: var(--neutral) !important;
}

.bg-success-soft { background: rgba(0, 196, 140, 0.12); }
.bg-danger-soft { background: rgba(255, 71, 87, 0.12); }

.badge-positive {
    background: rgba(0, 196, 140, 0.12);
    color: var(--positive);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

.badge-negative {
    background: rgba(255, 71, 87, 0.12);
    color: var(--negative);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* =====================================================
   HOMEPAGE SPECIFIC
   ===================================================== */
.page-header {
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 2px;
}

.page-header .page-subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.page-header .page-date {
    color: var(--text-muted);
    font-size: 13px;
}

.page-header .page-time {
    font-family: var(--font-mono);
    font-size: 22px;
    font-weight: 300;
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
}

.dashboard-main {
    min-width: 0;
}

.dashboard-side {
    min-width: 0;
}

/* Chart area */
.chart-container {
    position: relative;
    height: 280px;
    margin-bottom: 20px;
}

.chart-tabs {
    display: flex;
    gap: 4px;
    margin-top: 8px;
}

.chart-tab {
    padding: 4px 12px;
    font-size: 12px;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.chart-tab.active, .chart-tab:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

/* Top Movers */
.top-movers-tabs {
    display: flex;
    gap: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.top-movers-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.top-movers-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.mover-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mover-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.mover-item:last-child {
    border-bottom: none;
}

.mover-rank {
    width: 24px;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

.mover-code {
    font-weight: 600;
    font-size: 13px;
    flex: 1;
}

.mover-price {
    font-family: var(--font-mono);
    font-size: 13px;
    margin-right: 12px;
}

.mover-change {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    min-width: 65px;
    text-align: right;
}

/* Side widgets */
.side-widget {
    margin-bottom: 16px;
}

.side-widget .widget-header {
    padding: 12px 14px;
}

.side-widget .widget-header h3 {
    font-size: 14px;
}

.side-widget .widget-body {
    padding: 12px 14px;
}

/* IPO Widget */
.ipo-empty {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Dividend Widget */
.dividend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.dividend-item:last-child {
    border-bottom: none;
}

.dividend-code {
    font-weight: 600;
    color: var(--accent-primary);
}

.dividend-date {
    color: var(--text-muted);
    font-size: 12px;
}

.dividend-amount {
    font-family: var(--font-mono);
    font-weight: 500;
}

/* Gold Market Widget */
.gold-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.gold-item:last-child {
    border-bottom: none;
}

.gold-name {
    font-size: 13px;
    font-weight: 500;
}

.gold-price {
    font-family: var(--font-mono);
    font-size: 13px;
}

.gold-change {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
}

/* Economic Calendar Widget */
.eco-event {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.eco-event:last-child {
    border-bottom: none;
}

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

.eco-event-title {
    font-size: 13px;
    font-weight: 500;
}

.eco-event-importance {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.eco-event-importance.yuksek {
    background: rgba(255, 71, 87, 0.12);
    color: var(--danger);
}

.eco-event-importance.orta {
    background: rgba(255, 165, 2, 0.12);
    color: var(--warning);
}

.eco-event-importance.dusuk {
    background: rgba(107, 114, 128, 0.12);
    color: var(--text-muted);
}

.eco-event-values {
    display: flex;
    gap: 16px;
    font-size: 12px;
}

.eco-event-values span {
    color: var(--text-muted);
}

.eco-event-values strong {
    color: var(--text-primary);
    margin-left: 4px;
}

.eco-event-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

.eco-country-flag {
    font-size: 14px;
}

/* Community Widget */
.community-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.community-item:last-child {
    border-bottom: none;
}

.community-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.community-content {
    flex: 1;
    min-width: 0;
}

.community-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-meta {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    gap: 8px;
}

/* =====================================================
   FILTER BAR
   ===================================================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.filter-bar .btn-filter {
    padding: 6px 14px;
    font-size: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-bar .btn-filter:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.filter-bar .btn-filter.active {
    background: rgba(108, 92, 231, 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* =====================================================
   TAB SYSTEM
   ===================================================== */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 16px;
}

.tab-link {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
}

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

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

.tab-content {
    display: none;
}

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

/* =====================================================
   FORMS
   ===================================================== */
.form-control, .form-select {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 14px;
    padding: 10px 14px;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background: var(--bg-input);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
}

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

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

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 8px 20px;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background: #5A4BD4;
    border-color: #5A4BD4;
}

.btn-outline-primary {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-outline-primary:hover {
    background: var(--accent-primary);
    color: white;
}

.btn-outline-secondary {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

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

.btn-outline-light {
    border-color: var(--border-light);
    color: var(--text-primary);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.page-link-custom {
    padding: 6px 12px;
    font-size: 13px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.page-link-custom:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.page-link-custom.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.page-info {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 16px;
}

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-container {
    max-width: 420px;
    margin: 60px auto;
    padding: 0 16px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px;
}

.auth-card h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    text-align: center;
}

.auth-card .form-group {
    margin-bottom: 16px;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    color: var(--text-muted);
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--text-muted);
}

/* =====================================================
   ADMIN PANEL
   ===================================================== */
.admin-layout {
    display: flex;
    gap: 20px;
}

.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
}

.admin-main {
    flex: 1;
    min-width: 0;
}

.admin-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.admin-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.admin-stat-value {
    font-size: 24px;
    font-weight: 700;
}

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

/* =====================================================
   COOKIE BANNER
   ===================================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.5);
}

.cookie-content {
    max-width: 900px;
    margin: 0 auto;
}

.cookie-content h6 {
    font-size: 14px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cookie-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    line-height: 1.6;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-left: var(--sidebar-width);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-app-banner {
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.footer-app-banner h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-app-banner p {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.app-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.app-btn img {
    height: 40px;
    border-radius: var(--radius-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.footer-col h6 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 6px;
}

.footer-col a {
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--text-primary);
}

.footer-disclaimer {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.footer-disclaimer p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.footer-bottom p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    color: var(--text-muted);
    font-size: 16px;
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--text-primary);
}

/* =====================================================
   MOBILE BOTTOM NAV
   ===================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    color: var(--text-muted);
    font-size: 10px;
    text-decoration: none;
    transition: var(--transition);
    padding: 4px 8px;
}

.mobile-nav-item i {
    font-size: 20px;
}

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

/* =====================================================
   STOCK DETAIL PAGE
   ===================================================== */
.stock-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.stock-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-code-badge {
    font-size: 22px;
    font-weight: 700;
}

.stock-name {
    font-size: 14px;
    color: var(--text-secondary);
}

.stock-price-large {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
}

.stock-change-large {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 600;
}

.stock-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stock-info-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

.stock-info-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stock-info-value {
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-mono);
}

/* =====================================================
   ALERTS / NOTIFICATIONS
   ===================================================== */
.alert-custom {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.alert-success {
    background: rgba(0, 196, 140, 0.12);
    border: 1px solid rgba(0, 196, 140, 0.3);
    color: var(--positive);
}

.alert-error {
    background: rgba(255, 71, 87, 0.12);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: var(--negative);
}

.alert-warning {
    background: rgba(255, 165, 2, 0.12);
    border: 1px solid rgba(255, 165, 2, 0.3);
    color: var(--warning);
}

.alert-info {
    background: rgba(55, 66, 250, 0.12);
    border: 1px solid rgba(55, 66, 250, 0.3);
    color: var(--info);
}

/* =====================================================
   LIVE STREAM
   ===================================================== */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--danger);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.stream-embed {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.stream-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* =====================================================
   CHAT
   ===================================================== */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--header-height) - var(--ticker-height) - 80px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.chat-message-content {
    flex: 1;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
}

.chat-input-area input {
    flex: 1;
}

/* =====================================================
   TECHNICAL ANALYSIS
   ===================================================== */
.ta-signal {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.ta-signal.buy {
    background: rgba(0, 196, 140, 0.12);
    color: var(--positive);
}

.ta-signal.sell {
    background: rgba(255, 71, 87, 0.12);
    color: var(--negative);
}

.ta-signal.neutral {
    background: rgba(107, 114, 128, 0.12);
    color: var(--neutral);
}

/* =====================================================
   EMPTY STATES
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 13px;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 992px) {
    .sidebar {
        position: fixed;
        left: -var(--sidebar-width);
        top: calc(var(--header-height) + var(--ticker-height));
        height: calc(100vh - var(--header-height) - var(--ticker-height));
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1049;
    }

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

    .main-content {
        padding: 16px;
    }

    .site-footer {
        margin-left: 0;
    }

    .dashboard-side {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 52px;
    }

    .header-search {
        display: none;
    }

    .logo-text {
        font-size: 16px;
    }

    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }

    .stock-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    body {
        padding-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   DROPDOWN MENUS
   ===================================================== */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 4px;
}

.dropdown-item {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.dropdown-item-text {
    color: var(--text-primary);
    font-size: 13px;
}

.dropdown-divider {
    border-color: var(--border-color);
    margin: 4px 0;
}

/* =====================================================
   TABLE RESPONSIVE WRAPPER
   ===================================================== */
.table-responsive-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

/* View Tabs for different table views */
.view-tabs {
    display: flex;
    gap: 4px;
    padding: 2px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.view-tab {
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 500;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.view-tab.active {
    background: var(--bg-card);
    color: var(--text-primary);
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.font-mono { font-family: var(--font-mono); }
.fw-600 { font-weight: 600; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
