/* V13 — interface de acesso e painel do cliente */
:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --bg: #101216; --surface: #191c21; --line: #2c3038;
  --text: #f2f3f5; --muted: #a4acb9; --green: #68d7a2;
  --blue: #89adff; --amber: #e9bd78;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text); isolation: isolate; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
[hidden] { display: none !important; }
svg { display: block; flex: none; }
/* Animação decorativa de entrada e painel. */
.minimal-access { display: grid; place-items: center; padding: 24px; background: #080c09; }
.matrix-rain { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; mask-image: linear-gradient(transparent 2%, #000 30%); }
.matrix-col { position: absolute; top: -100%; writing-mode: vertical-rl; white-space: nowrap; font-family: monospace; font-size: 14px; letter-spacing: .55em; color: #6fbc83; opacity: .36; animation: matrix-fall var(--duration) linear infinite; animation-delay: var(--delay); user-select: none; }
.matrix-col:nth-child(4n) { color: #d6e7dc; opacity: .26; }
.matrix-col:nth-child(3n) { opacity: .15; }
@keyframes matrix-fall { from { transform: translateY(0); } to { transform: translateY(230vh); } }
.access-shell { width: min(100%, 360px); }
.access-form { padding: 5px; border: 1px solid #34463a; border-radius: 12px; background: #101812; box-shadow: 0 8px 30px #0006; }
.key-row { display: flex; align-items: center; gap: 5px; }
.key-row input { min-width: 0; width: 100%; height: 48px; padding: 0 12px; border: 0; background: transparent; color: var(--text); font-size: 16px; border-radius: 7px; outline-offset: -2px; }
.key-row input::placeholder { color: #a4b2a8; }
.key-row button { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border: 0; border-radius: 8px; background: #a0e5b4; color: #142b1b; }
.key-row button svg { width: 22px; height: 22px; }
.access-alert { padding: 12px 14px; margin-bottom: 14px; border: 1px solid #63513a; border-radius: 9px; background: #29241d; font-size: 13px; line-height: 1.5; }
/* Painel: superfícies planas, alinhamento único e tipografia compacta. */
.dashboard-page { padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); }
.dashboard-shell { max-width: 1000px; margin: 0 auto; }
.dashboard-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; border-bottom: 1px solid var(--line); }
.dashboard-brand, .card-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dashboard-brand strong { display: block; font-size: 15px; font-weight: 650; }
.eyebrow { display: block; color: var(--muted); font-size: 11px; font-weight: 500; margin-bottom: 3px; }
.brand-icon, .tile-icon, .phone-symbol, .goal-icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 9px; color: var(--blue); background: #26334b; }
.brand-icon svg, .tile-icon svg, .phone-symbol svg, .goal-icon svg { width: 20px; height: 20px; }
.dashboard-exit { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); background: transparent; border-radius: 8px; color: var(--muted); font-size: 13px; }
.dashboard-exit:hover { background: var(--surface); color: var(--text); }
.dashboard-exit svg { width: 17px; height: 17px; }
.dashboard-intro { display: flex; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 7px; padding: 24px 0 18px; }
.dashboard-intro h1 { order: -1; flex: 1; min-width: 200px; margin: 0; font-size: 26px; font-weight: 650; letter-spacing: -.035em; line-height: 1.2; }
.dashboard-intro p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.connection { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--green); white-space: nowrap; }
.connection i { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 14px; }
.stat-tile { display: grid; grid-template-columns: 36px minmax(0,1fr); align-items: center; column-gap: 12px; row-gap: 3px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 15px; }
.stat-tile .tile-icon { grid-row: 1 / span 2; }
.stat-tile > span { color: var(--muted); font-size: 12px; }
.stat-tile > strong { font-size: 17px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.stat-tile small { grid-column: 2; color: var(--muted); font-size: 10px; line-height: 1.3; }
.tile-green, .fps-icon { background: #213a31; color: var(--green); }
.tile-blue { background: #26334b; color: var(--blue); }
.tile-amber { background: #3b3227; color: var(--amber); }
.hs-icon { background: #393044; color: #c9a9ee; }
.dashboard-content { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.device-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; }
.card-heading { margin-bottom: 16px; }
.card-heading h2 { font-size: 17px; font-weight: 650; line-height: 1.3; letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; }
.device-card p { color: var(--muted); font-size: 13px; line-height: 1.55; margin: 0 0 16px; }
.field-label { display: block; font-size: 13px; margin-bottom: 8px; color: var(--muted); }
.device-card select { width: 100%; min-height: 48px; padding: 10px 12px; margin-bottom: 12px; border: 1px solid #3c414a; border-radius: 8px; background: #121418; color: var(--text); font-size: 16px; }
.primary-action { width: 100%; min-height: 46px; padding: 12px; border: 0; border-radius: 8px; background: #8eaff8; color: #111c31; font-size: 14px; font-weight: 650; transition: background .15s, transform .15s; }
.primary-action:hover:not(:disabled) { background: #a7c0fb; }
.primary-action:active:not(:disabled) { transform: scale(.99); }
.device-data { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 2px 0 16px; }
.device-data span, .device-data strong { display: block; overflow-wrap: anywhere; }
.device-data span { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.device-data strong { font-size: 14px; font-weight: 600; }
.saved-value, .security-row strong { color: var(--green); }
.goal-panel { border-top: 1px solid var(--line); margin: 0 0 16px; padding-top: 14px; }
.goal-heading { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 5px; }
.goal-heading strong { font-size: 13px; font-weight: 650; }
.goal-heading small { color: var(--muted); font-size: 11px; line-height: 1.5; }
.goal-row { display: flex; align-items: center; gap: 11px; min-height: 61px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.goal-row:last-child { border-bottom: 0; }
.goal-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.goal-copy strong { font-size: 14px; font-weight: 600; }
.goal-copy small { font-size: 12px; color: var(--muted); }
.goal-toggle { appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; flex: none; margin: 0; border: 1px solid #505663; border-radius: 20px; background: #353a43; cursor: pointer; transition: background .18s, border-color .18s; }
.goal-toggle::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #eef1f5; transition: transform .18s; }
.goal-toggle:checked { background: #31835c; border-color: #31835c; }
.goal-toggle:checked::before { transform: translateX(18px); }
.goal-toggle:disabled { opacity: .65; cursor: wait; }
.security-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 12px 0; font-size: 12px; color: var(--muted); }
.security-row strong { font-size: 12px; font-weight: 600; text-align: right; }
.security-card p { border-top: 1px solid var(--line); padding-top: 12px; margin: 0; font-size: 12px; }
.dashboard-footer { color: var(--muted); font-size: 11px; margin: 20px 0 0; text-align: center; }
.dashboard-footer span { margin: 0 5px; }
.profile-progress { display: flex; gap: 8px; align-items: center; margin-top: 12px; font-size: 12px; color: var(--muted); }
.profile-spinner { width: 15px; height: 15px; border: 2px solid #444a54; border-top-color: var(--blue); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.demo-track { height: 3px; background: #343a43; overflow: hidden; border-radius: 3px; margin-top: 10px; }
.demo-track span { display: block; width: 35%; height: 100%; border-radius: 3px; background: var(--blue); }
.demo-track.running span { animation: loading 1.1s ease-in-out infinite; }
@keyframes loading { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.ios-banner { position: fixed; z-index: 10; top: max(12px, env(safe-area-inset-top)); left: 50%; width: min(calc(100% - 24px), 400px); display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #484f5a; border-radius: 16px; background: #24282ff5; box-shadow: 0 8px 24px #0005; transform: translateX(-50%); animation: banner-in .3s cubic-bezier(.2,.8,.2,1) both; }
.banner-symbol { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 9px; background: #344768; color: #bdd0ff; font-size: 22px; }
.banner-body { flex: 1; min-width: 0; font-size: 12px; line-height: 1.4; }
.banner-body strong { display: block; margin: 3px 0; font-size: 14px; }
.banner-meta { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); }
.ios-banner button { align-self: flex-start; border: 0; background: transparent; color: var(--muted); font-size: 23px; line-height: 1; padding: 1px 4px; }
@keyframes banner-in { from { transform: translate(-50%,-140%); opacity: 0; } to { transform: translate(-50%,0); opacity: 1; } }
@media (max-width: 720px) {
  .dashboard-page { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .dashboard-content { grid-template-columns: 1fr; gap: 12px; }
  .dashboard-top { padding-bottom: 13px; }
  .dashboard-intro { padding: 19px 0 16px; }
  .dashboard-intro h1 { font-size: 23px; min-width: 0; }
  .dashboard-stats { gap: 7px; margin-bottom: 12px; }
  .stat-tile { grid-template-columns: minmax(0,1fr); padding: 10px; gap: 4px; align-content: start; }
  .stat-tile .tile-icon { grid-row: auto; width: 29px; height: 29px; border-radius: 7px; margin-bottom: 3px; }
  .stat-tile .tile-icon svg { width: 16px; height: 16px; }
  .stat-tile > span { font-size: 11px; }
  .stat-tile > strong { font-size: 14px; }
  .stat-tile small { grid-column: 1; font-size: 10px; }
  .device-card { padding: 16px; }
}
@media (max-width: 350px) { .dashboard-page { padding-left: 12px; padding-right: 12px; } .dashboard-intro h1 { flex-basis: 100%; } .stat-tile { padding: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } .matrix-col { top: 0; } .demo-track.running span { width: 100%; } }

/* V13 — terminal de configuração e fundo discreto. */
.dashboard-page { background: #0b100e; }
.dashboard-page .matrix-rain { opacity: .36; mask-image: linear-gradient(#000 0%, #000 80%, transparent); }
.dashboard-page .dashboard-shell { position: relative; }
.dashboard-page .dashboard-top { border-bottom-color: #303b35; }
.dashboard-page .device-card, .dashboard-page .stat-tile { background: #161d1a; border-color: #303b35; }
.dashboard-page .primary-action { background: #83d4a6; color: #10271a; }
.dashboard-page .primary-action:hover:not(:disabled) { background: #a0e5b4; }
.terminal-dialog { width: min(530px, calc(100% - 28px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid #354b3e; border-radius: 14px; background: #101813; color: #d9f4e4; box-shadow: 0 20px 80px #0009; overflow: auto; }
.terminal-dialog::backdrop { background: #050a08c9; backdrop-filter: blur(4px); }
.terminal-top { display: flex; gap: 11px; align-items: center; padding: 15px; border-bottom: 1px solid #2b3d31; }
.terminal-mark { width: 36px; height: 36px; display: grid; place-items: center; flex: none; font: 600 18px monospace; color: #8ce1a8; background: #203b2b; border-radius: 8px; }
.terminal-top h2 { font-size: 15px; margin: 0 0 4px; font-weight: 650; }
.terminal-top p { font-size: 12px; margin: 0; color: #9bc7aa; }
.terminal-close { margin-left: auto; color: #b8c9bf; background: none; border: 0; font-size: 24px; }
.terminal-screen { position: relative; isolation: isolate; overflow: hidden; min-height: 238px; padding: 18px 15px; background: #080e0a; }
.terminal-code { position: absolute; inset: 0; overflow: hidden; z-index: -1; opacity: .11; color: #54c77a; font: 12px/1.9 monospace; white-space: pre; letter-spacing: .2em; user-select: none; mask-image: linear-gradient(90deg, transparent, #000); }
#terminal-log { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #8bdfa5; font: 12px/1.85 ui-monospace, SFMono-Regular, Consolas, monospace; }
.terminal-cursor { display: inline-block; background: #8bdfa5; width: 7px; height: 12px; animation: cursor-pulse 1s steps(2,end) infinite; }
@keyframes cursor-pulse { 50% { opacity: 0; } }
.terminal-bottom { display: flex; align-items: center; gap: 12px; padding: 16px; font: 12px monospace; }
.terminal-bottom progress { flex: 1; min-width: 0; height: 5px; appearance: none; border: 0; border-radius: 5px; background: #2c3c32; overflow: hidden; accent-color: #82d79f; }
.terminal-bottom progress::-webkit-progress-bar { background: #2c3c32; }
.terminal-bottom progress::-webkit-progress-value { background: #82d79f; transition: width .3s; }
.terminal-bottom progress::-moz-progress-bar { background: #82d79f; }
@media(max-width: 350px) { #terminal-log { font-size: 11px; } .terminal-screen { padding: 13px; } }

/* V14: indicadores leves, aviso e fluxo visual continuamente atualizado. */
.dashboard-stats { gap: 8px; margin-bottom: 12px; }
.dashboard-page .stat-tile { grid-template-columns: 26px minmax(0,1fr); padding: 9px 10px; column-gap: 8px; row-gap: 2px; border-color: #34463b; border-radius: 10px; background: #151d18e8; box-shadow: 0 5px 12px #0003; animation: stat-float 4.8s ease-in-out infinite; }
.dashboard-page .stat-tile:nth-child(2) { animation-delay: -.7s; }
.dashboard-page .stat-tile:nth-child(3) { animation-delay: -1.4s; }
.stat-tile .tile-icon { grid-row: 1 / span 2; width: 26px; height: 26px; margin: 0; border-radius: 6px; }
.stat-tile .tile-icon svg { width: 15px; height: 15px; }
.stat-tile > span { font-size: 11px; }
.stat-tile > strong { font-size: 12px; line-height: 1.25; }
@keyframes stat-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
.sensitivity-note { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin: 0 0 13px; border: 1px solid #59482d; border-radius: 10px; background: #211d15f2; color: #e8c589; }
.note-icon { width: 30px; height: 30px; border-radius: 7px; background: #3b3020; display: grid; place-items: center; flex: none; }
.note-icon svg { width: 18px; height: 18px; }
.sensitivity-note strong { display: block; font-size: 12px; margin-bottom: 3px; }
.sensitivity-note p { margin: 0; color: #e2d5bf; font-size: 12px; line-height: 1.4; }
.terminal-screen { min-height: 0; padding: 13px 15px; }
.terminal-stream { margin-top: 12px; padding-top: 9px; border-top: 1px solid #294334; }
.stream-heading { display: flex; align-items: center; gap: 6px; color: #94c9a3; font: 11px/1.3 monospace; margin-bottom: 5px; }
.stream-dot { width: 6px; height: 6px; border-radius: 50%; background: #82d79f; animation: cursor-pulse 1s steps(2,end) infinite; }
.stream-heading .terminal-cursor { margin-left: auto; height: 9px; }
.terminal-code { position: static; z-index: auto; opacity: 1; mask-image: none; color: #6bd08e; font: 11px/1.45 monospace; letter-spacing: .04em; margin: 0; height: 80px; overflow: hidden; white-space: pre; }
.terminal-bottom { padding-bottom: 9px; }
.terminal-hint { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding: 0 16px 13px; color: #a6c8b1; font-size: 11px; font-variant-numeric: tabular-nums; }
@media(max-width: 500px) { .dashboard-page .stat-tile { grid-template-columns: minmax(0,1fr); padding: 7px 8px; gap: 3px; } .stat-tile .tile-icon { grid-row: auto; width: 22px; height: 22px; } .stat-tile > strong { font-size: 11px; } .stat-tile > span { font-size: 10px; } }
@media(prefers-reduced-motion: reduce) { .terminal-stream { display: none; } }

/* V15: modo de jogo, terminal com prévia de script e movimento em camadas. */
.dashboard-page { --line: #30403a; --muted: #a6b7b1; background: radial-gradient(ellipse at 50% 0%, #172d26 0%, #0b100e 55%); }
.dashboard-page .matrix-rain { opacity: .62; }
.dashboard-page .device-card { background: linear-gradient(155deg, #202b25f5, #131b17f5 55%); box-shadow: 0 12px 32px #0005; }
.dashboard-device { position: relative; overflow: hidden; }
.dashboard-device::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, #63d5aa, #83aaf8, transparent); background-size: 200% 100%; animation: edge-scan 5s linear infinite; pointer-events: none; }
@keyframes edge-scan { to { background-position: -200% 0; } }
.connection i { box-shadow: 0 0 0 0 #68d7a255; animation: status-pulse 2.8s ease-out infinite; }
@keyframes status-pulse { 65%,100% { box-shadow: 0 0 0 7px #68d7a200; } }
.game-modes { min-width: 0; border: 0; padding: 0; margin: 9px 0 18px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.mode-option { position: relative; display: block; min-width: 0; cursor: pointer; --mode-color: #78dbb1; }
.mode-option:nth-child(2) { --mode-color: #8eaff8; }
.mode-option:nth-child(3) { --mode-color: #e6bd82; }
.mode-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-face { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 96px; gap: 5px; padding: 10px; border-radius: 10px; border: 1px solid #3c4a43; background: #101813; transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; overflow: hidden; }
.mode-face svg { width: 21px; height: 21px; color: var(--mode-color); margin-bottom: 3px; }
.mode-face strong { font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.mode-face small { font-size: 10px; color: var(--muted); line-height: 1.3; overflow-wrap: anywhere; }
.mode-option input:checked + .mode-face { border-color: var(--mode-color); background: #23342b; box-shadow: inset 0 0 0 1px var(--mode-color), 0 4px 12px #0004; transform: translateY(-2px); }
.mode-option input:checked + .mode-face::after { content: '✓'; position: absolute; right: 8px; top: 6px; color: var(--mode-color); font-size: 13px; }
.mode-option input:focus-visible + .mode-face { outline: 2px solid #a8c7ff; outline-offset: 2px; }
.mode-option input:disabled + .mode-face { opacity: .7; cursor: wait; }
@media (hover:hover) { .mode-option:hover .mode-face { border-color: var(--mode-color); transform: translateY(-2px); } }
.settings-heading { padding-top: 11px; border-top: 1px solid var(--line); }
.humor-icon { color: #f1c47d; background: #3b3022; }
.dashboard-page .action-hint { margin: 8px 0 0; text-align: center; font-size: 11px; color: #a2b7aa; }
.dashboard-page #check-button { background: linear-gradient(100deg,#8de2ad,#72c7a7); box-shadow: 0 5px 18px #56bc8722; }
.terminal-dialog { border-color: #4a6b55; box-shadow: 0 20px 80px #000b, 0 0 30px #60c38c15; }
.terminal-screen { background: repeating-linear-gradient(0deg,#0a140e,#0a140e 3px,#0b170f 4px); }
.terminal-code { height: 116px; font-size: 11px; line-height: 1.5; letter-spacing: 0; color: #81eaa4; white-space: pre; }
.terminal-bottom progress::-webkit-progress-value { background: linear-gradient(90deg,#429e6c,#9cf5b9); }
@media(max-width:350px) { .game-modes { gap: 5px; } .mode-face { padding: 7px; min-height: 88px; } .mode-face strong { font-size: 12px; } .terminal-code { font-size: 10px; height: 105px; } }

/* V16 — instalação e acabamento, sem efeitos pesados. */
.install-gate { width:min(100%,400px); margin:0 auto; padding:22px; border:1px solid #354840; border-radius:19px; background:#141d19f5; box-shadow:0 18px 65px #0009; }
.dashboard-page .install-gate { margin-top:clamp(20px,12vh,120px); }
.install-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:18px; }
.install-symbol { display:grid; place-items:center; height:48px; width:48px; border:1px solid #427758; border-radius:13px; background:#203e2e; color:#a2efbc; }
.install-symbol svg { width:27px;height:27px; }
.install-tag { font-size:10px; letter-spacing:.07em; color:#a9c6b3; font-weight:600; }
.install-gate h1 { font-size:23px; letter-spacing:-.04em; line-height:1.15; margin:0 0 9px; }
.install-gate p { font-size:13px; color:#b4c5bc; line-height:1.55; margin:0; }
.install-steps { display:grid; gap:9px; margin:19px 0; }
.install-platform { display:flex; gap:12px; padding:12px; border:1px solid #34423b; background:#101713; border-radius:12px; align-items:flex-start; }
.platform-icon { display:grid;place-items:center;width:34px;height:34px;border-radius:9px;flex:none; }
.platform-icon svg { width:19px;height:19px; }
.ios-platform { background:#27384e;color:#a6c4ff; }
.android-platform { background:#213e2b;color:#9ee4b1; }
.install-platform strong { display:block;font-size:13px;margin-bottom:3px; }
.install-platform p { font-size:12px; }
.install-action { display:flex; justify-content:space-between; align-items:center; width:100%; min-height:46px; border:0; border-radius:10px; background:#98e5b7; color:#112a1d; font-weight:650; padding:0 14px; margin-bottom:13px; }
.install-foot { border-top:1px solid #334039; padding-top:13px; color:#a4b9ad; font-size:12px; line-height:1.5; }
.dashboard-page { --line:#303b3d; --muted:#aab8be; background:radial-gradient(ellipse at 15% 0%,#1c3032 0%,#0b1215 60%); }
.dashboard-page .matrix-rain { opacity:.52; }
.dashboard-page .device-card { background:linear-gradient(150deg,#202a2cf7,#151e20fa 65%); border-radius:16px; }
.dashboard-page .brand-icon { color:#9be7bf;background:#224237;border:1px solid #3c6652; }
.dashboard-page .brand-icon, .dashboard-page .phone-symbol, .dashboard-page .goal-icon { border-radius:11px; }
.dashboard-page .stat-tile { background:#192324f5;border-color:#344244;border-radius:11px; }
.dashboard-page .stat-tile .tile-icon { width:29px;height:29px; border-radius:8px; }
.dashboard-page .stat-tile { grid-template-columns:29px minmax(0,1fr); }
.dashboard-page .mode-face { background:#131c1e;border-color:#38464a; border-radius:12px; min-height:91px; }
.dashboard-page .mode-face svg { width:27px;height:27px;padding:4px;border-radius:7px;background:#ffffff0b; }
.dashboard-page .mode-option input:checked + .mode-face { background:#243739; border-color:var(--mode-color); box-shadow:0 4px 12px #0004,inset 0 0 0 1px var(--mode-color); }
.dashboard-page .goal-row { transition:background .18s; border-color:#303b3d; }
.dashboard-page .goal-row:has(input:checked) .goal-icon { box-shadow:0 0 12px #81c7a018; }
.dashboard-page .sensitivity-note { border-color:#6a5636; background:#2b2419f5; }
#check-button { display:flex; align-items:center; justify-content:center; gap:9px; }
#check-button svg { width:19px; height:19px; }
@media(max-width:500px) { .dashboard-page .stat-tile { grid-template-columns:minmax(0,1fr); } .dashboard-page .stat-tile .tile-icon { width:25px;height:25px; } .install-gate { padding:18px; } }
@media(prefers-reduced-motion:reduce) { .dashboard-page .stat-tile,.dashboard-page .connection i,.dashboard-device::before { animation:none !important; } }

/* V17 — design system: compact, native-like controls and consistent SVGs. */
:root {
  --bg:#0d1015; --surface:#151a22; --line:#29313d; --text:#f3f5fa;
  --muted:#aab4c4; --green:#71dfab; --blue:#95b9ff; --amber:#f2c37d;
  -webkit-font-smoothing:antialiased;
}
.dashboard-page { --line:#2b3441; --muted:#aab4c4; background:radial-gradient(ellipse at 12% 0%,#1a2a30 0%,transparent 42%),#0d1015; }
.dashboard-page .matrix-rain { opacity:.32; mask-image:linear-gradient(#000 0%,#000 65%,transparent); }
.dashboard-shell { max-width:1000px; }
.dashboard-top { padding:9px 0 17px; border-color:#28313a; }
.dashboard-brand { gap:11px; }
.dashboard-brand strong { font-size:15px; letter-spacing:-.02em; }
.eyebrow { color:#aab4c4; font-size:11px; letter-spacing:.01em; }
.dashboard-page .brand-icon { width:42px;height:42px;border-radius:12px;background:#18362b;border:1px solid #325341;color:#87e5b4; }
.dashboard-exit { border-radius:10px; background:#171c24; border-color:#303947; color:#b8c2d1; min-height:40px; }
.dashboard-intro { padding:23px 0 17px; }
.dashboard-intro h1 { font-size:clamp(23px,3vw,30px); font-weight:700; letter-spacing:-.045em; }
.dashboard-intro p { font-size:13px; color:var(--muted); }
.connection { border:1px solid #315143; border-radius:20px; padding:6px 9px; background:#14281f; font-size:11px; font-weight:600; }
.dashboard-stats { gap:8px; margin-bottom:13px; }
.dashboard-page .stat-tile { background:#171d26; border:1px solid #2c3543; border-radius:12px; padding:12px; grid-template-columns:34px minmax(0,1fr); column-gap:10px; box-shadow:0 4px 12px #0002; animation:stat-float 6s ease-in-out infinite; }
.dashboard-page .stat-tile .tile-icon { width:34px; height:34px; border-radius:9px; margin:0; }
.stat-tile .tile-icon svg { width:19px; height:19px; }
.stat-tile > span { font-size:11px; color:#aab4c4; }
.stat-tile > strong { font-size:13px; font-weight:650; letter-spacing:-.02em; }
.tile-green,.fps-icon { color:#8be5b3; background:#20382d; }
.tile-blue,.phone-symbol { color:#a2c1ff; background:#253651; }
.tile-amber { color:#f0c384; background:#3a3025; }
.hs-icon { color:#cbb3ff; background:#342b4a; }
.dashboard-page .sensitivity-note { background:#231e18; border-color:#463a2a; border-radius:12px; padding:11px 12px; margin-bottom:14px; }
.note-icon { color:#efbe77; }
.sensitivity-note strong { font-size:12px; }
.sensitivity-note p { font-size:12px; line-height:1.5; color:#dbc9ae; }
.dashboard-content { gap:14px; grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); }
.dashboard-page .device-card { background:#151a22f7; border:1px solid #2c3543; border-radius:16px; padding:19px; box-shadow:0 8px 22px #0003; }
.dashboard-device::before { opacity:.7;height:1px; }
.card-heading { gap:12px; margin-bottom:16px; }
.card-heading h2 { font-size:18px; font-weight:680; letter-spacing:-.035em; }
.dashboard-page .phone-symbol,.security-card .tile-icon { width:43px;height:43px;border-radius:12px; }
.dashboard-page .phone-symbol svg,.security-card .tile-icon svg { width:23px;height:23px; }
.device-data { gap:8px; padding:0 0 15px; }
.device-data > div { padding:10px 12px; border:1px solid #2a3440; border-radius:10px; background:#11161d; }
.device-data span { font-size:11px; }
.device-data strong { font-size:13px; }
.goal-panel { padding-top:15px; margin-bottom:15px; }
.goal-heading { justify-content:space-between; align-items:center; margin-bottom:9px; }
.goal-heading strong { font-size:14px; font-weight:650; }
.game-modes { gap:8px; margin:0 0 18px; }
.dashboard-page .mode-face { position:relative; background:#11161d; border:1px solid #303947; border-radius:11px; padding:11px; min-height:105px; gap:4px; transform:none; }
.dashboard-page .mode-face svg { width:34px; height:34px; padding:7px; border-radius:9px; background:#20382d; color:var(--mode-color); margin:0 0 3px; }
.mode-option:nth-child(2) .mode-face svg { background:#253651; }
.mode-option:nth-child(3) .mode-face svg { background:#3a3025; }
.mode-face strong { font-size:13px; font-weight:650; }
.mode-face small { font-size:10px; }
.dashboard-page .mode-option input:checked + .mode-face { border-color:var(--mode-color); background:#1a262a; transform:translateY(-2px); box-shadow:0 4px 10px #0003; }
.dashboard-page .mode-option input:checked + .mode-face::after { content:'✓'; display:grid; place-items:center; width:17px;height:17px; border-radius:50%; top:8px;right:8px; color:#101820;background:var(--mode-color);font-size:11px;font-weight:750; }
.settings-heading { margin-bottom:5px; }
.dashboard-page .goal-row { padding:11px 0; min-height:63px; gap:11px; border-color:#29313d; }
.dashboard-page .goal-icon { width:39px;height:39px;border-radius:10px; }
.goal-icon svg { width:22px;height:22px; }
.goal-copy strong { font-size:14px; }
.goal-copy small { font-size:11px; line-height:1.4; }
.goal-toggle { width:45px;height:27px;background:#363e4b;border-color:#485365; }
.goal-toggle::before { top:3px;left:3px;width:19px;height:19px;box-shadow:0 1px 3px #0005; }
.goal-toggle:checked { background:#62cf99;border-color:#62cf99; }
.goal-toggle:checked::before { transform:translateX(18px); }
.dashboard-page .primary-action,.dashboard-page #check-button { border-radius:10px; min-height:48px; background:#83dfad; color:#10251b; font-size:14px; box-shadow:0 3px 12px #69d79e1c; }
.dashboard-page .primary-action:hover:not(:disabled),.dashboard-page #check-button:hover:not(:disabled) { background:#a0eac0; }
.dashboard-page .action-hint { color:#aab4c4; font-size:11px; margin-top:9px; }
.device-card select { background:#11161d;border-color:#364253;border-radius:10px; }
.security-row { padding:13px 0; font-size:12px; }
.security-row strong { font-size:12px; }
.security-card p { line-height:1.6; }
.dashboard-footer { margin:17px 0 0; color:#a0aab9; }
.minimal-access { background:radial-gradient(ellipse at 50% 40%,#14271f 0%,#0b1011 52%,#0b1011 100%); }
.access-form { border-radius:14px; padding:6px; background:#151c22; border-color:#34444b; box-shadow:0 12px 32px #0005; }
.key-row input { height:48px; padding:0 13px; }
.key-row button { border-radius:10px; background:#83dfad; }
.install-gate { background:#151a22; border-color:#303a48; border-radius:18px; padding:23px; }
.install-symbol { background:#20382d;border-color:#365644;color:#87e5b4; }
.install-tag { color:#aab4c4; }
.install-gate h1 { font-size:24px; font-weight:700; }
.install-gate p { color:#aab4c4; }
.install-platform { background:#11161d; border-color:#2b3543; border-radius:11px; }
.platform-icon { width:38px;height:38px;border-radius:10px; }
.platform-icon svg { width:21px;height:21px; }
.install-foot { border-color:#2b3543;color:#aab4c4; }
.terminal-dialog { border-color:#344b3e; border-radius:16px; background:#121b17; }
.terminal-top { padding:15px 17px; }
.terminal-mark { width:39px;height:39px;border-radius:10px; }
.terminal-screen { padding:15px 17px; }
.terminal-code { font-size:11px; line-height:1.55; height:120px; }
.ios-banner { background:#202833f7;border-color:#3b4657; border-radius:16px; box-shadow:0 8px 25px #0006; }
.banner-symbol { background:#203d32;color:#a1eac3; }
/* Small-screen layout; prevent long device names and dates from overflowing. */
@media(max-width:720px) {
 .dashboard-page { padding-left:max(15px,env(safe-area-inset-left));padding-right:max(15px,env(safe-area-inset-right)); }
 .dashboard-content { grid-template-columns:minmax(0,1fr);gap:12px; }
 .dashboard-top { padding:3px 0 13px; }
 .dashboard-intro { padding:19px 0 15px; }
 .dashboard-page .device-card { padding:15px; }
 .dashboard-page .stat-tile { grid-template-columns:minmax(0,1fr);padding:9px;gap:4px; }
 .dashboard-page .stat-tile .tile-icon { width:28px;height:28px;border-radius:8px;grid-row:auto; }
 .stat-tile .tile-icon svg { width:16px;height:16px; }
 .stat-tile > strong { font-size:12px; }
 .stat-tile > span { font-size:10px; }
 .dashboard-page .mode-face { min-height:99px;padding:9px; }
 .install-gate { padding:19px; }
}
@media(max-width:350px) {
 .dashboard-page { padding-left:11px;padding-right:11px; }
 .dashboard-intro h1 { flex-basis:100%; }
 .dashboard-page .device-card { padding:12px; }
 .dashboard-page .stat-tile { padding:7px; }
 .game-modes { gap:6px; }
 .dashboard-page .mode-face { padding:7px; min-height:94px; }
 .mode-face strong { font-size:12px; }
 .mode-face small { font-size:9px; }
 .terminal-code { font-size:10px; }
}
@media(prefers-reduced-motion:reduce) { .dashboard-page .stat-tile,.dashboard-page .connection i,.dashboard-device::before { animation:none!important; } }

/* V18 — vermelho e grafite; verde reservado a status e terminal. */
:root { --bg:#111013; --surface:#1b191d; --line:#373039; --muted:#b6aeb7; --accent:#ef4055; }
.dashboard-page { --line:#373039; --muted:#b6aeb7; background:radial-gradient(ellipse at 15% 0%,#36151e 0%,transparent 43%),#111013; }
.minimal-access { background:radial-gradient(ellipse at 50% 40%,#35151e 0%,#111013 65%); }
.matrix-col { color:#ed5265; opacity:.32; }
.matrix-col:nth-child(4n) { color:#f4c1c9; opacity:.23; }
.dashboard-page .dashboard-top { border-color:#382d35; }
.dashboard-page .brand-icon,.dashboard-page .phone-symbol,.install-symbol { color:#ff8997; background:#41212b; border:1px solid #67323d; }
.dashboard-page .stat-tile,.dashboard-page .device-card { background:#1c191e; border-color:#39313a; box-shadow:0 6px 20px #0003; }
.dashboard-device::before { background:linear-gradient(90deg,transparent,#ff5269,#b33149,transparent); background-size:200% 100%; }
.dashboard-page .mode-face,.device-data > div,.device-card select,.install-platform { background:#151317; border-color:#3b333b; }
.mode-option { --mode-color:#ff7c8d!important; }
.dashboard-page .mode-face svg,.mode-option:nth-child(2) .mode-face svg,.mode-option:nth-child(3) .mode-face svg { color:#ff8c9a; background:#3b222b; }
.dashboard-page .mode-option input:checked + .mode-face { background:#36212a; border-color:#f16679; box-shadow:0 3px 13px #ec40551c; }
.dashboard-page .mode-option input:checked + .mode-face::after { background:#f66b7d; color:#22131a; }
.dashboard-page .goal-row { border-color:#3a3039; }
.goal-toggle:checked { background:#dc354d; border-color:#dc354d; }
.dashboard-page .primary-action,.dashboard-page #check-button,.key-row button { background:#ce2941; color:#fff; box-shadow:0 4px 14px #bd294333; }
.dashboard-page .primary-action:hover:not(:disabled),.dashboard-page #check-button:hover:not(:disabled),.key-row button:hover { background:#b91f36; }
.access-form,.install-gate { background:#1c191e; border-color:#49343e; }
.install-foot { border-color:#3b333b; }
:focus-visible { outline:2px solid #ff8493; outline-offset:3px; }
