:root {
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-2: #e9f0f4;
  --surface-3: #dce7ed;
  --text: #07131b;
  --muted: #4d6879;
  --line: #aabfcb;
  --line-strong: #7894a4;
  --gold: #d29300;
  --gold-dark: #5c4100;
  --green: #00b86b;
  --red: #ef4057;
  --cyan: #00aeca;
  --blue: #087fc5;
  --amber: #c98a00;
  --orange: #d2610c;
  --shadow: 0 12px 36px rgba(12, 31, 42, .12);
}

body.dark {
  --bg: #02090d;
  --surface: #061118;
  --surface-2: #0a1820;
  --surface-3: #10232d;
  --text: #f4f8fb;
  --muted: #8ba7b6;
  --line: #253f4b;
  --line-strong: #3d5d6c;
  --gold: #f3b400;
  --gold-dark: #3f2e00;
  --green: #00ef82;
  --red: #ff4059;
  --cyan: #00d4ef;
  --blue: #36a8e5;
  --amber: #f2c94c;
  --orange: #f2994a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 1px; }
.hidden { display: none !important; }
.page { display: none; min-height: calc(100vh - 84px); padding: 32px 4vw; }
.page.active { display: block; }
.brand-watermark { position: fixed; right: -8vw; bottom: -18vw; width: 58vw; height: 58vw; opacity: .035; pointer-events: none; background: #8f1731; clip-path: polygon(48% 0, 88% 18%, 88% 62%, 67% 62%, 67% 35%, 55% 30%, 55% 92%, 45% 92%, 45% 30%, 33% 35%, 33% 62%, 12% 62%, 12% 18%); transform: rotate(-18deg); z-index: -1; }

.site-header { height: 84px; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 4vw; position: sticky; top: 0; z-index: 20; }
.site-notice { min-height: 46px; padding: 9px 4vw; display: flex; align-items: center; justify-content: center; gap: 18px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--cyan) 12%, var(--surface)); color: var(--text); position: relative; z-index: 19; }
.site-notice div { display: flex; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.site-notice strong { color: var(--cyan); text-transform: uppercase; }
.site-notice[data-type="maintenance"] { background: color-mix(in srgb, var(--red) 12%, var(--surface)); }
.site-notice[data-type="maintenance"] strong { color: var(--red); }
.site-notice[data-type="promotion"] { background: color-mix(in srgb, var(--gold) 15%, var(--surface)); }
.site-notice[data-type="promotion"] strong { color: var(--gold); }
.site-notice button { border: 0; background: transparent; color: var(--text); font-size: 22px; cursor: pointer; }
.maintenance-warning { min-height: 42px; padding: 9px 4vw; display: flex; align-items: center; justify-content: center; gap: 12px; position: sticky; top: 84px; z-index: 24; border-bottom: 1px solid color-mix(in srgb, var(--gold) 55%, var(--line)); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); color: var(--text); }
.maintenance-warning b { color: var(--gold); text-transform: uppercase; }
.maintenance-gate { position: fixed; inset: 84px 0 0; z-index: 90; display: grid; place-items: center; padding: 24px; overflow: auto; background: color-mix(in srgb, var(--bg) 96%, transparent); backdrop-filter: blur(10px); }
.maintenance-gate-panel { width: min(620px, 96vw); padding: 30px; display: grid; place-items: center; gap: 12px; text-align: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow); }
.maintenance-gate-panel img { width: 180px; height: 190px; object-fit: contain; }
.maintenance-gate-panel h1 { margin: 0; font-size: 34px; }
.maintenance-gate-panel p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.55; }
.maintenance-gate-panel strong { color: var(--gold); }
.brand { height: 100%; display: flex; align-items: center; overflow: visible; }
.brand-logo { width: 220px; max-height: 56px; display: block; object-fit: contain; }
.logo-dark { display: none; }
.logo-light { display: block; }
body.dark .logo-light { display: none; }
body.dark .logo-dark { display: block; }
.public-actions, .app-actions, .hero-actions, .head-actions, .two-buttons { display: flex; align-items: center; gap: 10px; }

