/* ===================================================================
   FF ANÁLISES — Design system "Hyper"
   Painéis pretos sobre grafite, tipografia Space Grotesk com numerais tabulares, dados em espectro
   neon. O magenta (#FF1BFF) é a cor da marca e das ações.
   ========================================================================== */

@font-face {
    font-family: 'JetBrains Mono';
    src: url('/static/assets/fonts/jetbrains-mono.woff2') format('woff2');
    font-weight: 100 800;
    font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('/static/assets/fonts/space-grotesk.woff2') format('woff2');
    font-weight: 300 700;
    font-display: swap;
}

/* ---------- tokens ---------- */
:root {
    /* superfícies: tela grafite, painéis pretos */
    --bg: #17171A;
    --bg-2: #060607;
    --surface: #060607;
    --surface-2: #101012;
    --surface-3: #1B1B1F;
    --field: #0E0E10;
    --line: rgba(255, 255, 255, 0.07);
    --line-2: rgba(255, 255, 255, 0.12);
    --text: #F6F6F8;
    --text-2: #A0A0AA;
    --text-3: #74747E;

    /* marca */
    --accent: #FF1BFF;
    --accent-2: #E000E0;
    --accent-ink: #1A001A;
    --accent-soft: rgba(255, 27, 255, 0.12);
    --accent-line: rgba(255, 27, 255, 0.38);
    --accent-glow: rgba(255, 27, 255, 0.32);

    /* espectro dos dados */
    --c-violet: #7B5CFF;
    --c-blue: #3D8BFF;
    --c-cyan: #22D3EE;
    --c-teal: #19C8A6;
    --c-green: #3DE89B;
    --c-lime: #C5F53C;
    --c-yellow: #FFD233;
    --c-orange: #FF1BFF;
    --c-pink: #FF4D8F;

    --gold: #FFC94D;
    --silver: #C9CDD6;
    --bronze: #D08A5A;
    --ok: var(--c-green);
    --warn: var(--c-yellow);
    --danger: #FF5A5F;
    --info: var(--c-blue);
    --kills: var(--c-pink);
    --damage: var(--c-yellow);

    --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
    --font-body: var(--font-display);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 2px 6px rgba(0, 0, 0, 0.35), 0 22px 44px -22px rgba(0, 0, 0, 0.8);
    --shadow-2: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 30px 80px rgba(0, 0, 0, 0.7);
    --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
    --sidebar-w: 268px;
    --bnav-h: 0px;  /* altura da barra inferior (só no celular) */
    --safe-t: env(safe-area-inset-top, 0px);
    --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #FFA24F; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; }
/* Imagens não são arrastáveis nem selecionáveis; no celular, segurar o dedo não oferece "salvar imagem". */
img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(255, 27, 255, 0.35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2E2E34; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3E3E46; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-2);
    border-right: 1px solid var(--line);
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 60;
    transition: transform 0.28s var(--ease);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.brand-mark {
    width: 52px; height: auto; flex-shrink: 0;
    display: block;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}
.brand-name { font-family: var(--font-display); font-size: 0.98rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; line-height: 1.1; white-space: nowrap; }
.brand-sub { font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; white-space: nowrap; }

.guild-box { padding: 6px 20px 16px; border-bottom: 1px solid var(--line); }
.guild-box .field-label { display: block; margin-bottom: 6px; }
.guild-row { display: flex; gap: 8px; }
.guild-row .select { flex: 1; min-width: 0; }

.nav { flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    width: 100%; padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-2);
    font-size: 0.88rem; font-weight: 500;
    text-align: left;
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-item .ico { color: var(--text-3); flex-shrink: 0; transition: color 0.2s ease, transform 0.2s ease; }
/* Ícone passa de traço para preenchido (hover e item ativo) */
.nav-item .ico :is(path, circle, rect) { fill: currentColor; fill-opacity: 0; transition: fill-opacity 0.2s ease; }
.nav-item .ico .nofill { fill: none; }
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.nav-item:hover .ico { color: var(--text); transform: scale(1.08); }
.nav-item:hover .ico :is(path, circle, rect):not(.nofill),
.nav-item.active .ico :is(path, circle, rect):not(.nofill) { fill-opacity: 0.9; }
.nav-item:active .ico { transform: scale(0.94); }
.nav-item.active { background: var(--surface-3); color: var(--text); font-weight: 600; }
.nav-item.active .ico { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.nav-item.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
@media (prefers-reduced-motion: reduce) { .nav-item, .nav-item .ico, .nav-item .ico * { transition: none; } .nav-item:hover .ico { transform: none; } }
.nav-item .kbd { margin-left: auto; }

.sidebar-foot { padding: 12px; border-top: 1px solid var(--line); }
.ai-status { display: flex; align-items: center; gap: 8px; padding: 8px 12px 4px; font-size: 0.72rem; color: var(--text-3); }
.ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; }
.ai-status.ok .ai-dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.ai-status.warn .ai-dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }

.backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); z-index: 55; opacity: 0; visibility: hidden; transition: opacity 0.2s; backdrop-filter: blur(2px); }
.backdrop.show { opacity: 1; visibility: visible; }

