/* HestiaStudio AI — styles.css (vanilla, tanpa build step) */
:root{
  --bg:#0f0b16;
  --surface:#1a1526;
  --surface-2:#221b34;
  --surface-3:#2a2340;
  --accent:#8b7cf6;
  --accent-deep:#5b2dcc;
  --accent-soft:rgba(139,124,246,.14);
  --text:#f3efff;
  --text-2:#a9a3bd;
  --border:rgba(139,124,246,.20);
  --danger:#f87171;
  --success:#4ade80;
  --warning:#fbbf24;
  --info:#60a5fa;
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --radius:14px;
  --radius-sm:9px;
  --topbar-h:60px;
  --sidebar-w:238px;
}
html[data-theme="light"]{
  --bg:#f3f0fa;
  --surface:#ffffff;
  --surface-2:#f5f2fc;
  --surface-3:#ece7f8;
  --accent:#5b2dcc;
  --accent-deep:#5b2dcc;
  --accent-soft:rgba(91,45,204,.10);
  --text:#221b33;
  --text-2:#5f5775;
  --border:rgba(91,45,204,.16);
  --shadow:0 8px 24px rgba(91,45,204,.10);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:Inter,system-ui,'Segoe UI',Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  min-height:100vh;
  overflow-x:hidden;
}
img,video,canvas{max-width:100%;display:block}
a{color:var(--accent)}
.hidden{display:none !important}

/* ===== Topbar ===== */
.topbar{
  position:sticky;top:0;z-index:60;
  height:var(--topbar-h);
  display:flex;align-items:center;gap:10px;
  padding:0 14px;
  background:color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none}
.brand-logo{height:36px;width:auto}
.brand-mark{height:36px;width:36px;border-radius:50%;flex:none}
.brand-name{font-weight:800;font-size:17px;letter-spacing:-.3px;color:var(--text)}
.brand-name em{font-style:normal;color:var(--accent)}
.topbar-spacer{flex:1}
.demo-badge{
  font-size:11px;font-weight:800;letter-spacing:1.5px;
  color:#0f0b16;background:var(--warning);
  padding:4px 10px;border-radius:999px;
  box-shadow:0 0 0 2px rgba(251,191,36,.35);
}
.key-pill{
  font-size:12px;font-weight:600;color:var(--text-2);
  border:1px solid var(--border);border-radius:999px;padding:5px 12px;
  background:var(--surface-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:40vw;
}
.key-pill.ok{color:var(--success);border-color:rgba(74,222,128,.4)}
.key-pill.bad{color:var(--danger);border-color:rgba(248,113,113,.4)}
.icon-btn{
  display:inline-flex;align-items:center;justify-content:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--surface-2);border:1px solid var(--border);color:var(--text);
  cursor:pointer;flex:none;
}
.icon-btn:hover{background:var(--surface-3)}
.only-mobile{display:none}

/* ===== Shell: sidebar + view ===== */
.shell{display:flex;min-height:calc(100vh - var(--topbar-h))}
.sidebar{
  width:var(--sidebar-w);flex:none;
  position:sticky;top:var(--topbar-h);
  height:calc(100vh - var(--topbar-h));
  background:var(--surface);
  border-right:1px solid var(--border);
  display:flex;flex-direction:column;
  padding:14px 10px;
}
.nav{display:flex;flex-direction:column;gap:4px;overflow-y:auto}
.nav-link{
  display:flex;align-items:center;gap:12px;
  padding:11px 12px;border-radius:12px;
  color:var(--text-2);text-decoration:none;font-weight:600;font-size:14px;
  border:1px solid transparent;
}
.nav-link .nav-ic{font-size:18px;width:26px;text-align:center;flex:none}
.nav-link:hover{background:var(--surface-2);color:var(--text)}
.nav-link.active{background:var(--accent-soft);color:var(--text);border-color:var(--border)}
.sidebar-head{padding:14px 8px 12px;border-bottom:1px solid var(--border);color:var(--text-2);margin-bottom:8px}
.sidebar-head-brand{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--text);margin-bottom:4px}
.sidebar-foot{margin-top:auto;padding:12px 8px 4px;border-top:1px solid var(--border);color:var(--text-2)}
.sidebar-foot-brand{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--text);margin-bottom:4px}
.drawer-overlay{position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:70}
.view{flex:1;min-width:0;padding:22px clamp(14px,3vw,34px) 60px;max-width:1200px;margin:0 auto;width:100%}
/* Router memfokus .view secara programatik tiap pindah halaman (untuk screen reader).
   Matikan ring fokusnya total: fokus programatik di kontainer satu halaman penuh
   bukan indikator berguna, dan browser Android menggambarnya sebagai garis kuning
   di tepi layar (terutama saat focus() dipanggil sebelum interaksi pertama). */
.view:focus{outline:none}

/* ===== Ikon SVG inline (pengganti emoji) ===== */
.hs-ic{width:1.15em;height:1.15em;vertical-align:-0.22em;flex:none}
.nav-link .nav-ic{display:inline-flex;align-items:center;justify-content:center;width:26px;flex:none}
.nav-link .nav-ic .hs-ic{width:20px;height:20px;vertical-align:0}
.banner .b-ic{display:inline-flex;flex:none;line-height:1}
.banner .b-ic .hs-ic{width:20px;height:20px;vertical-align:0}
.dropzone .d-ic{display:flex;justify-content:center;margin-bottom:8px;color:var(--text-2)}
.dropzone .d-ic .hs-ic{width:38px;height:38px}
.empty .e-ic{display:flex;justify-content:center;margin-bottom:10px;color:var(--text-2)}
.empty .e-ic .hs-ic{width:44px;height:44px}
.template .t-ic{display:block;margin-bottom:6px;color:var(--accent)}
.template .t-ic .hs-ic{width:24px;height:24px;vertical-align:0}
.thumb-kind .hs-ic{width:11px;height:11px;vertical-align:-1px}
.badge .hs-ic{width:12px;height:12px;vertical-align:-1px}
.toast .hs-ic{width:16px;height:16px;vertical-align:-3px}
.key-pill .hs-ic{width:13px;height:13px;vertical-align:-2px}
h1 .hs-ic,h2 .hs-ic,h3 .hs-ic{vertical-align:-0.18em}

