
/* ============================================================
   MARKETSOARS · PREMIUM STOCK DASHBOARD
   ============================================================ */

:root {
    /* Surfaces */
    --bg-base:       #f5f7fb;
    --bg-soft:       #f1f4f9;
    --card-bg:       #ffffff;
    --card-elev:     #fafbfd;

    /* Ink scale */
    --ink-900:       #0a1633;
    --ink-700:       #324166;
    --ink-500:       #6b7896;
    --ink-400:       #94a0bb;
    --ink-300:       #d2d8e3;

    /* Brand & accents */
    --brand:         #0b2750;
    --brand-soft:    #e0ebff;
    --accent:        #2563eb;
    --accent-soft:   #e0ebff;

    /* Semantic */
    --good:          #059669;
    --good-soft:     #d9f5e8;
    --bad:           #dc2626;
    --bad-soft:      #fde2e2;
    --warn:          #b45309;
    --warn-soft:     #fdebcd;

    /* Lines */
    --line:          #e4e8ef;
    --line-strong:   #d2d8e3;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15,30,60,.04), 0 1px 1px rgba(15,30,60,.03);
    --shadow-md: 0 1px 3px rgba(15,30,60,.06), 0 8px 24px -12px rgba(15,30,60,.10);
    --shadow-lg: 0 6px 20px -8px rgba(15,30,60,.18), 0 24px 48px -24px rgba(15,30,60,.18);

    /* Type */
    --f-display: 'Fraunces', Georgia, serif;
    --f-body: 'Manrope', system-ui, -apple-system, Segoe UI, sans-serif;
    --f-mono: 'JetBrains Mono', ui-monospace, monospace;

    /* Radii */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--ink-900);
    font-family: var(--f-body);
    font-size: 14.5px;
    line-height: 1.55;
    font-feature-settings: "ss01", "cv11";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(1200px 600px at 90% -200px, #e2ecff 0%, transparent 60%),
        radial-gradient(900px 500px at -100px 100px, #e8f1ff 0%, transparent 50%);
}

.num, .stk-price, .stk-change, .h-val, .val, .news-time {
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   LAYOUT CONTAINER
   ============================================================ */
.stk-container {
    max-width: 1340px;
    margin: 28px auto;
    padding: 0 22px;
    min-height: 80vh;
}

/* ============================================================
   HERO BLOCK
   ============================================================ */
.stk-hero {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 28px 32px;
    box-shadow: var(--shadow-md);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
}

.stk-hero::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 140px; height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent));
}

.stk-hero::before {
    content: attr(data-symbol);
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%);
    font-family: var(--f-display);
    font-size: clamp(80px, 14vw, 180px);
    font-weight: 800;
    color: rgba(15, 30, 60, 0.025);
    z-index: 0;
    white-space: nowrap;
    pointer-events: none;
    letter-spacing: -4px;
    font-style: italic;
}

.stk-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;
    flex-wrap: wrap;
}

.stk-hero-left { flex: 1 1 420px; min-width: 0; }
.stk-hero-right { text-align: right; flex-shrink: 0; }

.stk-live-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-500);
    margin-bottom: 10px;
}
.stk-live-tag::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5);
    animation: ms-pulse 2s infinite;
}
@keyframes ms-pulse {
    0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.5); }
    70% { box-shadow: 0 0 0 8px rgba(5, 150, 105, 0); }
    100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* GRADIENT SYMBOL COLOR APPLIED HERE */
.stk-hero-left .symbol {
    font-family: var(--f-display);
    font-size: clamp(34px, 4.4vw, 52px);
    font-weight: 600;
    background: linear-gradient(135deg, var(--accent) 0%, var(--brand) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    letter-spacing: -1.5px;
    word-break: break-word;
}

.stk-hero-left .name {
    font-size: 13.5px;
    color: var(--ink-500);
    margin-top: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.stk-hero-left .badges {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stk-badge {
    font-size: 10.5px;
    font-weight: 700;
    background: var(--bg-soft);
    color: var(--ink-700);
    padding: 6px 12px;
    border-radius: 999px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border: 1px solid var(--line);
}
.stk-badge.fno {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: #c0cffc;
}

.stk-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 18px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px dashed var(--line-strong);
}
.h-item { display: flex; flex-direction: column; gap: 4px; }
.h-lbl {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ink-400);
    text-transform: uppercase;
    letter-spacing: 1.2px;
}
.h-val {
    font-family: var(--f-mono);
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-900);
}

