* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --green: #15803d; --red: #dc2626; --yellow: #a16207; --blue: #1d4ed8;
  --ink: #0f172a; --muted: #475569; --faint: #64748b;
  --line: #e2e8f0; --panel: #ffffff; --wash: #f1f5f9;
}
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%); color: var(--ink); line-height: 1.6; min-height: 100vh; }
header { background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(6px); padding: 1rem 2rem 0.9rem; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: 0 1px 8px rgba(15, 23, 42, 0.06); }
header h1 { color: var(--green); font-size: 1.5rem; margin-bottom: 0; letter-spacing: 0.01em; }
.tagline { color: var(--faint); font-size: 0.78rem; margin: 0 0 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.brand-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
header #live-clock { white-space: nowrap; color: var(--ink); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums; background: var(--wash); border: 1px solid var(--line); padding: 0.15rem 0.7rem; border-radius: 999px; }
header nav { margin-top: 0.5rem; display: flex; flex-wrap: wrap; gap: 0.4rem; }
header nav a { display: inline-block; color: #334155; text-decoration: none; font-size: 0.85rem; font-weight: 600; padding: 0.32rem 0.8rem; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; margin-right: 0; transition: all 0.15s ease; }
header nav a:hover { color: var(--green); border-color: var(--green); background: #f0fdf4; transform: translateY(-1px); }
main { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem 2rem; }
h2 { color: var(--green); margin: 1.5rem 0 1rem; font-size: 1.35rem; letter-spacing: 0.01em; }
h2 .status { font-size: 0.8rem; font-weight: 400; }
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06); transition: box-shadow 0.15s ease, transform 0.15s ease; }
.card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, 0.10); }
.card h3 { color: var(--green); font-size: 1rem; margin-bottom: 0.5rem; padding-bottom: 0.4rem; border-bottom: 2px solid #dcfce7; }
.card h4 { color: var(--ink); margin: 0.6rem 0 0.3rem; }
.price { font-size: 2rem; font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.regime { font-size: 1.2rem; font-weight: 600; margin: 0.5rem 0; }
.status { color: var(--muted); font-size: 0.85rem; margin-top: 0.6rem; }
.badge { display: inline-block; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.badge-green { background: #dcfce7; color: #15803d; }
.badge-red { background: #fee2e2; color: #b91c1c; }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }
button.badge { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08); }
button.badge:hover { filter: brightness(0.96); transform: translateY(-1px); }
button.badge:active { transform: translateY(0); }
footer { margin-top: 2rem; padding: 1.2rem 0; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.8rem; }
.pnl-full { display: block; width: 100%; }
.pnl-full .card { margin-bottom: 1rem; }
.full-list { display: block; width: 100%; }
.full-list .card { margin-bottom: 1rem; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; table-layout: fixed; }
.scan-table th, .scan-table td { padding: 0.45rem 0.4rem; overflow: hidden; text-overflow: ellipsis; }
.scan-table th:nth-child(n+7), .scan-table td:nth-child(n+7) { white-space: normal; word-break: break-word; }
.scan-table th:nth-child(n+3):nth-child(-n+4), .scan-table td:nth-child(n+3):nth-child(-n+4) { text-align: right; font-variant-numeric: tabular-nums; }
.history-table { width: 100%; min-width: 1020px; border-collapse: collapse; font-size: 0.85rem; }
.history-table thead th { background: #f0fdf4; color: #15803d; padding: 0.6rem 0.8rem; text-align: left; font-weight: 700; white-space: nowrap; position: sticky; top: 0; }
.history-table td { padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--line); color: var(--ink); white-space: nowrap; }
.history-table tbody tr:nth-child(even) { background: #f8fafc; }
.history-table td:nth-child(n+4):nth-child(-n+7) { text-align: right; font-variant-numeric: tabular-nums; }
.history-table tr:hover td { background: #f0fdf4; }
@media (max-width: 768px) { .grid { grid-template-columns: 1fr; } main { padding: 1rem; } header { padding: 0.8rem 1rem; } .history-table { font-size: 0.75rem; min-width: 860px; } .history-table th, .history-table td { padding: 0.4rem 0.5rem; } }
.updated-bar { background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 1rem; margin-bottom: 1rem; color: var(--muted); font-size: 0.8rem; display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 0.4rem 1rem; text-align: center; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05); }
.updated-bar #live-clock { white-space: nowrap; color: var(--ink); font-weight: bold; }
select, input, button { font-size: 0.85rem; padding: 0.35rem 0.6rem; border: 1px solid #cbd5e1; border-radius: 8px; background: #ffffff; color: var(--ink); }
select:focus, input:focus, button:focus-visible { outline: 2px solid #86efac; outline-offset: 1px; border-color: var(--green); }
details { margin-top: 0.6rem; border: 1px solid var(--line); border-radius: 8px; padding: 0.4rem 0.7rem; background: #f8fafc; }
details summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: 0.85rem; }
.ticker-wrap { overflow: hidden; background: linear-gradient(90deg, #0f172a, #1e293b); border-radius: 10px; margin-bottom: 1rem; box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25); border: 1px solid #1e293b; }
.ticker-track { display: inline-flex; gap: 2.5rem; white-space: nowrap; padding: 0.5rem 1rem; animation: tickscroll 45s linear infinite; color: #e2e8f0; font-size: 0.85rem; }
.ticker-wrap:hover .ticker-track { animation-play-state: paused; }
@keyframes tickscroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
