/* mods/crypto/assets/css/coin.css — Coin / Jeton Detail Page (/coin/{SYMBOL} & /jeton/{SYMBOL}) */
.coin-page-wrap {
    max-width: 1400px;
    margin: 1.5rem auto 3rem auto;
    padding: 0 1.25rem;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
}

/* Search Bar */
.coin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.coin-search-box {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 440px;
}

.coin-search-input {
    width: 100%;
    padding: 0.62rem 1rem 0.62rem 2.3rem;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.25));
    background: var(--card-bg, #1e293b);
    color: var(--text-main, #f8fafc);
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
}

.coin-search-input::placeholder {
    color: var(--text-dim, #94a3b8);
}

.coin-search-input:focus {
    border-color: #10b981;
}

.coin-search-icon {
    position: absolute;
    left: 0.78rem;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    pointer-events: none;
}

.coin-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: var(--card-bg, #0f172a);
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.28));
    border-radius: 10px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 60;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    display: none;
}

.coin-search-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-decoration: none;
    color: var(--text-main, #f8fafc);
}

.coin-search-item:hover {
    background: rgba(16, 185, 129, 0.12);
}

.coin-search-item-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.coin-search-item-left img {
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

/* Hero Card */
.coin-hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    padding: 1.4rem 1.65rem;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.coin-hero-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.coin-hero-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.35);
    object-fit: contain;
}

.coin-hero-title-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.coin-hero-title-row h1 {
    margin: 0;
    font-size: 1.65rem;
    font-weight: 800;
    color: inherit;
}

.coin-sym-badge {
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.2);
    color: inherit;
}

.coin-rank-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.coin-tr-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: rgba(16, 185, 129, 0.18);
    color: #10b981;
}

.coin-hero-price-box {
    text-align: right;
}

.coin-hero-price {
    font-size: 1.85rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.coin-hero-change {
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

.coin-pos { color: #10b981; }
.coin-neg { color: #ef4444; }

.coin-quick-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.65rem;
}

.coin-action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.38rem 0.72rem;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(148, 163, 184, 0.15);
    color: inherit;
    border: 1px solid rgba(148, 163, 184, 0.24);
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.coin-action-pill:hover {
    background: rgba(16, 185, 129, 0.18);
    border-color: #10b981;
}

/* Chart Timeframe Buttons */
#coin-chart-itv {
    display: inline-flex;
    gap: 0.3rem;
    background: rgba(148, 163, 184, 0.12);
    padding: 0.2rem;
    border-radius: 8px;
}

#coin-chart-itv .itv-btn {
    border: none;
    background: transparent;
    color: var(--text-dim, #94a3b8);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
}

#coin-chart-itv .itv-btn.active {
    background: #10b981;
    color: #ffffff;
}

/* Telemetry Strip */
.coin-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(195px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.coin-metric-card {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
    border-radius: 12px;
    padding: 0.9rem 1.05rem;
}

.coin-metric-label {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-dim, #94a3b8);
    margin-bottom: 0.3rem;
}

.coin-metric-val {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    font-variant-numeric: tabular-nums;
}

.coin-metric-sub {
    font-size: 0.76rem;
    color: var(--text-dim, #94a3b8);
    margin-top: 0.2rem;
}

/* Progress Bars (Supply & ATH) */
.coin-bar-track {
    width: 100%;
    height: 6px;
    background: rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.45rem;
}

.coin-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 999px;
}

/* Main 2-Column Layout */
.coin-main-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 1.25rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .coin-main-grid {
        grid-template-columns: 1fr;
    }
    .coin-hero-price-box {
        text-align: left;
    }
}

.coin-panel {
    background: var(--card-bg, #1e293b);
    border: 1px solid var(--border-color, rgba(148, 163, 184, 0.22));
    border-radius: 14px;
    padding: 1.15rem 1.3rem;
    margin-bottom: 1.25rem;
}

.coin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.coin-panel-head h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
}

#coin-mini-chart {
    width: 100%;
    height: 320px;
}

.coin-description {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-main, #cbd5e1);
    opacity: 0.92;
    white-space: pre-line;
}

.coin-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.85rem;
}

.coin-tag {
    font-size: 0.75rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.28);
}

