:root {
  --bg: #111418;
  --panel: #1b2027;
  --text: #e8ebef;
  --muted: #8a94a3;
  --idle: #3a7bd5;
  --tx: #e53935;
  --rx: #2e9e5b;
  --busy: #f0a020;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.screen {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}
.hidden { display: none !important; }

/* ---------- Login ---------- */
#login-screen { justify-content: center; }
.login-box { width: 100%; max-width: 320px; text-align: center; }
.logo { font-size: 56px; }
h1 { margin: 8px 0 0; }
.sub { color: var(--muted); margin: 4px 0 24px; }
#login-form, .form { display: flex; flex-direction: column; gap: 12px; }
input {
  padding: 14px; font-size: 16px; border-radius: 10px;
  border: 1px solid #2c333d; background: var(--panel); color: var(--text);
}
.sub.small { font-size: 13px; margin-top: 16px; }

/* ---------- Primeiro acesso ---------- */
#senha-screen, #cadastro-screen { justify-content: center; }
.form { text-align: left; user-select: text; -webkit-user-select: text; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--muted); }
.form fieldset { border: 1px solid #2c333d; border-radius: 10px; padding: 10px 12px; margin: 0; }
.form legend { font-size: 14px; color: var(--muted); padding: 0 4px; }
.cnh { display: flex; justify-content: space-between; }
.cnh label { flex-direction: row; align-items: center; gap: 4px; color: var(--text); font-size: 16px; }
.cnh input { width: 20px; height: 20px; padding: 0; }
input[type="date"] { color-scheme: dark; }
#login-form button, .form button {
  padding: 14px; font-size: 16px; font-weight: 600; border: 0;
  border-radius: 10px; background: var(--idle); color: #fff;
}
.error { color: var(--tx); min-height: 1.2em; margin: 0; }

/* ---------- Rádio ---------- */
header {
  width: 100%; max-width: 480px;
  display: flex; justify-content: space-between; align-items: center;
}
.channel { font-size: 13px; letter-spacing: 1px; color: var(--muted); }
.channel strong { color: var(--text); }
.me { font-size: 14px; margin-top: 2px; }
.conn { font-size: 12px; }
.conn.on { color: var(--rx); }
.conn.off { color: var(--tx); }

.status {
  width: 100%; max-width: 480px; margin: 20px 0;
  padding: 16px; border-radius: 14px; text-align: center;
  background: var(--panel); border-left: 6px solid var(--idle);
  transition: border-color .15s, background .15s;
}
#status-title { font-size: 20px; font-weight: 700; }
#status-sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.status.tx   { border-color: var(--tx);   background: #2a1718; }
.status.rx   { border-color: var(--rx);   background: #15261c; }
.status.busy { border-color: var(--busy); background: #2a2214; }

.ptt {
  width: min(70vw, 280px); aspect-ratio: 1; border-radius: 50%;
  border: 6px solid #2c333d; background: var(--idle); color: #fff;
  font-size: 40px; font-weight: 800; letter-spacing: 2px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.4);
  touch-action: none; /* evita rolagem/zoom enquanto segura */
  transition: transform .08s, background .15s;
}
.ptt:disabled { opacity: .4; }
.ptt.pressed { transform: scale(.95); }
.ptt.tx   { background: var(--tx); border-color: #ff8a80; }
.ptt.rx   { background: var(--rx); }
.ptt.busy { background: var(--busy); }
.ptt-timer { font-size: 16px; font-weight: 500; min-height: 1.2em; }

.hint { color: var(--muted); font-size: 13px; }
kbd { background: var(--panel); padding: 2px 6px; border-radius: 4px; border: 1px solid #2c333d; }

.roster { width: 100%; max-width: 480px; margin-top: 10px; background: var(--panel); border-radius: 10px; padding: 10px 14px; }
.roster ul { list-style: none; padding: 0; margin: 8px 0 0; }
.roster li { padding: 6px 0; border-top: 1px solid #262c35; display: flex; justify-content: space-between; }
.roster .role { color: var(--muted); font-size: 12px; text-transform: uppercase; }

.link { margin-top: 16px; background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 14px; }