.stk-price {
    font-family: var(--f-display);
    font-size: clamp(38px, 5vw, 56px);
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1;
    letter-spacing: -2px;
}
.stk-price.good { color: var(--good); }
.stk-price.bad { color: var(--bad); }

.stk-change {
    font-family: var(--f-mono);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
}
.stk-change.good {
    background: var(--good-soft);
    color: var(--good);
    border-color: rgba(5, 150, 105, 0.18);
}
.stk-change.bad {
    background: var(--bad-soft);
    color: var(--bad);
    border-color: rgba(220, 38, 38, 0.18);
}

/* ============================================================
   MAIN LAYOUT
   ============================================================ */
.stk-layout {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}
.stk-content-left { flex: 1; min-width: 0; }

/* NEWS SIDEBAR ENHANCED FOR FULL HEIGHT */
.stk-sidebar-right {
    width: 400px;
    flex-shrink: 0;
    position: sticky;
    top: 22px;
    height: calc(100vh - 44px);
}

.stk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

/* ============================================================
   CARDS
   ============================================================ */
.stk-card {
    background: var(--card-bg);
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
    position: relative;
}
.stk-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
    transform: translateY(-1px);
}

.stk-card-title {
    font-family: var(--f-body);
    font-size: 11.5px;
    font-weight: 700;
    color: var(--ink-500);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    text-transform: uppercase;
    letter-spacing: 1.8px;
}
.news-card-title-row { justify-content: space-between; }
.news-view-all {
    font-family: var(--f-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: none;
    color: var(--accent, #2563eb);
    text-decoration: none;
    white-space: nowrap;
    padding: 4px 10px;
    border: 1px solid var(--accent, #2563eb);
    border-radius: 999px;
    transition: background .15s ease, color .15s ease;
}
.news-view-all:hover {
    background: var(--accent, #2563eb);
    color: #fff;
}
.stk-card-title::before {
    content: '';
    width: 4px;
    height: 14px;
    background: var(--accent);
    border-radius: 2px;
}

.stk-kv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px dashed var(--line);
    gap: 12px;
}
.stk-kv:last-child { border-bottom: none; }
.stk-kv .lbl {
    font-size: 12.5px;
    color: var(--ink-500);
    font-weight: 600;
}
.stk-kv .val {
    font-family: var(--f-mono);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-900);
    text-align: right;
}
.val.good { color: var(--good); }
.val.bad { color: var(--bad); }
.val.highlight {
    color: #ffffff;
    background: var(--accent);
    padding: 3px 10px;
    border-radius: 6px;
}

.stk-card.featured {
    background: linear-gradient(180deg, #ffffff 0%, var(--card-elev) 100%);
    border-color: var(--line-strong);
    margin-bottom: 22px;
}
.stk-card.featured .stk-card-title { color: var(--brand); }
.stk-card.featured .stk-card-title::before { background: var(--brand); }

/* ============================================================
   HISTORICAL RETURNS STRIP
   ============================================================ */
.ret-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 12px;
}
.ret-tile {
    background: var(--bg-base);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    padding: 14px 12px;
    text-align: center;
    transition: all 0.2s ease;
}
.ret-tile:hover {
    background: #ffffff;
    border-color: var(--line-strong);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.ret-tile .rt-lbl {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--ink-400);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 7px;
}
.ret-tile .rt-val {
    font-family: var(--f-mono);
    font-size: 17px;
    font-weight: 600;
    color: var(--ink-900);
    line-height: 1;
}
.ret-tile .rt-val.good { color: var(--good); }
.ret-tile .rt-val.bad { color: var(--bad); }
.ret-tile .rt-sub {
    font-size: 9.5px;
    color: var(--ink-400);
    margin-top: 6px;
    font-family: var(--f-mono);
}
.ret-note {
    font-size: 11px;
    color: var(--ink-400);
    margin-top: 14px;
    text-align: center;
    font-style: italic;
}

.btn-simple {
    display: block;
    background: var(--ink-900);
    color: #ffffff;
    text-align: center;
    padding: 12px 14px;
    border-radius: var(--r-sm);
    font-family: var(--f-body);
    font-weight: 700;
    text-decoration: none;
    margin-top: 14px;
    font-size: 12px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: background 0.25s, transform 0.15s, box-shadow 0.25s;
    position: relative;
    overflow: hidden;
}
.btn-simple::after {
    content: ' →';
    transition: transform 0.25s;
    display: inline-block;
}
.btn-simple:hover {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(11, 39, 80, 0.4);
}
.btn-simple:hover::after { transform: translateX(4px); }

.promo-text {
    font-size: 12.5px;
    color: var(--ink-500);
    text-align: center;
    margin-top: 16px;
    font-weight: 500;
    line-height: 1.5;
    font-style: italic;
}

.loader-box {
    text-align: center;
    padding: 100px 20px;
    color: var(--ink-500);
    font-family: var(--f-display);
    font-style: italic;
    font-size: 18px;
    font-weight: 500;
}
.loader-box b {
    font-family: var(--f-mono);
    font-style: normal;
    color: var(--ink-900);
    background: var(--accent-soft);
    padding: 2px 10px;
    border-radius: 6px;
}

/* ============================================================
   NEWS SIDEBAR
   ============================================================ */
.news-card {
    height: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    border-top: 4px solid var(--accent);
}

.news-feed-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 6px;
    margin-right: -6px;
}
.news-feed-container::-webkit-scrollbar { width: 6px; }
.news-feed-container::-webkit-scrollbar-track { background: transparent; }
.news-feed-container::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 10px;
}
.news-feed-container::-webkit-scrollbar-thumb:hover { background: var(--ink-400); }

