:root{
  --primary: #202A43;
  --accent: #D88BA0;
  --bg: #f7f8fa;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --danger: #c0392b;
  --border: #D2D3D5;
}
:root.dark {
  --bg: #0f172a;
  --card: #111827;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border: #374151;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body { font-family: system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial; background: var(--bg); color: var(--text); }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; padding: env(safe-area-inset-top) 16px 8px 16px; background: var(--primary); color: #fff; }
.logo { height: 36px; }
.badge { background: rgba(255,255,255,.15); padding: 6px 10px; border-radius: 100px; font-size: 12px; }
.bottombar { position: sticky; bottom: 0; background: var(--card); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.bottombar nav { display: grid; grid-template-columns: repeat(4, 1fr); }
.bottombar nav button { padding: 12px 8px; background: transparent; border: 0; font-size: 14px; color: var(--muted); }
.bottombar nav button.active { color: var(--primary); font-weight: 700; }
main { padding: 16px; min-height: calc(100vh - 120px); }
.screen { display: none; }
.screen.active { display: block; }
.card { background: var(--card); padding: 16px; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
h1 { margin: 0 0 8px; font-size: 22px; }
h2 { margin: 8px 0; font-size: 18px; }
.muted { color: var(--muted); }
.helper { margin-top: 8px; }
.note { margin-top: 12px; background: rgba(216,139,160,.12); border: 1px dashed #D88BA0; color: var(--text); padding: 8px; border-radius: 8px; }
label { display: block; margin: 8px 0 4px; font-size: 14px; }
input, select { width: 100%; padding: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 10px; outline: none; }
input:focus, select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(32,42,67,.15); }
button { cursor: pointer; border-radius: 10px; }
.btn-primary { background: var(--primary); color: #fff; border: 0; padding: 12px 14px; }
.btn-link { background: transparent; border: 0; color: var(--primary); padding: 8px; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 10px 14px; }
.btn-danger { background: #c0392b; color: #fff; border: 0; padding: 12px 14px; margin-top: 8px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.tile { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.tile h2 { margin: 0 0 6px; font-size: 18px; }
.list { display: grid; gap: 8px; margin-top: 12px; }
.item { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item .meta { display: flex; align-items: center; gap: 12px; }
.item .meta img { width: 40px; height: 40px; border-radius: 100px; border: 1px solid var(--border); }
.item .meta .name { font-weight: 700; }
.item .meta .role { color: var(--muted); font-size: 12px; }
.modal { width: min(480px, 92vw); background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.greet { margin-bottom: 8px; }
.profile { display: grid; gap: 12px; }
.profile .avatar { width: 120px; height: 120px; border-radius: 100%; border: 2px solid var(--border); }
.row { display: flex; align-items: center; gap: 12px; }
.switch { position: relative; display: inline-block; width: 52px; height: 30px; }
.switch input { display:none; }
.switch span { position: absolute; cursor: pointer; background: var(--border); border-radius: 999px; inset: 0; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; border-radius: 50%; top: 3px; right: 3px; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(-22px); }