.main-wrap { flex: 1; margin-left: var(--sidebar-w); min-width: 0; position: relative; }
.main-wrap::before {
    content: ''; position: fixed; inset: 0; left: var(--sidebar-w); pointer-events: none; z-index: 0;
    background:
        radial-gradient(900px 520px at 100% -10%, rgba(255, 27, 255, 0.2), transparent 62%),
        radial-gradient(760px 520px at 0% 110%, rgba(123, 92, 255, 0.16), transparent 62%),
        linear-gradient(180deg, #1D1D21, #141416);
}
.topbar { display: none; }
.main { padding: 36px 40px 64px; max-width: 1320px; margin: 0 auto; position: relative; z-index: 1; }
.page { animation: pageIn 0.28s var(--ease); }
@keyframes pageIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- tipografia ---------- */
.page-head { margin-bottom: 26px; }
.page-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-title { font-family: var(--font-display); font-size: 2rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.1; margin-top: 6px; overflow-wrap: anywhere; }
.page-title .accent { color: var(--accent); }
.page-sub { color: var(--text-2); font-size: 0.9rem; margin-top: 8px; max-width: 680px; }
.eyebrow { font-family: var(--font-display); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.section-title { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title .ico { color: var(--accent); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 30px 0 14px; flex-wrap: wrap; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 0.8rem; }
.tiny { font-size: 0.72rem; }
.strong { font-weight: 600; color: var(--text); }
.display { font-family: var(--font-display); font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }
.accent-text { color: var(--accent); }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); }
.danger-text { color: var(--danger); }
.kills-text { color: var(--kills); }
.damage-text { color: var(--damage); }
.gold-text { color: var(--gold); }

/* ---------- utilitários ---------- */
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.right { margin-left: auto; }
.center { text-align: center; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 6px; } .gap-2 { gap: 12px; } .gap-3 { gap: 20px; }
.hide { display: none !important; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.kbd { font-size: 0.62rem; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--text-3); border: 1px solid var(--line-2); font-family: var(--font-mono); }

/* ---------- cards ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 22px;
    position: relative;
    box-shadow: var(--shadow-1);
}
.card-tight { padding: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.01em; }
.card-foot { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.card-accent { border-color: var(--accent-line); background: radial-gradient(120% 90% at 50% 120%, rgba(255, 27, 255, 0.16), transparent 60%), var(--surface); }
.callout { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); background: var(--accent-soft); border: 1px solid var(--accent-line); font-size: 0.85rem; color: var(--text-2); }
.callout .ico { color: var(--accent); flex-shrink: 0; margin-top: 1px; }
.callout strong { color: var(--text); }
.callout-warn { background: rgba(255, 210, 51, 0.08); border-color: rgba(255, 210, 51, 0.3); }
.callout-warn .ico { color: var(--warn); }
.callout-danger { background: rgba(255, 90, 95, 0.09); border-color: rgba(255, 90, 95, 0.32); }
.callout-danger .ico { color: var(--danger); }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat {
    --tone: var(--accent);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-1);
    display: flex; flex-direction: column;
    min-height: 132px;
    transition: border-color 0.2s;
}
.stat:hover { border-color: var(--line-2); }
.stat-label { font-size: 0.82rem; color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 7px; }
.stat-label .ico { color: var(--tone); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--tone) 55%, transparent)); flex-shrink: 0; }
.stat-value { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.1; margin-top: auto; padding-top: 14px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 0.74rem; color: var(--text-3); margin-top: 6px; }
.stat.kills { --tone: var(--kills); }
.stat.damage { --tone: var(--damage); }
.stat.gold { --tone: var(--gold); }
.stat.tone-violet { --tone: var(--c-violet); }
.stat.tone-blue { --tone: var(--c-blue); }
.stat.tone-cyan { --tone: var(--c-cyan); }
.stat.tone-green { --tone: var(--c-green); }
.stat.skeleton { box-shadow: none; }
.admin-stats .stat { min-height: 0; }

.stat.is-hero { grid-row: span 2; display: flex; flex-direction: column; padding-bottom: 16px; }
.stat.is-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(70% 55% at 50% 42%, rgba(255, 27, 255, 0.13), transparent 70%); }
.stat.is-hero > * { position: relative; }
.stat.is-hero .stat-label { font-size: 1.05rem; }
.stat.is-hero .stat-hint { text-align: center; margin-top: 2px; }

/* medidor em arco */
.gauge { position: relative; width: min(100%, 230px); margin: 8px auto 0; aspect-ratio: 200 / 164; }
.gauge svg { width: 100%; height: 100%; display: block; overflow: visible; }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, 0.07); stroke-width: 13; stroke-linecap: round; }
.gauge-inner { fill: none; stroke: rgba(255, 255, 255, 0.14); stroke-width: 1; stroke-linecap: round; }
.gauge-seg { fill: none; stroke-width: 13; }
.gauge-glow { filter: drop-shadow(0 0 9px rgba(255, 27, 255, 0.5)); }
.gauge-center { position: absolute; left: 0; right: 0; top: 37%; text-align: center; }
.gauge-caption { font-family: var(--font-display); font-size: 0.58rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.gauge-value { font-family: var(--font-display); font-size: 2.3rem; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.split-label { font-size: 0.74rem; color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.split-label i { width: 8px; height: 8px; border-radius: 3px; background: var(--tone, var(--accent)); box-shadow: 0 0 8px var(--tone, var(--accent)); flex-shrink: 0; }
.split-value { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.delta { font-family: var(--font-display); font-size: 0.7rem; font-weight: 700; color: var(--ok); white-space: nowrap; }
.delta.muted { color: var(--text-3); font-weight: 500; }

/* ---------- botões ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 38px; padding: 0 16px;
    border-radius: 10px;
    font-size: 0.85rem; font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
    user-select: none;
}
.btn .ico { flex-shrink: 0; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: 0.55; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset, 0 8px 24px -6px var(--accent-glow); }
.btn-primary:hover { background: #FF4DFF; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2) inset, 0 10px 30px -4px rgba(255, 27, 255, 0.55); }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); border-color: rgba(255, 255, 255, 0.22); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.btn-danger { background: rgba(255, 90, 95, 0.1); border-color: rgba(255, 90, 95, 0.28); color: var(--danger); }
.btn-danger:hover { background: rgba(255, 90, 95, 0.18); border-color: rgba(255, 90, 95, 0.55); }
.btn-danger-solid { background: var(--danger); color: #2A0606; }
.btn-danger-solid:hover { filter: brightness(1.08); }
.btn-success { background: rgba(61, 232, 155, 0.1); border-color: rgba(61, 232, 155, 0.35); color: var(--ok); }
.btn-success:hover { background: rgba(61, 232, 155, 0.18); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 0.78rem; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 0.72rem; border-radius: 7px; gap: 5px; }
.btn-lg { height: 46px; padding: 0 24px; font-size: 0.95rem; border-radius: 12px; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 26px; }
.btn-block { width: 100%; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: 14px; }
.field-label { font-family: var(--font-display); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-2); font-weight: 500; }
.field-label .req { color: var(--accent); }
.help { font-size: 0.74rem; color: var(--text-3); }
.help a { color: var(--accent); }
.input, .select, .textarea {
    width: 100%; height: 40px; padding: 0 12px;
    background: var(--field);
    border: 1px solid var(--line-2);
    border-radius: 10px;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; }
.input::placeholder { color: var(--text-3); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(255, 255, 255, 0.2); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 27, 255, 0.2); }
.input[type="date"] { color-scheme: dark; }
.input-sm { height: 32px; padding: 0 10px; font-size: 0.82rem; border-radius: 8px; }
.input-num { text-align: center; font-family: var(--font-display); font-weight: 600; font-variant-numeric: tabular-nums; }
.select {
    appearance: none; -webkit-appearance: none;
    padding-right: 34px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23A0A0AA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.select option { background: #101012; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1; min-width: 160px; margin: 0; }
.input.is-warn { border-color: rgba(255, 210, 51, 0.6); }
.segmented { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; max-width: 100%; overflow-x: auto; }
.segmented button { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface-3); color: var(--accent); box-shadow: 0 0 0 1px var(--line-2) inset; }
.segmented.block { display: flex; } .segmented.block button { flex: 1; justify-content: center; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-2); cursor: pointer; }
.checkbox input { accent-color: var(--accent); width: 16px; height: 16px; }

/* ---------- badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; font-family: var(--font-display); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1.4; }
.badge .ico { width: 12px; height: 12px; }
.badge-accent { background: var(--accent-soft); color: var(--accent); }
.badge-ok { background: rgba(61, 232, 155, 0.12); color: var(--ok); }
.badge-warn { background: rgba(255, 210, 51, 0.12); color: var(--warn); }
.badge-danger { background: rgba(255, 90, 95, 0.13); color: var(--danger); }
.badge-muted { background: rgba(255, 255, 255, 0.07); color: var(--text-2); }
.badge-gold { background: rgba(255, 201, 77, 0.14); color: var(--gold); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2); font-size: 0.78rem; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.chip:hover { border-color: var(--accent-line); color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip .count { color: var(--text-3); font-family: var(--font-display); font-weight: 500; }
.chip.active .count { color: var(--accent-ink); opacity: 0.7; }

/* ---------- avatares ---------- */
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; border: 1.5px solid var(--line-2); background: var(--surface-3); }
.avatar-fallback { display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 0.78rem; color: var(--accent); background: linear-gradient(135deg, #24242A, #121214); }
.avatar-guest { color: var(--accent); background: var(--accent-soft); border-style: dashed; border-color: var(--accent-line); }
.avatar-xs { width: 24px; height: 24px; font-size: 0.56rem; border-width: 1px; }
.avatar-sm { width: 30px; height: 30px; font-size: 0.66rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.05rem; }
.avatar-xl { width: 88px; height: 88px; font-size: 1.6rem; border-width: 2px; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { margin-left: -9px; border: 2px solid var(--surface); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar-more { width: 30px; height: 30px; border-radius: 50%; margin-left: -9px; display: grid; place-items: center; background: var(--surface-3); border: 2px solid var(--surface); font-family: var(--font-display); font-size: 0.62rem; font-weight: 600; color: var(--text-2); }

.player-inline { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 0.88rem; white-space: nowrap; }
.player-inline .sub { display: block; font-size: 0.7rem; color: var(--text-3); font-weight: 500; }
.player-inline.guest { color: var(--accent); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.table { width: 100%; border-collapse: collapse; }
.table th {
    position: sticky; top: 0;
    background: var(--surface);
    color: var(--text-3);
    font-family: var(--font-display);
    font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500;
    text-align: left; padding: 14px 16px 12px;
    border-bottom: 1px solid var(--line-2);
    white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 0.88rem; vertical-align: middle; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.12s; }
.table tbody tr:hover { background: rgba(255, 255, 255, 0.035); }
.table tr.clickable { cursor: pointer; }
.table tr.approved { background: rgba(255, 27, 255, 0.07); }
.table tr.approved td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.table .num { text-align: right; font-family: var(--font-display); font-size: 0.84rem; font-variant-numeric: tabular-nums; }
.table th.num { text-align: right; font-size: 0.64rem; }
.table .center, .table th.center { text-align: center; }
.table .value { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: -0.01em; }
.table .value.accent { color: var(--accent); }
.table td.wrap { white-space: normal; min-width: 120px; }
.table .empty-cell { text-align: center; color: var(--text-3); padding: 40px 16px; white-space: normal; }
.table-compact td, .table-compact th { padding: 8px 10px; }

.rank { display: inline-grid; place-items: center; width: 30px; height: 26px; border-radius: 7px; font-family: var(--font-display); font-size: 0.8rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); }
.rank.r1 { background: var(--c-yellow); color: #201800; box-shadow: 0 0 16px rgba(255, 210, 51, 0.4); }
.rank.r2 { background: #D5D9E2; color: #1B1D22; }
.rank.r3 { background: #D99365; color: #2A1608; }
.rank.big { width: 44px; height: 38px; font-size: 1.1rem; border-radius: 10px; }
.pos { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.pos.booyah { color: var(--gold); }
.pos .ico { width: 16px; height: 16px; }

/* ---------- pódio ---------- */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: end; }
.podium-slot { --tone: var(--silver); background: radial-gradient(90% 60% at 50% 115%, color-mix(in srgb, var(--tone) 22%, transparent), transparent 70%), var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 14px 18px; text-align: center; position: relative; overflow: hidden; box-shadow: var(--shadow-1); min-width: 0; }
.podium-slot::before { content: ''; position: absolute; left: 22%; right: 22%; bottom: 0; height: 2px; border-radius: 2px; background: var(--tone); box-shadow: 0 0 14px var(--tone); }
.podium-slot .avatar { margin: 0 auto 10px; }
.podium-name { font-size: 0.98rem; font-weight: 700; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-val { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.15; margin-top: 6px; letter-spacing: -0.02em; }
.podium-sub { font-size: 0.72rem; color: var(--text-3); margin-top: 4px; }
.podium-1 { --tone: var(--accent); order: 2; padding-top: 28px; padding-bottom: 24px; border-color: var(--accent-line); }
.podium-1 .podium-val { font-size: 2.1rem; }
.podium-1 .avatar { border-color: var(--accent); box-shadow: 0 0 26px var(--accent-glow); }
.podium-2 { order: 1; }
.podium-3 { --tone: var(--bronze); order: 3; }
.podium-slot.empty-slot { border-style: dashed; color: var(--text-3); background: transparent; box-shadow: none; }
.podium-slot.empty-slot::before { display: none; }

/* ---------- jogadores ---------- */
.players-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.player-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 16px 16px; text-align: center; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; position: relative; box-shadow: var(--shadow-1); min-width: 0; }
.player-card:hover { border-color: var(--accent-line); transform: translateY(-3px); box-shadow: var(--shadow-1), 0 0 34px -10px var(--accent-glow); }
.player-card .avatar { margin: 0 auto 12px; }
.player-card-name { font-size: 1.05rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-card-real { font-size: 0.78rem; color: var(--text-2); margin-top: 2px; min-height: 1.2em; }
.player-card-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }

.photo-picker { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 18px; border: 2px dashed var(--accent-line); display: grid; place-items: center; cursor: pointer; overflow: hidden; position: relative; background: var(--surface-2); transition: border-color 0.15s; }
.photo-picker:hover { border-color: var(--accent); }
.photo-picker img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker .hint { font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); text-align: center; padding: 10px; }
.photo-picker .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.6); color: #fff; opacity: 0; transition: opacity 0.15s; }
.photo-picker:hover .overlay { opacity: 1; }

/* ---------- upload ---------- */
.dropzone { border: 1.5px dashed var(--accent-line); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; cursor: pointer; background: radial-gradient(70% 90% at 50% 120%, rgba(255, 27, 255, 0.14), transparent 70%), var(--field); transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(255, 27, 255, 0.1), 0 0 40px -10px var(--accent-glow); }
.dropzone-icon { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.dropzone-title { font-weight: 600; font-size: 1rem; }
.dropzone-hint { font-size: 0.8rem; color: var(--text-3); margin-top: 6px; }
.file-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.file-item { display: flex; align-items: center; gap: 10px; padding: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.file-thumb { width: 52px; height: 52px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex-shrink: 0; }
.file-meta { flex: 1; min-width: 0; }
.file-name { font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-family: var(--font-display); font-size: 0.68rem; color: var(--text-3); }
.file-num { font-family: var(--font-display); font-weight: 600; color: var(--accent); font-size: 0.82rem; width: 26px; text-align: center; }

.review-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; overflow: hidden; box-shadow: var(--shadow-1); }
.review-card.has-error { border-color: rgba(255, 90, 95, 0.45); }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.review-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.review-title .badge { letter-spacing: 0.06em; }
.queda-pos { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 10px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.queda-pos label { font-family: var(--font-display); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 600; color: var(--accent); }
.queda-pos .input { width: 64px; height: 32px; font-size: 0.95rem; padding: 0 6px; }
.queda-pos .input::placeholder { color: var(--text-3); }
.queda-score { display: inline-flex; align-items: baseline; gap: 6px; font-size: 0.78rem; color: var(--text-2); }
.queda-score b { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; color: var(--accent); }
.review-scroll { overflow-x: auto; background: var(--surface); }
.review-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.review-table th { position: sticky; top: 0; padding: 10px 6px; font-family: var(--font-display); font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; color: var(--text-3); text-align: left; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.review-table th:first-child { padding-left: 18px; }
.review-table td { padding: 12px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; animation: row-in 0.35s ease both; animation-delay: calc(var(--i, 0) * 45ms); }
.review-table td:first-child { padding-left: 18px; position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: inset 3px 0 0 transparent, 1px 0 0 var(--line); min-width: 300px; }
.review-table th:first-child { position: sticky; left: 0; z-index: 2; }
.review-table tr:last-child td { border-bottom: 0; }
.review-table tbody tr:hover td { background: var(--surface-2); }
.review-table tr.approved td:first-child { box-shadow: inset 3px 0 0 var(--ok), 1px 0 0 var(--line); }
.review-table tr.pending td:first-child { box-shadow: inset 3px 0 0 var(--warn, #FFC53D), 1px 0 0 var(--line); }
.review-table th.c, .review-table td.c { text-align: center; }
.review-table .input-num, .review-table .input-time { width: 64px; height: 32px; padding: 0 4px; font-family: var(--font-mono, var(--font-display)); font-size: 0.85rem; border-color: transparent; background: var(--surface-3); border-radius: 7px; transition: border-color 0.15s, background 0.15s; -moz-appearance: textfield; }
.review-table .input-time { width: 70px; text-align: center; }
.review-table .input-num::-webkit-outer-spin-button, .review-table .input-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.review-table .input-num:hover, .review-table .input-time:hover { border-color: var(--line-2); }
.review-table .input-num:focus, .review-table .input-time:focus { border-color: var(--accent); background: var(--surface); }
.review-table .kills-text { color: var(--accent); font-weight: 700; background: var(--accent-soft); }
.review-foot { padding: 8px 14px; border-top: 1px solid var(--line); background: var(--surface); }
@keyframes row-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Tela de carregamento da análise */
.loading-card { max-width: 720px; margin: 0 auto; padding: 26px 26px 22px; }
.loading-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.loading-card .loading-title { text-align: left; }
.loading-count { font-family: var(--font-display); font-size: 0.85rem; color: var(--text-3); white-space: nowrap; }
.loading-count b { font-size: 1.6rem; color: var(--text); font-variant-numeric: tabular-nums; }
.loading-count span { margin-left: 6px; font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; }
.scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 20px; }
.scan-item { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); transition: border-color 0.3s; }
.scan-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.35; filter: grayscale(1); transition: opacity 0.4s, filter 0.4s; }
.scan-item.reading { border-color: var(--accent-line); }
.scan-item.reading img { opacity: 0.7; filter: grayscale(0.4); }
.scan-item.done img { opacity: 1; filter: none; }
.scan-item.done { border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.scan-line { position: absolute; left: 0; right: 0; height: 30%; top: -30%; background: linear-gradient(180deg, transparent, var(--accent-glow) 85%, var(--accent) 100%); opacity: 0; pointer-events: none; }
.scan-item.reading .scan-line { opacity: 1; animation: scan 1.3s ease-in-out infinite; }
.scan-tag { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 6px; font-family: var(--font-display); font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; background: rgba(0, 0, 0, 0.7); color: var(--text-3); }
.scan-item.reading .scan-tag { color: var(--accent); }
.scan-item.done .scan-tag { color: var(--ok); }
@keyframes scan { 0% { top: -30%; } 100% { top: 100%; } }
.skel-table { margin-top: 18px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.skel-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); animation: row-in 0.4s ease both; }
.skel-row:last-child { border-bottom: 0; }
.skel { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--surface-3) 0%, #2A2A30 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; flex-shrink: 1; }
.skel-line { flex: 1; background: none; animation: none; }
.skel-line i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--surface-3) 0%, #2A2A30 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.skel-avatar { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; }
.skel-num { width: 40px; flex-shrink: 0; height: 18px; border-radius: 6px; }
.steps.steps-inline { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 18px; max-width: none; margin-top: 16px; }
.steps-inline .step { font-size: 0.78rem; }

.pick { display: inline-flex; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; min-width: 190px; text-align: left; transition: border-color 0.15s, background 0.15s; }
.pick:hover { border-color: var(--accent); background: var(--surface-3); }
.pick.guest { border-style: dashed; border-color: var(--accent-line); background: var(--accent-soft); }
.pick.none { border-style: dashed; color: var(--text-2); justify-content: center; }
.pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.pick-name { font-weight: 700; font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick.guest .pick-name { color: var(--accent); }
.pick-sub { font-size: 0.7rem; color: var(--text-3); }
.pick-swap { font-family: var(--font-display); font-size: 0.6rem; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.pick-meta { font-size: 0.72rem; color: var(--text-3); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pick-meta b { color: var(--text-2); font-weight: 600; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.pick-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line-2); background: var(--surface-2); cursor: pointer; text-align: left; transition: border-color 0.15s, transform 0.15s; min-width: 0; }
.pick-card:hover { border-color: var(--accent-line); transform: translateY(-1px); }
.pick-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 24px -8px var(--accent-glow); }
.pick-card.ghost { border-style: dashed; border-color: var(--accent-line); }
.pick-card.ghost.selected { border-style: solid; border-color: var(--accent); }
.pick-card.ghost .pick-name { color: var(--accent); }
.new-ghost { display: flex; align-items: flex-end; gap: 12px; padding: 12px; border-radius: 12px; border: 1.5px dashed var(--accent-line); background: var(--accent-soft); }
.new-ghost.selected { border-style: solid; border-color: var(--accent); }
.new-ghost .avatar { margin-bottom: 2px; }
.player-card.ghost { border-style: dashed; border-color: var(--accent-line); }
.player-card.ghost .player-card-name { color: var(--accent); }
.pick-card .pick-name { font-size: 0.95rem; }
.pick-card .check { margin-left: auto; color: var(--accent); }

/* ---------- histórico ---------- */
.match-group { margin-bottom: 26px; }
.match-group-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; padding: 0 4px; }
.match-group-date { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.match-group-meta { display: flex; gap: 14px; font-size: 0.78rem; color: var(--text-3); align-items: center; }
.match-group-meta b { color: var(--accent); font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.names-trunc { display: inline-block; vertical-align: middle; margin-left: 8px; max-width: clamp(80px, 22vw, 320px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.detail-row { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); margin-bottom: 8px; flex-wrap: wrap; }
.detail-stats { display: flex; gap: 16px; flex-wrap: wrap; margin-left: auto; }
.detail-stat { text-align: center; min-width: 52px; }
.detail-stat .v { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; line-height: 1.1; }
.detail-stat .l { font-family: var(--font-display); font-size: 0.58rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); margin-top: 4px; }
.kpi-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); min-width: 110px; }
.kpi .v { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.kpi .l { font-size: 0.7rem; color: var(--text-3); margin-top: 5px; }
.kpi.accent { border-color: var(--accent-line); background: var(--accent-soft); } .kpi.accent .v { color: var(--accent); }

/* ---------- gráficos ---------- */
.chart-box { position: relative; height: 300px; }
.chart-box canvas { width: 100% !important; height: 100% !important; }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 8px var(--accent); margin-right: 6px; vertical-align: middle; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; padding-top: 20px; }
.bars-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; min-width: 0; }
.bars-bar { width: 100%; max-width: 36px; min-height: 3px; border-radius: 6px 6px 0 0; background: linear-gradient(180deg, var(--c-yellow), var(--accent)); }

/* mapa de calor: um bloco por dia, colorido pela intensidade */
.heat { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 5px; }
.heat-cell { height: 28px; border-radius: 7px; display: grid; place-items: center; font-family: var(--font-display); font-size: 0.7rem; font-weight: 600; background: var(--surface-3); color: var(--text-2); cursor: default; transition: transform 0.12s; }
.heat-cell:hover { transform: scale(1.12); }
.heat-cell.h1 { background: #4B38C7; color: #EDE9FF; }
.heat-cell.h2 { background: #3D6FF0; color: #F0F5FF; }
.heat-cell.h3 { background: var(--c-teal); color: #00231C; }
.heat-cell.h4 { background: #6BE675; color: #062A0A; }
.heat-cell.h5 { background: var(--c-yellow); color: #2A2000; }
.heat-cell.h6 { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 14px -2px var(--accent-glow); }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 0.7rem; color: var(--text-3); }
.heat-legend i { width: 14px; height: 10px; border-radius: 3px; }

/* ---------- tabs / filtros ---------- */
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; max-width: 100%; overflow-x: auto; }
.tab { height: 30px; padding: 0 13px; border-radius: 8px; font-size: 0.78rem; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent); color: var(--accent-ink); }
.filter-bar { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.filter-bar .field { margin: 0; min-width: 150px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.search { position: relative; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-left: 36px; }

/* ---------- modais ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(8, 8, 10, 0.72); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 100; opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.dialog-overlay { z-index: 110; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl); box-shadow: var(--shadow-2); padding: 26px; transform: translateY(14px) scale(0.98); transition: transform 0.22s var(--ease); }
.modal-overlay.open .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-lg { max-width: 760px; }
.modal-xl { max-width: 960px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-title { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.modal-sub { font-size: 0.82rem; color: var(--text-2); margin-top: 4px; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--text-2); border: 1px solid var(--line-2); flex-shrink: 0; transition: all 0.15s; }
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.dialog-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 14px; }
.dialog-icon.danger { background: rgba(255, 90, 95, 0.13); color: var(--danger); }
.dialog-text { color: var(--text-2); font-size: 0.9rem; white-space: pre-line; }

/* ---------- toasts ---------- */
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-size: 0.84rem; animation: toastIn 0.25s var(--ease); transition: opacity 0.25s, transform 0.25s; }
.toast.hide { opacity: 0; transform: translateX(30px); }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast-success .toast-icon { color: var(--ok); } .toast-error .toast-icon { color: var(--danger); }
.toast-info .toast-icon { color: var(--info); } .toast-warn .toast-icon { color: var(--warn); }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-close { color: var(--text-3); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- estados ---------- */
.empty { text-align: center; padding: 56px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); background: rgba(0, 0, 0, 0.35); }
.empty-icon { width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); }
.empty-title { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
.empty-text { color: var(--text-2); font-size: 0.88rem; margin-top: 6px; max-width: 420px; margin-left: auto; margin-right: auto; }
.empty .btn { margin-top: 16px; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; margin: 0 auto; }
.spinner-sm { width: 18px; height: 18px; border-width: 2px; margin: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 60px 20px; text-align: center; color: var(--text-2); }
.loading-block .spinner { margin-bottom: 16px; }
.loading-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--r-lg); }
@keyframes shimmer { to { background-position: -200% 0; } }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--c-yellow), var(--accent)); border-radius: 6px; box-shadow: 0 0 10px var(--accent-glow); transition: width 0.3s; }
.steps { display: flex; flex-direction: column; gap: 8px; text-align: left; max-width: 380px; margin: 18px auto 0; }
.step { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-3); }
.step.active { color: var(--text); } .step.done { color: var(--ok); }
.step .ico { flex-shrink: 0; }

/* ---------- relatórios ---------- */
.hero-banner { border-radius: var(--r-lg); padding: 22px 24px; background: radial-gradient(60% 140% at 0% 0%, rgba(255, 27, 255, 0.2), transparent 70%), var(--surface); border: 1px solid var(--accent-line); box-shadow: var(--shadow-1); }
.preview-16-9 { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: #000; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.preview-16-9 iframe, .preview-16-9 img { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; }
.slide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.slide-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-1); transition: border-color 0.2s, transform 0.2s; }
.slide-card:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.slide-thumb { aspect-ratio: 16 / 9; background: #000; cursor: pointer; overflow: hidden; }
.slide-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.slide-card:hover .slide-thumb img { transform: scale(1.03); }
.slide-body { padding: 12px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.slide-name { font-size: 0.92rem; font-weight: 600; }

/* ---------- home quick actions ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.quick-action { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: left; box-shadow: var(--shadow-1); transition: border-color 0.2s, transform 0.2s; color: var(--text); }
.quick-action:hover { border-color: var(--accent-line); transform: translateY(-2px); }
.quick-action .qa-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--accent); flex-shrink: 0; }
.quick-action .qa-title { font-weight: 600; font-size: 0.9rem; }
.quick-action .qa-sub { font-size: 0.74rem; color: var(--text-3); }
.quick-action .ico.arrow { margin-left: auto; color: var(--text-3); }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stat.is-hero { grid-column: 1 / -1; grid-row: auto; }
    .two-col { grid-template-columns: 1fr; }
    .main { padding: 28px 24px 56px; }
}
@media (max-width: 960px) {
    .sidebar { transform: translateX(-100%); box-shadow: none; }
    .sidebar.open { transform: none; box-shadow: var(--shadow-2); }
    .main-wrap { margin-left: 0; }
    .main-wrap::before { left: 0; }
    .topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; min-height: calc(56px + var(--safe-t)); padding: calc(8px + var(--safe-t)) 14px 8px; background: rgba(6, 6, 7, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
    .topbar-mark { display: block; width: 32px; height: auto; flex-shrink: 0; filter: drop-shadow(0 0 8px var(--accent-glow)); }
    .topbar-title { font-family: var(--font-display); font-size: 0.9rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    /* chip da guilda: um <select> invisível por cima abre o seletor nativo do aparelho */
    .topbar-guild { position: relative; margin-left: auto; flex-shrink: 1; min-width: 0; max-width: 52%; display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px 0 12px; border-radius: 999px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); font-family: var(--font-display); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; cursor: pointer; }
    .topbar-guild-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
    .topbar-guild svg { flex-shrink: 0; }
    .topbar-guild select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; cursor: pointer; -webkit-appearance: none; appearance: none; }
    .main { padding: 18px 16px 48px; }
    .page-title { font-size: 1.5rem; }
    .stat.is-hero { grid-column: 1 / -1; grid-row: auto; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .podium { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .podium-slot { padding-left: 8px; padding-right: 8px; }
    .podium-name { font-size: 0.85rem; }
    .podium-val { font-size: 1.25rem; }
    .podium-1 .podium-val { font-size: 1.5rem; }
    .modal { padding: 20px; border-radius: var(--r-lg); }
    .review-table .input-num { width: 64px; }
    .pick { min-width: 150px; }
}
@media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat { padding: 14px; min-height: 112px; }
    .stat-label { font-size: 0.76rem; }
    .stat-value { font-size: 1.4rem; }
    .gauge-value { font-size: 2rem; }
    .podium .avatar-xl { width: 64px; height: 64px; font-size: 1.2rem; }
    .podium .avatar-lg { width: 44px; height: 44px; font-size: 0.85rem; }
    .btn-lg { height: 42px; padding: 0 18px; font-size: 0.88rem; }
    .page-head-row .row { width: 100%; }
}

/* ---------- login ---------- */
body.auth-mode .app { display: none; }
body:not(.auth-mode) .auth-screen { display: none; }
.auth-screen {
    min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
    background:
        radial-gradient(800px 520px at 100% -10%, rgba(255, 27, 255, 0.26), transparent 62%),
        radial-gradient(700px 520px at 0% 110%, rgba(123, 92, 255, 0.2), transparent 62%),
        linear-gradient(180deg, rgba(29, 29, 33, 0.55), rgba(20, 20, 22, 0.7));
    position: relative; z-index: 1;
}
.auth-rain { position: fixed; inset: 0; z-index: 0; background: #000; }
body:not(.auth-mode) .auth-rain { display: none; }
.auth-screen:empty::after { content: ''; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
.auth-card {
    width: 100%; max-width: 420px; padding: 32px 28px 22px;
    background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-xl);
    box-shadow: var(--shadow-2);
    animation: pageIn 0.35s var(--ease);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.auth-brand .brand-mark { width: 64px; }
.auth-title { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.15; }
.auth-sub { color: var(--text-2); font-size: 0.88rem; margin-top: 8px; }
.auth-sub b { color: var(--text); }
.auth-switch { margin-top: 14px; text-align: center; font-size: 0.85rem; color: var(--text-2); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--text); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; text-decoration: none; background: #fff; color: #1f1f1f; border: 1px solid #dadce0; font-weight: 600; }
.btn-google:hover { background: #f4f6f8; color: #1f1f1f; }
.btn-google svg { flex: none; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; font-size: 0.75rem; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.08em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-legal { margin-top: 10px; text-align: center; font-size: 0.72rem; color: var(--text-3); }
.auth-legal a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.auth-legal a:hover { color: var(--text); }
.auth-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.auth-error { margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 0.84rem; color: var(--danger); background: rgba(255, 90, 95, 0.1); border: 1px solid rgba(255, 90, 95, 0.32); }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.7rem; color: var(--text-3); text-align: center; }
.input-lg { height: 46px; font-size: 0.95rem; }
.password-wrap { position: relative; }
.password-wrap .input { padding-right: 46px; }
.password-wrap .btn { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); margin-bottom: 6px; transition: border-color 0.15s; }
.user-chip:hover { border-color: var(--accent-line); color: var(--text); }
.user-name { display: block; font-size: 0.85rem; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { display: block; font-size: 0.68rem; color: var(--text-3); }

/* ---------- painel admin ---------- */
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.online-stat { --tone: var(--ok); border-color: rgba(61, 232, 155, 0.35); background: radial-gradient(110% 80% at 50% 125%, rgba(61, 232, 155, 0.2), transparent 65%), var(--surface); }
.online-stat .stat-value { color: var(--ok); }
.danger-stat { --tone: var(--danger); border-color: rgba(255, 90, 95, 0.35); }
.danger-stat .stat-value { color: var(--danger); }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); flex-shrink: 0; display: inline-block; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(61, 232, 155, 0.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 232, 155, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(61, 232, 155, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 232, 155, 0); } }
.table tr.is-online td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.credential-box { display: grid; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); }
.mono { font-family: var(--font-mono); }
@media (max-width: 960px) { .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.admin-table td, .admin-table th { padding: 10px 12px; }
.admin-table td.wrap { min-width: 96px; }

/* ---------- painel da equipe ---------- */
.tp-heroes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tp-hero, .tp-tile { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.tp-hero { padding: 16px 18px; gap: 4px; }
.tp-hero strong { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; letter-spacing: 1px; }
.tp-hero.gold { border-color: rgba(255, 194, 77, 0.35); background: linear-gradient(135deg, rgba(255, 194, 77, 0.12), transparent 65%), var(--surface); }
.tp-hero.gold strong { color: var(--gold); }
.tp-label { display: flex; align-items: center; gap: 6px; font-size: 0.68rem; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 600; color: var(--text-3); }
.tp-sub { font-size: 0.76rem; color: var(--text-2); }
.tp-meter { height: 5px; margin: 4px 0 2px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.tp-meter span { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.tp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tp-tile { padding: 12px 14px; gap: 2px; border-radius: var(--r-md); }
.tp-tile strong { font-size: 1.45rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tp-tile.kills strong { color: var(--kills); } .tp-tile.damage strong { color: var(--damage); } .tp-tile.heal strong { color: var(--ok); }
.tp-maps td, .tp-maps th { white-space: nowrap; }
@media (max-width: 1100px) { .tp-heroes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tp-hero strong { font-size: 2.1rem; } }
.tp-maps tr.approved td { background: var(--accent-soft); } .tp-maps tr.approved td:first-child { color: var(--accent); }

/* ---------- estratégias (mapas) ---------- */
.strat-page { display: flex; flex-direction: column; gap: 16px; }
.strat-head { display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.strat-head-title { margin-right: auto; }
.strat-h1 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin-top: 2px; }
.strat-tabs .tab { display: inline-flex; align-items: center; gap: 8px; }
.strat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35); }
.strat-main { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; min-height: 0; }
.strat-map, .strat-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; padding: 16px; }
.strat-map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.min-w-0 { min-width: 0; }
.strat-title { display: flex; align-items: center; gap: 8px; }
.strat-title .ico { color: var(--accent); }
.strat-zoom { gap: 6px; flex-wrap: nowrap; }
.strat-map-area { flex: 1; min-height: 320px; display: grid; place-items: center; }
.strat-board { position: relative; overflow: hidden; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--bg-2); cursor: grab; touch-action: none; user-select: none; width: 100%; aspect-ratio: 1; }
.strat-board.dragging { cursor: grabbing; }
.strat-stage { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.strat-stage img { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.strat-map-hint { text-align: center; }
.strat-search { width: 220px; height: 36px; flex-shrink: 0; }
.strat-side .strat-search { width: 100%; }
.strat-side-tabs { width: 100%; display: flex; flex-shrink: 0; }
.strat-side-tabs .tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.strat-side-title { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.strat-side-title .ico { color: var(--accent); }
.strat-tab-n { font-size: 0.7rem; font-weight: 600; opacity: 0.7; font-variant-numeric: tabular-nums; }
.strat-scroll { flex: 1; min-height: 0; overflow-y: auto; margin-right: -6px; padding-right: 6px; }
.strat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.strat-grid-side { grid-template-columns: 1fr 1fr; gap: 8px; }
.strat-none { grid-column: 1 / -1; padding: 20px 0; }
.strat-local { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); background: var(--surface-3); text-align: left; transition: border-color 0.15s; }
.strat-local img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.35s var(--ease); }
.strat-local:hover, .strat-local:focus-visible { border-color: var(--accent-line); outline: none; }
.strat-local:hover img { transform: scale(1.05); }
.strat-local-info { position: absolute; inset: auto 0 0 0; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding: 20px 9px 7px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)); }
.strat-local-name { font-weight: 600; font-size: 0.82rem; color: #fff; line-height: 1.2; }
.strat-local-count { display: inline-flex; align-items: center; gap: 4px; font-size: 0.7rem; color: rgba(255, 255, 255, 0.75); flex-shrink: 0; }
.strat-viewer-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.strat-viewer-main { position: relative; border-radius: var(--r-md); overflow: hidden; background: var(--bg-2); aspect-ratio: 16 / 9; }
.strat-viewer-main img { width: 100%; height: 100%; object-fit: contain; display: block; }
.strat-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(6, 6, 7, 0.7); border: 1px solid var(--line-2); backdrop-filter: blur(6px); transition: border-color 0.15s, color 0.15s; }
.strat-nav:hover { border-color: var(--accent); color: var(--accent); }
.strat-nav.prev { left: 12px; }
.strat-nav.next { right: 12px; }
.strat-counter { position: absolute; right: 12px; bottom: 12px; padding: 3px 9px; border-radius: 6px; background: rgba(6, 6, 7, 0.75); font-size: 0.74rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.strat-strip { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 2px; }
.strat-thumb { flex: 0 0 96px; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; border: 2px solid transparent; opacity: 0.6; transition: opacity 0.15s, border-color 0.15s; }
.strat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strat-thumb:hover { opacity: 1; }
.strat-thumb.active { border-color: var(--accent); opacity: 1; }

/* Desktop: a página inteira cabe na tela; só as listas da direita rolam por dentro. */
@media (min-width: 961px) {
    body.fit-mode .main { padding: 24px 32px; }
    body.fit-mode .page { animation: none; }
    body.fit-mode .strat-page { height: calc(100vh - 48px); height: calc(100dvh - 48px); }
    body.fit-mode .strat-main { flex: 1; }
    body.fit-mode .strat-map-area { min-height: 0; }
}
@media (max-width: 1280px) { .strat-main { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 960px) {
    .strat-main { grid-template-columns: minmax(0, 1fr); }
    .strat-head { align-items: stretch; }
    .strat-new { width: 100%; }
    .strat-map-area { min-height: 0; }
    .strat-side .strat-scroll, .strat-map .strat-scroll { max-height: 70vh; }
}
@media (max-width: 520px) {
    .strat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .strat-search { width: 100%; }
    .strat-map-head { flex-wrap: wrap; }
    .strat-nav { width: 36px; height: 36px; }
}

/* ---------- editor de estratégia ---------- */
/* No editor o menu do app some e tudo cabe numa tela, sem rolagem. */
body.board-mode .sidebar, body.board-mode .backdrop, body.board-mode .topbar { display: none; }
body.board-mode .main-wrap { margin-left: 0; }
body.board-mode .main-wrap::before { left: 0; }
body.board-mode .main { max-width: none; padding: 12px 16px; }
body.board-mode .page { animation: none; }
.sb { display: flex; flex-direction: column; gap: 10px; height: calc(100vh - 24px); height: calc(100dvh - 24px); min-height: 0; }
.sb-head { display: flex; align-items: center; gap: 14px; }
.sb-titles { min-width: 0; flex: 1; }
.sb-titles .eyebrow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-actions { display: flex; gap: 8px; align-items: center; }
.sb-actions .btn:disabled { opacity: 0.35; cursor: not-allowed; }
.sb-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 60px minmax(0, 1fr) 280px; gap: 12px; }
.sb-divider { width: 1px; height: 22px; background: var(--line-2); margin: 0 2px; }

.sb-rail { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); min-height: 0; }
.sb-sep { width: 28px; height: 1px; background: var(--line-2); margin: 3px 0; flex-shrink: 0; }
/* os botões encolhem com a altura da tela para as 13 ferramentas caberem sem rolagem */
.sb-tool { position: relative; width: 46px; height: clamp(28px, calc((100dvh - 150px) / 13.5), 46px); flex-shrink: 1; min-height: 26px; border-radius: 12px; display: grid; place-items: center; color: var(--text-2); transition: background 0.15s, color 0.15s; }
.sb-tool:hover { background: var(--surface-3); color: var(--text); }
.sb-tool.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px -6px var(--accent-glow); }
.sb-tip { position: fixed; left: auto; transform: translate(58px, 0); pointer-events: none; opacity: 0; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: #000; border: 1px solid var(--line-2); color: var(--text); font-size: 0.78rem; font-weight: 600; transition: opacity 0.12s; z-index: 30; display: inline-flex; gap: 8px; align-items: center; }
.sb-tool:hover .sb-tip { opacity: 1; }
.sb-tip kbd, .sb-key { font-family: var(--font-mono); font-size: 0.68rem; padding: 1px 6px; border-radius: 5px; background: var(--surface-3); border: 1px solid var(--line-2); color: var(--text-2); }

.sb-canvas { position: relative; overflow: hidden; border-radius: var(--r-lg); border: 1px solid var(--line-2); background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 22px 22px, #050506; touch-action: none; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.sb-canvas[data-tool="select"] { cursor: default; }
.sb-canvas[data-tool="pan"] { cursor: grab; }
.sb-canvas.dragging { cursor: grabbing !important; }
.sb-canvas[data-tool="text"] { cursor: text; }
.sb-canvas[data-tool="erase"] { cursor: cell; }
.sb-canvas[data-tool="select"] #sb-els [data-id] { cursor: move; }
.sb-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.sb-stage img { display: block; width: 100%; height: 100%; pointer-events: none; }
.sb-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sb-hint { position: absolute; left: 12px; bottom: 12px; max-width: calc(100% - 190px); padding: 7px 12px; border-radius: 9px; background: rgba(6, 6, 7, 0.82); border: 1px solid var(--line-2); backdrop-filter: blur(8px); font-size: 0.76rem; color: var(--text-2); pointer-events: none; }
.sb-zoom { position: absolute; right: 12px; bottom: 12px; display: flex; align-items: center; border-radius: 10px; background: rgba(6, 6, 7, 0.82); border: 1px solid var(--line-2); backdrop-filter: blur(8px); overflow: hidden; }
.sb-zoom button { height: 34px; min-width: 34px; display: grid; place-items: center; color: var(--text-2); padding: 0 8px; }
.sb-zoom button:hover { color: var(--text); background: var(--surface-3); }
.sb-zoom-val { font-size: 0.76rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 56px !important; border-left: 1px solid var(--line-2) !important; border-right: 1px solid var(--line-2) !important; }
.sb-text-input { position: absolute; width: 210px; height: 36px; z-index: 5; }

.sb-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden; }
.sb-sec { flex-shrink: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); }
.sb-sec-title { font-size: 0.66rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-3); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.sb-count { color: var(--accent); }
.sb-role-name { margin-left: auto; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 0.74rem; }
.sb-roles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.sb-role { display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); transition: border-color 0.15s, background 0.15s; }
.sb-role svg { width: 80%; height: 80%; }
.sb-role:hover { border-color: var(--line-2); color: var(--text); }
.sb-role.active { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.sb-colors { display: flex; justify-content: space-between; gap: 4px; margin-bottom: 8px; }
.sb-color { width: 26px; height: 26px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5) inset; transition: transform 0.12s; }
.sb-color:hover { transform: scale(1.1); }
.sb-color.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.sb-sizes { width: 100%; display: flex; }
.sb-sizes .tab { flex: 1; }
.sb-sec-layers { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.sb-layers { overflow-y: auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 2px; margin: 0 -6px; }
.sb-empty { font-size: 0.78rem; color: var(--text-3); padding: 0 6px; }
.sb-layer { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 8px; cursor: pointer; font-size: 0.8rem; color: var(--text-2); }
.sb-layer:hover { background: var(--surface-3); color: var(--text); }
.sb-layer.active { background: var(--accent-soft); color: var(--text); }
.sb-layer-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.sb-layer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-layer-del { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--text-3); opacity: 0; }
.sb-layer:hover .sb-layer-del { opacity: 1; }
.sb-layer-del:hover { color: var(--danger); background: rgba(255, 90, 95, 0.12); }
.sb-note { font-size: 0.72rem; color: var(--text-3); margin-top: 10px; }

@media (max-width: 1280px) { .sb-body { grid-template-columns: 56px minmax(0, 1fr) 250px; } .sb-hide-md { display: none; } }
@media (max-height: 620px) and (min-width: 961px) { .sb-head .eyebrow { display: none; } .sb-title { font-size: 1.1rem; } }
@media (max-width: 960px) {
    body.board-mode .main { padding: 8px; }
    .sb { gap: 8px; }
    .sb-body { display: flex; flex-direction: column; gap: 8px; }
    .sb-rail { flex-direction: row; justify-content: flex-start; overflow-x: auto; overflow-y: hidden; order: 2; flex-shrink: 0; }
    .sb-tool { width: 42px; height: 42px; flex-shrink: 0; }
    .sb-pick { grid-template-columns: 1fr; grid-template-rows: 150px 1fr; }
    .sb-sep { width: 1px; height: 28px; margin: 0 4px; }
    .sb-tip { display: none; }
    .sb-canvas { order: 1; flex: 1; min-height: 0; }
    /* no celular o painel vira uma faixa compacta: pins + cores; estratégia e camadas ficam no topo/ocultas */
    .sb-panel { order: 3; flex-shrink: 0; display: grid; grid-template-columns: 1fr; gap: 8px; }
    .sb-roles { gap: 6px; }
    .sb-role { aspect-ratio: auto; height: 38px; }
    .sb-sec-layers { display: none; }
    .sb-sec-strategy { grid-column: 1 / -1; }
    .sb-sec { padding: 8px; }
    .sb-hint { display: none; }
    .sb-hide-sm { display: none; }
}

/* estratégias do time */
.strat-team-empty { padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: var(--r-md); background: rgba(0, 0, 0, 0.3); }
.strat-plans { display: flex; flex-direction: column; gap: 8px; }
.strat-plan { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-md); border: 1px solid var(--line-2); background: var(--surface); text-align: left; transition: border-color 0.15s, background 0.15s; min-width: 0; }
.strat-plan:hover { border-color: var(--accent-line); background: var(--surface-2); }
.strat-plan-img { width: 88px; aspect-ratio: 16 / 11; border-radius: 8px; overflow: hidden; background: var(--surface-3); flex-shrink: 0; }
.strat-plan-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strat-plan-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.strat-plan-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strat-plan-where { display: inline-flex; align-items: center; gap: 4px; font-size: 0.74rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strat-plan-meta { font-size: 0.72rem; color: var(--text-3); }
.sb-sec-strategy .input { height: 32px; flex: 1; min-width: 0; font-size: 0.86rem; }
.sb-strat-row { display: flex; gap: 6px; align-items: center; }
.sb-note-tight { margin: 6px 0 8px !important; line-height: 1.35; }
.sb-strat-row + .sb-note-tight { margin-bottom: 0 !important; }
.sb-pick { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; height: min(62vh, 560px); }
.sb-pick-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding-right: 4px; }
.sb-pick-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 9px; text-align: left; font-size: 0.84rem; font-weight: 600; color: var(--text-2); }
.sb-pick-item img { width: 44px; height: 30px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.sb-pick-item span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pick-n { font-size: 0.72rem; color: var(--text-3); }
.sb-pick-item:hover { background: var(--surface-3); color: var(--text); }
.sb-pick-item.active { background: var(--accent-soft); color: var(--text); }
.sb-pick-grid { overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; align-content: start; }
.sb-pick-thumb { position: relative; border-radius: 10px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 16 / 10; background: var(--surface-3); }
.sb-pick-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sb-pick-thumb span { position: absolute; left: 8px; bottom: 6px; font-size: 0.74rem; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: rgba(6, 6, 7, 0.8); }
.sb-pick-thumb:hover { border-color: var(--accent-line); }
.sb-pick-thumb.active { border-color: var(--accent); }
.sb-status { margin-left: auto; text-transform: none; letter-spacing: 0; font-size: 0.72rem; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.sb-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sb-status.ok { color: var(--ok); }
.sb-status.busy { color: var(--warn); }
.sb-status.err { color: var(--danger); }
.sb-danger:hover { border-color: var(--danger); color: var(--danger); }
/* ---------- chuva binária (fundo decorativo, ver js/components/binary-rain.js) ---------- */
:where(.has-binary-rain) { position: relative; }
.has-binary-rain { isolation: isolate; overflow: hidden; }
.has-binary-rain > .binary-rain {
    position: absolute; inset: 0; width: 100%; height: 100%;
    display: block; z-index: -1; pointer-events: none; opacity: 0.5;
}
/* Menu lateral: bem sutil e sumindo para baixo, para não brigar com os itens. */
.sidebar > .binary-rain {
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 75%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.5) 35%, transparent 75%);
}
/* Cabeçalho da página Início vira um banner com a chuva atrás do título. */
.page-head.rain-hero {
    padding: 28px 28px 24px; border-radius: var(--r-xl);
    border: 1px solid var(--accent-line); background: #000;
    box-shadow: 0 0 40px -18px var(--accent-glow);
}
.page-head.rain-hero::after {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.55) 45%, rgba(0, 0, 0, 0.15) 100%);
}
@media (max-width: 720px) { .page-head.rain-hero { padding: 20px 16px 18px; } }