/* ===== Tombol: tidak bisa diseleksi & bubble bulat ===== */
button,.btn,.icon-btn,.tab,.mode-chip,.template{
  user-select:none;-webkit-user-select:none;-webkit-tap-highlight-color:transparent;
}

/* ===== Kunci scroll body saat drawer sidebar terbuka ===== */
body.locked{overflow:hidden}
.sidebar,.nav{overscroll-behavior:contain}

/* ===== Typography & layout helpers ===== */
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:18px;flex-wrap:wrap}
.page-head h1{margin:0;font-size:clamp(22px,3vw,30px);letter-spacing:-.5px}
.page-head p{margin:6px 0 0;color:var(--text-2);font-size:14px;max-width:640px}
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:18px;box-shadow:var(--shadow)}
.card h2{margin:0 0 12px;font-size:17px}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
.mt{margin-top:14px}.mb{margin-bottom:14px}
.muted{color:var(--text-2)}.small{font-size:12.5px}
.row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.row-end{justify-content:flex-end}
.grow{flex:1;min-width:0}

/* ===== Buttons ===== */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:11px 18px;border-radius:999px;font-weight:700;font-size:14px;
  border:1px solid var(--border);background:var(--surface-2);color:var(--text);
  cursor:pointer;text-decoration:none;transition:transform .08s ease, background .15s;
  min-height:44px;
}
.btn:hover{background:var(--surface-3)}
.btn:active{transform:scale(.98)}
.btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.btn-primary{background:linear-gradient(135deg,var(--accent-deep),var(--accent));border:none;color:var(--on-accent,#fff);box-shadow:0 6px 18px rgba(91,45,204,.35)}
.btn-primary:hover{filter:brightness(1.08)}
.btn-danger{background:rgba(248,113,113,.12);border-color:rgba(248,113,113,.45);color:var(--danger)}
.btn-danger:hover{background:rgba(248,113,113,.2)}
.btn-ghost{background:transparent}
.btn-sm{padding:7px 12px;min-height:36px;font-size:13px;border-radius:999px}
.btn-icon{padding:0;min-height:0;width:44px;height:44px;flex:none;border-radius:50%}
.btn-icon .hs-ic{width:19px;height:19px}
.btn-block{width:100%}
.btn-google{display:flex;align-items:center;justify-content:center;gap:10px;background:var(--surface-2);border:1px solid var(--border)}
.divider{display:flex;align-items:center;gap:12px;margin:18px 0;color:var(--text-2);font-size:12.5px}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:var(--border)}
.profile-row{display:flex;align-items:center;gap:14px}
.avatar-img{width:56px;height:56px;border-radius:50%;flex:none;object-fit:cover}
.avatar-initial{width:56px;height:56px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;font-size:24px;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--accent-deep),var(--accent))}
.profile-name{font-weight:800;font-size:17px}
.btn .spin{width:16px;height:16px;border:2px solid rgba(255,255,255,.4);border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== Forms ===== */
.field{margin-bottom:14px}
.field label{display:block;font-weight:600;font-size:13.5px;margin-bottom:7px}
.field .hint{font-size:12.5px;color:var(--text-2);margin-top:6px;line-height:1.5}
input[type=text],input[type=number],input[type=url],input[type=email],input[type=password],select,textarea{
  width:100%;padding:11px 13px;border-radius:12px;
  background:var(--surface-2);border:1px solid var(--border);color:var(--text);
  font:inherit;font-size:14px;
}
textarea{resize:vertical;min-height:110px;line-height:1.55}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent);outline-offset:1px;border-color:var(--accent)}
input[type=file]{padding:8px}
input[type=range]{width:100%;accent-color:var(--accent)}
/* Password field dengan tombol lihat/tutup */
.pass-wrap{position:relative}
.pass-wrap input{padding-right:44px}
.pass-toggle{position:absolute;right:6px;top:50%;transform:translateY(-50%);
  width:34px;height:34px;border:0;background:transparent;color:var(--text-2);
  cursor:pointer;border-radius:50%;display:flex;align-items:center;justify-content:center}
.pass-toggle:hover{color:var(--text);background:rgba(127,127,127,.14)}
.pass-toggle .hs-ic{width:19px;height:19px}
.link-btn{background:none;border:0;color:var(--accent);font:inherit;font-size:13.5px;
  font-weight:600;cursor:pointer;padding:4px 0;text-decoration:underline}
.checkbox-row{display:flex;align-items:center;gap:9px;padding:8px 0;font-size:14px}
.checkbox-row input{width:18px;height:18px;accent-color:var(--accent);flex:none}
.ratio-presets{display:flex;gap:8px;flex-wrap:wrap}
.ratio-presets .btn.active{background:var(--accent-soft);border-color:var(--accent);color:var(--text)}
.tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.tabs .tab{padding:10px 16px;border-radius:999px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-2);font-weight:700;cursor:pointer;font-size:14px}
.tabs .tab.active{background:var(--accent-soft);color:var(--text);border-color:var(--accent)}
/* ===== Banners ===== */
.banner{
  display:flex;gap:12px;align-items:flex-start;
  border-radius:var(--radius);padding:14px 16px;margin-bottom:16px;
  border:1px solid var(--border);background:var(--surface);
  font-size:14px;line-height:1.55;
}
.banner .b-ic{font-size:20px;flex:none;line-height:1.3}
.banner-warning{background:rgba(251,191,36,.08);border-color:rgba(251,191,36,.45)}
.banner-info{background:rgba(96,165,250,.08);border-color:rgba(96,165,250,.4)}
.banner-danger{background:rgba(248,113,113,.08);border-color:rgba(248,113,113,.45)}
.banner a{font-weight:700}

