:root {
  --bg: #080b0c;
  --panel: #0f1314;
  --panel-2: #131819;
  --line: #252c2d;
  --line-soft: #1a2021;
  --text: #f4f6f4;
  --muted: #899293;
  --green: #52e6a0;
  --green-deep: #153528;
  --red: #ff5f67;
  --red-deep: #351416;
  --amber: #f5c35a;
  --cyan: #6bd6dd;
  --radius: 14px;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "Space Grotesk", Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 82% 4%, #142024 0, transparent 26%), var(--bg); font-family: var(--sans); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.shell { max-width: 1560px; margin: 0 auto; padding: 24px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 13px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid #2b6964; border-radius: 11px; color: var(--green); font-family: var(--mono); font-weight: 700; background: linear-gradient(145deg, #102624, #0a1011); box-shadow: inset 0 0 24px rgba(82,230,160,.06); }
.eyebrow { display: block; color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .13em; }
h1 { margin: 3px 0 0; font-size: 22px; letter-spacing: -.02em; }
h1 span { color: var(--green); font-family: var(--mono); font-size: .72em; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.compact-field { display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 12px; height: 40px; }
.compact-field select { border: 0; background: transparent; color: var(--text); }
.compact-field option { background: var(--panel); }
.button { min-height: 40px; border: 1px solid var(--line); border-radius: 9px; padding: 0 14px; background: var(--panel); cursor: pointer; font-weight: 600; transition: transform .15s ease, border-color .15s ease, background .15s ease; display: inline-flex; align-items: center; justify-content: center; }
.button:hover { transform: translateY(-1px); border-color: #3e494a; }
.button.primary { color: #04100b; border-color: var(--green); background: var(--green); }
.button.ghost { color: #c4cbca; background: #0b0f10; }
.button.danger { color: var(--red); border-color: #63272b; background: #1e0e10; }
.file-button input { display: none; }
.summary-grid { display: grid; grid-template-columns: 1.45fr repeat(4, 1fr); gap: 10px; margin-bottom: 10px; }
.metric { min-height: 112px; padding: 17px 18px; background: linear-gradient(145deg, rgba(20,25,26,.96), rgba(12,16,17,.96)); border: 1px solid var(--line-soft); border-radius: var(--radius); display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.metric::after { content: ""; width: 60px; height: 1px; background: #344043; position: absolute; right: 16px; top: 24px; }
.hero-metric { border-color: #29564a; background: linear-gradient(135deg, #10231d, #0d1414 72%); }
.metric-label { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.metric strong { font-family: var(--mono); font-size: clamp(22px, 2vw, 32px); letter-spacing: -.05em; }
.hero-metric strong { color: var(--green); }
.metric small { color: #737d7e; font-size: 12px; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 10px; }
.calendar-card, .pulse-card { background: rgba(15,19,20,.96); border: 1px solid var(--line); border-radius: var(--radius); }
.calendar-card { padding: 18px; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.calendar-head > div:first-child { display: flex; align-items: center; gap: 18px; }
.view-tabs { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.tab { height: 38px; padding: 0 18px; border: 0; border-right: 1px solid var(--line); background: #0b0f10; color: var(--muted); cursor: pointer; font-weight: 600; }
.tab:last-child { border-right: 0; }
.tab.active { color: var(--text); background: #262c2d; }
.month-nav { display: flex; align-items: center; gap: 13px; }
.month-nav strong { min-width: 180px; text-align: center; font-family: var(--mono); font-size: 13px; text-transform: lowercase; }
.month-nav button, .icon-btn { width: 41px; height: 41px; border: 1px solid var(--line); border-radius: 9px; background: #151a1b; cursor: pointer; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.weekday-row { margin-bottom: 8px; }
.weekday-row span { padding: 11px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: .1em; background: #0b0f10; border-radius: 6px; }
.day-cell { min-height: 112px; border: 1px solid var(--line-soft); border-radius: 10px; background: #0b0f10; padding: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; position: relative; overflow: hidden; transition: transform .15s ease, border-color .15s ease; }
.day-cell:hover { transform: translateY(-2px); border-color: #3d4849; }
.day-cell.empty { cursor: default; opacity: .5; }
.day-cell.empty:hover { transform: none; }
.day-number { font-family: var(--mono); font-size: 13px; font-weight: 700; }
.day-pnl { margin-top: 12px; font-family: var(--mono); font-size: 18px; font-weight: 700; letter-spacing: -.04em; }
.day-meta { margin-top: 5px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.day-cell.positive { border-color: #287458; background: linear-gradient(145deg, #173126, #10211b); }
.day-cell.positive .day-pnl, .day-cell.positive .day-meta { color: var(--green); }
.day-cell.negative { border-color: #7f1e24; background: linear-gradient(145deg, #351315, #260f11); }
.day-cell.negative .day-pnl, .day-cell.negative .day-meta { color: var(--red); }
.day-cell.pending { border-color: #62502a; background: linear-gradient(145deg, #282111, #17150e); }
.day-cell.pending .day-pnl, .day-cell.pending .day-meta { color: var(--amber); }
.day-cell.today::before { content: "HOY"; position: absolute; top: 8px; left: 8px; color: var(--cyan); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.day-strip { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; display: flex; }
.day-strip i { height: 100%; }
.day-strip .win { background: var(--green); }
.day-strip .loss { background: var(--red); }
.day-strip .wait { background: var(--amber); }
.calendar-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; color: var(--muted); font-size: 11px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--line); }
.dot.positive { background: var(--green); } .dot.negative { background: var(--red); } .dot.pending { background: var(--amber); }
.pulse-card { padding: 18px; }
.pulse-head { display: flex; align-items: center; justify-content: space-between; }
.status-chip { padding: 5px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-family: var(--mono); font-size: 8px; }
.ring-wrap { display: grid; place-items: center; padding: 27px 0 22px; }
.ring { --score: 0deg; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; align-content: center; background: radial-gradient(circle at center, var(--panel) 61%, transparent 62%), conic-gradient(var(--green) var(--score), #202728 0); }
.ring span { font-family: var(--mono); font-size: 29px; font-weight: 700; }
.ring small { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line-soft); font-size: 12px; }
.checks li span { color: var(--muted); }
.checks b { font-family: var(--mono); }
.pulse-note { margin: 18px 0 0; padding: 12px; border-left: 2px solid var(--green); color: #8f9999; background: #0b1010; font-size: 11px; line-height: 1.5; }
.dialog { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 28px); padding: 0; border: 1px solid #354041; border-radius: 15px; color: var(--text); background: #101415; box-shadow: 0 30px 100px rgba(0,0,0,.7); }
.dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(5px); }
.dialog-shell { padding: 20px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 0; font-size: 22px; }
.icon-btn { font-size: 24px; }
.day-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 14px 0; }
.day-summary div { border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px; background: #0b0f10; }
.day-summary span { display: block; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.day-summary strong { display: block; margin-top: 5px; font-family: var(--mono); }
.bet-list { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.bet-row { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 12px; align-items: center; padding: 13px; border: 1px solid var(--line-soft); border-radius: 10px; background: #0b0f10; cursor: pointer; }
.bet-row:hover { border-color: #3a4647; }
.bet-accent { align-self: stretch; border-radius: 999px; background: var(--amber); }
.bet-row.won .bet-accent { background: var(--green); } .bet-row.lost .bet-accent { background: var(--red); } .bet-row.void .bet-accent { background: var(--muted); }
.bet-row h3 { margin: 0 0 5px; font-size: 14px; }
.bet-row p { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 10px; }
.bet-value { text-align: right; font-family: var(--mono); }
.bet-value strong, .bet-value small { display: block; }
.bet-value small { margin-top: 4px; color: var(--muted); }
.empty-state { padding: 34px; text-align: center; border: 1px dashed #303839; border-radius: 10px; color: var(--muted); }
.dialog-footer { padding-top: 16px; margin-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.dialog-footer.split { justify-content: space-between; }
.dialog-footer > div { display: flex; gap: 8px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 13px; padding-top: 16px; }
.form-grid label { color: var(--muted); font-size: 11px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid input, .form-grid select, .form-grid textarea { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 11px; color: var(--text); background: #0a0e0f; }
.form-grid textarea { resize: vertical; }
.profit-preview { display: flex; justify-content: space-between; margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: #0b0f10; }
.profit-preview span { color: var(--muted); }
.profit-preview strong { font-family: var(--mono); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 11px 16px; border: 1px solid #356452; border-radius: 9px; background: #10221b; color: var(--green); font-size: 12px; transition: all .2s ease; z-index: 20; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.hidden { display: none !important; }
@media (max-width: 1100px) { .summary-grid { grid-template-columns: repeat(3, 1fr); } .hero-metric { grid-column: span 2; } .workspace { grid-template-columns: 1fr; } .pulse-card { display: grid; grid-template-columns: 1fr 180px 2fr; gap: 18px; } .pulse-head { align-self: start; } .ring-wrap { padding: 0; } .pulse-note { grid-column: 1 / -1; } }
@media (max-width: 760px) { .shell { padding: 12px; } .topbar { align-items: flex-start; flex-direction: column; } .top-actions { justify-content: flex-start; } .summary-grid { grid-template-columns: repeat(2, 1fr); } .metric { min-height: 95px; } .calendar-card { padding: 10px; overflow-x: auto; } .calendar-head { min-width: 700px; } .weekday-row, .calendar-grid { min-width: 700px; } .day-cell { min-height: 96px; } .pulse-card { display: block; } .ring-wrap { padding: 22px 0; } .day-summary { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .summary-grid { grid-template-columns: 1fr 1fr; } .hero-metric { grid-column: span 2; } .top-actions .compact-field { width: 100%; justify-content: space-between; } .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
