/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light;
  --bg: #EEF2F8;
  --group: #FFFFFF;
  --group2: #F2F2F7;
  --line: rgba(60, 60, 67, .16);
  --text: #1C1C1E;
  --muted: #6C6C70;
  --blue: #0071E3;          /* isi tombol: putih di atasnya 4.8:1 */
  --blue-text: #0062C4;     /* teks tautan */
  --green-text: #1E7B37;
  --red: #D70015;
  --orange-text: #9A5B00;
  --topbar: rgba(238, 242, 248, .82);
  /* widget selalu gelap, seperti widget iOS */
  --w-bg: #1C1C1E;
  --w-bg2: #2C2C2E;
  --w-text: #FFFFFF;
  --w-muted: #A1A1A6;
  --i-blue: #0A84FF;
  --i-green: #30D158;
  --i-red: #FF453A;
  --i-orange: #FF9F0A;
  --i-yellow: #FFD60A;
  --i-teal: #40C8E0;
  --i-purple: #BF5AF2;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --font-round: ui-rounded, -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Display", "Inter", system-ui, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --group: #1C1C1E;
  --group2: #2C2C2E;
  --line: rgba(84, 84, 88, .65);
  --text: #F5F5F7;
  --muted: #A1A1A6;
  --blue: #0071E3;
  --blue-text: #4DA3FF;
  --green-text: #30D158;
  --red: #D70015;
  --orange-text: #FFB340;
  --topbar: rgba(0, 0, 0, .78);
  --w-bg: #1C1C1E;
  --w-bg2: #2C2C2E;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