/* ===== Badges & status ===== */
.badge{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;letter-spacing:.4px;padding:4px 10px;border-radius:999px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-2);white-space:nowrap}
.badge .dot{width:8px;height:8px;border-radius:50%;background:currentColor}
.st-queued{color:var(--warning)}.st-running{color:var(--info)}.st-done{color:var(--success)}.st-failed,.st-timeout{color:var(--danger)}
.badge-demo{background:var(--warning);color:#0f0b16;border:none;font-weight:800;letter-spacing:1px}
.fav-btn{background:none;border:none;font-size:20px;cursor:pointer;color:var(--text-2);padding:4px;line-height:1}
.fav-btn.on{color:#fbbf24}
.fav-btn:hover{transform:scale(1.15)}

/* ===== Job card ===== */
.job-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;box-shadow:var(--shadow)}
.job-card .job-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.job-card .job-prompt{font-size:13.5px;color:var(--text-2);margin-bottom:12px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.job-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.job-result img,.job-result video{border-radius:12px;background:#000;max-height:420px;width:auto;margin:0 auto}
.job-error{color:var(--danger);font-size:13.5px;background:rgba(248,113,113,.08);border:1px solid rgba(248,113,113,.35);border-radius:10px;padding:10px 12px;line-height:1.5}
.progress{height:8px;border-radius:99px;background:var(--surface-3);overflow:hidden;margin:10px 0}
.progress > div{height:100%;width:40%;border-radius:99px;background:linear-gradient(90deg,var(--accent-deep),var(--accent));animation:slide 1.2s ease-in-out infinite}
@keyframes slide{0%{margin-left:-40%}100%{margin-left:100%}}

/* ===== Job progress megah (persentase estimasi + timer) ===== */
.job-progress{
  margin:14px 0 4px;padding:18px;border-radius:18px;
  background:linear-gradient(135deg,rgba(139,124,246,.12),rgba(91,45,204,.05));
  border:1px solid var(--border);
  position:relative;overflow:hidden;
}
.job-progress::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(110deg,transparent 30%,rgba(139,124,246,.20) 50%,transparent 70%);
  background-size:220% 100%;
  animation:jpSheen 2.4s linear infinite;
}
@keyframes jpSheen{from{background-position:220% 0}to{background-position:-220% 0}}
.jp-top{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-bottom:12px;position:relative}
.jp-pct{
  font-size:38px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;
  background:linear-gradient(135deg,#d8ccff,#8b7cf6 55%,#60a5fa);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.jp-stage{font-size:13px;font-weight:700;color:var(--text);text-align:right}
.jp-bar{
  height:12px;border-radius:99px;background:var(--surface-3);overflow:hidden;position:relative;
  box-shadow:inset 0 1px 3px rgba(0,0,0,.35);
}
.jp-fill{
  height:100%;width:0;border-radius:99px;
  background:linear-gradient(90deg,var(--accent-deep),var(--accent),#60a5fa);
  background-size:200% 100%;
  animation:jpFlow 1.8s linear infinite;
  box-shadow:0 0 14px rgba(139,124,246,.75);
  transition:width .6s ease;
}
@keyframes jpFlow{from{background-position:0 0}to{background-position:200% 0}}
.jp-meta{display:flex;justify-content:space-between;align-items:center;margin-top:9px;font-size:11.5px;color:var(--text-2);position:relative}
.jp-elapsed{font-variant-numeric:tabular-nums;font-weight:700;color:var(--text)}
.jp-note{font-style:italic}

/* ===== Model picker elegan ===== */
.model-picker{display:grid;gap:10px;grid-template-columns:1fr}
.model-opt{
  position:relative;display:flex;gap:13px;align-items:center;
  padding:13px 14px;border-radius:16px;cursor:pointer;
  border:1.5px solid var(--border);background:var(--surface-2);
  transition:transform .12s ease, border-color .15s, box-shadow .15s, background .15s;
}
.model-opt:hover{transform:translateY(-2px);border-color:var(--accent)}
.model-opt.selected{
  border-color:var(--accent);background:var(--accent-soft);
  box-shadow:0 0 0 1px var(--accent), 0 10px 24px rgba(91,45,204,.28);
}
.model-opt .m-ic{
  width:44px;height:44px;flex:none;border-radius:14px;
  display:flex;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,var(--accent-deep),var(--accent));
  box-shadow:0 4px 12px rgba(91,45,204,.4);
}
.model-opt .m-ic .hs-ic{width:22px;height:22px}
.model-opt .m-body{flex:1;min-width:0}
.model-opt .m-name{font-weight:800;font-size:14.5px}
.model-opt .m-desc{font-size:12px;color:var(--text-2);margin-top:3px;line-height:1.45}
.model-opt .m-check{
  position:absolute;top:10px;right:10px;width:22px;height:22px;border-radius:50%;
  display:none;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,var(--accent-deep),var(--accent));
}
.model-opt.selected .m-check{display:flex}
.model-opt .m-check .hs-ic{width:13px;height:13px}
.model-opt .m-tag{
  font-size:10px;font-weight:800;letter-spacing:.6px;text-transform:uppercase;
  color:var(--success);margin-top:5px;display:inline-block;
}
.model-opt .m-tag.tag-soon{color:var(--text-2)}
.model-opt .m-tag .hs-ic{width:11px;height:11px;vertical-align:-1px;margin-right:2px}
.model-opt.locked{cursor:not-allowed;opacity:.6}
.model-opt.locked:hover{transform:none;border-color:var(--border);box-shadow:none}
.model-opt .m-lock{
  position:absolute;top:10px;right:10px;width:22px;height:22px;border-radius:50%;
  display:flex;align-items:center;justify-content:center;color:var(--text-2);
  background:var(--surface);border:1px solid var(--border);
}
.model-opt .m-lock .hs-ic{width:12px;height:12px}
.model-static{
  display:flex;gap:13px;align-items:center;padding:14px;border-radius:16px;
  border:1.5px solid var(--border);
  background:linear-gradient(135deg,var(--accent-soft),transparent);
  flex-wrap:wrap;
}
.model-static .m-body{flex:1 1 0;min-width:0}
.model-static .m-ic{
  width:46px;height:46px;flex:none;border-radius:14px;
  display:flex;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,var(--accent-deep),var(--accent));
  box-shadow:0 4px 14px rgba(91,45,204,.45);
}
.model-static .m-ic .hs-ic{width:23px;height:23px}
.model-static .m-name{font-weight:800;font-size:15px}
.model-static .m-desc{font-size:12px;color:var(--text-2);margin-top:3px;line-height:1.45}
.model-static .badge{margin-left:auto;flex:none}
@media (max-width:560px){
  .model-static{align-items:flex-start}
  .model-static .m-body{flex:1 1 calc(100% - 59px)}
  .model-static .badge{margin-left:59px;margin-top:4px}
}

/* ===== Skeleton ===== */
.skeleton{position:relative;overflow:hidden;background:var(--surface-2);border-radius:10px;min-height:20px}
.skeleton::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,transparent,rgba(255,255,255,.09),transparent);animation:shimmer 1.4s infinite}
@keyframes shimmer{from{transform:translateX(-100%)}to{transform:translateX(100%)}}
.sk-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.sk-line{height:14px;margin:8px 0}