.btn { min-height: 38px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 9px 18px; display: inline-flex; justify-content: center; align-items: center; background: var(--surface-2); color: var(--text); text-transform: uppercase; text-decoration: none; font-weight: 800; font-size: 12px; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease; }
.btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--gold-dark); border-color: var(--gold); color: #ffd861; }
.btn-toggle-on { background: color-mix(in srgb, var(--green) 20%, var(--surface)); border-color: var(--green); color: var(--green); }
.btn-toggle-on:hover { background: color-mix(in srgb, var(--green) 30%, var(--surface)); }
.btn-primary:hover { color: #fff; }
.btn-soft { background: var(--surface); }
.btn-danger { background: var(--surface); color: var(--red); border-color: var(--line-strong); }
.btn-large { min-height: 48px; padding: 13px 24px; font-size: 14px; }
.full { width: 100%; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 42px; align-items: center; min-height: 620px; }
.eyebrow { margin: 0 0 6px; color: var(--gold); font-weight: 900; text-transform: uppercase; font-size: 12px; }
.hero h1 { margin: 10px 0 22px; max-width: 900px; font-size: clamp(42px, 6vw, 76px); line-height: .98; }
.lead { max-width: 720px; color: var(--muted); font-size: 20px; line-height: 1.55; }
.trust-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trust-row span { border: 1px solid var(--line); padding: 9px 13px; background: var(--surface); }
.hero-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.status-card, .sales-grid article, .catalog-showcase, .offer, .login-card { border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.status-card { min-height: 144px; padding: 24px; }
.status-card:nth-child(2) { grid-column: span 2; }
.status-card span, .status-card small, .sales-grid p, .offer p { color: var(--muted); }
.status-card strong { display: block; margin: 12px 0; font-size: 32px; }
.positive strong { color: var(--green); }
.warning { border-color: var(--gold); }
.sales-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 16px 0 42px; }
.sales-grid article { padding: 26px; }
.sales-grid h2, .offer h2 { font-size: 26px; }
.sales-grid p, .offer p { line-height: 1.55; }
.catalog-showcase { padding: 30px; margin-bottom: 42px; }
.showcase-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; }
.catalog-mock { margin-top: 20px; padding: 20px; border: 1px solid var(--line); background: var(--surface-2); }
.mock-top { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mock-top strong, .mock-top span { display: block; }
.mock-top small { color: var(--muted); text-transform: uppercase; font-weight: 800; }
.showcase-cycle { max-width: 760px; margin: 24px auto 30px; }
.offer { min-height: 300px; padding: 0 30px 0 0; display: grid; grid-template-columns: 220px minmax(0, 1fr) auto; align-items: center; gap: 28px; overflow: hidden; }
.offer-mascot { height: 300px; align-self: end; display: flex; align-items: end; justify-content: center; overflow: hidden; background: var(--surface-2); }
.offer-mascot img { width: 235px; max-width: none; height: 292px; display: block; object-fit: contain; object-position: center bottom; }
.offer-copy { max-width: 650px; }
.price-card { text-align: right; }
.price-card strong { display: block; margin: 8px 0 16px; color: var(--green); font-size: 46px; }
.regular-price { display: block; margin-top: 7px; color: var(--muted); text-decoration: line-through; }
.flash-offer { display: grid; gap: 3px; margin: -7px 0 13px !important; color: var(--gold) !important; }
.flash-offer b { text-transform: uppercase; }
.flash-offer span { color: var(--muted); font-size: 12px; }
.login-page { display: none; place-items: center; }
.login-page.active { display: grid; }
.login-card { width: min(920px, 94vw); min-height: 540px; padding: 0; display: grid; grid-template-columns: minmax(290px, .85fr) minmax(390px, 1.15fr); overflow: hidden; text-align: left; }
.login-visual { position: relative; min-height: 540px; padding: 28px 24px 0; display: grid; grid-template-rows: auto 1fr; align-items: end; overflow: hidden; border-right: 1px solid var(--line); background: var(--surface-2); }
.login-logo { width: 320px; max-width: 100%; max-height: 82px; object-fit: contain; margin: 0 auto; }
.login-mascot { width: min(100%, 390px); max-height: 420px; align-self: end; justify-self: center; display: block; object-fit: contain; object-position: center bottom; }
.login-form { padding: 50px 42px 38px; display: flex; flex-direction: column; justify-content: center; }
.login-form h1 { margin: 5px 0 10px; font-size: 34px; }
.login-form > p:not(.eyebrow):not(.form-msg) { margin: 0 0 15px; color: var(--muted); line-height: 1.45; }
.login-form .btn { width: 100%; margin-top: 8px; }
.form-msg { color: var(--red); font-weight: 800; }

label { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
label:not(.inline-check) { display: grid; gap: 6px; }
.login-card label { margin: 13px 0; text-align: left; }
input, select, textarea { width: 100%; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 0; background: var(--surface-2); color: var(--text); }
.readonly-value { width: 100%; min-height: 28px; padding: 6px 8px; display: flex; align-items: center; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--green); font-size: 13px; font-weight: 900; }
textarea { resize: vertical; }
.inline-check { display: flex; align-items: center; gap: 7px; min-height: 24px; color: var(--cyan); }
.inline-check input { width: 14px; min-height: 14px; margin: 0; accent-color: var(--blue); }

body.app-mode { overflow: hidden; }
body.app-mode .brand-watermark { display: none; }
body.app-mode .site-header { height: 84px; padding: 0 3.8vw; background: var(--surface); }
body.dark.app-mode .site-header { background: #02080c; }
body.app-mode .site-header .brand { visibility: hidden; width: 232px; }
body.app-mode .site-header .app-actions { margin-left: auto; }
.app-page { padding: 0; }
.app-page.active { display: grid; grid-template-columns: 238px minmax(0, 1fr); height: calc(100vh - 84px); min-height: 0; }
.sidebar { height: 100%; overflow-y: auto; padding: 10px 11px 18px; border-right: 1px solid var(--line); background: var(--surface); }
.side-brand { height: 92px; display: grid; place-items: center; margin-bottom: 4px; border: 1px solid var(--line); background: var(--surface); }
body.dark .side-brand { background: #01070a; }
.side-logo { width: 205px; max-height: 62px; object-fit: contain; }
.side-nav { margin-bottom: 12px; }
.side-link { width: 100%; min-height: 38px; margin: 5px 0; padding: 8px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--muted); text-align: left; text-transform: uppercase; font-size: 12px; font-weight: 700; cursor: pointer; }
.side-link span { width: 12px; color: var(--text); text-align: center; }
.side-link:hover { color: var(--text); border-color: var(--line-strong); }
.side-link.active { color: var(--text); border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--surface)); }
.side-card { margin-top: 12px; padding: 12px; border: 1px solid var(--line); background: var(--surface); }
.side-card h3, .side-card h4 { margin: 0 0 8px; color: var(--gold); text-transform: uppercase; font-size: 12px; }
.side-card h4 { margin-top: 10px; font-size: 10px; }
.side-card label { grid-template-columns: 82px 1fr; align-items: center; margin: 6px 0; }
.side-card input, .side-card select { min-height: 28px; padding: 4px 7px; }
.side-card strong { display: block; margin-top: 8px; color: var(--cyan); }
.side-card small { color: var(--muted); }
.side-card p { margin: 5px 0; font-size: 11px; }
.feature-state { color: var(--green); text-transform: uppercase; font-weight: 900; }
.feature-state i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.feature-state.off { color: var(--red); }
.feature-state.off i { background: var(--red); box-shadow: 0 0 7px color-mix(in srgb, var(--red) 70%, transparent); }
.rate { display: inline-block; margin-top: 8px; color: var(--green); font-size: 20px; }
.license-card { background: color-mix(in srgb, var(--green) 7%, var(--surface)); }
.license-card h3, .license-card b { color: var(--green); }