.news-loader {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0;
}
.skeleton-box {
    background: linear-gradient(90deg, var(--bg-soft) 25%, #e4e8ef 50%, var(--bg-soft) 75%);
    background-size: 200% 100%;
    border-radius: var(--r-sm);
    height: 80px;
    animation: ms-shimmer 1.6s infinite;
}
@keyframes ms-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-item {
    padding: 14px 16px;
    background: var(--bg-base);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    border-left: 3px solid var(--line-strong);
    transition: all 0.25s ease;
    cursor: pointer;
    position: relative;
    animation: ms-slide-in 0.4s ease;
}
@keyframes ms-slide-in {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.news-item:hover {
    background: #ffffff;
    border-color: var(--line-strong);
    border-left-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateX(2px);
}

/* ============================================================
   DISCLAIMER
   ============================================================ */
.strict-disclaimer {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 22px 26px;
    margin: 30px 0 10px 0;
}
.strict-disclaimer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 800;
    color: #9a3412;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.strict-disclaimer-text {
    font-size: 12.5px;
    line-height: 1.6;
    color: #78350f;
    text-align: justify;
}
.strict-disclaimer-text p { margin: 0 0 8px 0; }
.strict-disclaimer-text p:last-child { margin-bottom: 0; }
.strict-disclaimer-text strong { font-weight: 700; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .stk-sidebar-right { width: 340px; }
}

@media (max-width: 992px) {
    .stk-layout { flex-direction: column; }
    .stk-sidebar-right {
        width: 100%;
        position: static;
        height: auto;
    }
    .news-card { height: auto; max-height: 700px; }
    .stk-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stk-container { margin: 14px auto; padding: 0 14px; }
    .stk-hero { padding: 22px 20px; }
    .stk-hero-inner { flex-direction: column; align-items: flex-start; gap: 18px; }
    .stk-hero-right { text-align: left; width: 100%; }
    .stk-change { display: inline-flex; }
    .stk-card { padding: 16px; }
    .stk-hero::before { font-size: 100px; right: -30px; opacity: 0.6; }
    .ret-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .stk-highlights {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .stk-hero-left .symbol { font-size: 32px; }
    .stk-price { font-size: 38px; }
}

.stk-card { animation: ms-fade-up 0.5s ease backwards; }
.stk-card:nth-child(1) { animation-delay: 0.05s; }
.stk-card:nth-child(2) { animation-delay: 0.10s; }
.stk-card:nth-child(3) { animation-delay: 0.15s; }
.stk-card:nth-child(4) { animation-delay: 0.20s; }
.stk-card:nth-child(5) { animation-delay: 0.25s; }
.stk-card:nth-child(6) { animation-delay: 0.30s; }
@keyframes ms-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