/* Painel admin — cadastro público */
.signup-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 16px 18px; }
.signup-card-main { min-width: 0; flex: 1 1 320px; }
.signup-link { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.signup-link .mono { overflow-wrap: anywhere; color: var(--text-2); }
.admin-table tr.is-pending td { background: var(--accent-soft); }

/* ===================================================================
   CELULAR
   Barra de navegação no rodapé, tabelas que viram cartões, revisão de prints em grade,
   modais que sobem de baixo e alvos de toque maiores.
   ========================================================================== */
.bottom-nav, .m-unit, .only-mobile { display: none; }

/* Em telas de toque não há "hover": nada de cartões pulando ao tocar. */
@media (hover: none) {
    .player-card:hover, .quick-action:hover, .slide-card:hover, .pick-card:hover, .heat-cell:hover,
    .strat-local:hover img, .slide-card:hover .slide-thumb img, .nav-item:hover .ico { transform: none; }
    .player-card:hover { box-shadow: var(--shadow-1); border-color: var(--line); }
    .quick-action:active, .player-card:active, .pick-card:active, .strat-local:active, .slide-card:active { transform: scale(0.985); }
    .table tbody tr:hover { background: transparent; }
    .table tbody tr.clickable:active { background: rgba(255, 255, 255, 0.05); }
}

@media (max-width: 960px) {
    :root { --bnav-h: 62px; }

    /* ---- barra inferior ---- */
    .bottom-nav {
        display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
        height: calc(var(--bnav-h) + var(--safe-b)); padding: 6px 6px var(--safe-b);
        background: rgba(6, 6, 7, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--line-2);
    }
    body.auth-mode .bottom-nav, body.board-mode .bottom-nav { display: none; }
    .bn-item { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 0.64rem; font-weight: 600; letter-spacing: 0.02em; transition: color 0.15s; }
    .bn-icon { display: grid; place-items: center; width: 46px; height: 28px; border-radius: 999px; transition: background 0.15s, color 0.15s, transform 0.12s; }
    .bn-item .ico :is(path, circle, rect) { fill: currentColor; fill-opacity: 0; transition: fill-opacity 0.15s; }
    .bn-item .ico .nofill { fill: none; }
    .bn-item.active { color: var(--text); }
    .bn-item.active .bn-icon { background: var(--accent-soft); color: var(--accent); }
    .bn-item.active .ico :is(path, circle, rect):not(.nofill) { fill-opacity: 0.22; }
    .bn-item:active .bn-icon { transform: scale(0.9); }
    .bn-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    /* "Enviar" é a ação principal: pílula magenta */
    .bn-main { color: var(--text-2); }
    .bn-main .bn-icon, .bn-main.active .bn-icon { width: 52px; height: 32px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px -6px var(--accent-glow); }
    .bn-main.active { color: var(--accent); }

    .main { padding-bottom: calc(var(--bnav-h) + var(--safe-b) + 28px); }
    /* avisos aparecem no topo: embaixo ficam a barra de navegação e os botões de salvar */
    .toast-region { top: calc(64px + var(--safe-t)); bottom: auto; left: 12px; right: 12px; max-width: none; align-items: center; }
    .toast { width: 100%; max-width: 440px; }
    @keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
    .toast.hide { transform: translateY(-12px); }

    /* ---- menu lateral (aberto pelo botão "Menu") ---- */
    .sidebar { width: min(86vw, 300px); padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
    .sidebar .kbd { display: none; }
    .nav-item { padding: 12px; font-size: 0.92rem; }
    body.drawer-open { overflow: hidden; }

    /* ---- cabeçalhos de página mais enxutos (o título já está no topo) ---- */
    .page-head { margin-bottom: 18px; }
    .page-head .eyebrow { display: none; }
    .page-title { font-size: 1.4rem; letter-spacing: 0.08em; margin-top: 0; }
    .page-sub { font-size: 0.84rem; margin-top: 6px; }
    .page-head-row { align-items: stretch; }
    .page-head-row > .row { width: 100%; flex-wrap: nowrap; }
    .page-head-row > .row > .btn { flex: 1 1 0; min-width: 0; }
    .page-head-row > .row > .btn-icon { flex: 0 0 auto; }
    .page-head-row > .row > .input { flex: 1 1 0; min-width: 0; width: auto !important; }
    .page-head.rain-hero { padding: 18px 16px; }
    .section-head { margin: 26px 0 12px; }
    .card { padding: 16px; }
    .card-tight { padding: 14px; }

    /* ---- formulários: 16px evita o zoom automático do iPhone ao tocar num campo ---- */
    .input, .select, .textarea, .review-table .input-num, .review-table .input-time, .queda-pos .input, .sb-sec-strategy .input { font-size: 16px; }
    .input-sm { height: 38px; }
    .btn-xs { height: 30px; }
    .btn-icon.btn-xs { width: 30px; }

    /* ---- filtros do dashboard ---- */
    .filter-bar { gap: 10px; }
    .filter-bar > .field { flex: 1 1 100%; min-width: 0; }
    .filter-bar #dash-custom-start, .filter-bar #dash-custom-end { flex: 1 1 40%; }
    .filter-bar .segmented { display: flex; width: 100%; }
    .filter-bar .segmented button { flex: 1; justify-content: center; padding: 0 6px; height: 36px; }

    /* ---- datas em faixa deslizante, sem quebrar em várias linhas ---- */
    .date-chips { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .date-chips::-webkit-scrollbar { display: none; }
    .date-chips .chip { flex-shrink: 0; height: 34px; }
    .toolbar > .date-chips { width: calc(100% + 32px); max-width: none; margin: 0 -16px; padding: 0 16px; }

    /* ---- tabelas largas: 1ª coluna fixa e sombra indicando que dá para deslizar ---- */
    .table-wrap {
        background:
            linear-gradient(90deg, var(--surface) 60%, transparent) left / 28px 100% no-repeat local,
            linear-gradient(270deg, var(--surface) 60%, transparent) right / 28px 100% no-repeat local,
            radial-gradient(farthest-side at 100% 50%, rgba(255, 27, 255, 0.28), transparent) right / 14px 100% no-repeat scroll,
            var(--surface);
        -webkit-overflow-scrolling: touch;
    }
    .tp-maps th:first-child, .tp-maps td:first-child, .admin-table th:first-child, .admin-table td:first-child { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--line-2); }
    .tp-maps tr.approved td:first-child { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
    .admin-table tr.is-pending td:first-child { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }

    /* ---- envio de prints ---- */
    .dropzone { padding: 28px 18px; }
    .only-desktop { display: none; }
    .only-mobile { display: inline; }
    .upload-actions .btn { width: 100%; }
    /* com vários prints na lista, "Analisar" continua à mão */
    .upload-actions { position: sticky; z-index: 5; bottom: calc(var(--bnav-h) + var(--safe-b)); margin: 16px -16px -16px; padding: 12px 16px; border-radius: 0 0 var(--r-lg) var(--r-lg); background: rgba(6, 6, 7, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
    .kpi-strip .kpi { flex: 1 1 0; min-width: 0; }
    .file-list { grid-template-columns: 1fr; }

    /* ---- editor de estratégia: cabeçalho compacto para o título caber ---- */
    body.board-mode .main { padding: calc(8px + var(--safe-t)) 8px calc(8px + var(--safe-b)); }
    .sb { height: calc(100dvh - 16px - var(--safe-t) - var(--safe-b)); }
    .sb-head { gap: 8px; }
    .sb-head > .btn-icon { width: 36px; height: 36px; }
    .sb-actions { gap: 4px; flex-shrink: 0; }
    .sb-actions .btn-sm { width: 36px; height: 36px; padding: 0; }
    .sb-divider { display: none; }
    .sb-title { font-size: 1rem; }
    .sb-titles .eyebrow { font-size: 0.58rem; }
}

/* ---- tabelas de ranking e histórico viram cartões ---- */
@media (max-width: 640px) {
    .table-cards thead { display: none; }
    .table-cards, .table-cards tbody { display: block; width: 100%; }
    .table-cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
    .table-cards tbody tr:last-child { border-bottom: 0; }
    .table-cards td { display: block; padding: 0; border: 0; white-space: nowrap; min-width: 0; }
    .table-cards td[data-m="lead"] { order: 0; flex-shrink: 0; }
    .table-cards td[data-m="main"] { order: 1; flex: 1 1 0; overflow: hidden; text-overflow: ellipsis; }
    .table-cards td[data-m="value"] { order: 2; flex-shrink: 0; text-align: right; }
    .table-cards tr::after { content: ''; order: 3; flex-basis: 100%; height: 0; }
    .table-cards td[data-m="meta"] { order: 4; display: inline-flex; align-items: center; gap: 4px; font-size: 0.8rem; color: var(--text-2); }
    .table-cards td[data-m="meta"][data-label]::after { content: attr(data-label); color: var(--text-3); text-transform: lowercase; }
    .table-cards td[data-m="lead"] ~ td[data-m="main"] + td[data-m="meta"] { margin-left: 42px; }
    .table-cards td[data-m="bar"] { order: 5; flex: 1 1 60px; }
    .table-cards td[data-m="bar"] .progress { min-width: 0 !important; }
    .table-cards td[data-m="hide"] { display: none; }
    .table-cards .m-unit { display: inline; margin-left: 4px; font-size: 0.7rem; font-weight: 600; color: var(--text-3); }
    .table-cards .value { font-size: 1.2rem; }
    .table-cards .player-inline { max-width: 100%; }
    .table-cards .player-inline > span:last-child { overflow: hidden; text-overflow: ellipsis; }
    .table-cards td.empty-cell { flex: 1; white-space: normal; }
    .table-cards tr.approved td:first-child { box-shadow: none; }
    .table-cards tr.approved { box-shadow: inset 3px 0 0 var(--accent); }

    /* histórico: "#5 · squad · mapa      147 pts" / "1º +12  (avatares)  7 abates  🖼 🗑" */
    .match-table td.m-grow { flex: 1 1 auto; }
    .match-table .names-trunc { display: none; }
    .match-table td[data-m="meta"] .btn { width: 34px; height: 34px; }
    .match-group-head { gap: 8px 12px; }
    .match-group-date { width: 100%; font-size: 0.95rem; }
    .match-group-head .grow { display: none; }
    .match-group-head .btn { flex: 1 1 0; }

    /* ---- jogadores: dois por linha ---- */
    .players-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .player-card { padding: 16px 10px 12px; }
    .player-card .avatar-xl { width: 64px; height: 64px; font-size: 1.2rem; }
    .player-card-name { font-size: 0.95rem; }
    .player-card-real { font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .player-card-actions { margin-top: 10px; gap: 6px; }
    .player-card-actions .btn { height: 34px; }
    .toolbar .search { max-width: none !important; }

    /* ---- modais sobem de baixo, como folhas ---- */
    .modal-overlay { align-items: flex-end; padding: 0; }
    .modal, .modal-sm, .modal-lg, .modal-xl {
        max-width: none; width: 100%;
        max-height: calc(100dvh - var(--safe-t) - 28px);
        border-radius: 22px 22px 0 0; border-bottom: 0;
        padding: 0 18px calc(18px + var(--safe-b));
        transform: translateY(48px);
    }
    .modal::before { content: ''; display: block; width: 40px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.18); margin: 10px auto 6px; }
    .modal-overlay.open .modal { transform: none; }
    .modal-head { position: sticky; top: 0; z-index: 4; margin: 0 -18px 14px; padding: 8px 18px 12px; background: var(--surface); border-bottom: 1px solid var(--line); }
    .modal-title { font-size: 1.15rem; }
    .modal-foot { position: sticky; bottom: calc(-18px - var(--safe-b)); z-index: 4; margin: 18px -18px calc(-18px - var(--safe-b)); padding: 12px 18px calc(12px + var(--safe-b)); background: var(--surface); }
    .modal-foot > * { flex: 1 1 auto; }
    .modal-foot .btn { height: 44px; }
    .dialog-icon { margin-top: 6px; }
}

/* ---- revisão dos prints: cada atleta vira um cartão com os números em grade ---- */
@media (max-width: 900px) {
    .review-card { border-radius: var(--r-md); }
    .review-head { padding: 12px 14px; gap: 10px; }
    .review-title { width: 100%; flex-wrap: wrap; gap: 8px; font-size: 0.95rem; white-space: nowrap; }
    .review-controls { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
    .review-controls .queda-pos { grid-column: 1; grid-row: 1; justify-content: space-between; }
    .review-controls .queda-score { grid-column: 2; grid-row: 1; align-self: center; padding: 0 4px; }
    .review-controls .select { width: 100% !important; height: 40px; }
    .review-controls [id^="mapa-"] { grid-column: 1; }
    .review-controls [id^="modo-"] { grid-column: 2; min-width: 116px; }
    .review-scroll { overflow: visible; }
    .review-table, .review-table tbody { display: block; }
    .review-table thead { display: none; }
    .review-table tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 8px; padding: 14px; border-bottom: 1px solid var(--line); }
    .review-table tr:last-child { border-bottom: 0; }
    .review-table td { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 0 !important; border: 0; background: none !important; animation: none; }
    .review-table td.rv-who { grid-column: 1 / -1; position: static; min-width: 0; box-shadow: none !important; }
    .review-table td[data-label]::before { content: attr(data-label); font-family: var(--font-display); font-size: 0.58rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .review-table .input-num, .review-table .input-time { width: 100% !important; height: 42px; }
    .review-table td.rv-del { justify-content: flex-end; }
    .review-table td.rv-del .btn { width: 100%; height: 42px; border: 1px dashed var(--line-2); color: var(--text-3); }
    .review-table td[colspan] { grid-column: 1 / -1; display: block; }
    .review-table tr.approved { box-shadow: inset 3px 0 0 var(--ok); }
    .review-table tr.pending { box-shadow: inset 3px 0 0 var(--warn); }
    .rv-who > .row { flex-wrap: nowrap; }
    .rv-who .pick { flex: 1; min-width: 0; }
    .rv-who > .row > .btn { height: 40px; flex-shrink: 0; }
    .review-foot .btn { height: 36px; }
    .review-batch { flex-direction: column; align-items: stretch; gap: 8px; }
    .review-batch .row { flex-wrap: nowrap; justify-content: space-between; }
    .review-batch .input { width: auto !important; flex: 1; max-width: 200px; }
    /* os botões do topo saem: a barra de salvar fica presa no rodapé */
    .review-top-actions { display: none !important; }
    .review-actions { position: sticky; z-index: 20; bottom: calc(var(--bnav-h) + var(--safe-b) + 8px); flex-wrap: nowrap; gap: 8px; padding: 8px; border-color: var(--line-2); background: rgba(6, 6, 7, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5); }
    .review-actions > .btn-ghost { width: 44px; padding: 0; flex-shrink: 0; height: 44px; }
    .review-actions > .btn-ghost span { display: none; }
    .review-actions > .row { flex: 1; flex-wrap: nowrap; gap: 8px; min-width: 0; }
    .review-actions > .row > .btn { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 12px; font-size: 0.82rem; }
    .review-actions > .row > .btn-secondary { flex: 0 0 auto; }
    .review-actions > .row > .btn-secondary .ico { display: none; }
}
/* tablet em pé: 6 números por linha */
@media (min-width: 561px) and (max-width: 900px) {
    .review-table tr { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .review-controls { grid-template-columns: auto 1fr 1fr auto; }
    .review-controls .queda-pos, .review-controls .queda-score, .review-controls [id^="mapa-"], .review-controls [id^="modo-"] { grid-row: 1; grid-column: auto; }
    .review-controls .queda-score { order: 4; }
    .review-actions > .row > .btn-secondary .ico { display: inline-block; }
}

@media (max-width: 380px) {
    .main { padding-left: 12px; padding-right: 12px; }
    .toolbar > .date-chips { width: calc(100% + 24px); margin: 0 -12px; padding: 0 12px; }
    .stat-value { font-size: 1.25rem; }
    .bn-label { font-size: 0.6rem; }
}

/* apresentação: formulário e botões de download empilhados no celular */
@media (max-width: 640px) {
    .report-form .row-between, .report-form .row-between > .row { flex-direction: column; align-items: stretch; min-width: 0; width: 100%; }
    .report-form .input { width: 100% !important; }
    .report-form .date-chips { align-self: stretch !important; }
    .report-form .btn-lg { width: 100%; }
    .report-ready .row-between > .row { width: 100%; }
    .report-ready .row-between > .row > .btn { flex: 1 1 auto; }
    #slide-tabs { display: flex; }
}

/* ---------- dashboard: filtro de um dia ---------- */
.day-picker { display: flex; align-items: center; gap: 6px; }
.day-picker .input { width: auto; min-width: 150px; }
.day-picker .btn[disabled] { opacity: 0.4; pointer-events: none; }

/* ---------- compartilhar com a equipe (modal) ---------- */
.share-form { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 12px; align-items: end; }
.share-form .field + .field { margin-top: 0; }
.share-list { display: flex; flex-direction: column; gap: 10px; }
.share-item { padding: 14px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.share-item.is-fresh { border-color: var(--accent-line); box-shadow: 0 0 0 3px rgba(255, 27, 255, 0.12); }
.share-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; }
.share-item-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.share-url .input { width: 100%; color: var(--text-2); }
.share-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.share-actions .share-revoke { margin-left: auto; color: var(--danger); }
@media (max-width: 640px) {
    .share-form { grid-template-columns: 1fr; }
    .share-actions .btn { flex: 1 1 auto; }
    .share-actions .share-revoke { margin-left: 0; }
}

/* ---------- visualização compartilhada (/v/<token>) ---------- */
.share-top {
    position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px;
    padding: calc(10px + var(--safe-t, 0px)) 24px 10px;
    background: rgba(6, 6, 7, 0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}
.share-mark { width: 34px; height: auto; flex-shrink: 0; filter: drop-shadow(0 0 8px var(--accent-glow)); }
.share-brand { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.share-brand-name { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-2); }
.share-guild { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-ro { margin-left: auto; flex-shrink: 0; }
body.share-mode .main { padding-bottom: calc(48px + var(--safe-b, 0px)); }
@media (max-width: 720px) {
    .share-top { padding-left: 14px; padding-right: 14px; }
    .day-picker { width: 100%; }
    .day-picker .input { flex: 1 1 0; min-width: 0; }
}