.robot-shell { position: relative; min-width: 0; height: 100%; overflow: auto; padding: 22px 15px 20px; }
.robot-toolbar { display: flex; justify-content: center; align-items: flex-end; gap: 10px; margin: -14px 0 20px; }
.robot-toolbar label { width: 125px; }
.robot-toolbar label:nth-child(2) { width: 250px; }
.robot-toolbar select { min-height: 34px; font-weight: 700; }
.robot-toolbar [data-broker-toggle] { min-width: 124px; flex: 0 0 auto; }
.market-control { width: 430px; display: grid; gap: 4px; }
.market-control > span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.market-choice-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 8px; }
.market-choice-row > small { color: var(--muted); font-size: 9px; line-height: 1.2; text-align: right; }
.market-segments { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; min-height: 38px; }
.market-segments button { min-width: 0; min-height: 38px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 6px 8px; display: grid; grid-template-columns: 7px auto; grid-template-rows: auto auto; align-content: center; justify-content: center; column-gap: 6px; background: var(--surface); color: var(--text); font: inherit; text-transform: uppercase; cursor: pointer; transition: border-color .16s ease, background-color .16s ease, color .16s ease; }
.market-segments button i { width: 7px; height: 7px; grid-row: 1 / span 2; align-self: center; border-radius: 50%; background: var(--line-strong); }
.market-segments button b { font-size: 10px; line-height: 1; }
.market-segments button small { margin-top: 2px; color: var(--muted); font-size: 7px; line-height: 1; }
.market-segments button:hover:not(:disabled) { border-color: var(--gold); background: var(--surface-2); }
.market-segments button.active { border-color: var(--gold); background: var(--gold-dark); color: #fff; }
.market-segments button.active i { background: var(--green); box-shadow: 0 0 0 2px color-mix(in srgb, var(--green) 18%, transparent); }
.market-segments button.active small { color: #ffe28a; }
.market-segments button.unavailable { color: var(--muted); cursor: not-allowed; }
.market-segments button.unavailable i { background: var(--red); box-shadow: 0 0 0 2px color-mix(in srgb, var(--red) 14%, transparent); }
.market-segments button.unavailable small { color: var(--red); }
.broker-status { min-width: 92px; display: grid; gap: 4px; align-self: end; }
.broker-status > span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.broker-led { min-width: 84px; min-height: 34px; align-self: center; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--red) 42%, var(--line)); background: color-mix(in srgb, var(--red) 6%, var(--surface)); color: var(--red); font-size: 11px; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.broker-led::before { content: ""; width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 15%, transparent); }
.broker-led.connected { color: var(--green); }
.broker-led.connected { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); background: color-mix(in srgb, var(--green) 6%, var(--surface)); }
.broker-led.connected::before { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent); }
.robot-view { display: none; }
.robot-view.active { display: block; }