/* ===== Empty state ===== */
.empty{text-align:center;padding:44px 20px;color:var(--text-2);border:1.5px dashed var(--border);border-radius:var(--radius);background:var(--surface)}
.empty .e-ic{font-size:44px;margin-bottom:10px}
.empty h3{margin:0 0 6px;color:var(--text);font-size:16px}
.empty p{margin:0 0 16px;font-size:13.5px;line-height:1.6}

/* ===== Toast ===== */
.toasts{position:fixed;bottom:18px;left:50%;transform:translateX(-50%);z-index:200;display:flex;flex-direction:column;gap:10px;width:min(92vw,420px)}
.toast{background:var(--surface-3);border:1px solid var(--border);color:var(--text);border-radius:12px;padding:12px 16px;font-size:14px;box-shadow:var(--shadow);display:flex;gap:10px;align-items:flex-start;animation:toastIn .25s ease}
.toast.success{border-color:rgba(74,222,128,.5)}
.toast.error{border-color:rgba(248,113,113,.5)}
.toast.warning{border-color:rgba(251,191,36,.5)}
@keyframes toastIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ===== Modal ajakan login (generate wajib login) ===== */
.login-gate { text-align:center; padding:8px 4px 4px; }
.lg-ic { display:inline-flex; align-items:center; justify-content:center; width:56px; height:56px;
  border-radius:50%; color:var(--accent); background:var(--accent-soft); margin-bottom:14px; }
.lg-ic .hs-ic { width:26px; height:26px; }
.login-gate p { margin:0; line-height:1.65; color:var(--text-2); font-size:14.5px; }

/* ===== Toast tengah layar (login/daftar berhasil) ===== */
.toast-center-overlay{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;
  pointer-events:none;padding:20px;animation:toastIn .25s ease}
.toast-center-overlay.fade{opacity:0;transition:opacity .35s}
.toast-center{background:#14532d;border:1px solid rgba(74,222,128,.65);color:#dcfce7;border-radius:14px;
  padding:14px 22px;font-size:15px;font-weight:700;box-shadow:var(--shadow);display:flex;gap:10px;
  align-items:center;max-width:min(92vw,440px);text-align:center}
.toast-center .hs-ic{width:22px;height:22px;flex:none}

/* ===== Wallpaper latar ===== */
#wallpaper{position:fixed;inset:0;z-index:0;background-size:cover;background-position:center;background-repeat:no-repeat;
  opacity:0;transition:opacity .5s;pointer-events:none}
#wallpaper.on{opacity:1}
#wallpaper.on::after{content:"";position:absolute;inset:0;background:rgba(4,4,10,.55)}
#app{position:relative;z-index:1}

/* ===== Landing page (mode tamu) ===== */
body.landing #sidebar, body.landing #drawerOverlay, body.landing #menuBtn { display:none !important; }
body.landing .shell { display:block; }
body.landing #wallpaper { display:none !important; } /* wallpaper pribadi disembunyikan di landing */
html.landing, html.landing body { overflow-x:clip; } /* kunci geser horizontal di level html+body */
body.landing .topbar { background:var(--surface); backdrop-filter:none; -webkit-backdrop-filter:none; }
#topbarLogin { display:none; }
body.landing #topbarLogin { display:inline-flex; }
.landing-loading { display:flex; justify-content:center; padding:80px 0; }
.landing-loading .spin { width:28px; height:28px; border:3px solid var(--accent-soft);
  border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; }

.landing-hero { display:grid; grid-template-columns:1.05fr .95fr; gap:36px; align-items:center;
  padding:clamp(24px,5vw,72px) 0 clamp(32px,5vw,64px); }
.landing-hero > * { min-width:0; } /* cegah grid blowout di layar kecil */
.landing-badge { display:inline-flex; align-items:center; gap:8px; font-size:13px; font-weight:700;
  color:var(--accent); background:var(--accent-soft); border:1px solid var(--accent-soft);
  padding:7px 14px; border-radius:999px; margin-bottom:18px; }
.landing-badge .hs-ic { width:15px; height:15px; }
.landing-hero h1 { font-size:clamp(32px,5vw,56px); line-height:1.08; letter-spacing:-1.5px; margin:0 0 16px; }
.landing-hero h1 em { font-style:normal;
  background:linear-gradient(120deg,var(--accent),var(--accent-deep)); -webkit-background-clip:text;
  background-clip:text; color:transparent; }
.lh-sub { font-size:clamp(15px,2vw,18px); color:var(--text-2); line-height:1.65; margin:0 0 26px; max-width:52ch; }
.lh-cta { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:22px; }
.btn-lg { padding:14px 30px; font-size:16px; min-height:52px; }
.lh-checks { list-style:none; margin:0; padding:0; display:flex; gap:18px; flex-wrap:wrap; }
.lh-checks li { display:flex; align-items:center; gap:7px; font-size:14px; color:var(--text-2); font-weight:600; }
.lh-checks .hs-ic { width:16px; height:16px; color:var(--accent); }

