/* iCat — full-screen mobile PWA. Dark, teal accent. Ported from the mockup. */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0f0f1a;
  --teal: #5de0d8;
  --teal-d: #3bbdb5;
  --red: #ff6b6b;
  --yellow: #ffc83c;
  --purple: #b27cff;
  --green: #64d278;
  --card: rgba(255,255,255,0.04);
  --card-bd: rgba(255,255,255,0.07);
  --muted: #777;
}
html, body { height: 100%; }
body {
  background: var(--bg);
  color: #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overscroll-behavior-y: none;
  -webkit-font-smoothing: antialiased;
}
#root { min-height: 100%; }

.app {
  max-width: 520px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column;
  padding-top: env(safe-area-inset-top);
}
.content {
  flex: 1; overflow-y: auto; padding: 14px 14px 96px;
  scrollbar-width: none;
}
.content::-webkit-scrollbar { display: none; }

.app-header { display: flex; justify-content: space-between; align-items: center; padding: 6px 0 14px; }
.app-logo { font-size: 24px; font-weight: 900; color: var(--teal); letter-spacing: -1px; }
.app-logo span { color: #fff; }
.hdr-sub { font-size: 12px; color: var(--muted); }

.card {
  background: var(--card); border: 1px solid var(--card-bd);
  border-radius: 18px; padding: 14px; margin-bottom: 10px;
}
.section-title { font-size: 10px; font-weight: 800; color: #555; text-transform: uppercase; letter-spacing: 1.5px; margin: 18px 0 8px; }
.s-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; margin-bottom: 6px; }
.muted { color: var(--muted); }
.row { display: flex; justify-content: space-between; align-items: center; }

.day-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-normal { background: rgba(93,224,216,0.15); color: var(--teal); border: 1px solid rgba(93,224,216,0.4); }
.badge-school { background: rgba(255,200,60,0.15); color: var(--yellow); border: 1px solid rgba(255,200,60,0.4); }
.badge-hobby  { background: rgba(178,124,255,0.15); color: var(--purple); border: 1px solid rgba(178,124,255,0.4); }
.badge-gaming { background: rgba(100,210,120,0.15); color: var(--green); border: 1px solid rgba(100,210,120,0.4); }

.status-card { background: linear-gradient(140deg, rgba(93,224,216,0.12), rgba(93,224,216,0.04)); border: 1px solid rgba(93,224,216,0.25); border-radius: 20px; padding: 18px; margin-bottom: 10px; text-align: center; }
.s-main { font-size: 18px; font-weight: 800; color: var(--teal); margin-bottom: 4px; }
.s-sub { font-size: 12px; color: #999; }
.countdown { font-size: 38px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; margin: 8px 0 4px; letter-spacing: -1px; }
.credit-number { font-size: 48px; font-weight: 900; color: var(--teal); line-height: 1; }
.timer-time { font-size: 64px; font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; letter-spacing: -3px; }

.progress-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg,var(--teal),var(--teal-d)); transition: width .4s; }

.btn { width: 100%; padding: 14px; border-radius: 14px; border: none; font-size: 15px; font-weight: 800; cursor: pointer; transition: opacity .15s; }
.btn:active { opacity: .8; }
.btn-start { background: linear-gradient(135deg,var(--teal),var(--teal-d)); color: var(--bg); }
.btn-stop { background: linear-gradient(135deg,var(--red),#e05555); color: #fff; }
.btn-sec { background: rgba(255,255,255,0.07); color: #ccc; border: 1px solid rgba(255,255,255,0.1); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.tl-item { display: flex; gap: 12px; margin-bottom: 11px; align-items: flex-start; }
.tl-item:last-child { margin-bottom: 0; }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.tl-lbl { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.tl-desc { font-size: 13px; color: #e8e8e8; font-weight: 600; }

.list-row { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.list-row:last-child { border-bottom: none; }
.amt-pos { color: var(--teal); font-weight: 800; font-size: 15px; }
.amt-neg { color: var(--red); font-weight: 800; font-size: 15px; }

.redeem-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-bd); border-radius: 13px; margin-bottom: 8px; }
.cost-badge { background: rgba(93,224,216,0.15); color: var(--teal); padding: 4px 9px; border-radius: 7px; font-size: 11px; font-weight: 800; }

.day-tab-bar { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; }
.day-tab-bar::-webkit-scrollbar { display: none; }
.day-tab { padding: 7px 13px; border-radius: 10px; border: 1px solid var(--card-bd); background: none; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.day-tab.active { background: var(--teal); color: var(--bg); border-color: var(--teal); }

.parent-row { display: flex; justify-content: space-between; align-items: center; padding: 12px; background: rgba(255,255,255,0.03); border: 1px solid var(--card-bd); border-radius: 13px; margin-bottom: 7px; gap: 10px; }
.p-name { font-size: 13px; color: #fff; font-weight: 700; }
.p-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.a-btn { padding: 8px 13px; border-radius: 9px; border: none; font-size: 12px; font-weight: 800; cursor: pointer; flex-shrink: 0; }
.a-teal { background: var(--teal); color: var(--bg); }
.a-red { background: rgba(255,107,107,0.2); color: var(--red); border: 1px solid rgba(255,107,107,0.3); }

.pending-card { background: rgba(255,200,60,0.07); border: 1px solid rgba(255,200,60,0.3); border-radius: 14px; padding: 12px; margin-bottom: 8px; }

/* bottom nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto; height: 78px; background: rgba(15,15,28,0.97); backdrop-filter: blur(20px); border-top: 1px solid rgba(255,255,255,0.07); display: flex; align-items: center; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom); }
.nav-btn { display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: #555; font-size: 10px; font-weight: 600; cursor: pointer; padding: 6px 10px; border-radius: 12px; letter-spacing: .3px; }
.nav-btn.active { color: var(--teal); }
.nav-btn svg { width: 22px; height: 22px; }
.nav-badge { position: absolute; transform: translate(14px,-6px); background: var(--red); color: #fff; font-size: 9px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* login + pin */
.center-screen { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; }
.input { width: 100%; padding: 14px; border-radius: 13px; border: 1px solid var(--card-bd); background: rgba(255,255,255,0.05); color: #fff; font-size: 16px; margin-bottom: 10px; }
.input:focus { outline: none; border-color: var(--teal); }
.err { color: var(--red); font-size: 13px; margin: 6px 0; min-height: 18px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 18px 0; }
.pin-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--teal); }
.pin-dot.filled { background: var(--teal); }
.pin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; max-width: 240px; margin: 0 auto; }
.pin-key { padding: 16px; border-radius: 13px; border: 1px solid var(--card-bd); background: rgba(255,255,255,0.04); color: #fff; font-size: 20px; font-weight: 600; cursor: pointer; }
.pin-key:active { background: rgba(93,224,216,0.15); }

.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%); background: #1c2333; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13px; font-weight: 600; border: 1px solid var(--card-bd); z-index: 200; max-width: 90%; text-align: center; }
.toggle { width: 46px; height: 28px; border-radius: 14px; border: none; cursor: pointer; position: relative; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.toggle.on { background: var(--teal); }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on::after { transform: translateX(18px); }
.spinner { text-align: center; color: var(--muted); padding: 40px; }