/* Dev Activity & Social Health */
.dev-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.dev-active { background: rgba(16, 185, 129, 0.18); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.35); }
.dev-moderate { background: rgba(245, 158, 11, 0.18); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.35); }
.dev-dormant { background: rgba(239, 68, 68, 0.16); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.35); }
.dev-archived { background: rgba(100, 116, 139, 0.25); color: #94a3b8; border: 1px solid rgba(148, 163, 184, 0.35); }
.dev-unknown { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.coin-kv-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.coin-kv-item {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}

.coin-kv-k {
    font-size: 0.74rem;
    color: var(--text-dim, #94a3b8);
}

.coin-kv-v {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--text-main, #f8fafc);
    margin-top: 0.15rem;
}

/* Links List */
.coin-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.coin-link-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.5rem 0.72rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.07);
    border: 1px solid rgba(148, 163, 184, 0.12);
    text-decoration: none;
    color: var(--text-main, #f8fafc);
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.15s, border-color 0.15s;
}

.coin-link-row:hover {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.35);
}

.coin-link-health {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 5px;
}

.health-ok { background: rgba(16, 185, 129, 0.18); color: #10b981; }
.health-bad { background: rgba(239, 68, 68, 0.18); color: #ef4444; }

.coin-source-pills {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.74rem;
    color: var(--text-dim, #94a3b8);
}

.coin-source-pill {
    padding: 0.24rem 0.58rem;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.14);
    color: var(--text-main, #cbd5e1);
}

.coin-pairs-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.coin-pair-chip {
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--text-main, #f8fafc);
}

.coin-pair-chip:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
}

/* =========================================================
   LIGHT THEME HIGH-CONTRAST OPTIMIZATIONS
   ========================================================= */
[data-theme="light"] .coin-search-input {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .coin-search-input::placeholder {
    color: #64748b;
}

[data-theme="light"] .coin-search-dropdown {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .coin-search-item {
    color: #0f172a;
    border-bottom-color: #e2e8f0;
}

[data-theme="light"] .coin-source-pill {
    background: #e2e8f0;
    color: #334155;
    font-weight: 600;
}

[data-theme="light"] .coin-hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .coin-hero-icon {
    background: #e2e8f0;
}

[data-theme="light"] .coin-sym-badge {
    background: #e2e8f0;
    color: #1e293b;
}

[data-theme="light"] .coin-rank-badge {
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

[data-theme="light"] .coin-tr-badge {
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

[data-theme="light"] .coin-pos { color: #047857; }
[data-theme="light"] .coin-neg { color: #dc2626; }

[data-theme="light"] .coin-action-pill {
    background: #ffffff;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .coin-action-pill:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #047857;
}

[data-theme="light"] .coin-metric-card,
[data-theme="light"] .coin-panel {
    background: #ffffff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .coin-metric-label,
[data-theme="light"] .coin-metric-sub,
[data-theme="light"] .coin-kv-k {
    color: #475569;
}

[data-theme="light"] .coin-metric-val,
[data-theme="light"] .coin-panel-head h2,
[data-theme="light"] .coin-kv-v {
    color: #0f172a;
}

[data-theme="light"] .coin-description {
    color: #1e293b;
    opacity: 1;
}

[data-theme="light"] .coin-tag {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.25);
}

[data-theme="light"] .coin-kv-item {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .coin-link-row {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme="light"] .coin-link-row:hover {
    background: #ecfdf5;
    border-color: #10b981;
}

[data-theme="light"] .coin-pair-chip {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

[data-theme="light"] .coin-pair-chip:hover {
    background: #ecfdf5;
    border-color: #059669;
    color: #047857;
}

[data-theme="light"] #coin-chart-itv {
    background: #e2e8f0;
}

[data-theme="light"] #coin-chart-itv .itv-btn {
    color: #334155;
}

[data-theme="light"] #coin-chart-itv .itv-btn.active {
    background: #059669;
    color: #ffffff;
}

[data-theme="light"] .dev-active { background: rgba(5, 150, 105, 0.12); color: #047857; border-color: rgba(5, 150, 105, 0.35); }
[data-theme="light"] .dev-moderate { background: rgba(217, 119, 6, 0.12); color: #b45309; border-color: rgba(217, 119, 6, 0.35); }
[data-theme="light"] .dev-dormant { background: rgba(220, 38, 38, 0.12); color: #b91c1c; border-color: rgba(220, 38, 38, 0.35); }
[data-theme="light"] .dev-archived,
[data-theme="light"] .dev-unknown { background: #e2e8f0; color: #334155; border-color: #cbd5e1; }

[data-theme="light"] .health-ok { background: rgba(5, 150, 105, 0.12); color: #047857; }
[data-theme="light"] .health-bad { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }

/* Multi-Horizon Performance Grid */
.coin-perf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.65rem;
}

.coin-perf-cell {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 9px;
    padding: 0.6rem 0.75rem;
    text-align: center;
}

.coin-perf-k {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-dim, #94a3b8);
}

.coin-perf-v {
    font-size: 1rem;
    font-weight: 800;
    margin-top: 0.18rem;
    font-variant-numeric: tabular-nums;
}

/* Supply Lock Bar & Unlock Calendar Links */
.coin-lock-bar-wrap {
    margin-bottom: 0.9rem;
}

.coin-lock-bar-track {
    width: 100%;
    height: 10px;
    background: rgba(245, 158, 11, 0.28);
    border-radius: 999px;
    overflow: hidden;
}

.coin-lock-bar-unlocked {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.coin-lock-legend {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 0.45rem;
    color: var(--text-dim, #94a3b8);
}

.coin-unlock-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Fundraising & Investor Rounds */
.coin-raises-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.coin-raise-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.65rem 0.85rem;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.14);
}

.coin-raise-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-main, #f8fafc);
}

.coin-raise-meta {
    font-size: 0.78rem;
    color: var(--text-dim, #94a3b8);
    margin-top: 0.15rem;
}

.coin-raise-amt {
    font-weight: 800;
    font-size: 0.98rem;
    color: #10b981;
}

[data-theme="light"] .coin-perf-cell,
[data-theme="light"] .coin-raise-row {
    background: #f8fafc;
    border-color: #e2e8f0;
}

[data-theme="light"] .coin-perf-k,
[data-theme="light"] .coin-lock-legend,
[data-theme="light"] .coin-raise-meta {
    color: #475569;
}

[data-theme="light"] .coin-raise-title {
    color: #0f172a;
}

[data-theme="light"] .coin-raise-amt {
    color: #047857;
}

.coin-unlock-events {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
}

.coin-unlock-event-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.14);
    font-size: 0.82rem;
}

.coin-unlock-event-note {
    font-size: 0.8rem;
    color: var(--text-dim, #94a3b8);
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.07);
}

[data-theme="light"] .coin-unlock-event-row,
[data-theme="light"] .coin-unlock-event-note {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #334155;
}
