/* A telefonos app főképernyője — ugyanaz a vizuális nyelv, mint a csengetés (remote.css) és a
   kijelzők (display.css) oldalaké. */
:root {
  --bg: #F4F5F7; --surface: #FFFFFF; --border: #E2E5EA; --ink: #131826; --muted: #6B7280;
  --accent: #22D3AA; --accent-ink: #04342C; --danger: #C0263B; --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0F131B; --surface: #181D28; --border: #2A3140; --ink: #EEF1F6; --muted: #8C95A5; --danger: #F87171; }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; }
body { padding-bottom: env(safe-area-inset-bottom); }
.muted { color: var(--muted); }
.error { color: var(--danger); margin: 0 0 0.6rem; }

.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: calc(0.6rem + env(safe-area-inset-top)) 1rem 0.6rem; background: #131826; color: #fff; }
.brand { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.logo { width: 2.3rem; height: 2.3rem; border-radius: 50%; }
.title { font-weight: 800; font-size: 1.15rem; }
.sub { font-size: 0.72rem; color: #9CA3AF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 65vw; }
.icon-btn { background: none; border: none; color: #fff; font-size: 1.5rem; padding: 0.2rem 0.5rem; cursor: pointer; }
.menu { position: fixed; right: 0.6rem; top: calc(3.6rem + env(safe-area-inset-top)); z-index: 10; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); min-width: 220px; overflow: hidden; }
.menu-user { padding: 0.8rem 1rem; font-weight: 700; border-bottom: 1px solid var(--border); }
.menu-item { display: block; width: 100%; text-align: left; padding: 0.85rem 1rem; background: none; border: none; color: var(--ink); font: inherit; cursor: pointer; }
.menu-item.danger { color: var(--danger); }

.wrap { padding: 1rem; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: 0.85rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem; }
.card h1 { margin: 0 0 0.3rem; font-size: 1.4rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.7rem; }
label.check { flex-direction: row; align-items: center; font-weight: 500; }
input, select { font: inherit; font-size: 16px; padding: 0.7rem 0.75rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); width: 100%; }
label.check input { width: auto; }
.btn { font: inherit; font-weight: 700; padding: 0.85rem; border-radius: 12px; border: none; cursor: pointer; min-height: 52px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.wide { width: 100%; }

.greeting { margin: 0.2rem 0 0; font-size: 1.25rem; font-weight: 800; }
.alert { background: #DC2626; color: #fff; border-radius: 14px; padding: 0.8rem 1rem; font-weight: 600; font-size: 0.92rem; line-height: 1.4; }

.tile {
  display: flex; align-items: center; gap: 1rem; padding: 1.2rem 1.1rem; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 4px 14px rgba(0,0,0,0.06); min-height: 104px;
}
.tile:active { transform: scale(0.98); }
.tile-ico { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 16px; font-size: 1.9rem; flex-shrink: 0; }
.tile-bell .tile-ico { background: #FEF3C7; }
.tile-display .tile-ico { background: #CCFBF1; }
.tile-admin .tile-ico { background: #E0E7FF; }
.tile-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1; }
.tile-title { font-size: 1.25rem; font-weight: 800; }
.tile-status { font-size: 0.85rem; color: var(--muted); line-height: 1.35; }
.tile-status b { font-weight: 800; }
.chev { font-size: 2rem; color: var(--muted); line-height: 1; }
.good { color: #10B981; }
.bad { color: #EF4444; }
.warn { color: #D97706; }
