:root {
  --red: #c8102e;
  --red-dark: #9f0b24;
  --red-soft: #fff1f3;
  --ink: #17202a;
  --ink-2: #3b4653;
  --muted: #75808d;
  --line: #e7eaee;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --surface-3: #eef1f4;
  --green: #14805e;
  --green-soft: #e9f8f2;
  --amber: #a86200;
  --amber-soft: #fff6df;
  --danger: #b42318;
  --danger-soft: #ffefed;
  --shadow: 0 14px 38px rgba(20, 30, 44, .08);
  --radius: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--surface-2); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--surface-2); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }

.app-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.94); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-inner { height: 74px; display: flex; align-items: center; gap: 26px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 185px; }
.brand-mark { width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 13px; background: linear-gradient(145deg, var(--red), var(--red-dark)); color: white; font-weight: 900; letter-spacing: -1px; box-shadow: 0 8px 20px rgba(200,16,46,.22); }
.brand-mark.large { width: 54px; height: 54px; border-radius: 16px; font-size: 20px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.brand-copy strong { font-size: 15px; }
.brand-copy small { color: var(--muted); font-size: 11px; margin-top: 4px; }
.desktop-nav { display: flex; align-items: center; gap: 6px; flex: 1; }
.desktop-nav a { padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.desktop-nav a:hover { background: var(--surface-2); color: var(--red); }
.user-menu { display: flex; align-items: center; gap: 9px; }
.user-copy { display: flex; flex-direction: column; min-width: 110px; max-width: 170px; }
.user-copy strong, .user-copy small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-copy strong { font-size: 13px; }
.user-copy small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-weight: 800; border: 1px solid #ffd9df; }
.avatar.small { width: 34px; height: 34px; font-size: 12px; }
.icon-button { width: 36px; height: 36px; border: 0; border-radius: 10px; cursor: pointer; background: transparent; color: var(--muted); font-weight: 800; font-size: 18px; }
.icon-button:hover { background: var(--surface-2); color: var(--red); }

.app-main { padding: 34px 0 64px; min-height: calc(100vh - 74px); }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 4px 0 26px; }
.page-head.compact-head { align-items: center; }
.page-head h1 { margin: 5px 0 7px; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; line-height: 1.05; }
.page-head p { margin: 0; color: var(--muted); font-size: 15px; }
.eyebrow { display: inline-block; color: var(--red); font-size: 11px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }

.btn { border: 0; border-radius: 12px; min-height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 750; font-size: 14px; cursor: pointer; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(145deg, var(--red), var(--red-dark)); color: white; box-shadow: 0 10px 24px rgba(200,16,46,.20); }
.btn-secondary { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.btn-light { background: rgba(255,255,255,.93); color: var(--red-dark); }
.btn-ghost { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.btn-success { background: var(--green); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-small { min-height: 36px; border-radius: 9px; padding-inline: 12px; font-size: 12px; }
.btn-block { width: 100%; min-height: 50px; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.text-link, .metric-link { color: var(--red); font-size: 13px; font-weight: 750; }
.small-note { color: var(--muted); font-size: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 18px rgba(20,30,44,.035); padding: 22px; margin-bottom: 20px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-head h2 { margin: 3px 0 0; font-size: 20px; letter-spacing: -.02em; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 132px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 4px 18px rgba(20,30,44,.035); display: flex; flex-direction: column; justify-content: space-between; }
.metric-highlight { background: linear-gradient(145deg, #181f2a, #2c3543); color: white; border-color: transparent; }
.metric-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-highlight .metric-label, .metric-highlight .metric-foot { color: #cbd1d8; }
.metric-value { font-size: 36px; line-height: 1; font-weight: 880; letter-spacing: -.045em; margin: 10px 0; }
.metric-value small { font-size: 15px; letter-spacing: 0; color: var(--muted); }
.metric-foot { color: var(--muted); font-size: 12px; }

.lead-card { margin: 18px 0; padding: 24px; border-radius: var(--radius); background: linear-gradient(130deg, #c8102e 0%, #9d0b25 65%, #7c091d 100%); color: white; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; box-shadow: 0 18px 38px rgba(169,13,40,.18); }
.lead-card.leader-state { background: linear-gradient(130deg, #15202b, #2b3542); }
.lead-card .eyebrow { color: #ffd8df; }
.lead-icon { width: 56px; height: 56px; display: grid; place-items: center; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.2); border-radius: 16px; font-size: 26px; }
.lead-copy h2 { margin: 4px 0 5px; font-size: 22px; }
.lead-copy p { margin: 0; color: rgba(255,255,255,.82); font-size: 13px; line-height: 1.55; }
.lead-copy p strong { color: white; }
.dashboard-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.pending-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pending-box { display: flex; flex-direction: column; padding: 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.pending-box.important { background: var(--amber-soft); border-color: #f2d48d; }
.pending-box strong { font-size: 28px; }
.pending-box span { color: var(--muted); font-size: 12px; margin-top: 5px; }
.tip-box { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--red-soft); color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.tip-box.success { background: var(--green-soft); }
.countdown { display: flex; align-items: end; gap: 10px; margin: 18px 0; }
.countdown strong { font-size: 48px; line-height: .9; }
.countdown span { color: var(--muted); font-size: 12px; }
.progress-track { height: 9px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress-track span { display: block; height: 100%; background: var(--red); border-radius: inherit; }
.progress-legend { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }

.meeting-list { display: flex; flex-direction: column; }
.meeting-row { display: flex; align-items: center; gap: 12px; padding: 14px 4px; border-top: 1px solid var(--line); }
.meeting-row:first-child { border-top: 0; }
.meeting-row.detailed { align-items: flex-start; padding-block: 16px; }
.meeting-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.meeting-main strong { font-size: 14px; }
.meeting-main > span { color: var(--muted); font-size: 12px; }
.meeting-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 11px; }
.meeting-notes { margin: 6px 0 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; max-width: 700px; }
.meeting-actions { display: flex; align-items: flex-end; gap: 8px; flex-direction: column; }
.status { display: inline-flex; align-items: center; white-space: nowrap; border-radius: 999px; padding: 6px 9px; font-size: 10px; font-weight: 800; }
.status-ok { background: var(--green-soft); color: var(--green); }
.status-warn { background: var(--amber-soft); color: var(--amber); }
.status-bad { background: var(--danger-soft); color: var(--danger); }
.status-muted { background: var(--surface-3); color: var(--muted); }
.empty-inline { padding: 18px 4px; color: var(--muted); font-size: 13px; }
.empty-state { text-align: center; max-width: 640px; margin: 42px auto; padding: 48px 24px; }
.empty-state.inline { margin: 0 auto; box-shadow: none; border: 0; }
.empty-state h1, .empty-state h2 { margin: 12px 0 6px; }
.empty-state p { color: var(--muted); margin: 0 0 20px; }
.empty-icon { width: 58px; height: 58px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; background: var(--red-soft); color: var(--red); font-weight: 900; font-size: 18px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.form-card { padding: 26px; }
.form-card.wide-form, .wide-form { max-width: 820px; }
.form-stack { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; border: 0; padding: 0; margin: 0; }
.field > span, .field legend { font-size: 12px; font-weight: 750; color: var(--ink-2); }
.field small { color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea, .admin-status-form input, .admin-status-form select { width: 100%; min-height: 46px; border: 1px solid #d9dee4; border-radius: 11px; padding: 10px 12px; color: var(--ink); background: white; outline: none; transition: border .15s, box-shadow .15s; }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .admin-status-form input:focus, .admin-status-form select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(200,16,46,.09); }
.field-grid { display: grid; gap: 14px; }
.field-grid.two { grid-template-columns: 1fr 1fr; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 48px; }
.input-suffix > span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12px; }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 52px; }
.password-field button { position: absolute; right: 6px; top: 6px; bottom: 6px; border: 0; background: var(--surface-2); border-radius: 8px; padding: 0 10px; color: var(--muted); font-size: 11px; cursor: pointer; }
.field-hint { color: var(--muted) !important; font-size: 11px !important; font-weight: 500 !important; line-height: 1.45; }
.field-error { color: var(--danger) !important; font-size: 11px !important; }
.validation-summary { color: var(--danger); background: var(--danger-soft); border: 1px solid #ffd0cb; border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.validation-summary:empty, .validation-summary.valid { display: none; }
.validation-summary ul { margin: 0; padding-left: 18px; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--red); }
.check-row.card-check { align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.check-row.card-check span { display: flex; flex-direction: column; gap: 3px; }
.check-row.card-check small { color: var(--muted); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; font-size: 12px; font-weight: 700; background: var(--surface); }
.segmented input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.rules-card h2 { margin: 6px 0 10px; font-size: 20px; }
.rules-card > p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.step-list { list-style: none; padding: 0; margin: 20px 0; display: flex; flex-direction: column; gap: 16px; }
.step-list li { display: flex; gap: 12px; }
.step-list li > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: var(--red-soft); color: var(--red); font-weight: 850; font-size: 12px; }
.step-list strong { font-size: 13px; }
.step-list p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.rule-note { background: var(--surface-2); border-radius: 12px; padding: 13px; color: var(--ink-2); font-size: 12px; line-height: 1.5; }
.warning-border { border-color: #efb5bd; }

.strategy-card { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; padding: 22px; border-radius: var(--radius); background: linear-gradient(145deg, #fff1f3, #fff 70%); border: 1px solid #ffd8df; }
.strategy-card.leader { background: linear-gradient(145deg, #ecf8f4, #fff 70%); border-color: #c9eadf; }
.strategy-card h2 { margin: 5px 0; font-size: 22px; }
.strategy-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; max-width: 650px; }
.strategy-numbers { display: flex; gap: 24px; }
.strategy-numbers div { display: flex; flex-direction: column; align-items: flex-end; }
.strategy-numbers strong { font-size: 24px; }
.strategy-numbers span { color: var(--muted); font-size: 10px; }
.cycle-pill { min-width: 92px; display: flex; flex-direction: column; align-items: center; background: white; border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; }
.cycle-pill strong { font-size: 22px; }
.cycle-pill span { color: var(--muted); font-size: 10px; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; margin: 22px auto; max-width: 780px; }
.podium-place { position: relative; min-height: 186px; border: 1px solid var(--line); background: white; border-radius: 18px 18px 12px 12px; padding: 24px 14px 16px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: var(--shadow); }
.podium-place.place-1 { min-height: 228px; padding-top: 34px; border-color: #edbec6; }
.podium-place.is-me { outline: 3px solid rgba(200,16,46,.12); }
.podium-avatar { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #202a36; color: white; font-weight: 850; }
.place-1 .podium-avatar { width: 70px; height: 70px; background: var(--red); }
.medal { position: absolute; top: 14px; left: 14px; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-size: 11px; font-weight: 900; }
.place-1 .medal { background: #ffecad; color: #7b5900; }
.crown { position: absolute; top: 8px; font-size: 20px; color: #c58d00; }
.podium-place strong { margin-top: 10px; font-size: 13px; }
.podium-place small { margin-top: 3px; color: var(--muted); min-height: 28px; font-size: 10px; }
.podium-place b { margin-top: 10px; color: var(--red); font-size: 16px; }
.ranking-list { display: flex; flex-direction: column; }
.rank-row { display: grid; grid-template-columns: 46px 36px minmax(180px, 1fr) repeat(4, minmax(62px, .35fr)) 70px; gap: 10px; align-items: center; padding: 13px 8px; border-top: 1px solid var(--line); }
.rank-row:first-child { border-top: 0; }
.rank-row.is-me { background: var(--red-soft); margin-inline: -8px; padding-inline: 16px; border-radius: 12px; border-top-color: transparent; }
.rank-position { color: var(--muted); font-weight: 850; font-size: 13px; }
.rank-name { min-width: 0; display: flex; flex-direction: column; }
.rank-name strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name span { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-stat, .rank-points { text-align: right; display: flex; flex-direction: column; }
.rank-stat strong, .rank-points strong { font-size: 14px; }
.rank-stat span, .rank-points span { color: var(--muted); font-size: 9px; }
.rank-points strong { color: var(--red); font-size: 17px; }
.rules-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.rules-grid > div { background: var(--surface-2); border-radius: 13px; padding: 15px; }
.rules-grid strong { font-size: 12px; }
.rules-grid p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 6px 0 0; }

.counter-badge { min-width: 32px; height: 32px; padding: 0 9px; display: grid; place-items: center; border-radius: 999px; background: var(--red); color: white; font-size: 12px; font-weight: 850; }
.counter-badge.muted { background: var(--surface-3); color: var(--muted); }
.action-row .button-row { justify-content: flex-end; }

.admin-top-list { display: flex; flex-direction: column; }
.admin-top-row { display: grid; grid-template-columns: 38px 34px 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line); }
.admin-top-row:first-child { border-top: 0; }
.admin-top-row > div:not(.avatar) { display: flex; flex-direction: column; }
.admin-top-row strong { font-size: 12px; }
.admin-top-row small { color: var(--muted); font-size: 10px; }
.admin-top-row b { color: var(--red); font-size: 13px; }
.admin-shortcuts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.admin-shortcuts a { display: grid; grid-template-columns: 34px 1fr auto; gap: 9px; align-items: center; padding: 13px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; }
.admin-shortcuts a:hover { border-color: var(--line); background: white; }
.admin-shortcuts a > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: white; }
.admin-shortcuts a > div { display: flex; flex-direction: column; }
.admin-shortcuts strong { font-size: 12px; }
.admin-shortcuts small { color: var(--muted); font-size: 9px; margin-top: 2px; }
.export-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.export-bar h2 { margin: 3px 0; }
.export-bar p { margin: 0; color: var(--muted); font-size: 12px; }
.table-card { padding: 8px 16px 16px; }
.table-scroll { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th { text-align: left; padding: 14px 10px 10px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
.data-table td { padding: 13px 10px; font-size: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.table-actions { text-align: right; }
.filter-tabs { display: flex; gap: 6px; margin: -5px 0 14px; overflow-x: auto; padding-bottom: 2px; }
.filter-tabs a { white-space: nowrap; padding: 8px 12px; border-radius: 999px; font-size: 11px; font-weight: 750; color: var(--muted); border: 1px solid var(--line); background: white; }
.filter-tabs a.active { background: var(--ink); border-color: var(--ink); color: white; }
.admin-status-form { display: grid; grid-template-columns: 130px minmax(150px,1fr) auto; gap: 7px; align-items: center; min-width: 390px; }
.admin-status-form input, .admin-status-form select { min-height: 36px; padding-block: 7px; font-size: 11px; border-radius: 9px; }

.toast { position: fixed; right: 22px; top: 88px; z-index: 100; width: min(420px, calc(100% - 32px)); min-height: 52px; display: grid; grid-template-columns: 28px 1fr 28px; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 13px; box-shadow: 0 18px 42px rgba(20,30,44,.18); font-size: 12px; animation: toast-in .25s ease; }
.toast-success { background: #102c24; color: white; }
.toast-error { background: #4b1713; color: white; }
.toast > span { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.12); font-weight: 900; }
.toast button { border: 0; color: white; background: transparent; font-size: 22px; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }

.auth-body { min-height: 100vh; background: #101722; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-hero { position: relative; overflow: hidden; padding: clamp(44px, 7vw, 92px); color: white; background: radial-gradient(circle at 75% 15%, rgba(200,16,46,.5), transparent 30%), linear-gradient(145deg, #171f2a, #0f141c); }
.auth-hero::after { content:""; position:absolute; width:420px; height:420px; border:80px solid rgba(255,255,255,.035); border-radius:50%; right:-140px; bottom:-150px; }
.auth-badge { display: inline-block; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.06); border-radius: 999px; padding: 8px 12px; font-size: 10px; letter-spacing: .1em; font-weight: 800; }
.auth-logo { width: 72px; height: 72px; display: grid; place-items: center; background: var(--red); border-radius: 20px; font-size: 25px; font-weight: 900; margin: 70px 0 24px; box-shadow: 0 16px 40px rgba(200,16,46,.25); }
.auth-hero h1 { margin: 0 0 20px; max-width: 600px; font-size: clamp(42px, 5.5vw, 72px); line-height: .98; letter-spacing: -.05em; }
.auth-hero h1 span { color: #ff5e76; }
.auth-hero > p { max-width: 560px; color: #aeb7c2; line-height: 1.6; font-size: 15px; margin-bottom: 36px; }
.auth-feature { display: inline-flex; align-items: center; gap: 8px; margin: 0 18px 10px 0; }
.auth-feature strong { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.08); color: #ff8395; }
.auth-feature span { color: #c5ccd4; font-size: 11px; }
.auth-card-wrap { display: grid; place-items: center; padding: 34px; background: #f7f8fa; }
.auth-card { width: min(430px, 100%); background: white; border: 1px solid var(--line); border-radius: 22px; padding: 30px; box-shadow: var(--shadow); }
.auth-card-title { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.auth-card-title h2 { margin: 0; font-size: 23px; }
.auth-card-title p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.auth-help { margin: 20px 0 0; text-align: center; color: var(--muted); font-size: 10px; }

.mobile-nav { display: none; }

@media (max-width: 980px) {
  .desktop-nav { display: none; }
  .header-inner { justify-content: space-between; }
  .user-menu .user-copy { display: none; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .form-layout { grid-template-columns: 1fr; }
  .rules-card { order: -1; }
  .rules-grid { grid-template-columns: 1fr 1fr; }
  .strategy-card { align-items: flex-start; flex-direction: column; }
  .strategy-numbers { width: 100%; justify-content: space-between; }
  .strategy-numbers div { align-items: flex-start; }
  .rank-row { grid-template-columns: 42px 34px minmax(150px,1fr) 60px 60px 68px; }
  .rank-row .hide-mobile { display: none; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}

@media (max-width: 700px) {
  .container { width: min(calc(100% - 24px), var(--container)); }
  .app-header { position: static; }
  .header-inner { height: 62px; }
  .brand-copy small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .user-menu form { display: none; }
  .app-main { padding: 22px 0 92px; }
  .page-head { align-items: stretch; flex-direction: column; margin-bottom: 18px; gap: 14px; }
  .page-head h1 { font-size: 29px; }
  .page-head > .btn, .page-head > .button-row { width: 100%; }
  .page-head > .button-row .btn { flex: 1; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 116px; padding: 16px; }
  .metric-value { font-size: 31px; }
  .lead-card { grid-template-columns: 44px 1fr; padding: 18px; gap: 12px; }
  .lead-icon { width: 44px; height: 44px; border-radius: 13px; }
  .lead-card .btn { grid-column: 1 / -1; }
  .lead-copy h2 { font-size: 18px; }
  .card { padding: 17px; border-radius: 15px; margin-bottom: 14px; }
  .pending-summary { grid-template-columns: 1fr; }
  .field-grid.two { grid-template-columns: 1fr; }
  .form-card { padding: 18px; }
  .rules-card { order: 2; }
  .meeting-row.detailed { display: grid; grid-template-columns: 36px 1fr; }
  .meeting-row.detailed .meeting-actions, .meeting-row.detailed .button-row { grid-column: 1 / -1; width: 100%; align-items: stretch; }
  .meeting-row.detailed .button-row form, .meeting-row.detailed .button-row .btn { flex: 1; }
  .action-row .button-row { justify-content: stretch; }
  .podium { gap: 6px; margin: 14px -4px 18px; }
  .podium-place { min-height: 158px; padding: 20px 6px 12px; border-radius: 14px 14px 10px 10px; }
  .podium-place.place-1 { min-height: 192px; padding-top: 30px; }
  .podium-avatar { width: 46px; height: 46px; font-size: 12px; }
  .place-1 .podium-avatar { width: 54px; height: 54px; }
  .podium-place strong { font-size: 10px; max-width: 90px; }
  .podium-place small { display: none; }
  .rank-row { grid-template-columns: 32px 30px minmax(110px,1fr) 48px 54px; gap: 6px; padding-inline: 2px; }
  .rank-row .rank-stat:nth-of-type(2), .rank-row .hide-mobile { display: none; }
  .rank-name strong { font-size: 11px; }
  .rank-points strong { font-size: 15px; }
  .rules-grid { grid-template-columns: 1fr; }
  .strategy-numbers { gap: 10px; }
  .strategy-numbers strong { font-size: 20px; }
  .cycle-pill { align-self: flex-start; }
  .admin-shortcuts { grid-template-columns: 1fr; }
  .export-bar { align-items: stretch; flex-direction: column; }
  .export-bar .button-row .btn { flex: 1; }
  .toast { top: 12px; right: 12px; }
  .auth-card-wrap { min-height: 100vh; padding: 18px; }
  .auth-card { padding: 24px 20px; }
  .mobile-nav { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 7px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(6, 1fr); background: rgba(255,255,255,.97); backdrop-filter: blur(16px); border-top: 1px solid var(--line); box-shadow: 0 -10px 30px rgba(20,30,44,.06); }
  .mobile-nav a { min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); border-radius: 10px; }
  .mobile-nav a span { font-size: 18px; line-height: 1; }
  .mobile-nav a small { font-size: 9px; font-weight: 700; white-space: nowrap; }
  .mobile-nav a:hover { color: var(--red); background: var(--red-soft); }
  .mobile-nav .mobile-primary { color: var(--red); }
}

@media (max-width: 390px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 108px; padding: 13px; }
  .metric-value { font-size: 28px; }
  .metric-label, .metric-foot { font-size: 10px; }
  .brand { min-width: 0; }
  .brand-mark { width: 40px; height: 40px; }
  .brand-copy strong { font-size: 13px; }
  .mobile-nav a small { font-size: 8px; }
}


/* ===== Login lúdico ===== */
.auth-hero { background: radial-gradient(circle at 80% 10%, rgba(255,214,102,.45), transparent 32%), radial-gradient(circle at 10% 90%, rgba(255,94,118,.45), transparent 40%), linear-gradient(145deg, #e0183a, #a40d28 70%); display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 64px); }
.auth-hero::after { border-color: rgba(255,255,255,.07); }
.auth-badge { align-self: flex-start; background: #fff; color: var(--red); border: 0; font-size: 11px; padding: 9px 16px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.game-title { margin: 22px 0 10px; display: flex; flex-direction: column; gap: 6px; }
.game-title-top { font-size: clamp(28px, 3.6vw, 48px); font-weight: 900; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 rgba(0,0,0,.18); }
.game-title-main { display: inline-flex; align-items: baseline; gap: 14px; font-weight: 900; line-height: .9; color: #ffd166; font-size: clamp(64px, 9vw, 120px); letter-spacing: -.04em; text-shadow: 0 6px 0 rgba(122,59,0,.35); }
.game-title-main i { font-size: .45em; font-style: normal; color: #fff; text-shadow: none; }
.game-tagline { margin: 0 0 6px; color: #ffe9ed; font-size: clamp(15px, 1.5vw, 19px); }
.game-tagline strong { color: #fff; }
.hero-scene { width: min(560px, 100%); height: auto; margin: 6px 0 4px; filter: drop-shadow(0 18px 24px rgba(0,0,0,.2)); overflow: visible; }
.auth-steps { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 8px; }
.auth-feature strong { background: #fff; color: var(--red); }
.auth-feature span { color: #fff; font-size: 12px; font-weight: 600; }
.confetti { position: absolute; width: 12px; height: 12px; border-radius: 3px; opacity: .9; animation: fall 7s linear infinite; }
.confetti.c1 { left: 8%; top: -20px; background: #ffd166; animation-delay: 0s; }
.confetti.c2 { left: 24%; top: -20px; background: #fff; border-radius: 50%; animation-delay: 1.8s; }
.confetti.c3 { left: 46%; top: -20px; background: #5eead4; animation-delay: 3.4s; }
.confetti.c4 { left: 66%; top: -20px; background: #ffd166; border-radius: 50%; animation-delay: .9s; }
.confetti.c5 { left: 82%; top: -20px; background: #fff; animation-delay: 2.6s; }
.confetti.c6 { left: 92%; top: -20px; background: #93c5fd; animation-delay: 4.4s; }
@keyframes fall { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(110vh) rotate(540deg); } }
.float-a { animation: floaty 4.5s ease-in-out infinite; }
.float-b { animation: floaty 5.5s ease-in-out infinite reverse; }
.float-c { animation: floaty 3.8s ease-in-out infinite .6s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hero-scene .float-a, .hero-scene .float-b, .hero-scene .float-c { transform-box: fill-box; }
.pulse { transform-box: fill-box; transform-origin: center; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.18); } }
.twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 2.4s ease-in-out infinite; }
.twinkle.t2 { animation-delay: .8s; } .twinkle.t3 { animation-delay: 1.5s; }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: 1; } 50% { transform: scale(.6) rotate(20deg); opacity: .6; } }
.auth-card-wrap { background: linear-gradient(160deg, #fff7f8, #fff3e0); }
.auth-card { border-top: 6px solid var(--red); box-shadow: 0 24px 60px rgba(160,13,36,.16); }
.auth-mobile-title { display: none; }
@media (prefers-reduced-motion: reduce) { .confetti, .float-a, .float-b, .float-c, .pulse, .twinkle { animation: none; } }
@media (max-width: 900px) {
  .auth-hero { display: none; }
  .auth-card-wrap { background: linear-gradient(160deg, #e0183a, #a40d28); }
  .auth-mobile-title { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: -4px 0 20px; padding-bottom: 16px; border-bottom: 1px dashed var(--line); text-align: center; }
  .auth-mobile-title span { font-size: 10px; font-weight: 800; letter-spacing: .1em; color: var(--red); }
  .auth-mobile-title strong { font-size: 22px; font-weight: 900; }
}

.auth-hero h1.game-title { max-width: none; font-size: inherit; letter-spacing: normal; line-height: 1; }
.auth-hero h1.game-title .game-title-top { color: #fff; }
.auth-hero h1.game-title .game-title-main { color: #ffd166; }
.auth-hero h1.game-title .game-title-main i { color: #fff; }
[hidden] { display: none !important; }

/* ----- login com foto ----- */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.auth-hero.auth-hero-photo { container-type: inline-size; position: relative; padding: 0; display: block; overflow: hidden; background: #a40d28; min-height: 100vh; }
.auth-hero-photo::after { display: none; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 30% 0; }
.hero-shade { position: absolute; inset: auto 0 0 0; height: 34%; background: linear-gradient(to top, rgba(110,0,18,.92), rgba(110,0,18,.55) 55%, transparent); pointer-events: none; }
.auth-hero-photo .auth-steps { position: absolute; left: clamp(20px, 4vw, 48px); right: clamp(20px, 4vw, 48px); bottom: clamp(20px, 4vh, 40px); margin: 0; gap: 8px 18px; }
.auth-hero-photo .auth-feature span { text-shadow: 0 1px 6px rgba(0,0,0,.45); }
.auth-mobile-hero { display: none; }
@media (max-width: 900px) {
  .auth-hero.auth-hero-photo { display: none; }
  .auth-shell { display: block; background: #fff; }
  .auth-card-wrap { display: block; min-height: 100vh; min-height: 100dvh; padding: 0; background: linear-gradient(180deg, #fff 0%, #fff 60%, #fff4f5 100%); }
  /* foto no topo, de ponta a ponta; o final dela se dissolve no fundo da área de login */
  .auth-mobile-hero { display: block; position: relative; width: 100%; height: min(92vw, 46vh); min-height: 260px; overflow: hidden; background: #fff; }
  .auth-mobile-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; display: block; -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, #000 52%, transparent 100%); }
  /* o cartão sobe sobre a base da foto e perde a moldura: vira parte da mesma página */
  .auth-card { position: relative; width: 100%; max-width: 460px; margin: -30px auto 0; padding: 14px 24px 28px; background: transparent; border: 0; box-shadow: none; border-radius: 0; }
  .auth-card-title { margin-bottom: 22px; }
}

/* Título do login como texto real (centralizado), sobre o fundo limpo da foto. Tamanhos em cqw = proporção da largura do bloco. */
.hero-title { position: absolute; z-index: 2; top: clamp(18px, 4.2cqw, 56px); left: 0; right: 0; display: flex; flex-direction: column; align-items: center; gap: .4em; text-align: center; color: #fff; pointer-events: none; font-family: Montserrat, "Arial Black", Helvetica, Arial, sans-serif; text-shadow: 0 3px 14px rgba(90,0,12,.35); }
.ht-brand { font-size: 5vw; font-size: 5.6cqw; font-weight: 900; letter-spacing: .02em; line-height: 1.05; }
.ht-match { font-size: 10vw; font-size: 11.5cqw; font-weight: 900; line-height: 1; letter-spacing: -.03em; white-space: nowrap; }
.ht-match b { color: #ffd166; text-shadow: 0 .04em 0 rgba(122,59,0,.35); }
.ht-match b.ht-white { color: #fff; text-shadow: 0 .04em 0 rgba(90,0,12,.35); }
.ht-match i { font-style: normal; font-size: .5em; color: #fff; padding: 0 .12em; }
.ht-tag { font-size: 3vw; font-size: 3.2cqw; font-weight: 500; line-height: 1.2; color: #ffe9ed; }
.ht-tag strong { color: #fff; font-weight: 800; }
@media (max-width: 900px) {
  .auth-mobile-hero { container-type: inline-size; height: auto; aspect-ratio: 1 / 1; max-height: 58vh; min-height: 0; }
  .auth-mobile-hero img { object-position: 50% 0; }
  .auth-mobile-hero .hero-title { top: 3.8cqw; }
}