.main-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(390px, 23vw, 430px); gap: 14px; }
.workspace { min-width: 0; }
.workspace h2, .view-head h1 { margin: 4px 0 14px; text-transform: uppercase; font-size: 23px; }
.motivation-card { min-height: 54px; margin-bottom: 10px; padding: 8px 16px; display: flex; align-items: center; gap: 24px; border: 1px solid var(--line); background: var(--surface); }
.motivation-card div { min-width: 260px; }
.motivation-card strong { color: var(--gold); text-transform: uppercase; }
.motivation-card p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.motivation-card span { margin-left: auto; color: var(--gold); font-size: 12px; font-weight: 800; }
.motivation-card b { color: var(--green); }
.signal-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.signal-cards > div, .chart-card, .adx-card, .why-card, .live-catalog, .panel-card, .settings-card, .catalog-panel, .license-server, .table-wrap { border: 1px solid var(--line); background: var(--surface); }
.signal-cards > div { min-height: 100px; padding: 14px; display: flex; flex-direction: column; }
.signal-cards span { color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 800; }
.signal-cards strong { margin: 7px 0; color: var(--gold); text-transform: uppercase; }
.signal-cards small { margin-top: auto; color: var(--muted); }
.chart-card { margin-top: 10px; padding: 0; }
.chart-title { min-height: 42px; padding: 6px 13px; display: flex; align-items: center; gap: 16px; background: var(--surface-2); font-size: 12px; }
.chart-title [data-chart-analysis] { margin-left: auto; color: var(--cyan); text-align: right; font-size: 11px; }
.chart { position: relative; height: 346px; padding: 28px 26px; display: flex; align-items: end; gap: 7px; overflow: hidden; border-top: 1px solid var(--line); background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 72px 58px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); text-transform: uppercase; }
.bar { position: relative; flex: 1 1 8px; max-width: 13px; min-width: 4px; background: var(--green); }
.bar.red { background: var(--red); }
.bar::before { content: ""; position: absolute; left: calc(50% - 1px); top: -14px; width: 2px; height: calc(100% + 28px); background: inherit; opacity: .9; }
.lower-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 9px; margin-top: 10px; }
.adx-card, .why-card { min-height: 118px; padding: 9px 12px; }
.adx-card h3, .why-card h3, .live-catalog h3 { margin: 0 0 8px; color: var(--gold); text-transform: uppercase; font-size: 11px; }
.adx { height: 84px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.adx-value { font-size: 11px; font-weight: 800; color: var(--muted); }
.adx-value.adx-strong { color: var(--green); }
.adx-value.adx-weak { color: var(--red); }
.adx-bars { flex: 1; min-height: 0; display: flex; align-items: center; gap: 5px; overflow: hidden; }
.adx span { flex: 1 1 5px; max-width: 8px; background: var(--green); }
.adx span.red { background: var(--red); }
.why-card ul { margin: 0; padding-left: 16px; line-height: 1.45; font-size: 11px; }
.live-catalog { min-height: 178px; margin-top: 10px; padding: 11px; display: grid; grid-template-columns: 190px minmax(0, 1fr) 240px; align-items: center; gap: 12px; overflow: hidden; }
.live-catalog strong, .live-catalog span { display: block; margin: 5px 0; }
.live-catalog span, .live-catalog p { color: var(--muted); font-size: 11px; }
.mini-cycle { width: 100%; min-width: 0; min-height: 142px; display: grid; grid-template-rows: 112px 30px; align-content: end; overflow: hidden; }
.cycle-bars { height: 112px; padding: 0 8px; display: flex; align-items: end; justify-content: center; gap: clamp(7px, 1.35vw, 16px); overflow: hidden; border-bottom: 1px solid var(--line); }
.cycle-candle { width: clamp(32px, 6vw, 48px); height: 110px; flex: 0 1 48px; display: grid; grid-template-rows: 22px 62px 26px; text-align: center; }
.cycle-tag { min-height: 22px; margin: 0 !important; display: flex !important; align-items: center; justify-content: center; color: transparent !important; font-size: 9px !important; font-weight: 900; line-height: 1; letter-spacing: 0; white-space: nowrap; }
.cycle-candle.reference .cycle-tag { color: var(--red) !important; }
.cycle-candle.entry .cycle-tag { color: var(--gold) !important; }
.cycle-plot { width: 100%; height: 62px; display: flex; align-items: flex-end; justify-content: center; }
.cycle-plot i { display: none; }
.cycle-plot b { width: 24px; height: 56px; display: block; border: 1px solid currentColor; border-radius: 3px 3px 1px 1px; background: currentColor; box-shadow: inset 0 0 0 1px rgba(255,255,255,.09); }
.cycle-plot b.up { color: var(--green); }
.cycle-plot b.down { color: var(--red); }
.cycle-plot b.pending { color: var(--gold); border: 2px solid var(--gold); background: transparent; box-shadow: none; }
.cycle-candle small { margin: 0 !important; display: grid; grid-template-rows: 13px 11px; place-items: center; color: var(--muted); font-size: 8px; line-height: 1; white-space: nowrap; }
.cycle-candle small strong { color: var(--text); font-size: 10px; }
.cycle-legend { height: 30px; display: flex; align-items: center; justify-content: center; gap: 22px; color: var(--muted); font-size: 9px; overflow: hidden; }
.cycle-legend span { display: inline-flex !important; align-items: center; gap: 6px; margin: 0 !important; white-space: nowrap; }
.cycle-legend i { width: 13px; height: 3px; display: inline-block; border: 0; border-radius: 2px; background: var(--red); }
.cycle-legend i.entry { background: var(--gold); }
.mini-cycle.large { min-height: 158px; grid-template-rows: 126px 32px; }
.mini-cycle.large .cycle-bars { height: 126px; }
.mini-cycle.large .cycle-candle { width: clamp(36px, 6vw, 54px); height: 124px; grid-template-rows: 24px 70px 30px; }
.mini-cycle.large .cycle-plot { height: 70px; }
.mini-cycle.large .cycle-plot b { width: 28px; height: 64px; }

.right-panel { min-width: 0; display: grid; align-content: start; gap: 10px; }
.panel-card, .settings-card, .catalog-panel { padding: 14px; }
.panel-card h3, .settings-card h3, .catalog-panel h3, .month-result h3 { margin: 0 0 10px; color: var(--gold); text-transform: uppercase; font-size: 14px; }
.panel-card p { margin: 7px 0; color: var(--muted); font-size: 12px; }
.panel-card label { grid-template-columns: 120px 1fr; align-items: center; margin: 6px 0; }
.broker-card dl { margin: 0 0 10px; display: grid; grid-template-columns: 115px 1fr; gap: 7px; font-size: 12px; }
.broker-card dt { color: var(--muted); text-transform: uppercase; }
.broker-card dd { margin: 0; font-weight: 800; }
.operation-card h3 { display: flex; justify-content: space-between; }
.operation-card h3 b { color: var(--green); }
.operation-card .status-big { display: block; margin-bottom: 8px; color: var(--cyan); text-transform: uppercase; font-size: 23px; }
.operation-card .status-big.cycle-win { color: var(--green); }
.operation-card .status-big.cycle-loss { color: var(--red); }
.live-clock-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 8px 0 10px; padding: 8px 12px; border: 1px solid var(--line); background: var(--surface-2); }
.live-clock-row .live-clock-now { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--fg); letter-spacing: 0.5px; }
.live-clock-row .live-clock-next { display: flex; align-items: baseline; gap: 6px; text-align: right; }
.live-clock-row .live-clock-next small { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.live-clock-row .live-clock-next strong { color: var(--gold); font-size: 18px; font-variant-numeric: tabular-nums; }
.live-clock-row .live-clock-next em { color: var(--cyan); font-size: 11px; font-style: normal; font-weight: 700; }
.live-clock-row .live-clock-next em.clock-next-now { color: var(--green); animation: pulse-now 1s infinite; }
@keyframes pulse-now { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.operation-clock { min-height: 62px; margin: 10px 0; padding: 9px 12px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: center; column-gap: 14px; border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--surface-2); }
.operation-clock > span { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.operation-clock > strong { grid-row: 1 / span 2; grid-column: 2; min-width: 78px; color: var(--gold); text-align: right; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.operation-clock > small { color: var(--cyan); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.operation-clock.expired { border-left-color: var(--cyan); }
.operation-clock.expired > strong { color: var(--cyan); font-size: 17px; }
.operation-clock.result-win { border-left-color: var(--green); }
.operation-clock.result-win > strong { color: var(--green); font-size: 20px; }
.operation-clock.result-loss { border-left-color: var(--red); }
.operation-clock.result-loss > strong { color: var(--red); font-size: 20px; }
.operation-clock.result-draw { border-left-color: var(--muted); }
.operation-clock.result-draw > strong { color: var(--muted); font-size: 20px; }
.goal-list { min-height: 50px; margin: 8px 0; white-space: pre-line; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.45; }
.two-buttons .btn { flex: 1; }
.goal-card .inline-check { justify-content: flex-start; }
.mode-explain { margin: -2px 0 8px; padding: 7px 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.45; }
.auto-state { display: block; margin-top: 7px; color: var(--muted); text-transform: uppercase; font-size: 11px; }

.view-head { min-height: 58px; margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.view-head p { margin: 0; color: var(--muted); font-size: 11px; }
.head-actions { flex-wrap: wrap; justify-content: flex-end; }
.catalog-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 12px; margin-bottom: 12px; }
.catalog-panel { min-height: 170px; }
.catalog-panel strong { font-size: 21px; }
.catalog-progress { color: var(--cyan); min-height: 18px; }
.strategy-protected { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.head-actions .btn:disabled { opacity: .38; cursor: not-allowed; filter: grayscale(.45); }
.table-wrap { max-height: 64vh; overflow: auto; box-shadow: none; }
.table-wrap.tall { min-height: calc(100vh - 190px); max-height: calc(100vh - 190px); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 8px; border: 1px solid var(--line); text-align: left; white-space: nowrap; font-size: 11px; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--gold); text-transform: uppercase; }
tr.selected td { background: color-mix(in srgb, var(--green) 13%, var(--surface)); }
.call { color: var(--green); }
.put { color: var(--red); }

.monthly-grid { display: grid; grid-template-columns: 345px minmax(520px, 1fr) 310px; gap: 14px; align-items: start; }
.monthly-form { display: grid; gap: 7px; padding: 4px; border: 0; }
.monthly-form label:not(.inline-check) { margin: 0; }
.balance-label { color: var(--muted); text-transform: uppercase; font-size: 11px; }
.balance-label span, .next-fee span { display: block; margin-top: 4px; color: var(--cyan); font-size: 18px; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.window-row { display: grid; grid-template-columns: 72px 1fr 1fr; align-items: center; gap: 8px; }
.window-row input { min-height: 30px; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.calendar-card { border: 1px solid var(--line); background: var(--surface); }
.calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-week span { padding: 6px; border-right: 1px solid var(--line); color: var(--gold); text-transform: uppercase; font-size: 11px; font-weight: 800; }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); }
.day { min-height: 62px; padding: 8px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface-2); font-size: 11px; text-align: center; }
.day.blank { background: var(--bg); }
.day.today { background: color-mix(in srgb, var(--green) 24%, var(--surface)); }
.day.win { background: color-mix(in srgb, var(--green) 35%, var(--surface)); }
.day.loss { background: color-mix(in srgb, var(--red) 30%, var(--surface)); }
.month-result { min-height: 94px; margin: 12px 0 0; padding: 12px; border: 1px solid var(--line); }
.month-result p { margin: 4px 0; color: var(--green); font-size: 12px; }
.monthly-summary { min-height: 400px; }
.monthly-summary b { color: var(--green); }
.monthly-summary .summary-block { margin-bottom: 24px; }
.monthly-summary .summary-block strong { display: block; color: var(--gold); text-transform: uppercase; font-size: 11px; }
.monthly-summary .summary-block span { display: block; margin-top: 4px; color: var(--text); font-size: 12px; }

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 12px; margin-bottom: 12px; }
.admin-stats strong { color: var(--green); text-transform: uppercase; font-size: 20px; }
.broker-fee-indicator { min-height: 30px; display: flex; align-items: center; gap: 8px; padding: 7px 9px; border: 1px solid var(--line); color: var(--muted); font-size: 11px; text-transform: uppercase; }
.broker-fee-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 3px color-mix(in srgb, var(--muted) 14%, transparent); }
.broker-fee-indicator.fee-active { color: var(--gold); border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.broker-fee-indicator.fee-active .broker-fee-dot { background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.broker-custom-fee { display: grid; grid-template-columns: minmax(0, 1fr) 82px; align-items: center; gap: 8px; color: var(--gold); }
.broker-custom-fee input { width: 100%; }
.broker-fee-admin { margin-bottom: 12px; padding: 14px; }
.broker-fee-admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.broker-fee-admin-head h3 { margin: 0 0 4px; }
.broker-fee-admin-head p { margin: 0; color: var(--muted); font-size: 12px; }
.broker-fee-options { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 8px; }
.broker-fee-option { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.broker-fee-option input { width: 16px; height: 16px; accent-color: var(--green); }
.broker-fee-option span { display: grid; gap: 2px; min-width: 0; }
.broker-fee-option b { color: var(--text); font-size: 12px; }
.broker-fee-option small { color: var(--muted); font-size: 10px; }
.broker-fee-option em { margin-left: auto; color: var(--muted); font-size: 9px; font-style: normal; text-transform: uppercase; }
.broker-fee-option.locked { cursor: default; opacity: .72; }
.cloud-access-admin { margin-bottom: 12px; padding: 14px; }
.cloud-access-controls { display: grid; grid-template-columns: 1.2fr 1.2fr 1fr 1fr auto; align-items: end; gap: 10px; }
.cloud-access-controls label { min-width: 0; }
.cloud-access-controls select, .cloud-access-controls input { width: 100%; min-height: 36px; }
.cloud-access-list { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 11px; }
.cloud-access-list span { min-width: 150px; display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-2); }
.cloud-access-list span b { color: var(--text); }
.cloud-access-list span.active small { color: var(--green); }
.cloud-access-list span.expired small { color: var(--red); }
.maintenance-admin-card { margin-bottom: 12px; padding: 14px; }
.maintenance-admin-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; align-items: end; gap: 10px; }
.maintenance-admin-grid label { min-width: 0; }
.maintenance-admin-grid input, .maintenance-admin-grid textarea { width: 100%; }
.maintenance-admin-grid .inline-check { min-height: 38px; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); background: var(--surface-2); }
.maintenance-admin-grid .inline-check input { width: 16px; height: 16px; }
.maintenance-message-field { grid-column: span 2; }
.maintenance-admin-status { margin: 12px 0 0; padding: 8px 10px; border-left: 3px solid var(--muted); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.maintenance-admin-status.active { border-left-color: var(--red); color: var(--red); }
.maintenance-admin-status.warning { border-left-color: var(--gold); color: var(--gold); }
.catalog-trade-button { min-width: 104px; white-space: nowrap; }
.catalog-auto-owned, .catalog-no-signal { display: inline-block; color: var(--muted); font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.catalog-auto-owned { color: var(--cyan); }
.license-server { min-height: 58px; margin-bottom: 8px; padding: 10px 12px; display: grid; grid-template-columns: 210px 12px 1fr auto; align-items: center; gap: 10px; }
.license-server b { color: var(--gold); text-transform: uppercase; font-size: 11px; }
.license-server span { color: var(--muted); font-size: 11px; }
.server-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); }
.admin-drawer { margin-top: 14px; display: grid; grid-template-columns: 360px 360px 1fr; gap: 12px; }
.settings-card { display: grid; gap: 8px; }
.marketing-stats { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 12px; margin-bottom: 14px; }
.marketing-stats .panel-card { min-height: 108px; }
.marketing-stats strong { color: var(--green); text-transform: uppercase; font-size: 20px; }
.marketing-grid { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(300px, .8fr) minmax(390px, 1.2fr); gap: 14px; align-items: start; }
.marketing-card { padding: 18px; }
.marketing-card h2, .marketing-live-preview h2 { margin: 0 0 10px; font-size: 18px; text-transform: uppercase; }
.marketing-card .field-help { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.banner-file-info { margin: 0; padding: 8px 10px; border-left: 3px solid var(--cyan); background: var(--surface-2); color: var(--text); font-size: 11px; }
.marketing-banner-form { grid-row: span 2; }
.banner-upload-preview { min-height: 170px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); }
.banner-upload-preview img { width: 100%; height: 210px; display: block; object-fit: contain; }
.marketing-live-preview { grid-column: 1 / span 2; min-height: 220px; }
.marketing-preview-image { width: min(100%, 420px); max-height: 190px; display: block; margin: 0 0 14px; object-fit: contain; border: 1px solid var(--line); background: var(--surface-2); }
.preview-price { margin: 20px 0; }
.preview-price small { display: block; color: var(--muted); text-decoration: line-through; }
.preview-price strong { display: block; color: var(--green); font-size: 38px; }
.preview-notice { padding: 12px; border-left: 3px solid var(--cyan); background: var(--surface-2); color: var(--muted); }

.settings-modal { width: min(1120px, 96vw); max-height: 94vh; overflow: auto; border: 1px solid var(--line-strong); border-radius: 8px; padding: 26px; background: var(--surface); color: var(--text); }
.settings-modal::backdrop { background: rgba(0, 0, 0, .72); }
.maintenance-preview-modal { width: min(560px, 94vw); padding: 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--text); text-align: center; }
.maintenance-preview-modal::backdrop { background: rgba(0, 0, 0, .72); }
.maintenance-preview-modal img { width: 170px; height: 180px; object-fit: contain; }
.maintenance-preview-modal h2 { margin: 4px 0 10px; font-size: 28px; }
.maintenance-preview-modal > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.maintenance-preview-modal strong { color: var(--gold); }
.settings-modal h2 { margin: 0 0 4px; text-transform: uppercase; font-size: 24px; }
.settings-modal > p { color: var(--muted); }
.modal-close { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; color: var(--text); font-size: 26px; cursor: pointer; }
.settings-options { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.settings-numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.settings-modal h3 { margin-top: 20px; color: var(--gold); text-transform: uppercase; }
.cloud-schedule-card { margin-top: 24px; padding: 16px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); }
.cloud-schedule-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.cloud-schedule-head h3 { margin: 0 0 4px; }
.cloud-schedule-head p { margin: 0; color: var(--muted); font-size: 11px; }
.switch-control { display: flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer; white-space: nowrap; }
.switch-control input { position: absolute; opacity: 0; pointer-events: none; }
.switch-control span { width: 36px; height: 20px; padding: 2px; display: block; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); transition: background-color .16s ease, border-color .16s ease; }
.switch-control span::after { content: ""; width: 14px; height: 14px; display: block; border-radius: 50%; background: var(--muted); transition: transform .16s ease, background-color .16s ease; }
.switch-control input:checked + span { border-color: var(--green); background: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.switch-control input:checked + span::after { transform: translateX(16px); background: var(--green); }
.cloud-access-status, .cloud-schedule-status { margin: 12px 0; padding: 8px 10px; border-left: 3px solid var(--green); background: var(--surface); color: var(--green); font-size: 11px; }
.cloud-access-status.blocked { border-left-color: var(--red); color: var(--red); }
.cloud-schedule-status { border-left-color: var(--cyan); color: var(--cyan); }
.cloud-schedule-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cloud-random-options { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr 1fr auto; align-items: end; gap: 10px; }
.cloud-day-grid { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.cloud-day-row { min-height: 43px; display: grid; grid-template-columns: minmax(110px, 1fr) 104px 104px; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.cloud-day-row input[type="time"] { min-width: 0; width: 100%; }
.cloud-day-row input[readonly] { color: var(--cyan); }
.cloud-schedule-card :disabled { cursor: not-allowed; opacity: .58; }
.modal-actions { margin-top: 28px; display: flex; justify-content: flex-end; }
.modal-actions form { display: flex; gap: 10px; }
.broker-login-modal { width: min(660px, 94vw); }
.broker-login-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.broker-login-grid label:nth-child(-n+2) { grid-column: 1 / -1; }
.broker-login-status { min-height: 22px; margin: 16px 0 0; color: var(--cyan); font-weight: 700; }
.broker-login-status.error { color: var(--red); }
.broker-login-status.success { color: var(--green); }
.campaign-popup { width: min(760px, 94vw); max-height: 90vh; padding: 0; overflow: auto; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.48); }
.campaign-popup::backdrop { background: rgba(0,0,0,.76); }
.campaign-popup .modal-close { z-index: 2; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); }
.campaign-image { width: 100%; max-height: 390px; display: block; object-fit: contain; background: var(--surface-2); }
.campaign-content { padding: 26px; }
.campaign-content h2 { margin: 5px 0 10px; font-size: 30px; }
.campaign-content > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.marketing-preview-modal { width: min(1580px, 98vw); height: 95vh; max-height: 95vh; padding: 0; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); color: var(--text); box-shadow: 0 24px 80px rgba(0,0,0,.48); }
.marketing-preview-modal::backdrop { background: rgba(0,0,0,.76); }
.marketing-preview-toolbar { min-height: 66px; padding: 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.marketing-preview-toolbar div { display: grid; gap: 2px; }
.marketing-preview-toolbar .eyebrow { margin: 0; }
.marketing-preview-toolbar strong { font-size: 17px; text-transform: uppercase; }
.marketing-preview-toolbar span { color: var(--muted); font-size: 11px; }
.marketing-page-frame { height: calc(95vh - 67px); overflow: auto; background: var(--bg); }
.marketing-page-canvas { position: relative; min-width: 980px; min-height: 100%; overflow: hidden; background: var(--bg); pointer-events: none; }
.marketing-page-canvas .preview-public-header { position: sticky; top: 0; z-index: 3; }
.marketing-page-canvas .marketing-page-preview { display: block; }
.preview-public-notice { position: relative; z-index: 2; display: flex; gap: 12px; }
.preview-campaign-popup { position: absolute; top: 108px; left: 50%; z-index: 5; width: min(720px, 70%); max-height: 620px; overflow: auto; transform: translateX(-50%); border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: 0 24px 80px rgba(0,0,0,.58); }
.preview-campaign-popup img { width: 100%; max-height: 360px; display: block; object-fit: contain; background: var(--surface-2); }
.preview-campaign-popup div { padding: 24px; }
.preview-campaign-popup h2 { margin: 4px 0 10px; font-size: 28px; }
.preview-campaign-popup div > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.app-toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--text); box-shadow: 0 12px 35px rgba(0,0,0,.35); opacity: 0; transform: translateY(12px); pointer-events: none; transition: .18s ease; }
.app-toast.show { opacity: 1; transform: translateY(0); }
.app-toast.error { border-color: var(--red); color: var(--red); }
.app-toast.success { border-color: var(--green); color: var(--green); }
.live-chart { position: absolute; inset: 0; width: 100%; height: 100%; }
.chart-price { fill: var(--muted); font-size: 10px; }
.chart-ema-fast { fill: none; stroke: var(--gold); stroke-width: 1.7; }
.chart-ema-slow { fill: none; stroke: var(--cyan); stroke-width: 1.7; }

