@import url('/css/account.css');

/* ===================================================================
   METIS — Global Design System
   Dark glassmorphism finansal dashboard
   =================================================================== */

:root {
    --bg-base:        #060b14;
    --bg-surface:     #0d1628;
    --bg-card:        #111c33;
    --bg-card-hover:  #162240;
    --border:         rgba(99, 141, 255, 0.12);
    --border-bright:  rgba(99, 141, 255, 0.30);

    --accent:         #4f8ef7;
    --accent-glow:    rgba(79, 142, 247, 0.25);
    --accent-2:       #7c5cfc;

    --green:          #22c55e;
    --green-dim:      rgba(34, 197, 94, 0.12);
    --red:            #ef4444;
    --red-dim:        rgba(239, 68, 68, 0.12);
    --yellow:         #eab308;
    --yellow-dim:     rgba(234, 179, 8, 0.12);
    --cyan:           #06b6d4;
    --cyan-dim:       rgba(6, 182, 212, 0.12);

    --text-primary:   #f0f4ff;
    --text-secondary: #8fa3c8;
    --text-muted:     #4a6080;

    --radius-sm:      8px;
    --radius-md:      14px;
    --radius-lg:      20px;

    --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.45);
    --shadow-glow:    0 0 40px rgba(79, 142, 247, 0.15);

    --font:           'Inter', -apple-system, sans-serif;
    --transition:     0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    font-family: var(--font);
    background: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: #1e3a5f; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Layout ────────────────────────────────────────────────────── */
.page {
    display: flex;
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 60% at 20% -10%, rgba(79,142,247,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 110%, rgba(124,92,252,0.06) 0%, transparent 60%),
        var(--bg-base);
}

.sidebar {
    width: 240px;
    min-height: 100vh;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    flex-shrink: 0;
}

main {
    flex: 1;
    min-width: 0;
    padding: 28px 32px;
    overflow-x: hidden;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.card:hover {
    border-color: var(--border-bright);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    transform: translateY(-1px);
}

/* ── Score Badge ───────────────────────────────────────────────── */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 13px;
    flex-shrink: 0;
}

/* ── Recommendation Pills ──────────────────────────────────────── */
.rec-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}
.rec-strongbuy  { background: rgba(34,197,94,0.18); color: #4ade80; border: 1px solid rgba(34,197,94,0.35); }
.rec-buy        { background: rgba(34,197,94,0.10); color: #86efac; border: 1px solid rgba(34,197,94,0.20); }
.rec-neutral    { background: rgba(234,179,8,0.12); color: #fde047; border: 1px solid rgba(234,179,8,0.25); }
.rec-sell       { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.25); }
.rec-strongsell { background: rgba(239,68,68,0.20); color: #f87171; border: 1px solid rgba(239,68,68,0.40); }

/* ── Score Bar ─────────────────────────────────────────────────── */
.score-bar-track {
    background: rgba(255,255,255,0.06);
    border-radius: 99px;
    height: 5px;
    overflow: hidden;
}
.score-bar-fill {
    height: 100%;
    border-radius: 99px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Detail Rows ───────────────────────────────────────────────── */
.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 12.5px;
}
.detail-row:last-child { border-bottom: none; }
.detail-icon { font-size: 14px; flex-shrink: 0; }
.detail-name { color: var(--text-secondary); min-width: 110px; }
.detail-reason { color: var(--text-primary); flex: 1; }
.detail-score { color: var(--text-secondary); font-size: 11px; white-space: nowrap; }

/* ── Section Headers ───────────────────────────────────────────── */
.section-header {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 14px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* ── Stat Tiles ─────────────────────────────────────────────────── */
.stat-tile {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 22px;
    transition: border-color var(--transition);
}
.stat-tile:hover { border-color: var(--border-bright); }
.stat-tile-label { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 6px; }
.stat-tile-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1; }
.stat-tile-sub   { font-size: 12px; color: var(--text-secondary); margin-top: 5px; }

/* ── Buttons ────────────────────────────────────────────────────── */
.btn-metis {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-bright);
    background: rgba(79,142,247,0.08);
    color: var(--accent);
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}
.btn-metis:hover { background: rgba(79,142,247,0.18); transform: translateY(-1px); }
.btn-metis:active { transform: none; }

/* ── Search ─────────────────────────────────────────────────────── */
.search-input {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 8px 14px;
    font-size: 13px;
    font-family: var(--font);
    outline: none;
    transition: border-color var(--transition);
    width: 220px;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus { border-color: var(--accent); }

/* ── Loading Spinner ─────────────────────────────────────────────── */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(79,142,247,0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Detail Expand Panel ─────────────────────────────────────────── */
.detail-panel {
    background: rgba(6, 11, 20, 0.7);
    border-top: 1px solid var(--border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 20px 24px;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ── Category Tag ────────────────────────────────────────────────── */
.cat-tag {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.cat-trend      { background: rgba(79,142,247,0.15); color: #93c5fd; }
.cat-momentum   { background: rgba(124,92,252,0.15); color: #c4b5fd; }
.cat-hacim      { background: rgba(6,182,212,0.15);  color: #67e8f9; }
.cat-volatilite { background: rgba(234,179,8,0.15);  color: #fde047; }
.cat-guc        { background: rgba(249,115,22,0.15); color: #fdba74; }
.cat-saglik     { background: rgba(34,197,94,0.15);  color: #86efac; }
.cat-buyume     { background: rgba(79,142,247,0.15); color: #93c5fd; }
.cat-verimlilik { background: rgba(124,92,252,0.15); color: #c4b5fd; }
.cat-default    { background: rgba(255,255,255,0.07); color: var(--text-secondary); }

/* ── Blazor error ────────────────────────────────────────────────── */
#blazor-error-ui {
    background: #b32121;
    bottom: 0; left: 0; right: 0;
    position: fixed;
    padding: 12px 20px;
    color: white; font-size: 13px;
    display: none;
    z-index: 9999;
}
#blazor-error-ui .reload { color: #ffe; font-weight: 600; text-decoration: underline; cursor: pointer; }
#blazor-error-ui .dismiss { float: right; cursor: pointer; font-size: 18px; }

.blazor-error-boundary { background: #b32121; padding: 1rem; color: white; }
.blazor-error-boundary::after { content: "Bir hata oluştu."; }

/* Chart hover content is created by JavaScript, outside Blazor's CSS scope. */
#tvchart .metis-lifecycle-tooltip { position:absolute; z-index:10; top:12px; right:12px; width:min(320px,calc(100% - 24px)); max-height:min(55%,300px); overflow:auto; padding:12px; border:1px solid #536985; border-radius:10px; background:#101a2af2; box-shadow:0 12px 32px #0008; color:#e2e8f0; font-size:11px; pointer-events:auto; }
#tvchart .metis-lifecycle-tooltip > strong { display:block; margin-bottom:8px; font-size:12px; }
#tvchart .metis-lifecycle-tooltip-row { display:grid; gap:3px; padding:7px 0; border-top:1px solid #334155; }
#tvchart .metis-lifecycle-tooltip-row b { color:#f8fafc; font-weight:650; }
#tvchart .metis-lifecycle-tooltip-row span { color:#aebdd1; line-height:1.4; }