.lh-visual { position:relative; perspective:1200px; }
.landing-mock { background:var(--surface); border:1px solid var(--border); border-radius:18px;
  box-shadow:0 30px 80px rgba(0,0,0,.45), 0 0 0 1px var(--accent-soft), 0 0 60px var(--accent-soft);
  transform:rotateY(-8deg) rotateX(4deg); transition:transform .4s ease; overflow:hidden; }
.lh-visual:hover .landing-mock { transform:rotateY(-3deg) rotateX(1deg); }
.lm-bar { display:flex; align-items:center; gap:7px; padding:12px 16px; border-bottom:1px solid var(--border); }
.lm-dot { width:10px; height:10px; border-radius:50%; background:var(--border); }
.lm-title { margin-left:8px; font-size:13px; font-weight:700; }
.lm-badge { margin-left:auto; font-size:11px; font-weight:800; color:var(--accent);
  background:var(--accent-soft); padding:4px 10px; border-radius:999px; }
.lm-body { padding:16px; }
.lm-preview { position:relative; height:190px; border-radius:12px;
  background:linear-gradient(135deg,var(--accent-soft),var(--surface-2) 60%,var(--accent-soft));
  border:1px solid var(--border); display:flex; align-items:center; justify-content:center; margin-bottom:12px; }
.lm-ph .hs-ic { width:44px; height:44px; color:var(--accent); opacity:.7; }
.lm-gen { position:absolute; bottom:10px; right:10px; display:inline-flex; align-items:center; gap:6px;
  font-size:12px; font-weight:800; color:var(--on-accent,#fff);
  background:linear-gradient(135deg,var(--accent-deep),var(--accent)); padding:8px 14px; border-radius:999px; }
.lm-gen .hs-ic { width:14px; height:14px; }
.lm-prompt { display:flex; align-items:center; justify-content:space-between; gap:10px;
  background:var(--surface-2); border:1px solid var(--border); border-radius:12px;
  padding:11px 14px; font-size:13px; color:var(--text-2); margin-bottom:10px; }
.lm-prompt span:first-child { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; flex:1; }
.lm-send { flex:none; width:30px; height:30px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; color:var(--on-accent,#fff);
  background:linear-gradient(135deg,var(--accent-deep),var(--accent)); }
.lm-send .hs-ic { width:15px; height:15px; }
.lm-row { display:flex; gap:8px; }
.lm-chip { font-size:11.5px; font-weight:700; color:var(--text-2); background:var(--surface-2);
  border:1px solid var(--border); padding:5px 11px; border-radius:999px; }
.lm-chip-acc { color:var(--accent); border-color:var(--accent-soft); background:var(--accent-soft); }
.lh-float { position:absolute; display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:800;
  background:var(--surface-3); border:1px solid var(--border); border-radius:999px; padding:9px 15px;
  box-shadow:var(--shadow); animation:floatY 3.5s ease-in-out infinite; }
.lh-float .hs-ic { width:15px; height:15px; color:var(--accent); }
.lh-float.f1 { top:6%; right:-8px; }
.lh-float.f2 { bottom:10%; left:-12px; animation-delay:1.7s; }
@keyframes floatY { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-10px); } }

.landing-sec { padding:clamp(28px,4vw,56px) 0; }
.landing-sec h2, .landing-cta h2 { font-size:clamp(22px,3.4vw,32px); letter-spacing:-.5px; margin:0 0 22px; text-align:center; }
.landing-feats { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.landing-feat { display:flex; gap:13px; background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px; }
.lf-ic { flex:none; width:42px; height:42px; border-radius:12px; display:flex; align-items:center;
  justify-content:center; color:var(--accent); background:var(--accent-soft); }
.lf-ic .hs-ic { width:21px; height:21px; }
.landing-feat b { display:block; margin-bottom:5px; font-size:15px; }
.landing-feat p { margin:0; font-size:13.5px; color:var(--text-2); line-height:1.55; }
.landing-steps { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:14px; }
.landing-step { display:flex; gap:13px; padding:6px 4px; }
.ls-n { flex:none; width:40px; height:40px; border-radius:50%; display:flex; align-items:center;
  justify-content:center; font-weight:800; font-size:17px; color:var(--on-accent,#fff);
  background:linear-gradient(135deg,var(--accent-deep),var(--accent)); }
.landing-step b { display:block; margin-bottom:5px; font-size:15px; }
.landing-step p { margin:0; font-size:13.5px; color:var(--text-2); line-height:1.55; }
.landing-cta { text-align:center; background:var(--surface); border:1px solid var(--border);
  border-radius:calc(var(--radius) + 6px); padding:clamp(30px,5vw,56px) 20px; margin:clamp(20px,4vw,40px) 0; }
.landing-cta p { color:var(--text-2); margin:0 0 22px; }
.landing-foot { display:flex; gap:10px; align-items:center; justify-content:center;
  padding:26px 0 10px; color:var(--text-2); font-size:13px; }
.landing-foot a { color:var(--text-2); }
@media (max-width:860px) {
  .landing-hero { grid-template-columns:1fr; gap:30px; }
  .lh-visual { max-width:480px; perspective:none; }
  .landing-mock, .lh-visual:hover .landing-mock { transform:none; }
  .lh-float.f1 { right:0; }
  .lh-float.f2 { left:0; }
  .lh-cta { flex-direction:column; align-items:stretch; }
  .lh-cta .btn { width:100%; text-align:center; }
}
.profile-edit{margin-top:16px;border-top:1px solid var(--border);padding-top:14px}
.profile-edit>h3{font-size:14px;margin:0 0 10px}
.avatar-edit{display:flex;align-items:center;gap:14px}
.avatar-edit .avatar{width:56px;height:56px;font-size:20px;flex:none}
.wallpaper-thumb{width:100%;height:96px;object-fit:cover;border-radius:12px;border:1px solid var(--border);margin-bottom:10px;display:block}
.wallpaper-empty{height:96px;border:1px dashed var(--border);border-radius:12px;display:flex;align-items:center;
  justify-content:center;color:var(--text-2);font-size:13px;margin-bottom:10px}
.swatch-grid{display:flex;flex-wrap:wrap;gap:10px}
.swatch{width:46px;height:46px;border-radius:50%;border:2px solid transparent;cursor:pointer;position:relative;
  flex:none;transition:transform .1s;padding:0}
.swatch:hover{transform:scale(1.08)}
.swatch.active{border-color:var(--text);box-shadow:0 0 0 3px var(--accent-soft)}
.swatch .sw-check{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.swatch .sw-check .hs-ic{width:20px;height:20px}
.swatch-row{display:flex;align-items:center;gap:10px}
.swatch-name{font-size:13px}

/* ===== Modal ===== */
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:150;display:flex;align-items:center;justify-content:center;padding:16px;animation:toastIn .2s ease}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:18px;box-shadow:var(--shadow);width:min(94vw,480px);max-height:90vh;overflow-y:auto;padding:22px}
.modal h2{margin:0 0 14px;font-size:18px}
.modal .modal-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px;flex-wrap:wrap}