@media (min-width: 1800px) {
  body.app-mode .robot-toolbar { position: fixed; top: 8px; left: 300px; right: 560px; z-index: 22; margin: 0; flex-wrap: nowrap; gap: 8px; justify-content: flex-start; }
  body.app-mode .robot-toolbar .market-control { width: 360px; flex: 0 0 360px; }
  body.app-mode .robot-toolbar label { width: 110px; flex: 0 0 110px; }
  body.app-mode .robot-toolbar label:nth-child(2) { width: 240px; flex: 0 0 240px; }
  body.app-mode .robot-toolbar .broker-status { min-width: 84px; flex: 0 0 84px; }
}

@media (min-width: 1481px) and (max-width: 1799px) {
  body.app-mode .robot-toolbar { justify-content: flex-start; flex-wrap: wrap; margin-top: 0; }
}

@media (max-width: 1480px) {
  body.app-mode { overflow: auto; }
  .app-page.active { height: auto; min-height: calc(100vh - 84px); }
  .sidebar { height: auto; }
  .robot-shell { height: auto; overflow: visible; }
  .main-grid { grid-template-columns: minmax(0, 1fr) 390px; }
  .monthly-grid { grid-template-columns: 320px minmax(450px, 1fr); }
  .monthly-summary { grid-column: 2; min-height: auto; }
  .admin-drawer { grid-template-columns: 1fr 1fr; }
  .admin-drawer .panel-card { grid-column: span 2; }
  .broker-fee-options { grid-template-columns: 1fr 1fr; }
  .marketing-grid { grid-template-columns: 1fr 1fr; }
  .marketing-banner-form { grid-row: auto; }
  .marketing-live-preview { grid-column: 2; }
}

