/*
 * Global Markets — Premium Dashboard
 * Desktop Styles
 */

/* ═══ Page Wrapper ═══ */
.gm-page {
    background: var(--bg);
    min-height: 60vh;
}

/* ═══ Hero ═══ */
.gm-hero {
    background: linear-gradient(135deg, var(--primary-deep) 0%, var(--primary) 60%, #0a4a30 100%);
    padding: 48px 0 40px;
    text-align: center;
    position: relative;
}
.gm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.gm-hero-inner {
    position: relative;
    z-index: 1;
}
.gm-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 20px;
    padding: 5px 16px;
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.gm-hero-dot {
    width: 7px; height: 7px;
    background: #34d399;
    border-radius: 50%;
    animation: gm-pulse 2s ease-in-out infinite;
}
@keyframes gm-pulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
}
.gm-hero-title {
    font-family: var(--font-display);
    font-size: 42px;
    font-weight: 900;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}
.gm-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.7);
    margin: 0 0 14px;
    font-weight: 400;
}
.gm-hero-time {
    display: inline-block;
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    background: rgba(255,255,255,0.06);
    padding: 4px 14px;
    border-radius: 12px;
}

/* ═══ Container ═══ */
.gm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 28px 32px 48px;
}

/* ═══ KSE-100 Hero Card ═══ */
.gm-kse-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
    transition: box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
}
.gm-kse-hero:hover { box-shadow: var(--shadow-md); }
.gm-kse-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}
.gm-kse-flag {
    width: 44px; height: 44px;
    background: var(--primary);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}
