/* Agrinesia Portal — tampilan desktop: satu jendela tetap, panel menggulung sendiri-sendiri. */

:root {
  --bg: #FAFBFA;
  --side: #F5F7F5;
  --surface: #FFFFFF;
  --hover: #F0F3F0;
  --line: #E0E5E0;
  --line-soft: #EDF0ED;
  --chrome: #FFFFFF;
  --on-chrome: #12261C;
  --on-chrome-2: #4A5A50;
  --chrome-field: #F0F3F0;
  --chrome-hover: rgba(18, 38, 28, 0.07);
  --chrome-line: #E0E5E0;
  --ink: #12261C;
  --ink-2: #4A5A50;
  --forest: #12261C;
  --forest-2: #1A3327;
  --forest-3: #24402F;
  --on-forest: #F1F4EE;
  --on-forest-2: #B9C7BD;
  --sun: #F2C14E;
  --sun-soft: #FBEFCB;
  --sun-ink: #6B4700;
  --idle: #C3CDC5;
  --accent: #0B8537;
  --brand: #0B8537;
  --hero-1: #3CC477;
  --hero-2: #17A052;
  --hero-3: #0A7836;
  --gold: #D4AC55;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, white);
  --accent-vis: var(--accent);
  --avatar: #12261C;
  --press: rgba(18, 38, 28, 0.07);
  --scroll: #C3CDC5;
  color-scheme: light;
  --ui: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
}