@media (max-width: 1120px) {
  .app-page.active { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: 1fr; padding: 10px; }
  .side-brand, .side-card { display: none; }
  .side-nav { display: flex; overflow-x: auto; gap: 6px; margin: 0; }
  .side-link { min-width: max-content; margin: 0; }
  .main-grid, .monthly-grid, .catalog-layout, .admin-drawer, .marketing-grid { grid-template-columns: 1fr; }
  .right-panel { grid-template-columns: 1fr 1fr; }
  .monthly-summary, .admin-drawer .panel-card { grid-column: auto; }
  .signal-cards { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .broker-fee-options { grid-template-columns: 1fr; }
  .cloud-access-controls { grid-template-columns: 1fr 1fr; }
  .maintenance-admin-grid { grid-template-columns: 1fr 1fr; }
  .broker-fee-admin-head { align-items: stretch; flex-direction: column; }
  .marketing-stats { grid-template-columns: 1fr 1fr; }
  .marketing-live-preview { grid-column: auto; }
}

@media (max-width: 720px) {
  .site-header { height: auto; min-height: 72px; padding: 12px 14px; gap: 12px; align-items: flex-start; }
  .brand-logo { width: 170px; }
  .public-actions, .app-actions, .head-actions { flex-wrap: wrap; }
  .site-notice div { align-items: flex-start; flex-direction: column; gap: 2px; text-align: left; }
  .page { padding: 22px 14px; }
  .hero, .hero-panel, .sales-grid, .mock-top, .right-panel, .signal-cards, .lower-grid, .live-catalog, .admin-stats, .marketing-stats, .settings-options, .settings-numbers, .cloud-schedule-options, .cloud-random-options, .cloud-day-grid { grid-template-columns: 1fr; }
  .maintenance-admin-grid { grid-template-columns: 1fr; }
  .maintenance-message-field { grid-column: auto; }
  .maintenance-warning { top: 72px; align-items: flex-start; flex-direction: column; gap: 2px; }
  .maintenance-gate { inset: 72px 0 0; }
  .hero { min-height: auto; }
  .status-card:nth-child(2) { grid-column: auto; }
  .offer, .showcase-head { display: block; }
  .offer { padding: 22px; }
  .offer-mascot { width: 150px; height: 170px; margin: -22px auto 14px; background: transparent; }
  .offer-mascot img { width: 160px; height: 168px; }
  .login-card { min-height: 0; grid-template-columns: 1fr; }
  .login-visual { min-height: 210px; padding: 20px 20px 0; grid-template-columns: 1fr 130px; grid-template-rows: 1fr; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-logo { width: 240px; }
  .login-mascot { width: 145px; max-height: 190px; }
  .login-form { padding: 28px 24px; }
  .mock-candles { padding-left: 0; }
  .price-card { text-align: left; }
  body.app-mode .site-header .brand { display: none; }
  body.app-mode .site-header { justify-content: flex-end; }
  .robot-shell { padding: 12px 8px; }
  .robot-toolbar { justify-content: flex-start; flex-wrap: wrap; margin: 0 0 14px; }
  .robot-toolbar label, .robot-toolbar label:nth-child(2) { width: calc(50% - 5px); }
  .market-control { width: 100%; }
  .broker-led { min-width: 0; }
  .motivation-card { align-items: flex-start; flex-wrap: wrap; }
  .motivation-card div { min-width: 100%; }
  .motivation-card span { margin-left: 0; }
  .chart { height: 280px; }
  .broker-login-grid { grid-template-columns: 1fr; }
  .broker-login-grid label { grid-column: auto !important; }
  .view-head { align-items: flex-start; flex-direction: column; }
  .monthly-grid { grid-template-columns: 1fr; }
  .calendar-card { overflow-x: auto; }
  .calendar-week, .calendar { min-width: 560px; }
  .license-server { grid-template-columns: 1fr; }
}

/* Catalogação: período, badge de cooldown e modal "Ver Ciclos" (padrão OBPlus) */
.catalog-period-field { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.catalog-period-field select { padding: 8px 10px; }
.catalog-cooldown-badge { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; background: color-mix(in srgb, var(--amber) 24%, var(--surface)); color: var(--amber); }
.catalog-cycles-button { padding: 6px 10px; font-size: 11px; }

.settings-modal.client-details-modal, .settings-modal.catalog-cycles-modal { max-width: 560px; width: 92vw; }
.settings-modal.catalog-cycles-modal small[data-cycles-period] { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; }

.cycle-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.cycle-stat { padding: 10px; border-radius: 10px; text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-left-width: 4px; }
.cycle-stat span { display: block; font-size: 20px; font-weight: 800; }
.cycle-stat small { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 700; }
.cycle-stat.outcome-first { border-left-color: var(--green); }
.cycle-stat.outcome-g1 { border-left-color: var(--amber); }
.cycle-stat.outcome-g2 { border-left-color: var(--orange); }
.cycle-stat.outcome-loss { border-left-color: var(--red); }
.cycle-stat.outcome-first span, .cycle-legend .outcome-first::before { color: var(--green); }
.cycle-stat.outcome-g1 span, .cycle-legend .outcome-g1::before { color: var(--amber); }
.cycle-stat.outcome-g2 span, .cycle-legend .outcome-g2::before { color: var(--orange); }
.cycle-stat.outcome-loss span, .cycle-legend .outcome-loss::before { color: var(--red); }

.cycles-summary { font-weight: 800; color: var(--gold); margin: 4px 0 12px; }

.cycle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-bottom: 12px; max-height: 420px; overflow-y: auto; }
.cycle-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 8px; border: 2px solid transparent; background: var(--surface-2); }
.cycle-chip b { font-size: 14px; font-weight: 900; }
.cycle-chip span { font-size: 11px; font-weight: 700; }
.cycle-chip small { font-size: 9px; }
/* Cores bem mais vivas e saturadas (o mix anterior, de 18-30%, ficava
   muito escuro/parecido entre G1 e G2 no tema escuro). Fundo forte na cor +
   texto escuro de alto contraste em cima, exceto no HIT (vermelho), que
   fica melhor com texto claro. */
.cycle-chip.outcome-first { background: color-mix(in srgb, var(--green) 78%, var(--surface)); border-color: var(--green); }
.cycle-chip.outcome-first b, .cycle-chip.outcome-first span, .cycle-chip.outcome-first small { color: #04140c; }
.cycle-chip.outcome-g1 { background: color-mix(in srgb, var(--amber) 82%, var(--surface)); border-color: var(--amber); }
.cycle-chip.outcome-g1 b, .cycle-chip.outcome-g1 span, .cycle-chip.outcome-g1 small { color: #251900; }
.cycle-chip.outcome-g2 { background: color-mix(in srgb, var(--orange) 82%, var(--surface)); border-color: var(--orange); }
.cycle-chip.outcome-g2 b, .cycle-chip.outcome-g2 span, .cycle-chip.outcome-g2 small { color: #2b1300; }
.cycle-chip.outcome-loss { background: color-mix(in srgb, var(--red) 80%, var(--surface)); border-color: var(--red); }
.cycle-chip.outcome-loss b, .cycle-chip.outcome-loss span, .cycle-chip.outcome-loss small { color: #fff; }
.cycle-chip.outcome-noCycle { background: var(--surface-2); opacity: .55; }
.cycle-chip.outcome-open { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 45%, var(--surface)); }

.cycle-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); }
.cycle-legend span { display: flex; align-items: center; gap: 5px; }
.cycle-legend span::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.cycle-legend .outcome-noCycle::before { color: var(--muted); }
.cycle-legend .outcome-open::before { color: var(--blue); }

/* Admin: resumo geral (ganhos x perdas) e detalhes do usuário */
.admin-summary-chart { padding: 4px 0; }
.summary-bar-row { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; margin-top: 10px; }
.summary-bar { height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-top: 4px; }
.summary-bar-fill { height: 100%; border-radius: 999px; }
.summary-bar-fill.win { background: var(--green); }
.summary-bar-fill.loss { background: var(--red); }
.summary-net { margin-top: 14px; font-size: 13px; font-weight: 800; }
.admin-summary-blocks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 12px 0; }

/* Divide um bloco em duas colunas: Conta Real e Conta Prática */
.account-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.account-split h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; color: var(--muted); }
@media (max-width: 720px) {
  .account-split { grid-template-columns: 1fr; }
}