/* ===== Dashboard ===== */
.stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:16px 0}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px}
.stat .num{font-size:28px;font-weight:800;color:var(--accent);line-height:1.1}
.stat .lbl{font-size:12.5px;color:var(--text-2);margin-top:4px}
.template-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.template{border:1px solid var(--border);background:var(--surface-2);border-radius:12px;padding:12px;cursor:pointer;text-align:left;color:var(--text);font:inherit;transition:transform .08s}
.template:hover{background:var(--surface-3);transform:translateY(-2px);border-color:var(--accent)}
.template .t-ic{font-size:24px;display:block;margin-bottom:6px}
.template .t-name{font-weight:700;font-size:13.5px;display:block}
.template .t-desc{font-size:11.5px;color:var(--text-2);display:block;margin-top:3px;line-height:1.4}
.media-strip{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px}
.media-thumb{position:relative;border-radius:10px;overflow:hidden;border:1px solid var(--border);background:var(--surface-2);aspect-ratio:1;cursor:pointer}
.media-thumb img,.media-thumb video{width:100%;height:100%;object-fit:cover}
.media-thumb .thumb-kind{position:absolute;bottom:6px;left:6px;font-size:10.5px;font-weight:700;background:rgba(0,0,0,.6);color:#fff;padding:2px 8px;border-radius:99px}
.section-head{display:flex;align-items:center;justify-content:space-between;margin:22px 0 12px;gap:10px}
.section-head h2{margin:0;font-size:18px}
.quick-gen .mode-row{display:flex;gap:8px;margin:12px 0;flex-wrap:wrap}
.mode-chip{padding:9px 16px;border-radius:99px;border:1px solid var(--border);background:var(--surface-2);color:var(--text-2);font-weight:700;cursor:pointer;font-size:13.5px}
.mode-chip.active{background:var(--accent-soft);border-color:var(--accent);color:var(--text)}

/* ===== Upload / dropzone ===== */
.dropzone{border:2px dashed var(--border);border-radius:var(--radius);padding:28px 18px;text-align:center;cursor:pointer;background:var(--surface-2);transition:border-color .15s, background .15s}
.dropzone:hover,.dropzone.dragover{border-color:var(--accent);background:var(--accent-soft)}
.dropzone .d-ic{font-size:38px;margin-bottom:8px}
.preview-box{margin-top:12px;text-align:center}
.preview-box img,.preview-box video{max-height:300px;border-radius:12px;margin:0 auto;border:1px solid var(--border)}

/* ===== Frames page ===== */
.frames-player{background:#000;border-radius:var(--radius);overflow:hidden;border:1px solid var(--border)}
.frames-player video{width:100%;max-height:52vh}
.timeline-row{display:flex;align-items:center;gap:10px;margin-top:10px}
.timeline-row input[type=range]{flex:1}
.timestamp{font-variant-numeric:tabular-nums;font-weight:700;font-size:14px;min-width:86px;text-align:center;background:var(--surface-2);border:1px solid var(--border);padding:8px 10px;border-radius:10px}
.frame-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:10px;margin-top:14px}
.frame-item{border:1px solid var(--border);border-radius:10px;overflow:hidden;background:var(--surface-2)}
.frame-item img{width:100%;aspect-ratio:16/9;object-fit:cover;background:#000}
.frame-item .f-meta{padding:8px 10px;font-size:12px;color:var(--text-2);display:flex;justify-content:space-between;align-items:center;gap:6px}
.frame-item .f-num{font-weight:800;color:var(--accent)}

/* ===== Lightbox ===== */
.lightbox{position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:160;display:flex;align-items:center;justify-content:center;padding:20px;flex-direction:column;gap:12px}
.lightbox img,.lightbox video{max-height:78vh;max-width:94vw;border-radius:12px}
.lightbox .lb-bar{display:flex;gap:8px;flex-wrap:wrap;justify-content:center}
.zoomable{cursor:zoom-in}
/* Panggung pinch-zoom: cubit untuk zoom, geser saat zoom, double-tap untuk toggle. */
.lb-stage{width:100%;flex:1;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden;touch-action:none}
.lb-stage img{max-width:100%;max-height:100%;border-radius:12px;user-select:none;-webkit-user-select:none;touch-action:none;transform-origin:center center}
.lb-zoom-inline{display:inline-flex;gap:8px}
/* Lightbox review hasil job */
.lb-review{padding:0;gap:0;z-index:170}
.lb-review .lb-stage{position:absolute;inset:0}
.lb-review video{max-height:84vh;max-width:94vw;border-radius:12px;position:relative}
.lb-close{position:absolute;top:12px;right:12px;background:rgba(10,6,20,.6);border:1px solid var(--border);z-index:2}
.lb-title{position:absolute;bottom:16px;left:50%;transform:translateX(-50%);color:#fff;font-size:12px;max-width:92vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:.85;z-index:2}
.lb-zoom{position:absolute;bottom:52px;left:50%;transform:translateX(-50%);display:flex;gap:8px;z-index:2}
.lb-zoom .icon-btn{background:rgba(10,6,20,.6);border:1px solid var(--border)}

/* ===== Tables / lists ===== */
.list-item{display:flex;align-items:center;gap:12px;padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-2);margin-bottom:8px}
.list-item .li-body{flex:1;min-width:0}
.list-item .li-title{font-weight:700;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.list-item .li-sub{font-size:12px;color:var(--text-2);margin-top:3px}
.list-actions{display:flex;gap:6px;flex:none}
.toolbar{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:14px}
.toolbar input[type=text],.toolbar select{width:auto;min-width:140px;flex:1}
.pagination{display:flex;align-items:center;justify-content:center;gap:12px;margin-top:18px;color:var(--text-2);font-size:14px}

/* ===== Toggle switch ===== */
.switch{position:relative;display:inline-block;width:48px;height:27px;flex:none}
.switch input{opacity:0;width:0;height:0}
.slider{position:absolute;inset:0;cursor:pointer;background:var(--surface-3);border:1px solid var(--border);border-radius:99px;transition:.2s}
.slider:before{content:"";position:absolute;height:19px;width:19px;left:3px;bottom:3px;background:var(--text-2);border-radius:50%;transition:.2s}
.switch input:checked + .slider{background:var(--accent-deep);border-color:var(--accent)}
.switch input:checked + .slider:before{transform:translateX(21px);background:#fff}
.setting-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid var(--border)}
.setting-row:last-child{border-bottom:none}
.setting-row .s-label{font-weight:700;font-size:14.5px}
.setting-row .s-desc{font-size:12.5px;color:var(--text-2);margin-top:3px;line-height:1.5;max-width:520px}

/* ===== Key manager ===== */
.key-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:16px;margin-bottom:12px}
.key-card .k-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.key-card .k-name{font-weight:800;font-size:15px}
.key-masked{font-family:ui-monospace,Menlo,Consolas,monospace;font-size:12.5px;color:var(--text-2);background:var(--surface-2);padding:6px 10px;border-radius:8px;word-break:break-all}
.feature-chips{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.test-result{margin-top:10px;font-size:13px;line-height:1.5;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:10px 12px;white-space:pre-wrap;word-break:break-word}
pre.code{background:var(--surface-2);border:1px solid var(--border);border-radius:10px;padding:12px;font-size:12px;overflow-x:auto;max-height:300px;overflow-y:auto}

/* ===== Footer ===== */
.app-foot{text-align:center;color:var(--text-2);font-size:12px;padding:24px 0 8px}

/* ===== Responsive ===== */
@media (max-width:900px){
  .only-mobile{display:inline-flex}
  .sidebar{
    position:fixed;top:0;left:0;bottom:0;z-index:80;
    height:100vh;border-radius:0 18px 18px 0;
    transform:translateX(-105%);transition:transform .25s ease;
    width:min(78vw,264px);
  }
  .sidebar.open{transform:none;box-shadow:var(--shadow)}
  .stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .key-pill{display:none}
  .view{padding:16px 14px 60px}
}
@media (min-width:901px){
  .drawer-overlay{display:none !important}
}
@media (prefers-reduced-motion:reduce){
  *{animation-duration:.01ms !important;transition-duration:.01ms !important}
}



/* ===== Chat AI ===== */
.chat-wrap { display:flex; flex-direction:column; height:calc(100vh - 130px); min-height:440px; max-height:900px; position:relative; }
.chat-head { display:flex; align-items:center; padding:2px 2px 10px; }
.chat-msgs { flex:1; overflow-y:auto; padding:6px 4px 12px; display:flex; flex-direction:column; }

/* pesan user: bubble kanan */
.msg { margin:7px 0; max-width:100%; }
.msg-user { display:flex; flex-direction:column; align-items:flex-end; }
.msg-user .bubble { background:var(--accent); color:var(--on-accent); padding:10px 15px;
  border-radius:20px 20px 6px 20px; max-width:82%; width:fit-content;
  overflow-wrap:anywhere; line-height:1.5; font-size:15px;
  box-shadow:0 3px 10px rgba(0,0,0,.25); }
.msg-user .msg-img { display:block; max-width:100%; border-radius:14px; margin-bottom:6px; }
.msg-user .msg-text { margin:2px 0; }

/* pesan AI: teks polos, TIDAK bisa diseleksi (kecuali mode pilih) */
.msg-ai { color:var(--text); font-size:15.5px; line-height:1.65; overflow-wrap:anywhere; word-break:break-word;
  user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; }
.msg-ai .ai-body.selectable { user-select:text; -webkit-user-select:text; -webkit-touch-callout:default; }
.msg-ai .ai-body { max-width:100%; }
.ai-actions { display:flex; gap:6px; margin-top:8px; align-items:center; }
.ai-act { width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center;
  background:var(--card-2, rgba(127,127,127,.12)); color:var(--text-2);
  border:1px solid var(--line); cursor:pointer; }
.ai-act .hs-ic { width:16px; height:16px; }
.ai-act:active { transform:scale(.9); }
.ai-liked { display:inline-flex; color:#ff5b7f; margin-left:2px; }
.ai-liked .hs-ic { width:17px; height:17px; fill:currentColor; }
.msg-error { color:#ff6b6b; font-size:14px; }

/* lampiran */
.chat-att { display:flex; flex-wrap:wrap; gap:8px; padding:0 2px; }
.chat-att:not(:empty) { padding-bottom:10px; }
.att-chip { display:inline-flex; align-items:center; gap:6px; background:var(--card-2, rgba(127,127,127,.12));
  border:1px solid var(--line); border-radius:12px; padding:4px 6px 4px 4px; font-size:12.5px; color:var(--text); }
.att-chip img { width:44px; height:44px; object-fit:cover; border-radius:8px; }
.att-chip .hs-ic { width:16px; height:16px; }
.att-chip button { border:none; background:none; color:var(--text-2); font-size:17px; cursor:pointer; padding:0 5px; line-height:1; }
.msg-user .att-chip { background:rgba(255,255,255,.16); border-color:transparent; color:inherit; margin:3px 2px; }

/* komposer: + kiri bawah, pil panjang, kirim kanan melayang */
.chat-composer { display:flex; align-items:flex-end; gap:10px; padding:10px 2px 4px; position:relative; }
.cmp-circle { width:50px; height:50px; border-radius:50%; flex:none; display:flex; align-items:center; justify-content:center;
  border:none; cursor:pointer; }
.cmp-circle .hs-ic { width:22px; height:22px; }
.cmp-circle:active { transform:scale(.92); }
#chatPlus { background:var(--card-2, rgba(127,127,127,.16)); color:var(--text); border:1px solid var(--line);
  box-shadow:0 4px 14px rgba(0,0,0,.25); }
.cmp-send { background:var(--accent); color:var(--on-accent); opacity:.45; transition:opacity .2s, transform .15s;
  box-shadow:0 8px 22px rgba(0,0,0,.35), 0 0 0 0 var(--accent-soft); }
.cmp-send.ready { opacity:1; box-shadow:0 8px 24px var(--accent-soft), 0 4px 14px rgba(0,0,0,.3); }
.cmp-pill { flex:1; min-width:0; background:var(--card); border:1px solid var(--line);
  border-radius:999px; padding:11px 18px; display:flex; flex-direction:column;
  box-shadow:0 4px 16px rgba(0,0,0,.25); transition:border-radius .18s ease; }
.cmp-pill.tall { border-radius:22px; }
.cmp-pill textarea { width:100%; background:none; border:none; outline:none; resize:none; color:var(--text);
  font-size:15.5px; line-height:1.45; min-height:0; height:23px; max-height:150px; font-family:inherit; padding:0;
  display:block; }
.cmp-pill textarea:focus { outline:none; border:none; }
.cmp-pill textarea::placeholder { color:var(--text-2); }

/* menu kecil (sidebar popup) */
.cmp-menu, .lp-menu, .gear-menu { position:absolute; z-index:30; display:flex; flex-direction:column; gap:4px;
  background:var(--card); border:1px solid var(--line); border-radius:14px; padding:6px;
  box-shadow:0 12px 32px rgba(0,0,0,.4); min-width:180px; }
.cmp-menu.hidden, .lp-menu.hidden, .gear-menu.hidden { display:none; }
.cmp-menu { left:2px; bottom:72px; }
.gear-menu { left:2px; top:52px; max-height:60vh; overflow:hidden; }
.lp-menu { position:fixed; }
.cmp-menu button, .lp-menu button, .gear-menu button { display:flex; align-items:center; gap:10px; background:none; border:none; color:var(--text);
  font-size:14.5px; padding:11px 12px; border-radius:10px; cursor:pointer; text-align:left; white-space:nowrap; }
.cmp-menu button:hover, .lp-menu button:hover, .gear-menu button:hover { background:var(--accent-soft); }
.cmp-menu .hs-ic, .gear-new .hs-ic { width:20px; height:20px; color:var(--accent); }
.gear-new { font-weight:600; border-bottom:1px solid var(--line); border-radius:10px 10px 0 0 !important; }
.gear-list { overflow-y:auto; display:flex; flex-direction:column; gap:2px; }
.gear-empty { padding:12px; font-size:13.5px; color:var(--text-2); text-align:center; }
.gear-item { display:flex; align-items:center; gap:8px; padding:10px 8px 10px 12px; border-radius:10px; cursor:pointer; }
.gear-item:hover { background:var(--accent-soft); }
.gear-item.active { background:var(--accent-soft); }
.gear-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:14px; color:var(--text); }
.gear-del { border:none; background:none; color:var(--text-2); font-size:18px; cursor:pointer; padding:2px 8px; line-height:1; border-radius:8px; }
.gear-del:hover { color:#ff6b6b; background:rgba(255,107,107,.12); }

/* indikator mengetik */
.typing { display:inline-flex; gap:5px; padding:8px 2px; }
.typing span { width:7px; height:7px; border-radius:50%; background:var(--text-2); opacity:.5; animation:tp 1.2s infinite; }
.typing span:nth-child(2) { animation-delay:.15s; }
.typing span:nth-child(3) { animation-delay:.3s; }
@keyframes tp { 0%,60%,100% { transform:none; opacity:.4; } 30% { transform:translateY(-5px); opacity:1; } }

/* markdown di pesan AI */
.msg-ai .md-h { margin:.7em 0 .4em; font-size:1.1em; }
.msg-ai h1.md-h { font-size:1.28em; } .msg-ai h2.md-h { font-size:1.18em; }
.md-p { margin:.45em 0; }
.md-list { margin:.45em 0; padding-left:1.4em; }
.md-list li { margin:.25em 0; }
.md-quote { margin:.5em 0; padding:.5em .8em; border-left:3px solid var(--accent); background:var(--accent-soft); border-radius:0 8px 8px 0; }
.md-hr { border:none; border-top:1px solid var(--line); margin:.8em 0; }
.md a { color:var(--accent); }
.md-pre-wrap { margin:.6em 0; border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.md-pre-head { display:flex; justify-content:space-between; align-items:center; padding:6px 10px;
  background:var(--card-2, rgba(127,127,127,.12)); font-size:12px; color:var(--text-2); }
.md-copy { border:1px solid var(--line); background:transparent; color:var(--text-2); border-radius:8px;
  font-size:12px; padding:3px 10px; cursor:pointer; }
.md-pre { margin:0; padding:10px 12px; overflow-x:auto; font-size:13px; line-height:1.55; }
.md-pre code { font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md code:not(pre code) { background:var(--card-2, rgba(127,127,127,.16)); padding:1px 6px; border-radius:6px;
  font-size:.92em; font-family:ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.md-table-wrap { overflow-x:auto; margin:.6em 0; }
.md-table { border-collapse:collapse; width:100%; font-size:13.5px; }
.md-table th, .md-table td { border:1px solid var(--line); padding:7px 10px; text-align:left; }
.md-table th { background:var(--card-2, rgba(127,127,127,.12)); }
@media (max-width:640px) {
  .chat-wrap { height:calc(100vh - 96px); min-height:0; }
  .msg-user .bubble { max-width:86%; }
}