.gm-kse-label { font-size: 1rem; font-weight: 700; color: var(--text); }
.gm-kse-exchange { font-size: 0.75rem; color: var(--muted); margin-top: 1px; }
.gm-kse-center { text-align: center; }
.gm-kse-price { font-family: var(--font-mono); font-size: 32px; font-weight: 600; color: var(--text); line-height: 1.1; }
.gm-kse-changes { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.gm-kse-change { font-family: var(--font-mono); font-size: 0.9rem; color: var(--muted); }
.gm-kse-pct { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.gm-kse-right { display: flex; gap: 20px; flex-shrink: 0; }
.gm-kse-stat { text-align: center; }
.gm-kse-stat-label { display: block; font-size: 0.65rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }
.gm-kse-stat-val { display: block; font-family: var(--font-mono); font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* ═══ Market Summary Strip ═══ */
.gm-summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.gm-summary-item { text-align: center; padding: 0 14px; }
.gm-si-num { display: block; font-family: var(--font-mono); font-size: 1.25rem; font-weight: 700; color: var(--text); }
.gm-si-label { font-size: 0.68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.gm-si-adv .gm-si-num { color: #059669; }
.gm-si-dec .gm-si-num { color: #dc2626; }
.gm-si-unc .gm-si-num { color: var(--muted); }
.gm-si-link { cursor: pointer; text-decoration: none; }
.gm-si-link:hover .gm-si-label { color: var(--primary); }
.gm-summary-divider { width: 1px; height: 32px; background: var(--line); flex-shrink: 0; }

/* ═══ Other Indices Strip ═══ */
.gm-indices {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}
.gm-idx-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 14px;
    transition: border-color 0.15s ease;
}
.gm-idx-chip:hover { border-color: var(--primary); }
.gm-idx-name { font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.gm-idx-val { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; color: var(--text); }
.gm-idx-chg { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; }

/* ═══ Grid ═══ */
.gm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* ═══ Card ═══ */
.gm-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}
.gm-card:hover { box-shadow: var(--shadow-md); }
.gm-card-full { margin-bottom: 20px; }
.gm-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 22px 14px;
    border-bottom: 1px solid var(--grey);
}
.gm-card-icon-wrap {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.gm-icon-usa { background: rgba(37,99,235,0.1); color: #2563eb; }
.gm-icon-psx { background: rgba(0,95,56,0.1); color: var(--primary); }
.gm-icon-comm { background: rgba(184,148,44,0.1); color: #b8942c; }
.gm-icon-petro { background: rgba(234,88,12,0.1); color: #ea580c; }
.gm-icon-curr { background: rgba(139,92,246,0.1); color: #8b5cf6; }
.gm-icon-crypto { background: rgba(249,115,22,0.1); color: #f97316; }
.gm-card-title { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--text); margin: 0; }
.gm-card-count { font-size: 0.72rem; color: var(--muted); }
.gm-card-body { padding: 16px 22px 20px; }

/* ═══ Table ═══ */
.gm-table-wrap { overflow-x: auto; }
.gm-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.gm-table th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--grey);
}
.gm-table td { padding: 9px 10px; border-bottom: 1px solid var(--surface-2); }
.gm-table tr:last-child td { border-bottom: none; }
.gm-table tr:hover td { background: var(--surface-2); }
.gm-sym-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.78rem;
    background: var(--grey);
    padding: 2px 8px;
    border-radius: 5px;
    color: var(--text);
}
.gm-num { font-family: var(--font-mono); font-weight: 600; }
.gm-pct-badge {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 5px;
}
.gm-pb-up { background: rgba(5,150,105,0.1); color: #059669; }
.gm-pb-down { background: rgba(220,38,38,0.1); color: #dc2626; }
.gm-pb-flat { background: var(--grey); color: var(--muted); }

/* ═══ Direction Colors ═══ */
.gm-up { color: #059669 !important; }
.gm-down { color: #dc2626 !important; }
.gm-dir-up .gm-sym-badge { background: rgba(5,150,105,0.08); }
.gm-dir-down .gm-sym-badge { background: rgba(220,38,38,0.08); }

/* ═══ PSX Movers ═══ */
.gm-movers-body { display: flex; gap: 24px; }
.gm-mover-section { flex: 1; }
.gm-mover-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gm-mover-label.gm-up { color: #059669; }
.gm-mover-label.gm-down { color: #dc2626; }
.gm-mover-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--surface-2);
}
.gm-mover-row:last-child { border-bottom: none; }

.gm-card-link {
    display: block;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--surface-2);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.gm-card-link:hover { color: var(--primary-dark, #003d24); }
.gm-mr-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gm-mr-sym { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--text); flex-shrink: 0; }
.gm-mr-name { font-size: 0.76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.gm-mr-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.gm-mr-price { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 600; color: var(--text); }
.gm-mr-pct { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; }

/* ═══ Commodities Grid ═══ */
.gm-comm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.gm-comm-item {
    background: var(--surface-2);
    border: 1px solid var(--grey);
    border-radius: 12px;
    padding: 16px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gm-comm-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.gm-comm-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gm-comm-icon { font-size: 0.9rem; color: var(--muted); }
.gm-comm-name { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.gm-comm-price { font-family: var(--font-mono); font-size: 1.2rem; font-weight: 700; color: var(--text); }
.gm-comm-unit { font-size: 0.7rem; color: var(--muted-2); font-weight: 400; margin-left: 2px; }
.gm-comm-chg { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; margin-top: 4px; }

/* ═══ Crude Oil ═══ */
.gm-crude-hero {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    text-align: center;
}
.gm-crude-top { display: flex; justify-content: space-between; margin-bottom: 4px; }
.gm-crude-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; color: #9a3412; letter-spacing: 0.05em; }
.gm-crude-date { font-size: 0.7rem; color: #c2410c; }
.gm-crude-price { font-family: var(--font-mono); font-size: 2rem; font-weight: 700; color: var(--text); line-height: 1.2; }
.gm-crude-sub { font-size: 0.75rem; color: var(--muted); margin-bottom: 4px; }
.gm-crude-chg { font-family: var(--font-mono); font-size: 0.85rem; font-weight: 700; }

/* ═══ Fuel List ═══ */
.gm-fuel-list { display: flex; flex-direction: column; }
.gm-fuel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--surface-2);
}
.gm-fuel-row:last-child { border-bottom: none; }
.gm-fuel-info { display: flex; flex-direction: column; }
.gm-fuel-name { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.gm-fuel-date { font-size: 0.68rem; color: var(--muted-2); margin-top: 1px; }
.gm-fuel-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.gm-fuel-price { font-family: var(--font-mono); font-size: 0.9rem; font-weight: 700; color: var(--text); }
.gm-fuel-chg { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; }

/* ═══ Currency Grid ═══ */
.gm-curr-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.gm-curr-item {
    background: var(--surface-2);
    border: 1px solid var(--grey);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gm-curr-item:hover { border-color: var(--primary); transform: translateY(-1px); }
.gm-curr-top { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.gm-curr-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px; height: 26px;
    background: var(--grey);
    border-radius: 6px;
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text);
}
.gm-curr-name { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.gm-curr-price { font-family: var(--font-mono); font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.gm-curr-chg { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; }

/* ═══ Crypto Grid ═══ */
.gm-crypto-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}
.gm-crypto-item {
    background: var(--surface-2);
    border: 1px solid var(--grey);
    border-radius: 14px;
    padding: 16px 14px;
    text-align: center;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.gm-crypto-item:hover { border-color: var(--primary); transform: translateY(-2px); }
.gm-crypto-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.gm-crypto-icon { font-size: 1.1rem; color: #f97316; }
.gm-crypto-sym { font-family: var(--font-mono); font-size: 0.82rem; font-weight: 700; color: var(--text); }
.gm-crypto-label { font-size: 0.68rem; color: var(--muted-2); }
.gm-crypto-price { font-family: var(--font-mono); font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.gm-crypto-chg { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; }


/* ── Drawer/Hamburger z-index safety ── */
.site-header { z-index: 100; }
.hamburger-toggle { z-index: 101; position: relative; }
.mobile-drawer { z-index: 1000 !important; }
.drawer-overlay { z-index: 999 !important; }