/* Catalogação: lista de linhas no padrão OBPlus (par+estratégia, %, seta,
   contagem, dica e ações), substituindo a tabela densa antiga. */
.catalog-list { display: flex; flex-direction: column; gap: 8px; max-height: 620px; overflow-y: auto; padding-right: 4px; }
.catalog-empty { padding: 24px; text-align: center; color: var(--muted); }
.catalog-row {
  display: grid;
  grid-template-columns: 200px 1fr 110px 140px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}
.catalog-row-pair { display: flex; align-items: center; gap: 8px; min-width: 0; }
.catalog-row-flag { font-size: 18px; }
.catalog-row-pair b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-row-pair small { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; }
.catalog-row-strategy { font-weight: 800; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-row-accuracy { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.catalog-row-accuracy.call { color: var(--green); }
.catalog-row-accuracy.put { color: var(--red); }
.catalog-row-accuracy.neutral { color: var(--muted); }
.catalog-row-trend { font-size: 13px; }
.catalog-row-trend.call { color: var(--green); }
.catalog-row-trend.put { color: var(--red); }
.catalog-row-trend.neutral { color: var(--muted); }
.catalog-row-counts { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.catalog-row-hint { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; min-width: 0; }
.catalog-row-info { cursor: help; opacity: .7; }
.catalog-row-entry-time { font-weight: 800; font-size: 11px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.catalog-row-entry-time.live { color: var(--green); animation: catalog-entry-pulse 1.1s ease-in-out infinite; }
@keyframes catalog-entry-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.catalog-row-actions { display: flex; gap: 6px; align-items: center; }
.catalog-row-actions .btn, .catalog-cycles-button { padding: 7px 12px; font-size: 10px; min-height: 30px; white-space: nowrap; }
.catalog-auto-owned, .catalog-no-signal { font-size: 11px; color: var(--muted); font-weight: 700; text-transform: uppercase; white-space: nowrap; }

@media (max-width: 1100px) {
  .catalog-row { grid-template-columns: 1fr 1fr; grid-template-areas: "pair accuracy" "strategy strategy" "counts hint" "actions actions"; row-gap: 8px; }
  .catalog-row-pair { grid-area: pair; }
  .catalog-row-accuracy { grid-area: accuracy; justify-content: flex-end; }
  .catalog-row-strategy { grid-area: strategy; white-space: normal; }
  .catalog-row-counts { grid-area: counts; }
  .catalog-row-hint { grid-area: hint; justify-content: flex-end; text-align: right; }
  .catalog-row-actions { grid-area: actions; justify-content: flex-end; flex-wrap: wrap; }
}