/* Mode gelap: hanya token yang berganti, komponen tidak tahu soal tema. */
:root[data-theme="dark"] {
  --bg: #101713;
  --side: #141C17;
  --surface: #19221D;
  --hover: #212C26;
  --line: #2C3932;
  --line-soft: #232E28;
  --chrome: #0C1410;
  --on-chrome: #F1F4EE;
  --on-chrome-2: #B9C7BD;
  --chrome-field: rgba(255, 255, 255, 0.1);
  --chrome-hover: rgba(255, 255, 255, 0.12);
  --chrome-line: #1E2822;
  --ink: #E8EEE9;
  --ink-2: #A3B2A8;
  --forest: #0C1410;
  --forest-2: #16241C;
  --forest-3: #223629;
  --sun-soft: #3A3014;
  --sun-ink: #F2C14E;
  --idle: #4A584F;
  --brand: #0A6A2D;
  --hero-1: #1F9150;
  --hero-2: #0F7038;
  --hero-3: #074A22;
  --accent-soft: color-mix(in srgb, var(--accent) 30%, #19221D);
  --accent-vis: color-mix(in srgb, var(--accent) 60%, white);
  --avatar: #2B4A3A;
  --press: rgba(232, 238, 233, 0.08);
  --scroll: #3A4840;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: var(--bg); color: var(--ink);
  font: 13px/1.4 var(--ui); user-select: none; cursor: default;
}
h1, h2, h3, p { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
input, textarea { user-select: text; }
svg { flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--accent-vis); outline-offset: 1px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: var(--ink-2); }

.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- Rangka jendela ---------- */

.window { display: grid; grid-template-rows: 38px minmax(0, 1fr) 26px; height: 100vh; }

.titlebar { display: flex; align-items: center; background: var(--chrome); color: var(--on-chrome); border-bottom: 1px solid var(--chrome-line); }
.tb-app img { display: block; }
.tb-app { width: 216px; padding: 0 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; pointer-events: none; }
.tb-search {
  margin: 0 auto; width: min(460px, 42vw); height: 26px; padding: 0 8px; display: flex; align-items: center; gap: 8px;
  border-radius: 6px; background: var(--chrome-field); color: var(--on-chrome-2);
}
button.tb-search { border: 0; font-size: 12px; text-align: left; }
.tb-search:hover { box-shadow: 0 0 0 1px var(--chrome-line); color: var(--on-chrome); }

/* ---------- Pencarian (Ctrl K) ---------- */

.pal-back { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; align-items: flex-start; padding-top: 64px; background: rgba(8, 16, 12, 0.36); }
.pal-back[hidden] { display: none; }
.pal { width: min(640px, 92vw); max-height: min(580px, calc(100vh - 104px)); display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); }
.pal-in { flex: 0 0 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); }
.pal-in input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--ink); }
.pal-in input::placeholder { color: var(--ink-2); }
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; margin-right: 3px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); font-size: 11px; color: var(--ink-2); }
.pal-scopes { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 2px; }
.pal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 8px 10px; }
.pal-label { padding: 10px 8px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.pal-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; text-align: left; }
.pal-item.active { background: var(--accent-soft); }
.pal-ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 8px; background: var(--hover); display: flex; align-items: center; justify-content: center; }
.pal-item.active .pal-ic { background: var(--surface); }
.pal-item .avatar { width: 30px; height: 30px; flex-shrink: 0; }
.pal-text { flex: 1 1 auto; min-width: 0; }
.pal-text b, .pal-text span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pal-text b { font-weight: 600; }
.pal-text span { font-size: 12px; color: var(--ink-2); }
.pal-type { font-size: 11px; color: var(--ink-2); white-space: nowrap; }
.pal mark { background: var(--sun-soft); color: inherit; border-radius: 3px; padding: 0 1px; }
.pal-people { display: flex; gap: 4px; padding: 2px 4px 4px; }
.person { width: 88px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; border-radius: 10px; background: none; font-size: 12px; text-align: center; }
.person .avatar { width: 38px; height: 38px; font-size: 13px; }
.person .avatar.grp { border-radius: 10px; background: var(--forest-3); }
.person.active { background: var(--accent-soft); }
.pal-empty { padding: 28px 16px; text-align: center; color: var(--ink-2); }
.pal-foot { display: flex; align-items: center; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line-soft); font-size: 11px; color: var(--ink-2); }
.kbd { font-size: 11px; padding: 1px 6px; border-radius: 4px; border: 1px solid color-mix(in srgb, currentColor 35%, transparent); white-space: nowrap; }
.tb-ctl { display: flex; margin-left: 0; }
.tb-btn { width: 30px; height: 26px; margin-right: 6px; border: 0; border-radius: 6px; background: none; color: var(--on-chrome); display: flex; align-items: center; justify-content: center; }
.tb-btn:hover { background: var(--chrome-hover); }
.tb-btn span { display: flex; }
:root[data-theme="dark"] .tb-btn .i-moon, :root:not([data-theme="dark"]) .tb-btn .i-sun { display: none; }
.tb-ctl button { width: 46px; height: 37px; border: 0; background: none; color: var(--on-chrome); display: flex; align-items: center; justify-content: center; }
.tb-ctl button:hover { background: var(--chrome-hover); }
.tb-ctl .close:hover { background: #C42B1C; color: #fff; }

.body { display: grid; grid-template-columns: 216px minmax(0, 1fr); min-height: 0; }

.sidebar { display: flex; flex-direction: column; gap: 2px; padding: 8px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.nav-label { padding: 12px 10px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.nav {
  position: relative; display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px;
  border: 0; border-radius: 6px; background: none; text-align: left; width: 100%;
}
.nav:hover { background: var(--press); }
.nav.active { background: var(--press); font-weight: 600; }
.nav.active::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 2px; background: var(--accent-vis); }
.nav .count { margin-left: auto; font-size: 11px; color: var(--ink-2); }
.rec { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-vis); }
.rec.off { background: var(--idle); }
.side-foot { margin-top: auto; padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line); margin-top: 6px; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--avatar); color: var(--on-forest); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.me b { display: block; line-height: 1.2; }

.statusbar { display: flex; align-items: center; gap: 18px; padding: 0 12px; font-size: 11.5px; color: var(--ink-2); background: var(--side); border-top: 1px solid var(--line); white-space: nowrap; overflow: hidden; }
.statusbar span { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-vis); }
.dot.off { background: var(--idle); }

