/* Asisten Konten — tampilan terang, bersih, dengan animasi halus */
:root {
  --accent: #4F46E5;
  --accent-dark: #3730A3;
  --accent-tint: #EEF0FF;
  --ink: #0F172A;
  --muted: #5B6475;
  --line: #E6E8F0;
  --bg: #F6F7FB;
  --card: #FFFFFF;
  --ok: #047857;
  --ok-tint: #E7F7F0;
  --warn: #92400E;
  --warn-tint: #FFF4E5;
  --err: #B91C1C;
  --err-tint: #FDECEC;
  --radius: 18px;
  --shadow: 0 14px 30px rgba(15, 23, 42, .07);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Animasi ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { from { background-position: -400px 0; } to { background-position: 400px 0; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(4,120,87,.45); } 70% { box-shadow: 0 0 0 10px rgba(4,120,87,0); } 100% { box-shadow: 0 0 0 0 rgba(4,120,87,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
.rise { animation: rise .6s var(--ease) both; }
.d1 { animation-delay: .06s; } .d2 { animation-delay: .12s; } .d3 { animation-delay: .18s; } .d4 { animation-delay: .24s; }
.grow { transform-origin: left; animation: grow 1.2s var(--ease) both; }
.skel { background: linear-gradient(90deg, #EEF0F5 0%, #F8F9FC 50%, #EEF0F5 100%); background-size: 800px 100%; animation: shimmer 1.4s linear infinite; border-radius: 6px; }
.pulse { animation: pulse 1.8s infinite; }
.spinner { width: 16px; height: 16px; border-radius: 99px; border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.spinner.dark { border-color: rgba(15,23,42,.15); border-top-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Header ---------- */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-in { max-width: 1320px; margin: 0 auto; padding: 12px 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; object-fit: cover; flex: 0 0 32px; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; font-weight: 600; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 14px; border-radius: 999px; transition: background .2s, color .2s; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover { background: #F1F2F6; color: var(--ink); }
.nav a.active { color: var(--accent); background: var(--accent-tint); }
.soon { font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 99px; background: #F1F2F6; color: var(--muted); }
.user-menu { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.avatar { width: 36px; height: 36px; border-radius: 99px; background: var(--accent-tint); color: var(--accent-dark); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }

/* ---------- Layout ---------- */
.page { max-width: 1320px; margin: 0 auto; padding: 28px 28px 60px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px; }
.page-head h1 { font-size: 30px; font-weight: 800; }
.sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.grow-main { flex: 999 1 560px; min-width: 0; }
.side { flex: 1 1 320px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h2 { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lift { transition: transform .25s ease, box-shadow .25s ease; }
.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

/* ---------- Tombol ---------- */
.btn { font: inherit; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 12px; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s ease, filter .2s ease, background .2s ease; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:hover { filter: brightness(1.05); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { color: #fff; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { color: var(--ink); background: #FAFBFD; }
.btn-soft { background: var(--accent-tint); color: var(--accent-dark); }
.btn-danger { background: #fff; color: var(--err); border-color: #F5C2C2; }
.btn-sm { font-size: 12.5px; padding: 7px 12px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link-btn { font: inherit; background: none; border: none; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 700; }
.input, .select, .textarea {
  font: inherit; font-weight: 500; font-size: 14.5px; color: var(--ink); background: #fff;
  padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 12px; width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.hint { font-size: 12px; font-weight: 500; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.error-text { color: var(--err); font-size: 12.5px; font-weight: 600; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Chip & badge ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.chip-accent { background: var(--accent-tint); color: var(--accent-dark); }
.chip-ok { background: var(--ok-tint); color: #065F46; }
.chip-warn { background: var(--warn-tint); color: var(--warn); }
.chip-err { background: var(--err-tint); color: var(--err); }
.chip-gray { background: #F1F2F6; color: var(--muted); }
.chip-ai { background: #FDEBF3; color: #9D174D; }
.dot { width: 8px; height: 8px; border-radius: 99px; display: inline-block; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a { font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px; text-decoration: none; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .2s; }
.filters a.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Statistik ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 14px; }
.stat { flex: 1 1 200px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.stat .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.bar { height: 6px; border-radius: 999px; background: #EEF0F5; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Upload ---------- */
.dropzone { border: 2px dashed #C7CBE0; border-radius: 20px; background: #fff; padding: 30px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; cursor: pointer; transition: border-color .3s, background .3s, transform .3s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 4%, #fff); }
.dropzone.drag { transform: scale(1.01); }
.drop-icon { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.queue { display: flex; flex-direction: column; gap: 12px; }
.queue-item { display: flex; flex-direction: column; gap: 6px; animation: rise .4s var(--ease) both; }
.queue-item .top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.queue-item .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue-item .bar > span { transition: width .2s linear; width: 0; }
.queue-item.done .bar > span { background: var(--ok); }
.queue-item.fail .bar > span { background: var(--err); }

/* ---------- Grid konten ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.post-card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; transition: transform .25s ease, box-shadow .25s ease, border-color .2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.post-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.post-thumb { aspect-ratio: 4 / 3; background: #EEF0F5; position: relative; display: block; overflow: hidden; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.post-card:hover .post-thumb img { transform: scale(1.04); }
.post-thumb .tags { position: absolute; inset: 10px 10px auto 10px; display: flex; justify-content: space-between; gap: 6px; pointer-events: none; }
.tag { font-size: 11px; font-weight: 700; padding: 4px 8px; border-radius: 7px; background: rgba(255,255,255,.94); color: var(--ink); }
.tag-dark { background: rgba(15,23,42,.78); color: #fff; }
.post-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.post-body:hover { color: var(--ink); }
.post-title { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.select-box { position: absolute; top: 10px; right: 10px; z-index: 2; width: 26px; height: 26px; border-radius: 8px; background: rgba(255,255,255,.94); display: flex; align-items: center; justify-content: center; cursor: pointer; opacity: 0; transition: opacity .2s; }
.post-card:hover .select-box, .post-card.selected .select-box, .selecting .select-box { opacity: 1; }
.select-box input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.bulkbar { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 30; background: var(--ink); color: #fff; border-radius: 16px; padding: 10px 12px 10px 18px; display: none; align-items: center; gap: 10px; box-shadow: 0 20px 40px rgba(15,23,42,.25); animation: toastIn .35s var(--ease) both; }
.bulkbar.show { display: flex; }
.bulkbar .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); }

/* ---------- Editor ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gallery .main { grid-column: span 3; }
.gallery figure { margin: 0; border-radius: 14px; overflow: hidden; background: #EEF0F5; position: relative; }
.gallery figure img, .gallery figure video { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.gallery .main img, .gallery .main video { aspect-ratio: auto; max-height: 520px; object-fit: contain; background: #0F172A; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-chips button { font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--ink); transition: all .2s; }
.lang-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.writing { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; display: none; flex-direction: column; gap: 8px; }
.is-writing .writing { display: flex; }
.is-writing .caption-field { display: none; }

/* ---------- Dashboard ---------- */
.hero { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 26px 28px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.hero h2 { font-size: 24px; font-weight: 800; }
.check-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #F1F2F6; text-decoration: none; color: var(--ink); }
.check-item:last-child { border-bottom: none; }
.check-item:hover { color: var(--ink); }
.check-dot { flex: 0 0 24px; height: 24px; border-radius: 99px; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.check-item.done .check-dot { background: var(--ok); border-color: var(--ok); }
.check-item.done .check-label { color: var(--muted); text-decoration: line-through; }
.recent { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.recent a { display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: #EEF0F5; }
.recent img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.recent a:hover img { transform: scale(1.05); }

/* ---------- Pengaturan ---------- */
.tabs { flex: 1 1 220px; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 84px; }
.tabs a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 11px 12px; border-radius: 10px; color: #334155; transition: background .2s, color .2s; }
.tabs a:hover { background: #F1F2F6; }
.tabs a.on { background: var(--accent-tint); color: var(--accent); }
.panel { display: none; }
.panel.on { display: flex; animation: rise .45s var(--ease) both; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.swatch { width: 40px; height: 40px; border-radius: 99px; border: none; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.swatch:hover { transform: scale(1.08); }
.swatch.on { box-shadow: 0 0 0 3px #fff, 0 0 0 5px currentColor; }
.preview-box { background: var(--bg); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.key-row { display: flex; gap: 8px; align-items: center; }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: flex; flex-wrap: wrap; background: #fff; }
.auth-art { flex: 1 1 480px; background: var(--accent-tint); padding: 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; position: relative; overflow: hidden; }
.auth-form { flex: 1 1 440px; display: flex; align-items: center; justify-content: center; padding: 48px 28px; }
.auth-form .inner { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 20px; }
.float-card { background: #fff; border-radius: 18px; padding: 12px; box-shadow: 0 24px 48px rgba(15,23,42,.10); position: absolute; animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); } 50% { transform: translateY(-12px) rotate(var(--r, 0deg)); } }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 84px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font: inherit; font-size: 12px; font-weight: 700; padding: 7px 10px; border: none; border-radius: 8px; background: #F1F2F6; color: var(--ink); cursor: pointer; }
@media (max-width: 760px) { .auth-art { display: none; } }

/* ---------- Notifikasi ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: 0 16px 36px rgba(15,23,42,.25); animation: toastIn .35s var(--ease) both; max-width: 92vw; }
.toast.err { background: var(--err); }
.alert { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; }
.alert-err { background: var(--err-tint); color: var(--err); }
.alert-warn { background: var(--warn-tint); color: var(--warn); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pagination a, .pagination span { font-size: 13px; font-weight: 600; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; }
.pagination .on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* =====================================================================
   Tambahan tahap 2–4: ikon, kalender, komentar, studio, jadwal cepat
   ===================================================================== */
.icon { flex-shrink: 0; vertical-align: -3px; }
.btn .icon, .chip .icon, .nav .icon, .tabs .icon, .filters .icon { vertical-align: middle; }
.icon-box { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-tint); color: var(--accent); flex: 0 0 40px; }
.icon-box.ok { background: var(--ok-tint); color: var(--ok); }
.icon-box.warn { background: var(--warn-tint); color: var(--warn); }
.icon-box.gray { background: #F1F2F6; color: var(--muted); }
.label-row { display: inline-flex; align-items: center; gap: 7px; }
.stat .label { display: flex; align-items: center; gap: 8px; }
.stat .label .icon { color: var(--accent); }
.nav a .icon { opacity: .85; }
.tabs a { display: flex; align-items: center; gap: 10px; }

/* Segmented switch (Profil / Halaman, mode komentar) */
.segmented { position: relative; display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 2px; }
.segmented a, .segmented button { position: relative; z-index: 1; font: inherit; font-size: 13.5px; font-weight: 700; padding: 9px 16px; border-radius: 10px; border: none; background: transparent; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; transition: background .3s var(--ease), color .3s var(--ease); }
.segmented .on { background: var(--accent); color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent); }
.segmented .on.page { background: var(--ok); box-shadow: 0 4px 12px rgba(4,120,87,.25); }

/* Timeline hari ini */
.slot { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 14px; transition: background .2s; text-decoration: none; color: var(--ink); }
.slot:hover { background: #F8F9FD; color: var(--ink); }
.slot .time { width: 54px; font-weight: 800; font-variant-numeric: tabular-nums; }
.slot .thumb { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: #EEF0F5; flex: 0 0 48px; }

/* Kalender */
.cal-wrap { overflow-x: auto; border: 1px solid #EEF0F5; border-radius: 16px; background: #fff; }
.cal { min-width: 900px; }
.cal-row { display: grid; grid-template-columns: 72px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid #EEF0F5; transition: background .25s; }
.cal-row:last-child { border-bottom: none; }
.cal-row:not(.cal-head):hover { background: #FAFBFD; }
.cal-head { background: #FAFBFD; position: sticky; top: 0; z-index: 1; }
.cal-head > div { padding: 10px 8px; border-left: 1px solid #EEF0F5; }
.cal-head > div:first-child { border-left: none; }
.cal-head .today { background: var(--accent-tint); }
.cal-time { padding: 14px 10px; font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; display: flex; align-items: flex-start; gap: 6px; color: var(--ink); }
.cal-cell { padding: 6px; border-left: 1px solid #EEF0F5; min-height: 78px; transition: background .2s; }
.cal-cell.drop-hover { background: var(--accent-tint); outline: 2px dashed var(--accent); outline-offset: -4px; }
.cal-cell.past { background: repeating-linear-gradient(135deg, #FAFBFD, #FAFBFD 6px, #F4F5F9 6px, #F4F5F9 12px); }
.cal-item { display: flex; gap: 8px; align-items: center; padding: 7px; border-radius: 11px; background: #fff; box-shadow: 0 0 0 1px #EEF0F5; text-decoration: none; color: var(--ink); cursor: grab; transition: transform .2s, box-shadow .2s; animation: rise .45s var(--ease) both; }
.cal-item:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(15,23,42,.10); color: var(--ink); }
.cal-item.dragging { opacity: .45; }
.cal-item img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: 0 0 36px; background: #EEF0F5; }
.cal-item .t { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item .m { display: flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 600; color: var(--muted); }
.cal-item.done { opacity: .6; cursor: default; }
.cal-add { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 64px; border-radius: 11px; color: #B5BBCB; transition: color .2s, background .2s; }
.cal-cell:hover .cal-add { color: var(--accent); background: #FAFBFD; }
.tray { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.tray .cal-item { flex: 0 0 210px; }

/* Jadwal cepat (HP) */
.quick { max-width: 520px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.ring { position: relative; width: 60px; height: 60px; }
.ring svg { transform: rotate(-90deg); }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.quick-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 14px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 16px 36px rgba(15,23,42,.07); animation: slideIn .55s var(--ease) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(40px) rotate(1.5deg); } to { opacity: 1; transform: none; } }
.quick-media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.quick-media .main { grid-column: span 3; }
.quick-media img, .quick-media video { width: 100%; border-radius: 14px; object-fit: cover; aspect-ratio: 4 / 3; background: #EEF0F5; }
.quick-media .main img, .quick-media .main video { aspect-ratio: auto; max-height: 360px; object-fit: contain; background: #0F172A; }

/* Komentar */
.comment { display: flex; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; transition: transform .25s ease, box-shadow .25s ease; animation: rise .5s var(--ease) both; }
.comment:hover { box-shadow: var(--shadow); }
.comment .who { flex: 0 0 40px; height: 40px; border-radius: 99px; background: var(--accent-tint); color: var(--accent-dark); font-weight: 800; font-size: 14px; display: flex; align-items: center; justify-content: center; }
.ai-reply { display: flex; gap: 10px; align-items: flex-start; background: var(--bg); border-radius: 12px; padding: 10px 12px; }
.ai-reply .textarea { min-height: 70px; background: #fff; }

/* Studio */
.gen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gen-card { border-radius: 16px; overflow: hidden; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; animation: reveal .7s var(--ease) both; }
@keyframes reveal { from { opacity: 0; transform: scale(.94); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.gen-card .media { aspect-ratio: 4 / 3; background: #EEF0F5; position: relative; }
.gen-card .media img { width: 100%; height: 100%; object-fit: cover; }
.gen-card .media .tag { position: absolute; top: 8px; left: 8px; }
.idea { text-align: left; font: inherit; font-size: 13px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; animation: rise .4s var(--ease) both; }
.idea:hover { border-color: var(--accent); background: var(--accent-tint); transform: translateY(-2px); }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-pick label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 700; font-size: 14px; cursor: pointer; transition: all .2s; }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
.type-pick input:checked + span { color: var(--accent); }
.type-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); color: var(--accent); }
.pill-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-pick label { cursor: pointer; }
.pill-pick input { position: absolute; opacity: 0; pointer-events: none; }
.pill-pick span { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; transition: all .2s; }
.pill-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pill-pick input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); }

/* Riwayat */
.log { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #F1F2F6; }
.log:last-child { border-bottom: none; }

/* Langkah panduan */
.steps { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: #334155; }
.steps li { margin-bottom: 4px; }
code.k { font-size: 12.5px; background: #F1F2F6; padding: 2px 6px; border-radius: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid #F1F2F6; vertical-align: middle; }

/* =====================================================================
   v3: navigasi bawah HP, sheet, dialog, alat edit, audio
   ===================================================================== */
.clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-sm { padding: 6px 30px 6px 10px; font-size: 13px; border-radius: 10px; width: auto; }

@media (max-width: 1320px) and (min-width: 821px) { .nav a { padding: 8px 10px; } .nav { font-size: 13.5px; } }

/* Navigasi bawah: hanya di layar kecil */
.bottom-nav { display: none; }
.sheet, .modal { border: none; outline: none; padding: 0; color: var(--ink); }
.sheet::backdrop, .modal::backdrop { background: rgba(15, 23, 42, .38); backdrop-filter: blur(2px); }

@media (max-width: 820px) {
  .topbar .nav { display: none; }
  .topbar-in { padding: 10px 16px; }
  .user-menu form { display: none; }
  .page { padding: 18px 14px calc(120px + env(safe-area-inset-bottom)); gap: 16px; }
  .page-head h1 { font-size: 24px; }
  .card { padding: 16px; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    height: 66px; padding: 0 6px; background: #fff; border-radius: 24px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
    animation: navIn .5s var(--ease) both;
  }
  .bottom-nav > a, .bottom-nav > button:not(.fab) {
    font: inherit; background: none; border: none; cursor: pointer; text-decoration: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: 100%; color: #9AA1B2; font-size: 10.5px; font-weight: 700; position: relative;
    transition: color .25s var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .bottom-nav > a .icon, .bottom-nav > button .icon { transition: transform .3s var(--ease); }
  .bottom-nav > a.on, .bottom-nav > button.on { color: var(--accent); }
  .bottom-nav > a.on .icon, .bottom-nav > button.on .icon { transform: translateY(-1px) scale(1.08); }
  .bottom-nav > a.on::after, .bottom-nav > button.on::after {
    content: ''; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 99px; background: var(--accent);
  }
  .bottom-nav > a.on span, .bottom-nav > button.on span { opacity: 0; transform: translateY(4px); }
  .bottom-nav span { transition: opacity .2s, transform .2s; }
  .bottom-nav > a:active .icon, .bottom-nav > button:active .icon { transform: scale(.88); }
  .fab {
    justify-self: center; width: 58px; height: 58px; margin-top: -30px; border-radius: 999px; border: 5px solid var(--bg);
    background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 12px 24px color-mix(in srgb, var(--accent) 45%, transparent);
    transition: transform .25s var(--ease), box-shadow .25s;
    -webkit-tap-highlight-color: transparent;
  }
  .fab:active { transform: scale(.92) rotate(90deg); }

  .bulkbar { bottom: calc(92px + env(safe-area-inset-bottom)); left: 12px; right: 12px; transform: none; flex-wrap: wrap; justify-content: center; animation: none; }
  .toast { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@keyframes navIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }

/* Bottom sheet */
.sheet {
  margin: auto 0 0; width: 100%; max-width: 100%; max-height: 86vh; background: #fff;
  border-radius: 26px 26px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom));
}
.sheet[open] { animation: sheetUp .38s var(--ease) both; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet-grip { width: 44px; height: 5px; border-radius: 99px; background: #DDE0EA; margin: 4px auto 14px; cursor: pointer; }
.sheet-title { font-weight: 800; font-size: 17px; margin-bottom: 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-item {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 18px; border: 1px solid var(--line);
  text-decoration: none; color: var(--ink); background: #FAFBFD; animation: rise .4s var(--ease) both;
}
.sheet-item:nth-child(2) { animation-delay: .04s; } .sheet-item:nth-child(3) { animation-delay: .08s; } .sheet-item:nth-child(4) { animation-delay: .12s; }
.sheet-item:active { transform: scale(.97); }
.sheet-item b { margin-top: 6px; font-size: 14.5px; }
.sheet-item span:last-child { font-size: 12px; color: var(--muted); }
.icon-box.ai { background: #FDEBF3; color: #9D174D; }
.sheet-list { display: flex; flex-direction: column; gap: 4px; }
.sheet-list a, .sheet-list button {
  font: inherit; font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 14px; padding: 13px 12px;
  border-radius: 14px; text-decoration: none; color: var(--ink); background: none; border: none; width: 100%; text-align: left; cursor: pointer;
}
.sheet-list a.on { background: var(--accent-tint); color: var(--accent-dark); }
.sheet-list a:active, .sheet-list button:active { background: #F1F2F6; }
.sheet-list form { margin: 0; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 6px; }
.sheet-list form button { color: var(--err); }
@media (min-width: 821px) { .sheet { max-width: 480px; margin: auto; border-radius: 24px; } .sheet[open] { animation: rise .3s var(--ease) both; } }

/* Dialog umum */
.modal { width: min(560px, 94vw); max-height: 90vh; border-radius: 22px; box-shadow: 0 30px 60px rgba(15,23,42,.25); }
.modal[open] { animation: rise .3s var(--ease) both; }
.modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.modal-head h2 { margin: 0; font-size: 18px; }
@media (max-width: 820px) {
  .modal { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 24px 24px 0 0; max-height: 88vh; }
  .modal[open] { animation: sheetUp .35s var(--ease) both; }
  .modal-body { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* Upload: pilihan bahasa & tujuan */
.upload-opts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; cursor: default; }
.upload-opts label { gap: 8px; font-weight: 700; color: var(--muted); }

/* Alat edit (akordeon) */
.tool { border: 1px solid var(--line); border-radius: 16px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.tool[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow); }
.tool > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.tool > summary::-webkit-details-marker { display: none; }
.tool > summary > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tool > summary > .icon:last-child { transition: transform .25s var(--ease); color: var(--muted); }
.tool[open] > summary > .icon:last-child { transform: rotate(90deg); }
.tool > form, .tool > div { padding: 4px 14px 16px; animation: rise .35s var(--ease) both; }
.tool[inert] { opacity: .5; }
.style-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.style-pick input { position: absolute; opacity: 0; pointer-events: none; }
.style-pick span { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1.5px solid var(--line); border-radius: 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: border-color .2s, background .2s; }
.style-pick i { font-style: normal; font-weight: 800; width: 34px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: #94A3B8; color: #fff; text-shadow: 1px 1px 2px rgba(0,0,0,.5); flex: 0 0 34px; }
.style-pick.s-dark i { background: #0F172A; text-shadow: none; }
.style-pick.s-light i { background: #F1F5F9; color: #0F172A; text-shadow: none; border: 1px solid var(--line); }
.style-pick.s-accent i { background: var(--accent); text-shadow: none; }
.style-pick input:checked + span { border-color: var(--accent); background: var(--accent-tint); }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Audio */
.track-picker { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; padding: 2px; }
.track-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; transition: border-color .2s, background .2s; }
.track-opt input { position: absolute; opacity: 0; pointer-events: none; }
.track-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-tint); }
.track-meta { display: flex; flex-direction: column; min-width: 0; }
.track-meta b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-play { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 99px; border: none; background: var(--accent); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .15s; }
.track-play:active { transform: scale(.9); }
.track-play.big { width: 44px; height: 44px; flex-basis: 44px; }
.track-play.playing { background: var(--ink); animation: pulse 1.6s infinite; }
span.track-play { background: #F1F2F6; color: var(--muted); }
.track-row { display: flex; align-items: flex-start; gap: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; animation: rise .5s var(--ease) both; }

/* Menu kecil (details) */
.menu-pop { position: relative; }
.menu-pop > summary { list-style: none; }
.menu-pop > summary::-webkit-details-marker { display: none; }
.menu-pop-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 25; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 36px rgba(15,23,42,.14); padding: 6px; min-width: 230px; animation: rise .2s var(--ease) both; }
.menu-item { font: inherit; font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border: none; background: none; border-radius: 10px; cursor: pointer; color: var(--ink); text-align: left; }
.menu-item:hover { background: #F6F7FB; }
.menu-item.danger { color: var(--err); }

/* Halaman Facebook */
.page-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-radius: 16px; transition: opacity .2s; }
.page-avatar { width: 42px; height: 42px; border-radius: 12px; background: #E8F0FE; color: #1D4ED8; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; }

/* Ide mingguan & performa */
.idea-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.idea-day { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #FAFBFD; animation: rise .45s var(--ease) both; }
.rank { width: 26px; height: 26px; border-radius: 8px; background: var(--accent-tint); color: var(--accent-dark); font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; }

/* =====================================================================
   Autopilot
   ===================================================================== */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 820px) { .grid-3 { grid-template-columns: 1fr; } }
.flow-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flow-steps > div { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--accent-dark); }
.flow-steps > div > span { position: absolute; top: 12px; right: 14px; width: 22px; height: 22px; border-radius: 99px; background: var(--accent-tint); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.flow-steps b { color: var(--ink); margin-top: 4px; }
.flow-steps small { color: var(--muted); font-size: 12px; }
@media (max-width: 820px) { .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pick-chips label { cursor: pointer; }
.pick-chips input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chips span { display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13px; font-weight: 600; background: #fff; transition: all .2s var(--ease); }
.pick-chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pick-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.toggles .check { align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.toggles .check > span { display: flex; flex-direction: column; gap: 2px; }
.toggles .check small { color: var(--muted); font-weight: 500; font-size: 12px; }
@media (max-width: 820px) { .toggles { grid-template-columns: 1fr; } }
.trend-box { border: 1px dashed var(--line); border-radius: 16px; padding: 12px; max-height: 340px; overflow: auto; }
.trend-box ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.trend-box li span { display: block; font-size: 12px; color: var(--muted); }
.ap-post { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 16px; animation: rise .45s var(--ease) both; }
.ap-thumb { width: 64px; height: 80px; flex: 0 0 64px; border-radius: 10px; overflow: hidden; background: #F1F2F6; }
.ap-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ap-title { display: block; font-weight: 700; color: var(--ink); text-decoration: none; margin: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ap-actions { display: flex; gap: 6px; align-items: center; }
@media (max-width: 820px) { .ap-post { flex-wrap: wrap; } .ap-actions { width: 100%; justify-content: flex-end; } }
.run-item { padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }

/* Target tugas */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 820px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.task-list { display: flex; flex-direction: column; gap: 12px; }
.task-row { display: flex; flex-direction: column; gap: 8px; }
.task-bar { height: 8px; border-radius: 99px; background: #E8EAF1; overflow: hidden; }
.task-bar span { display: block; height: 100%; border-radius: 99px; background: var(--accent); transition: width .8s var(--ease); animation: growBar 1s var(--ease) both; transform-origin: left; }
@keyframes growBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Pilihan sumber AI */
.provider-picks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.provider-pick input { position: absolute; opacity: 0; pointer-events: none; }
.provider-pick > span { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; height: 100%; }
.provider-pick small { color: var(--muted); font-size: 12.5px; }
.provider-pick input:checked + span { border-color: var(--accent); background: var(--accent-tint); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.provider-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 820px) { .provider-picks { grid-template-columns: 1fr; } }

/* Elemen tersembunyi harus selalu tersembunyi */
[hidden] { display: none !important; }
