:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --fg: #12181c;
  --muted: #5c6b74;
  --faint: #8b979e;
  --line: #e8ecef;
  --accent: #0f766e;
  --accent-soft: #e6f4f2;
  --accent-fg: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #dc2626;
  --radius: 18px;
  --bar: 56px;
  --tabs: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Plus Jakarta Sans", "Noto Sans Devanagari", system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }

.app {
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
}

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: calc(var(--bar) + var(--safe-t));
  padding: var(--safe-t) 16px 0 12px;
  background: var(--surface);
  color: var(--fg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 8;
}
.top h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  flex: 1;
  letter-spacing: -0.03em;
}
.back {
  width: 44px; height: 44px; border-radius: 22px;
  display: grid; place-items: center;
}
.back:active { background: var(--bg); }
.logo {
  width: 36px; height: 36px; border-radius: 12px;
  background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.chip {
  font-size: 11px; font-weight: 650; padding: 5px 9px; border-radius: 999px;
  background: var(--bg); color: var(--muted);
}
.chip.ok { background: #dcfce7; color: var(--ok); }
.chip.danger { background: #fee2e2; color: var(--danger); }

.main {
  flex: 1;
  padding: 16px 16px calc(var(--tabs) + var(--safe-b) + 16px);
}

.hero {
  background: var(--accent);
  color: var(--accent-fg);
  border-radius: 24px;
  padding: 22px 18px;
}
.hero .muted { color: rgb(255 255 255 / 0.75); font-size: 13px; }
.hero .big { font-size: 36px; font-weight: 800; margin: 4px 0 0; letter-spacing: -0.04em; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
}
.card .k { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.card .v { font-size: 22px; font-weight: 800; margin-top: 6px; letter-spacing: -0.03em; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface); border-radius: 16px; padding: 12px 14px;
}
.row:active { background: #eef1f3; }
.thumb {
  width: 48px; height: 48px; border-radius: 14px; object-fit: cover; background: var(--line); flex-shrink: 0;
}
.thumb.sm { width: 40px; height: 40px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); font-size: 13px; }
.faint { color: var(--faint); font-size: 12px; }
.fg { font-weight: 650; }

.tabs {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(100%, 480px);
  display: grid;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 8px 8px calc(8px + var(--safe-b));
  z-index: 9;
}
.tabs a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; color: var(--muted); padding: 4px 0;
  font-weight: 600;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.on { color: var(--accent); }
.tabs a.on svg {
  background: var(--accent-soft);
  border-radius: 14px;
  padding: 4px;
  box-sizing: content-box;
}

.badge {
  display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-weight: 650;
}
.badge.warn { background: #ffedd5; color: var(--warn); }
.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.danger { background: #fee2e2; color: var(--danger); }
.btn {
  display: inline-flex; justify-content: center; align-items: center;
  width: 100%; border: 0; border-radius: 999px; padding: 14px;
  background: var(--accent); color: var(--accent-fg); font-weight: 700;
}
.btn:active { opacity: 0.9; }
.btn.ghost { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.field { display: block; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 600; }
.field input, .field select {
  width: 100%; margin-top: 6px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface); color: var(--fg);
}
.search {
  width: 100%; padding: 13px 16px; border: 0; border-radius: 999px;
  background: var(--surface); margin-bottom: 12px;
}
.keys {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 12px 20px; margin-top: auto; padding: 12px 24px calc(24px + var(--safe-b));
}
.keys button {
  width: 72px; height: 72px; margin: 0 auto; border: 0; border-radius: 50%;
  background: var(--surface); font-size: 26px; font-weight: 500; color: var(--fg);
}
.keys button:active { background: var(--accent-soft); }
.dots { display: flex; justify-content: center; gap: 14px; margin: 28px 0 8px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--accent); }
.danger { color: var(--danger); }
.empty { text-align: center; color: var(--muted); padding: 40px 16px; background: var(--surface); border-radius: var(--radius); }
.h2 { font-size: 12px; font-weight: 700; margin: 20px 0 8px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.switch { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; }
.login-main {
  display: flex; flex-direction: column; flex: 1;
  min-height: 100dvh; padding: calc(20px + var(--safe-t)) 20px 8px;
}
.login-head { display: flex; justify-content: space-between; align-items: center; }
.lock-title { margin: 28px 0 6px; font-size: 32px; font-weight: 800; letter-spacing: -0.04em; }

.types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.types label {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 14px; padding: 12px;
  font-size: 13px; font-weight: 650; border: 2px solid transparent;
}
.types input { accent-color: var(--accent); }
.types label.on { border-color: var(--accent); background: var(--accent-soft); }
.shade {
  background: #1c1c1e;
  border-radius: 22px;
  padding: 14px 12px 16px;
  color: #f5f5f7;
}
.shade .now { font-size: 11px; color: #9a9aa0; margin-bottom: 10px; }
.ncard {
  background: #2c2c2e;
  border-radius: 18px;
  padding: 12px;
  overflow: hidden;
}
.nhead { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #c7c7cc; }
.nicon {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 10px; font-weight: 800;
}
.ntitle { font-size: 15px; font-weight: 700; margin: 8px 0 2px; letter-spacing: -0.02em; }
.nmsg { font-size: 13px; color: #d1d1d6; line-height: 1.35; }
.nimg {
  width: 100%; height: 148px; object-fit: cover; border-radius: 12px;
  margin-top: 10px; background: #3a3a3c; display: block;
}
.ntimer {
  margin-top: 10px; font-variant-numeric: tabular-nums;
  font-weight: 800; font-size: 18px; letter-spacing: 0.04em; color: #ffd60a;
}
.nacts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.nacts span {
  font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  padding: 6px 10px; border-radius: 999px; background: #3a3a3c; color: #fff;
}
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.checks label {
  background: var(--surface); border-radius: 999px; padding: 8px 12px;
  font-size: 12px; font-weight: 650;
}
.upload {
  display: block;
  background: var(--surface);
  border-radius: 16px;
  padding: 14px;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 650;
  border: 1px dashed var(--line);
}
.upload input[type=file] { display: block; margin: 8px 0 4px; width: 100%; }