/* ---------- Area kerja ---------- */

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.view { display: none; flex: 1 1 auto; min-height: 0; flex-direction: column; }
.view.active { display: flex; }
.view-head { flex: 0 0 48px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.view-head h1 { font: 600 16px/1 var(--display); }
.view-head .actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.crumb { border: 0; background: none; padding: 0; color: var(--ink-2); }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.view-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.split { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.split.wide { grid-template-columns: minmax(0, 1fr) 380px; }
.pane { min-height: 0; overflow: auto; padding: 16px 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.pane.side { background: var(--surface); border-left: 1px solid var(--line); padding: 16px; }
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.span2 { grid-column: span 2; }
.narrow { max-width: 760px; }

/* ---------- Komponen ---------- */

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line-soft); font-weight: 600; }
.panel-head .src { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }
.panel-foot { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line-soft); }
.panel-body { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.side-title { display: flex; align-items: center; justify-content: space-between; font-weight: 600; margin-top: 8px; }
.side-title:first-child { margin-top: 0; }
.side-title .src { font-size: 11px; font-weight: 400; color: var(--ink-2); display: inline-flex; align-items: center; gap: 5px; }

.r { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 7px 12px; border-bottom: 1px solid var(--line-soft); }
.r:last-child { border-bottom: 0; }
.r.click:hover { background: var(--hover); }
.r input[type="checkbox"], .r input[type="radio"] { width: 16px; height: 16px; margin: 0; accent-color: var(--accent-vis); }
.r b { font-weight: 600; }
.r .sub { display: block; font-size: 12px; color: var(--ink-2); }
.kv { justify-content: space-between; }
.kv b { text-align: right; }

.b { height: 28px; padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); font-size: 12px; font-weight: 600; white-space: nowrap; }
.b:hover { background: var(--hover); }
.b:active { background: var(--line-soft); }
.b.p { border-color: transparent; background: var(--accent); color: #fff; }
.b.p:hover { background: color-mix(in srgb, var(--accent) 88%, black); }

.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; color: var(--ink-2); background: var(--hover); }
.pill.sun { color: var(--sun-ink); background: var(--sun-soft); }
.pill.ok { color: var(--ink); background: var(--accent-soft); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--hover); font-size: 12px; color: var(--ink-2); }

.seg { display: inline-flex; padding: 2px; border-radius: 7px; background: var(--hover); }
.seg button { height: 24px; padding: 0 12px; border: 0; border-radius: 5px; background: none; font-size: 12px; }
.seg button.on { background: var(--surface); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }

.bar { height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent-vis); }
.bar.sun span { background: var(--sun); }

.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; font-weight: 600; color: var(--ink-2); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.t td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.t td:not(:first-child) { white-space: nowrap; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: var(--hover); }
.t tbody tr.sel td { background: var(--accent-soft); }
.t .right { text-align: right; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.st { padding: 12px 14px; border-right: 1px solid var(--line-soft); }
.st:last-child { border-right: 0; }
.st-v { font: 600 20px/1.2 var(--display); }
.st-l { font-size: 12px; color: var(--ink-2); }

.hello { font: 600 22px/1.2 var(--display); }
.field { width: 100%; height: 30px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
textarea.field { height: auto; min-height: 64px; padding: 8px 10px; resize: none; line-height: 1.45; }
.note { background: var(--sun-soft); border: 0; border-radius: 8px; padding: 10px 12px; min-height: 84px; width: 100%; resize: none; line-height: 1.45; }
.hint { display: flex; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--hover); font-size: 12px; color: var(--ink-2); }
.slot { display: flex; gap: 10px; padding: 8px 10px; border-radius: 6px; background: var(--bg); }
.slot.now { background: var(--accent-soft); }
.slot-t { width: 40px; font-weight: 600; }

.day { position: relative; height: 8px; border-radius: 999px; background: var(--line-soft); }
.day span { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.day .w { background: var(--accent-vis); }
.day .o { background: var(--sun); }
.day .i { background: var(--idle); }
.day .m { background: var(--sun); }
.day .cur { top: -4px; bottom: -4px; width: 2px; border-radius: 1px; background: var(--ink); }
.scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-2); margin-top: 6px; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ink); }
.dept-icon { width: 24px; height: 24px; border-radius: 6px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; }

/* ---------- Sambutan saat laptop dibuka ---------- */

