:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #183b4a; background: #183c4b; font-size: 15px;
  --line: rgba(255,255,255,.65);
  --glass: rgba(238,249,252,.79);
  --muted: #42616d;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; isolation: isolate; }
body::before { content: ''; position: fixed; inset: 0; z-index: -2; background: linear-gradient(130deg,rgba(9,37,56,.35),rgba(17,52,61,.16)), url('/static/backgrounds/forest.jpg') center/cover no-repeat; pointer-events: none; }
body[data-scene="tokyo"]::before { background-image: linear-gradient(130deg,rgba(9,37,56,.4),rgba(17,52,61,.23)), url('/static/backgrounds/tokyo.jpg'); }
body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse at 85% 5%,rgba(199,241,255,.18),transparent 55%),linear-gradient(0deg,rgba(7,30,46,.3),transparent 70%); }
header, main, footer { max-width: 1250px; margin: auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 42px; padding-bottom: 28px; color: #fff; text-shadow: 0 2px 16px #123746; }
h1 { font-size: clamp(28px,4vw,42px); font-weight: 650; letter-spacing: -1.4px; margin: 8px 0; }
h2 { font-size: 19px; font-weight: 650; margin: 0 0 20px; letter-spacing: -.4px; }
p { line-height: 1.65; }
.eyebrow { font-size: 11px; letter-spacing: 2.8px; font-weight: 750; }
.header-subtitle { margin: 8px 0 0; color: #f1faff; font-size: 14px; }
.layout { display: grid; grid-template-columns: 290px minmax(0,1fr); gap: 24px; align-items: start; }
.card, .scene-panel { background: var(--glass); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 16px 48px rgba(9,35,50,.15), inset 0 1px 0 rgba(255,255,255,.8); -webkit-backdrop-filter: blur(24px) saturate(125%); backdrop-filter: blur(24px) saturate(125%); padding: 26px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.badge { background: rgba(255,255,255,.55); border: 1px solid rgba(75,119,135,.15); border-radius: 20px; padding: 6px 12px; font-size: 12px; }
label { display: block; font-size: 13px; font-weight: 650; margin: 12px 0; }
input, textarea, select { display: block; width: 100%; font: inherit; font-size: 16px; border: 1px solid rgba(58,104,122,.25); border-radius: 12px; padding: 12px; background: rgba(255,255,255,.64); color: #183b4a; margin-top: 8px; box-shadow: inset 0 1px 3px rgba(30,69,87,.03); }
input::placeholder, textarea::placeholder { color: #607680; }
textarea { resize: vertical; }
button { font: inherit; font-size: 14px; font-weight: 650; border: 1px solid rgba(255,255,255,.45); border-radius: 12px; min-height: 44px; padding: 11px 17px; background: linear-gradient(135deg,#206b84,#285675); color: #fff; box-shadow: 0 4px 12px rgba(25,67,88,.12); cursor: pointer; transition: background .2s, box-shadow .2s, transform .2s; }
button:hover { box-shadow: 0 6px 18px rgba(25,67,88,.22); transform: translateY(-1px); }
button:active { transform: translateY(0); }
button:disabled { opacity: .5; cursor: wait; transform: none; }
.secondary { background: rgba(255,255,255,.63); color: #254c60; border-color: rgba(76,119,138,.2); }
.danger { background: rgba(255,229,229,.85); color: #963742; border-color: rgba(175,77,87,.2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 8px; }
.check input { width: auto; margin: 0; accent-color: #246581; }
.account { width: 100%; text-align: left; background: rgba(255,255,255,.42); color: #234a5b; border-color: rgba(76,119,138,.18); margin-bottom: 10px; overflow-wrap: anywhere; }
.account.selected { background: rgba(197,232,244,.8); border-color: #649db3; box-shadow: 0 4px 16px rgba(32,107,132,.1); }
.account small { display: block; font-weight: 400; margin-top: 6px; line-height: 1.6; }
summary { cursor: pointer; padding: 12px 0; font-weight: 650; }
hr { border: 0; border-top: 1px solid rgba(74,116,132,.18); margin: 24px 0; }
.inline { display: flex; gap: 12px; align-items: end; }
.inline label { flex: 1; }
.inline button { margin-bottom: 12px; }
.log-card { margin-top: 24px; }
pre { background: rgba(14,44,60,.87); color: #d6f0f4; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; padding: 20px; max-height: 300px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 1.8; }
#notice { padding: 14px 18px; border: 1px solid rgba(255,255,255,.55); border-radius: 14px; background: rgba(232,249,248,.89); min-height: 48px; margin: 0 0 24px; font-size: 13px; }
#notice.error, .error { color: #932c3a; background: rgba(255,235,236,.92); border-radius: 12px; padding: 12px; }
#group-list { max-height: 240px; overflow: auto; }
footer { font-size: 12px; color: #fff; }
.footer-line { margin-top: 20px; text-shadow: 0 2px 8px #163946; }
.scene-panel { padding: 16px 20px; color: #183b4a; border-radius: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.scene-picker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scene-picker span { margin-right: 8px; font-weight: 650; }
.scene-choice { font-size: 12px; padding: 9px 13px; background: rgba(255,255,255,.45); color: #254c60; border-color: rgba(76,119,138,.2); }
.scene-choice[aria-pressed="true"] { background: #285f78; color: #fff; }
.scene-credit { font-size: 11px; line-height: 1.8; }
.scene-credit a { color: #224f68; text-underline-offset: 3px; }
.login { min-height: 100svh; display: grid; place-content: center; padding: 28px 20px; gap: 24px; }
.login-card { max-width: 460px; width: 100%; margin: auto; padding: 38px; }
.login-card h1 { font-size: 34px; margin-top: 18px; }
.login-card p { color: var(--muted); }
.login-card button { width: 100%; margin-top: 15px; }
.login footer { width: min(620px,100%); padding: 0; }
.login .scene-panel { justify-content: center; text-align: center; }
.brand-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 24px; background: rgba(255,255,255,.6); border: 1px solid #fff; border-radius: 17px; font-size: 27px; color: #2e6881; box-shadow: 0 8px 20px rgba(30,85,112,.08); }
.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty-state .brand-mark { margin: 0 auto 18px; }
.empty-state h3 { color: #254c60; font-size: 20px; font-weight: 600; }
#accounts:empty::after { content: 'Belum ada akun. Tambahkan akun Telegram pertama Anda.'; display: block; font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 16px; }
[hidden] { display: none!important; }
:focus-visible { outline: 3px solid #22718f; outline-offset: 3px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card,.scene-panel { background: #edf6f8; } }
@media(prefers-reduced-motion:reduce) { button { transition: none; } }
@media(max-width:800px) {
  .layout { grid-template-columns: 1fr; }
  header,main,footer { padding: 18px; }
  header { padding-top: 28px; }
  .card { padding: 20px; border-radius: 20px; }
  .fields { grid-template-columns: 1fr; gap: 0; }
  .section-head { flex-wrap: wrap; }
  .actions button { flex: 1; }
  .inline { flex-wrap: wrap; }
  .inline label { min-width: 180px; }
  #accounts { max-height: 260px; overflow: auto; }
  .login-card { padding: 28px; }
  .scene-panel { gap: 10px; }
  .header-subtitle { max-width: 250px; }
}

/* Saved Messages uses the same frosted surface as the workspace. */
dialog { width: min(640px,calc(100% - 32px)); max-height: 85svh; overflow: auto; color: #183b4a; background: rgba(238,249,252,.94); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 24px 80px rgba(9,35,50,.3); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); }
dialog::backdrop { background: rgba(9,30,45,.5); }
.saved-message { display: block; width: 100%; text-align: left; margin-top: 12px; }
.saved-message span { display: block; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 160px; overflow: auto; font-weight: 400; line-height: 1.6; }
.saved-message small { display: block; margin-top: 12px; color: #42616d; }