.hidden { display: none !important; }
h1, h2, h3 { margin: 0; letter-spacing: -0.02em; }
h1 { font-size: 34px; font-weight: 800; font-family: var(--font-round); }
h2 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
a { color: var(--blue-text); }
.muted { color: var(--muted); }
.small-text { font-size: 13px; }
.error { color: var(--red); margin-top: 8px; font-size: 14px; }
.error:empty { display: none; }
:root[data-theme="dark"] .error { color: #FF6961; }
svg { width: 1em; height: 1em; }
:focus-visible { outline: 3px solid var(--i-blue); outline-offset: 2px; }

/* ------------------------------------------------------------------ controls */
label { display: block; font-size: 13px; color: var(--muted); margin: 0 0 6px; }
input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 0; border-radius: 12px;
  background: var(--group2); color: var(--text); font: inherit; font-size: 15px;
}
textarea { resize: vertical; font-family: inherit; font-size: 15px; line-height: 1.4; }
#cookieInput { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
#cookieInput::placeholder { font-family: var(--font); }
input::placeholder, textarea::placeholder { color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--group2); color: var(--text); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--blue); color: #FFFFFF; }
.btn.tinted { background: rgba(0, 113, 227, .13); color: var(--blue-text); }
.btn.destructive { background: var(--red); color: #FFFFFF; }
.btn.plain { background: transparent; color: var(--blue-text); padding: 0 8px; }
.btn.destructive-text { color: var(--red); }
:root[data-theme="dark"] .btn.destructive-text { color: #FF6961; }
.btn.dashed { background: transparent; border: 1.5px dashed var(--line); color: var(--muted); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--group); color: var(--text); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.icon-btn svg { width: 19px; height: 19px; }

/* iOS switch */
input.switch { appearance: none; -webkit-appearance: none; flex: 0 0 51px; width: 51px; height: 31px; border-radius: 99px; background: rgba(120, 120, 128, .32); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
input.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 3px 8px rgba(0, 0, 0, .15), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .2s; }
input.switch:checked { background: #34C759; }
input.switch:checked::before { transform: translateX(20px); }

.segmented { display: inline-flex; padding: 2px; border-radius: 10px; background: rgba(120, 120, 128, .16); }
.segmented button { min-width: 44px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--group); box-shadow: 0 3px 8px rgba(0, 0, 0, .12); }

.row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.spacer { flex: 1; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; background: var(--group); font-size: 13px; font-weight: 600; }
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: #34C759; }
.pill.busy::before { background: var(--i-orange); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: var(--group2); color: var(--muted); white-space: nowrap; }
.badge:empty { display: none; }
.badge.success { background: rgba(52, 199, 89, .16); color: var(--green-text); }
.badge.partial, .badge.cancelled { background: rgba(255, 159, 10, .18); color: var(--orange-text); }
.badge.failed, .badge.missed { background: rgba(255, 59, 48, .14); color: var(--red); }
:root[data-theme="dark"] .badge.failed, :root[data-theme="dark"] .badge.missed { color: #FF6961; }
.badge.running { background: rgba(0, 113, 227, .14); color: var(--blue-text); }

/* ------------------------------------------------------------------ top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--topbar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 10px 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-family: var(--font-round); }
.app-icon { width: 54px; height: 54px; border-radius: 14px; background: #1C1C1E; color: #FF6A00; display: inline-flex; align-items: center; justify-content: center; }
.app-icon svg { width: 60%; height: 60%; }
.app-icon.small { width: 32px; height: 32px; border-radius: 9px; }

.tabs { display: flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(120, 120, 128, .14); }
.tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.tabs button svg { width: 17px; height: 17px; }
.tabs button.active { background: var(--group); color: var(--text); box-shadow: 0 3px 8px rgba(0, 0, 0, .1); }

.acct-pill { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 4px 12px 4px 4px; min-height: 44px; border: 0; border-radius: 99px; background: var(--group); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; }
.acct-pill .pill-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-pill .caret { width: 14px; height: 14px; color: var(--muted); transform: rotate(90deg); flex: none; }
.acct-pill[aria-expanded="true"] .caret { transform: rotate(-90deg); }
.avatar.user { background: var(--group2) !important; color: var(--text) !important; }
.avatar.user svg { width: 18px; height: 18px; }
.acct-pill .avatar { width: 32px; height: 32px; border-radius: 50%; background: #FF6A00; color: #1C1C1E; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; }

main { max-width: 1440px; margin: 0 auto; padding: 28px 24px 64px; }
section { display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 2px; }

/* ------------------------------------------------------------------ widgets */
.widgets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(176px, auto); gap: 18px; grid-auto-flow: dense; }
.widget { position: relative; overflow: hidden; border-radius: 26px; padding: 18px; background: var(--w-bg); color: var(--w-text); display: flex; flex-direction: column; gap: 10px; text-decoration: none; box-shadow: 0 10px 30px rgba(15, 23, 42, .08); }
:root[data-theme="dark"] .widget { box-shadow: none; }
.widget.link { transition: transform .15s ease; }
.widget.link:hover { transform: translateY(-2px); }
.w-2x2 { grid-column: span 2; grid-row: span 2; }
.w-2x1 { grid-column: span 2; }
.w-1x1 { grid-column: span 1; }
.w-head { display: flex; align-items: center; gap: 9px; }
.w-head.between { justify-content: space-between; }
.w-head h2 { font-size: 16px; color: var(--w-text); }
.w-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--w-bg2); color: var(--w-text); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 30px; }
.w-icon svg { width: 17px; height: 17px; }
.w-icon.blue { background: var(--i-blue); }
.w-icon.green { background: var(--i-green); color: #0B3D1A; }
.w-icon.red { background: var(--i-red); }
.w-icon.orange { background: transparent; color: var(--i-orange); }
.w-icon.orange svg { width: 26px; height: 26px; }
.w-icon.teal { background: var(--i-teal); color: #062A33; }
.w-icon.purple { background: var(--i-purple); }
.w-value { margin-top: auto; font-family: var(--font-round); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.w-sub { color: var(--w-muted); font-size: 13px; }
.w-stat { color: var(--w-muted); font-size: 14px; font-weight: 600; }

.widget input[type=text] { background: var(--w-bg2); color: var(--w-text); }
.widget input::placeholder { color: var(--w-muted); }
.widget .btn.tinted { background: rgba(10, 132, 255, .22); color: #64B5FF; }
.widget .error { color: #FF6961; }

/* Next schedule */
.next-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; }
.big-time { font-family: var(--font-round); font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.next-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.next-actions .row { margin-top: 10px; }
.ring { width: 132px; height: 132px; flex: 0 0 auto; }
.ring.small { width: 92px; height: 92px; }
.ring-bg { stroke: var(--w-bg2); }
.ring-fg { transition: stroke-dashoffset .6s ease; }
.ring-fg.blue { stroke: var(--i-blue); }
.ring-fg.green { stroke: var(--i-green); }
.ring-text { fill: var(--w-text); font-family: var(--font-round); font-size: 30px; font-weight: 800; }

/* Streak */
.widget.yellow { background: var(--i-yellow); color: #1C1C1E; }
.streak-num { font-family: var(--font-round); font-size: 56px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; position: relative; z-index: 1; }
.streak-label { font-size: 15px; font-weight: 600; position: relative; z-index: 1; }
.streak-flame { position: absolute; right: -14px; bottom: -16px; width: 118px; height: 118px; color: #FF5E1A; filter: drop-shadow(0 0 0 #fff); }

/* Goal */
.goal-body { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: 1; }
.goal-stats { display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.goal-stats span { display: inline-flex; align-items: center; gap: 7px; }
.goal-stats svg { width: 17px; height: 17px; color: var(--i-blue); }

/* Week */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-top: auto; }
.day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 8px; border-radius: 12px; background: var(--w-bg2); border: 1.5px solid transparent; }
.day .lbl { font-size: 13px; color: var(--w-muted); }
.day.today { border-color: var(--i-blue); background: #0B2747; }
.day.today .lbl { color: var(--w-text); font-weight: 600; }
.day.today::after { content: ""; position: absolute; bottom: -9px; width: 22px; height: 3px; border-radius: 3px; background: var(--i-blue); }
.dot { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.dot svg { width: 15px; height: 15px; }
.dot.success { background: var(--i-green); color: #0B3D1A; }
.dot.partial { background: transparent; color: var(--i-orange); }
.dot.partial svg { width: 20px; height: 20px; }
.dot.failed { background: var(--i-red); color: #FFFFFF; }
.dot.none { border: 4px solid #48484A; }
.dot.rest { color: #636366; font-size: 11px; font-weight: 800; }
.dot.ring-day { background: conic-gradient(var(--i-blue) var(--p, 0%), #3A3A3C 0); }
.dot.ring-day::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #0B2747; }

/* ------------------------------------------------------------------ groups & lists */
.group { background: var(--group); border-radius: 22px; padding: 20px; }
.group > h2 { margin-bottom: 12px; }
.group-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.group label + input, .group label + textarea { margin-bottom: 12px; }
details.group summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
details.group summary::-webkit-details-marker { display: none; }
details.group .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
details.group[open] .chev { transform: rotate(90deg); }
details.group[open] summary { margin-bottom: 14px; }

.two-col { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.two-col.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.two-col.wide-left { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }

.inset-list { list-style: none; margin: 0; padding: 0; background: var(--group); border-radius: 18px; overflow: hidden; }
.inset-list > * { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; position: relative; }
.inset-list > * + *::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line); }
.inset-list .grow { flex: 1; min-width: 0; }
.inset-list .title { font-weight: 600; }
.inset-list .meta { color: var(--muted); font-size: 13px; }
.inset-list .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; background: var(--group2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex: 0 0 38px; }
.avatar-sm.on { background: #FF6A00; color: #1C1C1E; }

.settings { display: flex; flex-direction: column; gap: 6px; max-width: 760px; }
.list-title { font-size: 13px; font-weight: 600; color: var(--muted); text-transform: none; margin: 16px 16px 4px; letter-spacing: 0; }
.list-foot { color: var(--muted); font-size: 13px; margin: 2px 16px 6px; }
.inset-list.form .cell { display: block; padding: 12px 16px; }
.inset-list.form .cell label { margin-bottom: 6px; }
.inset-list.form .switch-cell { display: flex; align-items: center; justify-content: space-between; margin: 0; font-size: 15px; color: var(--text); cursor: pointer; }

.savebar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; padding: 12px 14px 12px 18px; border-radius: 18px; background: var(--group); }
.savebar > span { flex: 1; min-width: 180px; font-size: 14px; }

/* Today timeline */
.slot { border-radius: 18px; background: var(--group2); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.slot-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.slot-time { font-family: var(--font-round); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-right: 8px; }
.crow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--group); }
.crow .name { font-weight: 600; }
.crow .detail { color: var(--muted); font-size: 13px; flex: 1; min-width: 140px; }
.crow .time { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.sdot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 22px; background: rgba(120, 120, 128, .2); color: var(--muted); }
.sdot svg { width: 12px; height: 12px; }
.sdot.success { background: #34C759; color: #0B3D1A; }
.sdot.failed { background: #FF3B30; color: #FFFFFF; }
.empty { color: var(--muted); padding: 6px 2px; }

/* Log */
.log { background: #0B0B0C; color: #E5E5EA; padding: 14px; border-radius: 14px; height: 300px; overflow: auto; margin: 0; font: 12.5px/1.7 ui-monospace, "SF Mono", Menlo, monospace; white-space: pre-wrap; }
.log .warning { color: #FFD60A; } .log .error { color: #FF6961; } .log .debug { opacity: .6; }
.proofs { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 12px; }
.proofs figure { margin: 0; }
.proofs img { width: 100%; border-radius: 12px; cursor: zoom-in; }
.proofs figcaption { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.shot { display: block; width: 100%; height: auto; margin-top: 12px; border-radius: 14px; cursor: zoom-in; flex: none; }

/* Lightbox */
.log-empty { color: #8E8E93; }
.proof-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; }
.lightbox { position: fixed; inset: 0; z-index: 40; display: flex; flex-direction: column; background: rgba(0, 0, 0, .78); backdrop-filter: blur(24px) saturate(160%); -webkit-backdrop-filter: blur(24px) saturate(160%); }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; color: #FFFFFF; }
.lb-caption { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 16px; border: 0; border-radius: 22px; background: rgba(255, 255, 255, .16); color: #FFFFFF; font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.lb-btn:hover { background: rgba(255, 255, 255, .26); }
.lb-close { padding: 0; width: 44px; }
.lb-close svg { width: 18px; height: 18px; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); overflow: hidden; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; cursor: zoom-in; user-select: none; }
.lb-stage.zoom { overflow: auto; display: block; text-align: center; }
.lb-stage.zoom img { max-width: none; max-height: none; cursor: zoom-out; border-radius: 0; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .16); color: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 1; }
.lb-nav svg { width: 20px; height: 20px; }
.lb-nav.prev { left: 12px; transform: translateY(-50%) scaleX(-1); }
.lb-nav.next { right: 12px; }
.lightbox :focus-visible { outline: 3px solid #FFFFFF; }

/* Table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
th, td { text-align: left; padding: 12px 8px; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
tbody tr { border-top: 1px solid var(--line); cursor: pointer; }
tbody tr:hover { background: var(--group2); }
td.num { font-variant-numeric: tabular-nums; }

/* Schedules editor */
.sched { background: var(--group); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.sched.off { opacity: .6; }
.sched-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.time-pick { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 14px; background: var(--group2); }
.time-pick select { width: auto; min-height: 44px; padding: 0 6px; background: transparent; font-family: var(--font-round); font-size: 28px; font-weight: 800; appearance: none; -webkit-appearance: none; text-align: center; }
.time-pick span { font-size: 26px; font-weight: 800; }
.sched-top .grow { flex: 1; min-width: 120px; }
.sched-top .title { font-weight: 700; font-size: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; margin: 0; border-radius: 99px; background: var(--group2); color: var(--text); font-size: 14px; font-weight: 500; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { background: rgba(0, 113, 227, .14); color: var(--blue-text); font-weight: 600; }
.chip:has(input:focus-visible) { outline: 3px solid var(--i-blue); }
.chip .tick { width: 14px; height: 14px; display: none; }
.chip:has(input:checked) .tick { display: inline; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 4px 2px; font-size: 15px; color: var(--text); cursor: pointer; }
.switch-row:has(input:focus-visible) { outline: 3px solid var(--i-blue); border-radius: 10px; }

/* Cookie */
.banner { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; background: var(--group); }
.banner .b-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: 0 0 40px; }
.banner .b-icon svg { width: 18px; height: 18px; }
.banner.ok .b-icon { background: #34C759; color: #0B3D1A; }
.banner.bad .b-icon { background: #FF3B30; color: #FFFFFF; }
.banner.none .b-icon { background: var(--group2); color: var(--muted); }
.banner .b-title { font-weight: 700; font-size: 16px; }
.banner .b-sub { color: var(--muted); font-size: 13.5px; }
.steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--group2); color: var(--muted); font-size: 14px; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(120, 120, 128, .24); font-weight: 700; font-size: 13px; flex: 0 0 26px; }
.steps li.done { color: var(--green-text); }
.steps li.done .n { background: #34C759; color: #0B3D1A; }
.steps li.now { color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--blue); }
.steps li.now .n { background: var(--blue); color: #FFFFFF; }
.remote-idle { min-height: 220px; border-radius: 18px; background: var(--group2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }
.remote { border-radius: 18px; overflow: hidden; background: var(--group2); }
.remote-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }
.remote-bar .dots { display: flex; gap: 6px; }
.remote-bar .dots i { width: 11px; height: 11px; border-radius: 50%; background: rgba(120, 120, 128, .4); }
.remote-bar .url { flex: 1; padding: 6px 12px; border-radius: 99px; background: var(--group); color: var(--muted); font-size: 12.5px; }
.remote img { display: block; width: 100%; height: auto; background: #000; cursor: pointer; user-select: none; outline: none; }
.remote img:focus-visible { box-shadow: inset 0 0 0 3px var(--i-blue); }
.remote-send { padding: 12px 14px; }
.note { padding: 14px 16px; border-radius: 14px; background: var(--group2); }
.note.warn { background: rgba(255, 159, 10, .16); color: var(--orange-text); }
.note.ok { background: rgba(52, 199, 89, .16); color: var(--green-text); }
.tips { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 8px; }

/* Login */
.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; background: var(--bg); z-index: 20; }
.sheet { background: var(--group); border-radius: 28px; padding: 32px 26px; }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.login-card .sub { color: var(--muted); }
.login-card input { margin-top: 6px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: rgba(28, 28, 30, .92); color: #FFFFFF; padding: 12px 20px; border-radius: 99px; z-index: 50; font-weight: 600; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); max-width: calc(100% - 32px); text-align: center; }

/* dashboard: kartu Hari Ini dan Log sama tinggi */
.dash-cols { align-items: stretch; }
.dash-cols > .group:last-child { display: flex; flex-direction: column; }
.dash-cols .log { flex: 1 1 0; height: auto; min-height: 220px; }

/* top bar satu baris di atas 720px */
@media (min-width: 721px) {
  .topbar-in { flex-wrap: nowrap; }
  .topbar-in > .brand, .topbar-in > .segmented, .topbar-in > .icon-btn, .topbar-in > .acct-pill { flex-shrink: 0; white-space: nowrap; }
  .tabs { flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex-shrink: 0; white-space: nowrap; }
  .topbar-in .spacer { flex: 1 1 0; min-width: 0; }
}

/* tab ringkas: label tab tidak aktif disembunyikan secara visual (tetap terbaca screen reader) */
@media (min-width: 721px) {
  .topbar-in { max-width: 1440px; }
}
.acct-pill { max-width: 100%; }
@media (min-width: 721px) and (max-width: 1479px) {
  .user-pill .pill-name { display: none; }
  .user-pill { padding-right: 4px; }
  .acct-pill .pill-name { max-width: 170px; }
  .tabs button:not(.active) span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs button:not(.active) { padding: 0 12px; }
}
@media (min-width: 721px) and (max-width: 1000px) {
  .brand strong { display: none; }
  .topbar-in { gap: 10px 8px; }
}
@media (min-width: 721px) and (max-width: 880px) {
  .topbar-in { padding: 10px 14px; }
  .acct-pill .pill-name { max-width: 90px; }
  .segmented button { min-width: 34px; padding: 0 8px; }
  .tabs button:not(.active) { padding: 0 9px; }
  .tabs button.active { padding: 0 10px; }
}

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .widgets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .two-col.wide-right, .two-col.wide-left { grid-template-columns: minmax(0, 1fr); }
  .dash-cols .log { flex: none; height: 300px; }
}
@media (max-width: 720px) {
  h1 { font-size: 30px; }
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .topbar-in { padding: 10px 16px; }
  main { padding: 20px 16px 110px; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; border-radius: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--topbar); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); justify-content: space-around; }
  .tabs button { flex: 1; flex-direction: column; gap: 3px; min-height: 52px; padding: 4px 2px; font-size: 10.5px; border-radius: 10px; }
  .tabs button svg { width: 24px; height: 24px; }
  .tabs button.active { background: transparent; box-shadow: none; color: var(--blue-text); }
  .brand strong { display: none; }
  .acct-pill .pill-name { max-width: 120px; }
  .user-pill .pill-name { display: none; }
  .user-pill { padding-right: 4px; }
  .widgets { gap: 12px; grid-auto-rows: minmax(160px, auto); }
  .widget { border-radius: 22px; padding: 14px; }
  .big-time { font-size: 52px; }
  .ring { width: 104px; height: 104px; }
  .ring.small { width: 72px; height: 72px; }
  .streak-num { font-size: 46px; }
  .streak-flame { width: 96px; height: 96px; }
  .w-value { font-size: 21px; }
  .day { padding: 8px 0 6px; }
  .day .lbl { font-size: 11px; }
  .dot { width: 22px; height: 22px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  #accountList > * { flex-wrap: wrap; }
  #accountList .actions { flex-basis: 100%; justify-content: flex-start; padding-left: 50px; }
}
@media (max-width: 400px) {
  .crow .detail { flex-basis: 100%; order: 3; }
  .crow .time { margin-left: auto; }
  .w-2x1 .w-head h2 { font-size: 14px; }
  .next-body { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* page header */
.head-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acct-chip { font-size: 13px; }
.acct-chip .acct-name-text { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chip::before { background: #FF6A00; }

/* kartu di dalam kartu */
.group .inset-list { background: var(--group2); }
.group .sched, .group .savebar { background: var(--group2); }
.group .sched input[type=text], .group .sched .time-pick { background: var(--group); }
.group .sched .chip { background: var(--group); }
.group .sched .chip:has(input:checked) { background: rgba(0, 113, 227, .14); }
.group > .btn.block { margin-top: 4px; }
.group #scheduleList { margin-bottom: 14px; }
.group .group-head + .small-text { margin: -6px 0 14px; }
.group > #btnAddSchedule { margin-bottom: 14px; }
.sched .switch-row { display: flex; align-items: center; justify-content: space-between; }

/* daftar akun / pengguna */
.inset-list .title-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.inset-list .title-line .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.inset-list .meta.line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-btn { width: 40px; height: 40px; flex: 0 0 40px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.more-btn:hover, .more-btn[aria-expanded="true"] { background: var(--group); color: var(--text); }
.group .more-btn:hover, .group .more-btn[aria-expanded="true"] { background: var(--group); }
.more-btn svg { width: 20px; height: 20px; }
.badge.accent { background: rgba(0, 113, 227, .14); color: var(--blue-text); }
.badge.neutral { background: var(--group2); color: var(--muted); }
.group .badge.neutral { background: var(--group); }

/* popover menu */
.menu { position: fixed; z-index: 35; min-width: 240px; max-width: 340px; padding: 6px; border-radius: 18px; background: var(--group); box-shadow: 0 18px 50px rgba(0, 0, 0, .28), 0 0 0 1px var(--line); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 10px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: inherit; font-size: 15px; font-weight: 500; text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--group2); outline: none; }
.menu button:focus-visible { box-shadow: inset 0 0 0 2px var(--i-blue); }
.menu button[disabled] { opacity: .5; cursor: not-allowed; }
.menu button.danger { color: var(--red); }
:root[data-theme="dark"] .menu button.danger { color: #FF6961; }
.menu .m-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .m-reason { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.menu .avatar-sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 13px; }
.menu .dot { width: 9px; height: 9px; border-radius: 50%; background: #8E8E93; flex: none; }
.menu .dot.ok { background: #34C759; } .menu .dot.bad { background: #FF3B30; }
.menu .tick { width: 16px; height: 16px; color: var(--blue-text); flex: none; visibility: hidden; }
.menu button[aria-checked="true"] .tick { visibility: visible; }
.menu hr { border: 0; height: 1px; background: var(--line); margin: 6px 8px; }

/* sheet pengguna */
.overlay { position: fixed; inset: 0; z-index: 36; display: flex; align-items: flex-start; justify-content: flex-end; padding: 72px 24px 24px; background: rgba(0, 0, 0, .35); }
.sheet-card { width: 100%; max-width: 380px; max-height: calc(100vh - 100px); overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.us-head { display: flex; align-items: center; gap: 12px; }
.us-head .grow { flex: 1; min-width: 0; }
.us-head .title { font-weight: 700; font-size: 17px; overflow: hidden; text-overflow: ellipsis; }
.us-head .avatar-sm svg { width: 20px; height: 20px; }
.sheet-card .list-title { margin: 8px 0 0; }
.pw-form { display: flex; flex-direction: column; gap: 10px; }
.pw-form input { margin: 0; }
.pw-form .msg { font-size: 14px; color: var(--muted); }
.pw-form .msg.err { color: var(--red); }
@media (max-width: 720px) {
  .menu { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(76px + env(safe-area-inset-bottom)); max-width: none; width: auto; }
  .overlay { padding: 16px; align-items: flex-end; justify-content: center; }
  .sheet-card { max-width: none; margin-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .inset-list .meta.line { white-space: normal; }
}

/* logo tanpa kotak */
:root { --logo-flame: #FF6A00; --logo-hands: #1C1C1E; --logo-accent: #FF6A00; }
:root[data-theme="dark"] { --logo-flame: #FF8A33; --logo-hands: #FFFFFF; --logo-accent: #FF8A33; }
.logo { width: 28px; height: 28px; flex: none; }
.logo.nosec { --logo-sec-op: 0; }
.logo.big { width: 64px; height: 64px; }

/* panduan cookie manual */
.guide-intro { margin: 0 0 14px; }
.guide { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gstep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--group2); }
.gstep .n { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--blue); color: #FFFFFF; font-weight: 700; font-size: 13px; flex: 0 0 28px; }
.gstep .gtxt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gstep .gtxt .muted { font-size: 13.5px; }
.gstep .btn { flex: none; text-decoration: none; }
details.group .note { margin: 0 0 10px; font-size: 14px; }
details.group textarea { margin-top: 4px; }
.cookie-check { margin: 8px 0 0; font-size: 14px; font-weight: 600; min-height: 1.3em; color: var(--muted); }
.cookie-check.ok { color: var(--green-text); }
.cookie-check.warn { color: var(--orange-text); }
.cookie-check.bad { color: var(--red); }
:root[data-theme="dark"] .cookie-check.bad { color: #FF6961; }
@media (max-width: 720px) {
  .gstep { flex-wrap: wrap; }
  .gstep .gtxt { flex: 1 1 calc(100% - 44px); }
  .gstep .btn { margin-left: 40px; }
}