.welcome { position: fixed; inset: 38px 0 0 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 14px; background: var(--bg); color: var(--ink); }
.welcome[hidden] { display: none; }
.w-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 30px 44px; border-radius: 24px; color: #fff; background: radial-gradient(110% 80% at 0% 0%, var(--hero-1) 0%, transparent 60%), radial-gradient(90% 70% at 100% 100%, var(--hero-3) 0%, transparent 65%), linear-gradient(155deg, var(--hero-2), var(--hero-3)); box-shadow: 0 18px 44px color-mix(in srgb, var(--hero-3) 32%, transparent); }
.w-logo { position: relative; z-index: 1; align-self: flex-start; display: flex; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(0, 60, 25, 0.18); }
.w-copy { position: relative; z-index: 1; margin: auto 0; max-width: 480px; }
.w-date { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #CDEBD6; margin-bottom: 12px; }
.welcome h2 { font: 600 clamp(38px, 4.6vw, 62px)/1.02 var(--display); letter-spacing: -0.02em; }
.welcome p { max-width: 40ch; margin-top: 14px; font-size: 16px; color: #E6F5EA; }
.welcome .b { height: 36px; padding: 0 18px; font-size: 13px; }
#welcome-later { margin-top: 20px; background: none; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
#welcome-later:hover { background: rgba(255, 255, 255, 0.14); }
.w-list { margin-top: 24px; max-width: 480px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: 0 8px 22px rgba(0, 60, 25, 0.18); }
.w-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.w-chip { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: #12261C; }
.w-mascot { position: absolute; right: 30px; bottom: 16px; z-index: 1; width: 150px; height: 150px; }
.w-deco { position: absolute; border-radius: 50%; }
.w-deco.arc { width: 560px; height: 560px; right: -210px; bottom: -400px; border: 46px solid var(--gold); opacity: 0.9; }
.w-deco.ring { width: 520px; height: 520px; right: -200px; top: -240px; background: radial-gradient(circle, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0) 68%); }
.w-deco.dot1 { width: 22px; height: 22px; right: 250px; top: 70px; background: #FF8A78; }
.w-deco.dot2 { width: 14px; height: 14px; right: 60px; top: 230px; background: #FFC93C; }
.w-deco.dot3 { width: 16px; height: 16px; left: 30px; bottom: 60px; background: #9A8CF5; }
.w-side { display: flex; align-items: center; justify-content: center; padding: 32px; min-width: 0; }
.checkin { width: min(500px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 10px 32px rgba(18, 38, 28, 0.08); }
.moods { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.mood { padding: 12px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; border: 2.5px solid transparent; border-radius: 16px; background: linear-gradient(165deg, color-mix(in srgb, var(--mc) 22%, var(--surface)), color-mix(in srgb, var(--mc) 62%, var(--surface))); font-size: 12px; font-weight: 700; transition: transform 0.14s, box-shadow 0.14s, filter 0.14s; }
.mood:hover { transform: translateY(-4px); box-shadow: 0 10px 20px color-mix(in srgb, var(--mc) 38%, transparent); }
.mood[aria-pressed="true"] { border-color: var(--mc); background: linear-gradient(165deg, color-mix(in srgb, var(--mc) 40%, var(--surface)), color-mix(in srgb, var(--mc) 85%, var(--surface))); transform: translateY(-4px) scale(1.04); box-shadow: 0 12px 24px color-mix(in srgb, var(--mc) 50%, transparent); }
.moods.has .mood[aria-pressed="false"] { filter: saturate(0.55); }
.moods.has .mood[aria-pressed="false"] img { opacity: 0.4; }
.words { display: flex; flex-wrap: wrap; gap: 6px; min-height: 26px; }
.words:empty { display: none; }
.wchip { height: 26px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12px; }
.wchip:hover { background: var(--hover); }
.wchip[aria-pressed="true"] { background: var(--ink); border-color: transparent; color: var(--surface); font-weight: 600; }
.checkin .b { justify-content: center; }
.b[disabled] { opacity: 0.5; }
#checkin-hint:empty { display: none; }
.step { font-weight: 600; }
.selfie-step[hidden] { display: none; }
.step-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.style-pick { display: inline-flex; gap: 6px; }
.style-opt { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 11px; }
.style-opt:hover { background: var(--hover); }
.style-opt[aria-pressed="true"] { border-color: var(--accent-vis); background: var(--accent-soft); font-weight: 600; }
.style-pick.compact .style-opt { padding: 3px; border-radius: 8px; }
.style-pick.compact .style-opt span { display: none; }
.style-pick.compact .style-opt img { width: 24px; height: 24px; }
.w-deco.glow { width: 420px; height: 420px; left: -160px; bottom: -200px; background: radial-gradient(circle, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 68%); }
.selfie { display: flex; gap: 12px; align-items: stretch; }
.cam { position: relative; flex: 0 0 140px; min-height: 105px; overflow: hidden; border-radius: 12px; border: 1.5px dashed var(--line); background: var(--hover); color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.cam.on { border-style: solid; border-width: 2.5px; border-color: var(--line); }
.cam.on.bad { border-color: #E07A66; }
.cam.on.good { border-color: var(--accent-vis); }
.cam video, .cam img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam video { transform: scaleX(-1); }
.selfie-side { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; }
.warn { display: flex; gap: 8px; padding: 8px 10px; border-radius: 8px; background: var(--sun-soft); color: var(--sun-ink); font-size: 12px; }
.warn.ok { background: var(--accent-soft); color: var(--ink); }
.warn.err { background: color-mix(in srgb, #F0A090 30%, var(--surface)); color: var(--ink); }
.selfie-av { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.gated .tb-search { opacity: 0.55; }
.checkin.nudge { border-color: var(--sun); box-shadow: 0 0 0 3px var(--sun-soft); animation: nudge 0.3s; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .checkin.nudge { animation: none; } }
@media (prefers-reduced-motion: reduce) { .mood { transition: none; } }

/* ---------- Check-in di beranda ---------- */

.week { display: inline-flex; gap: 6px; }
.wk { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10px; color: var(--ink-2); }
.wk .empty { width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--line); }
.mood-now { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- Obrolan ---------- */

.chat { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 290px minmax(0, 1fr); }
.chat-list { min-height: 0; overflow-y: auto; background: var(--surface); border-right: 1px solid var(--line); }
.chat-list-head { height: 48px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.chat-list-head h1 { font: 600 16px/1 var(--display); margin-right: auto; }
.conv-label { padding: 12px 16px 4px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.conv { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 16px; border: 0; background: none; text-align: left; }
.conv:hover { background: var(--hover); }
.conv.sel { background: var(--accent-soft); }
.conv .avatar { flex-shrink: 0; }
.conv .avatar.grp { border-radius: 8px; background: var(--forest-3); }
.conv-body { flex: 1 1 auto; min-width: 0; }
.conv-body b, .conv-body span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-body span { font-size: 12px; color: var(--ink-2); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.nav .count.unread:not(:empty) { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.thread { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; }
.msg .avatar { flex-shrink: 0; }
.msg.me .avatar { background: var(--accent); color: #fff; }
.msg-text { user-select: text; cursor: text; max-width: 70ch; }
.composer { display: flex; gap: 8px; padding: 12px 20px; background: var(--surface); border-top: 1px solid var(--line); }
.composer .field { height: 32px; }
.composer .b { height: 32px; }
.w-item { min-width: 0; display: flex; flex-direction: column; gap: 1px; padding: 14px 16px; border-left: 1px solid var(--line-soft); }
.w-item:first-child { border-left: 0; }
.w-item .n { font: 600 28px/1 var(--display); }
.w-item b { font-weight: 600; }
.w-item .sub { font-size: 12px; color: var(--ink-2); }
.w-item b, .w-item .sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-height: 740px) { .w-mascot { width: 120px; height: 120px; } }

@media (max-width: 1120px) {
  .split, .split.wide { grid-template-columns: minmax(0, 1fr) 280px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .w-hero { padding: 28px 32px; }
  .w-side { padding: 20px; }
  .w-mascot { width: 120px; height: 120px; right: 20px; bottom: 16px; }
}

/* ---------- Pemilih tema (di title bar) ---------- */

.look-menu { position: fixed; top: 42px; right: 150px; z-index: 50; width: 264px; padding: 6px; display: flex; flex-direction: column; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2); }
.look-menu[hidden] { display: none; }
.look-menu button { display: flex; align-items: center; gap: 12px; padding: 8px; border: 0; border-radius: 8px; background: none; text-align: left; }
.look-menu button:hover { background: var(--hover); }
.look-menu button.on { background: var(--accent-soft); }
.look-menu b { display: block; font-weight: 600; }
.look-menu .sub { display: block; font-size: 12px; color: var(--ink-2); }
.look-prev { width: 44px; height: 32px; flex-shrink: 0; border-radius: 7px; border: 1px solid var(--line); }
.look-prev.vivid { border: 0; background: radial-gradient(circle at 78% 82%, #D4AC55 0 26%, transparent 27%), linear-gradient(155deg, #3CC477, #0A7836); }
.look-prev.minimal { background: linear-gradient(var(--ink), var(--ink)) 8px 9px / 20px 3px no-repeat, linear-gradient(var(--line), var(--line)) 8px 17px / 28px 3px no-repeat, var(--surface); }

/* ---------- Tema minimalis: bentuk sama, warna dan hiasan dikurangi ---------- */

:root[data-look="minimal"] .w-hero { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
:root[data-look="minimal"] .w-deco { display: none; }
:root[data-look="minimal"] .w-logo { padding: 0; background: none; box-shadow: none; }
:root[data-look="minimal"] .w-date, :root[data-look="minimal"] .welcome p { color: var(--ink-2); }
:root[data-look="minimal"] #welcome-later { background: var(--surface); border-color: var(--line); color: var(--ink); }
:root[data-look="minimal"] #welcome-later:hover { background: var(--hover); }
:root[data-look="minimal"] .w-list { border: 1px solid var(--line); box-shadow: none; }
:root[data-look="minimal"] .w-chip { background: var(--hover) !important; color: var(--ink); }
:root[data-look="minimal"] .checkin { box-shadow: none; }
:root[data-look="minimal"] .warn:not(.err):not(.ok) { background: var(--hover); color: var(--ink); }
:root[data-look="minimal"] .mood { background: var(--surface); border: 1.5px solid var(--line); font-weight: 600; }
:root[data-look="minimal"] .mood:hover { background: var(--hover); box-shadow: none; transform: translateY(-2px); }
:root[data-look="minimal"] .mood[aria-pressed="true"] { background: var(--hover); border-color: var(--ink); box-shadow: none; transform: translateY(-2px); }
:root[data-look="minimal"] .moods.has .mood[aria-pressed="false"] { filter: none; }
:root[data-look="minimal"] .note { background: var(--hover); }
:root[data-look="minimal"] .pill.sun { background: var(--hover); color: var(--ink); }

/* ---------- Agnes: gambar render badan utuh, perlu ruang lebih besar ---------- */

.mood img, .w-mascot, .style-opt img, .wk img, .mood-now img { object-fit: contain; }
.welcome[data-style="agnes"] .mood img { width: 100%; height: 118px; }
.welcome[data-style="agnes"] .mood { padding-top: 8px; gap: 4px; }
.welcome[data-style="agnes"] .w-mascot { width: 215px; height: 215px; right: 10px; bottom: 4px; }
@media (max-height: 740px) { .welcome[data-style="agnes"] .w-mascot { width: 170px; height: 170px; } .welcome[data-style="agnes"] .mood img { height: 84px; } }

/* ---------- Beranda: hero, pengumuman, aksi cepat, kabar ---------- */

.home { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 20px 28px; }
.home-inner { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }

.h-hero { position: relative; overflow: hidden; padding: 22px 26px 20px; border-radius: 20px; color: #fff; background: radial-gradient(110% 90% at 0% 0%, var(--hero-1) 0%, transparent 60%), radial-gradient(90% 80% at 100% 100%, var(--hero-3) 0%, transparent 65%), linear-gradient(155deg, var(--hero-2), var(--hero-3)); box-shadow: 0 14px 34px color-mix(in srgb, var(--hero-3) 26%, transparent); }
.h-hero > * { position: relative; z-index: 1; }
.h-hero .w-deco { position: absolute; z-index: 0; }
.h-arc { width: 420px; height: 420px; right: -120px; bottom: -310px; border: 34px solid var(--gold); opacity: 0.9; }
.h-glow { width: 460px; height: 460px; right: -160px; top: -260px; background: radial-gradient(circle, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 68%); }
.h-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.h-hero h2 { font: 600 30px/1.15 var(--display); letter-spacing: -0.01em; }
.h-hero p { margin-top: 6px; max-width: 58ch; font-size: 14px; color: #E6F5EA; }
.h-hero .w-date { margin-bottom: 8px; }
.h-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.h-actions { display: flex; gap: 8px; }
.h-actions .b { background: rgba(255, 255, 255, 0.14); border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.h-actions .b:hover { background: rgba(255, 255, 255, 0.24); }
.h-agnes { width: 76px; height: 76px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; box-shadow: 0 6px 18px rgba(0, 60, 25, 0.22); }
.h-agnes img { width: 70px; height: 70px; object-fit: contain; }
.h-stats { max-width: none; margin-top: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.h-stats .n { font-size: 24px; }

.ticker { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.ticker-ic { width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; background: var(--sun-soft); color: var(--sun-ink); display: flex; align-items: center; justify-content: center; }
.ticker .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }

.sec-head { display: flex; align-items: baseline; gap: 10px; margin: 4px 2px 8px; }
.sec-head h3 { margin: 0; font: 600 15px/1.2 var(--display); }
.qa { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.qa-item { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); font-size: 12px; font-weight: 600; text-align: center; transition: transform 0.12s, border-color 0.12s, box-shadow 0.12s; }
.qa-item:hover { transform: translateY(-2px); border-color: var(--c); box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 22%, transparent); }
.qa-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 22%, var(--surface)); color: color-mix(in srgb, var(--c) 45%, var(--ink)); }

.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.home-col { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.more { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--accent-vis); }
.more:hover { text-decoration: underline; }

.news { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.news-feature { position: relative; overflow: hidden; margin: 12px; min-height: 196px; padding: 16px 132px 16px 16px; border-radius: 12px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 6px; text-decoration: none; color: #fff; background: radial-gradient(90% 90% at 100% 0%, var(--hero-1), transparent 60%), linear-gradient(155deg, var(--hero-2), var(--hero-3)); }
.news-feature img { position: absolute; right: 6px; bottom: 0; width: 128px; height: 168px; object-fit: contain; object-position: bottom; }
.news-title { font: 600 17px/1.25 var(--display); }
.news-meta { font-size: 12px; color: #D5EEDD; }
.news-list { display: flex; flex-direction: column; justify-content: center; border-left: 1px solid var(--line-soft); }
.news-list .r { text-decoration: none; color: inherit; }
.news-cat { display: block; font-size: 11px; font-weight: 600; color: var(--accent-vis); margin-bottom: 1px; }

.cal { width: 40px; flex-shrink: 0; padding: 4px 0; border-radius: 8px; background: var(--accent-soft); text-align: center; font-size: 10.5px; line-height: 1.15; color: var(--ink-2); }
.cal b { display: block; font: 600 15px/1.1 var(--display); color: var(--ink); }
.quote { padding: 10px 12px; border-radius: 8px; background: var(--bg); color: var(--ink-2); }
.home .note { min-height: 72px; }

:root[data-look="minimal"] .h-hero, :root[data-look="minimal"] .news-feature { background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
:root[data-look="minimal"] .h-hero p, :root[data-look="minimal"] .news-meta { color: var(--ink-2); }
:root[data-look="minimal"] .h-actions .b { background: var(--surface); border-color: var(--line); color: var(--ink); }
:root[data-look="minimal"] .h-agnes { border: 1px solid var(--line); box-shadow: none; }
:root[data-look="minimal"] .qa-ic, :root[data-look="minimal"] .ticker-ic { background: var(--hover); color: var(--ink); }
:root[data-look="minimal"] .qa-item:hover { border-color: var(--ink); box-shadow: none; }

@media (max-width: 1180px) {
  .qa { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .news { grid-template-columns: minmax(0, 1fr); }
  .news-list { border-left: 0; border-top: 1px solid var(--line-soft); }
  .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .h-stats .w-item:nth-child(3) { border-left: 0; }
  .h-stats .w-item:nth-child(n+3) { border-top: 1px solid var(--line-soft); }
}

/* ---------- Masuk dan keluar ---------- */

.me-out { width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-2); display: flex; align-items: center; justify-content: center; }
.me-out:hover { background: var(--press); color: var(--ink); }
.signin { position: fixed; inset: 38px 0 0 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--bg); }
.signin[hidden] { display: none; }
.signin-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 40px rgba(18, 38, 28, 0.1); }
.signin-card img { align-self: flex-start; }
.signin-card h2, .confirm h2 { font: 600 18px/1.25 var(--display); }
.signin-card p { margin-top: 4px; }
.signin-card label { display: block; font-weight: 600; margin-bottom: 6px; }
.signin-card .field { height: 34px; }
.signin-card .b { height: 36px; justify-content: center; }
#signin-error:empty { display: none; }
.confirm { width: min(420px, 92vw); margin-top: 120px; display: flex; flex-direction: column; gap: 12px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28); }

.signin-server summary { font-size: 12px; color: var(--ink-2); cursor: pointer; }
.signin-server .field { margin-top: 8px; }

/* ---------- Versi web: tampilan sama, minus hal yang hanya ada di app terpasang ---------- */

.web .tb-ctl { display: none; }
.web .titlebar { padding-right: 8px; }
.web #welcome-later, .web #track-toggle, .web #home-break, .web .signin-server { display: none; }
