/* ksirqu public — stylesheet ringan */
:root {
  --brand: #6576ff;
  --brand-2: #8549d4;
  --ink: #1c2b4a;
  --muted: #6b7f9e;
  --line: #e6ebf5;
  --bg: #f6f8fd;
  --ok: #0fac81;
  --warn: #f4a100;
}
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* topbar */
.topbar { background:#fff; border-bottom:1px solid var(--line); }
.topbar .wrap { display:flex; align-items:center; justify-content:space-between; min-height:64px; padding:10px 20px; gap:12px; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; font-size:1.25rem; color:var(--ink); }
.brand:hover { text-decoration:none; }
.brand-logo { display:block; width:245px; height:auto; max-width:52vw; }
@media (max-width:560px){ .brand-logo { width:auto; height:40px; } }
.brand-mark { width:34px;height:34px;border-radius:9px;display:inline-flex;align-items:center;justify-content:center;color:#fff;font-weight:900;font-size:1rem;
  background:linear-gradient(135deg,var(--brand),var(--brand-2)); }
.top-actions { display:flex; align-items:center; gap:14px; font-size:.9rem; }
.btn-mini { background:#eef1ff; color:var(--brand); border-radius:8px; padding:6px 12px; font-weight:600; font-size:.85rem; }
.btn-mini:hover { text-decoration:none; background:#e2e8ff; }
.user-chip { display:flex; align-items:center; gap:10px; color:var(--ink); font-weight:600; font-size:.88rem; }
.user-chip img, .avatar { width:32px;height:32px;border-radius:50%; object-fit:cover; }
.avatar { background:#e2e8ff; color:var(--brand); display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.user-id { display:flex; flex-direction:column; line-height:1.2; }
.user-name { font-weight:700; font-size:.9rem; color:var(--ink); }
.user-mail { font-size:.74rem; color:var(--muted); font-weight:500; }
.auth-ok { display:inline-flex; align-items:center; gap:6px; background:#e6f8f1; color:#0a7a5c; font-size:.78rem; font-weight:700; padding:3px 9px; border-radius:999px; }
.auth-ok::before { content:""; width:7px;height:7px;border-radius:50%; background:#0fac81; }
.login-wrap { display:flex; align-items:center; gap:10px; }
.quota-pill { font-size:.8rem; background:#fff3e0; color:#b26a00; padding:4px 10px; border-radius:999px; font-weight:600; }

/* hero */
.hero { text-align:center; padding:64px 20px 40px; }
.hero h1 { font-size:2.5rem; line-height:1.2; margin:0 0 12px; letter-spacing:-.02em; }
.hero h1 span { background:linear-gradient(90deg,var(--brand),var(--brand-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.hero p { color:var(--muted); font-size:1.1rem; max-width:640px; margin:0 auto; }
.hero .chips { margin-top:18px; display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.chip { background:#fff; border:1px solid var(--line); color:var(--muted); font-size:.82rem; padding:6px 12px; border-radius:999px; }

/* tool cards */
.tools { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:24px; padding:16px 0 56px; }
.tool-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:26px; box-shadow:0 6px 24px rgba(28,43,74,.06); display:flex; flex-direction:column; }
.tool-ico { width:58px;height:58px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;margin-bottom:16px; }
.tool-ico.doc { background:#eef4ff; }
.tool-ico.img { background:#f4edff; }
.tool-ico.pf { background:#e8f7ef; }
.tool-ico img { width:32px;height:32px;object-fit:contain; }
.tool-card h2 { margin:0 0 6px; font-size:1.3rem; }
.tool-card .tag { color:var(--muted); font-size:.9rem; }
.tool-feats { margin:16px 0 20px; padding:0; list-style:none; display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.tool-feats li { font-size:.88rem; color:var(--ink); display:flex; align-items:center; gap:8px; }
.tool-feats li::before { content:""; width:8px;height:8px;border-radius:50%; background:var(--brand); flex:0 0 auto; }
.tool-card.img .tool-feats li::before { background:var(--brand-2); }
.tool-card.pf .tool-feats li::before { background:var(--ok); }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; border:0; cursor:pointer; font-weight:700; border-radius:10px; padding:12px 18px; font-size:1rem; transition:.15s; }
.btn-primary { background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; }
.btn-primary:hover { filter:brightness(1.05); text-decoration:none; }
#downloadBtn img { width:18px;height:18px;object-fit:contain;vertical-align:-2px;margin-right:6px;filter:brightness(0) invert(1); }
.btn-ghost { background:#eef1ff; color:var(--brand); }
.btn-ghost:hover { background:#e2e8ff; text-decoration:none; }
.btn-lg { padding:14px 22px; }
.btn[disabled] { opacity:.55; cursor:not-allowed; }
.btn:active { transform:translateY(1px); }
.card-footer-btn { margin-top:auto; }

/* footer */
.foot { border-top:1px solid var(--line); background:#fff; }
.foot .wrap { display:flex; align-items:center; justify-content:space-between; padding-top:20px; padding-bottom:20px; color:var(--muted); font-size:.85rem; flex-wrap:wrap; gap:8px; }

/* generic page (tool) */
.page { padding:34px 20px 60px; }
.page-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.page-head h1 { margin:0 0 4px; font-size:1.6rem; }
.page-head .sub { color:var(--muted); margin:0; }
.panel { background:#fff; border:1px solid var(--line); border-radius:18px; padding:22px; box-shadow:0 6px 24px rgba(28,43,74,.05); }
.dropzone { border:2px dashed #c7d4ff; background:#f7f9ff; border-radius:16px; padding:44px 20px; text-align:center; cursor:pointer; transition:.15s; }
.dropzone:hover, .dropzone.over { border-color:var(--brand); background:#eef4ff; }
.dropzone .ico { font-size:2.4rem; }
.dropzone .ico img { width:60px; height:60px; object-fit:contain; }
.dropzone p { color:var(--muted); margin:8px 0 0; font-size:.9rem; }
.form-row { display:flex; gap:14px; align-items:flex-end; flex-wrap:wrap; margin-top:18px; }
.field { flex:1 1 220px; }
.field label { display:block; font-size:.85rem; font-weight:600; margin-bottom:6px; color:var(--ink); }
.select, .input { width:100%; border:1px solid #d3dcf0; border-radius:10px; padding:11px 12px; font-size:1rem; background:#fff; color:var(--ink); }
.select:focus, .input:focus { outline:none; border-color:var(--brand); }
.alert { border-radius:12px; padding:12px 14px; font-size:.9rem; margin-top:16px; }
.alert.ok { background:#e6f8f1; color:#0a7a5c; }
.alert.err { background:#fdecec; color:#c0392b; }
.d-none { display:none !important; }
.result { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:12px; padding:14px 16px; margin-top:16px; }
.msg-box { max-width:520px; margin:80px auto; text-align:center; }
.msg-box h1 { font-size:1.5rem; }
.msg-box p { color:var(--muted); }

/* image editor */
.editor-grid { display:grid; grid-template-columns:1fr; gap:18px; }
@media(min-width:900px){ .editor-grid { grid-template-columns:1fr 260px; } }
.canvas-holder { background:#0f1429; border-radius:16px; overflow:auto; max-height:70vh; display:flex; align-items:center; justify-content:center; padding:16px; }
.canvas-holder canvas { max-width:100%; box-shadow:0 4px 20px rgba(0,0,0,.3); }
.side-tools { display:flex; flex-direction:column; gap:14px; }
.opt label { font-weight:600; font-size:.85rem; display:block; margin-bottom:4px; }
.opt .input { padding:8px 10px; }
.icon-row { display:flex; gap:8px; flex-wrap:wrap; }
.hint { font-size:.8rem; color:var(--muted); }
.bar { display:flex; align-items:center; gap:10px; margin-top:12px; flex-wrap:wrap; }
.bar .quota-pill { margin-left:auto; }

/* kartu format tujuan (selectable) */
.format-grid { display:flex; flex-wrap:wrap; gap:10px; margin-top:10px; }
.fmt-card { position:relative; display:inline-flex; flex-direction:column; align-items:flex-start; gap:2px; min-width:118px; padding:12px 16px; border:1.5px solid #d3dcf0; background:#fff; border-radius:14px; cursor:pointer; font:inherit; color:var(--ink); text-align:left; transition:border-color .15s, background .15s, box-shadow .15s; }
.fmt-card:hover { border-color:#c0ccf5; background:#f6f8ff; }
.fmt-card.sel { border-color:var(--brand); background:#eef1ff; box-shadow:0 4px 12px rgba(101,118,255,.18); }
.fmt-card .fe { font-weight:800; font-size:1.05rem; text-transform:uppercase; letter-spacing:.02em; }
.fmt-card .fl { font-size:.72rem; color:var(--muted); max-width:130px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fmt-card .mark { display:none; }
.fmt-card.sel .mark { display:block; position:absolute; top:8px; right:10px; color:var(--brand); font-weight:900; }
.fmt-card.sel .mark::after { content:"✓"; }

/* ---- Canvas editor: marquee crop (image-editor) ---- */
.canvas-holder canvas { cursor:crosshair; touch-action:none; }
.sel-bar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; padding:8px 12px; background:#eef1ff; border:1px solid #d8e0ff; border-radius:10px; font-size:.85rem; color:var(--ink); }
.sel-bar .btn-mini { padding:4px 10px; }

/* ---- Alat Pilih / Geser (segmented control) ---- */
.tool-seg { display:inline-flex; flex-wrap:wrap; background:#eef1ff; border:1px solid #d8e0ff; border-radius:11px; overflow:hidden; }
.tool-seg button { border:0; background:transparent; padding:7px 11px; font:inherit; font-size:.84rem; font-weight:600; cursor:pointer; color:var(--muted); display:inline-flex; gap:5px; align-items:center; }
.tool-seg button + button { border-left:1px solid #d8e0ff; }
.tool-seg button.active { background:var(--brand); color:#fff; }
.tool-seg .ico-s { font-size:1.05rem; line-height:1; }

/* ===== Pas Foto Editor ===== */
.step-head { display:flex; gap:12px; align-items:flex-start; }
.step-no { width:30px;height:30px;border-radius:50%; background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; display:inline-flex; align-items:center; justify-content:center; font-weight:800; flex:0 0 auto; }
.step-head strong { display:block; }
.step-head .hint { margin:0; }
.size-seg button { flex:1 1 auto; justify-content:center; }
.pf-grid { display:grid; grid-template-columns:1fr; gap:18px; }
@media(min-width:900px){ .pf-grid { grid-template-columns:1fr 250px; } }
.sheet-toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-top:16px; }
.pool { display:flex; gap:10px; flex-wrap:wrap; margin:6px 0 4px; align-items:stretch; }
.pool-item { width:78px; border:2px solid var(--line); border-radius:12px; padding:6px; cursor:grab; background:#fff; text-align:center; transition:.15s; }
.pool-item:hover { border-color:#c3cdf5; box-shadow:0 4px 12px rgba(28,43,74,.08); }
.pool-item.active { border-color:var(--brand); box-shadow:0 0 0 3px rgba(101,118,255,.2); }
.pool-item img { width:100%; height:58px; object-fit:contain; border-radius:6px; background:#f0f3fc; display:block; }
.pool-item .plabel { display:block; font-size:.62rem; color:var(--muted); margin-top:3px; }
.pf-sheet-stage { background:#dfe5f2; border-radius:14px; padding:16px; overflow:auto; max-height:86vh; }
.a4 { background:#fff; display:grid; margin:0 auto; box-shadow:0 10px 30px rgba(20,30,60,.25); }
.slot { position:relative; background:#fbfcff; box-shadow:inset 0 0 0 1px rgba(150,165,205,.45); }
.slot .slot-ph { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:.6rem; color:#b3bfda; }
.slot.filled img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.slot.filled.contain img { object-fit:contain; }
.slot .slot-x { position:absolute; top:2px; right:3px; width:16px;height:16px; border-radius:50%; background:rgba(220,53,69,.9); color:#fff; font-size:.62rem; line-height:16px; text-align:center; cursor:pointer; display:none; z-index:2; }
.slot.filled:hover .slot-x { display:block; }
#printArea { display:none; }

/* ===== Tema gelap (toggle di header) ===== */
.theme-toggle { background:none; border:1px solid var(--line); color:var(--ink); width:34px;height:34px; border-radius:9px; font-size:1.05rem; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; padding:0; transition:.15s; }
.theme-toggle:hover { background:#eef1ff; border-color:#c9d6f2; }

html[data-theme="dark"] {
  --ink: #e8edf7;
  --muted: #9aa8c2;
  --line: #27354f;
  --bg: #0b1220;
  --ok: #38d2a2;
  --warn: #ffc25e;
  color-scheme: dark;
}
html[data-theme="dark"] body { background:var(--bg); color:var(--ink); }
html[data-theme="dark"] .topbar,
html[data-theme="dark"] .foot,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .result,
html[data-theme="dark"] .chip,
html[data-theme="dark"] .fmt-card { background:#111a2c; }
html[data-theme="dark"] .theme-toggle:hover { background:#1a2542; border-color:#2c3c63; }
html[data-theme="dark"] .brand { color:var(--ink); }
html[data-theme="dark"] .dropzone { background:#101a2e; border-color:#33456a; }
html[data-theme="dark"] .dropzone:hover,
html[data-theme="dark"] .dropzone.over { background:#16213c; border-color:var(--brand); }
html[data-theme="dark"] .fmt-card:hover { border-color:#3a4c78; background:#16203a; }
html[data-theme="dark"] .fmt-card.sel { border-color:var(--brand); background:#1c2a52; }
html[data-theme="dark"] .select,
html[data-theme="dark"] .input { background:#0f1830; color:var(--ink); border-color:#2a3a5c; }
html[data-theme="dark"] .select option { background:#111a2c; }
html[data-theme="dark"] .btn-mini,
html[data-theme="dark"] .btn-ghost { background:#1a2542; color:#b7c3ff; }
html[data-theme="dark"] .btn-mini:hover,
html[data-theme="dark"] .btn-ghost:hover { background:#22305a; text-decoration:none; }
html[data-theme="dark"] .sel-bar,
html[data-theme="dark"] .tool-seg { background:#182340; border-color:#2c3c63; }
html[data-theme="dark"] .sel-bar .btn-mini { background:#22305a; }
html[data-theme="dark"] .tool-seg button + button { border-left-color:#2c3c63; }
html[data-theme="dark"] .tool-seg button { color:var(--muted); }
html[data-theme="dark"] .tool-seg button.active { background:var(--brand); color:#fff; }
html[data-theme="dark"] .tool-ico.doc { background:#1b2a52; }
html[data-theme="dark"] .tool-ico.img { background:#2a1f4d; }
html[data-theme="dark"] .tool-ico.pf { background:#123426; }
html[data-theme="dark"] .quota-pill { background:#3a2c12; color:var(--warn); }
html[data-theme="dark"] .alert.ok { background:#0f2a22; color:#5fe0b6; }
html[data-theme="dark"] .alert.err { background:#3a1717; color:#ff9b93; }
html[data-theme="dark"] .auth-ok { background:#123d30; color:#52e0b0; }
html[data-theme="dark"] .avatar { background:#22305a; color:#b7c3ff; }
html[data-theme="dark"] .brand-logo { filter:drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
html[data-theme="dark"] .user-chip img { background:#22305a; }
html[data-theme="dark"] .ksirqu-modal-card { background:#141d33; }
html[data-theme="dark"] .ksirqu-modal-card h3 { color:var(--ink); }
html[data-theme="dark"] .ksirqu-modal-card p { color:var(--muted); }
/* ikon SVG (navy gelap) dibuat terang di mode gelap agar terlihat */
html[data-theme="dark"] .tool-ico img,
html[data-theme="dark"] .dropzone .ico img,
html[data-theme="dark"] img.icon-svg,
html[data-theme="dark"] img[src$=".svg"] { filter: brightness(0) invert(1); opacity:.96; }

/* ===== Pas Foto Editor — tema gelap ===== */
html[data-theme="dark"] .pool-item { background:#0f1830; border-color:#2a3a5c; }
html[data-theme="dark"] .pool-item:hover { border-color:#465b8f; }
html[data-theme="dark"] .pool-item img { background:#16213c; }
html[data-theme="dark"] .pf-sheet-stage { background:#0a1020; }
html[data-theme="dark"] .slot { background:#0e1626; box-shadow:inset 0 0 0 1px rgba(90,108,150,.5); }
html[data-theme="dark"] .slot .slot-ph { color:#4c5d80; }
html[data-theme="dark"] .slot.empty { background:transparent; }

/* ===== Cetak (Pas Foto Editor): hanya tampilkan lembar A4 ===== */
@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { background:#fff !important; margin:0; padding:0; }
  body.printing > * { display:none !important; }
  body.printing #printArea { display:block !important; position:static; }
  #printArea .a4 { box-shadow:none; margin:0; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
  #printArea .slot { background:#fff; box-shadow:none; }
  #printArea .slot .slot-ph,
  #printArea .slot .slot-x { display:none; }
}

/* ============================================================
   KSIRQU — Landing & Registrasi
============================================================ */
.hero-cta { margin-top:26px; }
.section-title { text-align:center; font-size:1.6rem; font-weight:800; margin:58px 0 8px; color:var(--ink); }
.pricing-note { text-align:center; color:var(--muted); margin:0 auto 8px; max-width:680px; font-size:1rem; }
.tools { margin-top:26px; }
.tool-ico .ic { font-size:1.7rem; line-height:1; }

.pricing-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:18px; margin-top:22px; }
.price-card { background:#fff; border:1px solid var(--line); border-radius:18px; padding:26px; box-shadow:0 6px 24px rgba(28,43,74,.06); display:flex; flex-direction:column; }
.price-card.featured { border:2px solid var(--brand); }
.price-card h3 { margin:0 0 4px; font-size:1.15rem; }
.price-card .price { font-size:1.45rem; font-weight:800; color:var(--brand); margin-bottom:8px; }
.price-card.featured .price { color:var(--brand-2); }

.cta-band { margin:56px auto; }
.cta-card { background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; text-align:center; padding:46px 24px; border-radius:22px; }
.cta-card h2 { margin:0 0 10px; color:#fff; }
.cta-card p { color:rgba(255,255,255,.92); max-width:540px; margin:0 auto 20px; }
.cta-card .btn-primary { background:#fff; color:var(--brand); }
.cta-card .btn-primary:hover { filter:brightness(.98); }

.foot-links a { color:inherit; text-decoration:underline; }
.btn-mini.accent { background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; }
.btn-mini.accent:hover { filter:brightness(1.05); color:#fff; }

/* ---- registrasi ---- */
.reg-wrap { max-width:880px; margin:0 auto; padding:36px 20px 20px; }
.reg-card { background:#fff; border:1px solid var(--line); border-radius:20px; padding:30px 30px 26px; box-shadow:0 8px 30px rgba(28,43,74,.08); }
.reg-card h1 { font-size:1.5rem; margin:0 0 4px; }
.reg-sub { color:var(--muted); margin:0 0 20px; font-size:.95rem; }
.reg-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:14px 18px; }
.field.col-2 { grid-column:span 2; }
@media (max-width:600px){ .field.col-2 { grid-column:span 1; } }
.field textarea { resize:vertical; min-height:84px; }
.reg-alert { border-radius:10px; padding:12px 14px; font-size:.92rem; margin-bottom:16px; }
.reg-alert.err { background:#fdeaea; color:#a11; border:1px solid #f3c1c1; }
.reg-alert.ok { background:#e6f8f1; color:#0a7a5c; border:1px solid #bfe6d6; }
.reg-note { font-size:.85rem; color:var(--muted); margin-top:10px; }
.reg-actions { margin-top:22px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.reg-divider { text-align:center; color:var(--muted); margin:18px 0 4px; font-size:.85rem; }
.reg-google { display:inline-flex; align-items:center; gap:10px; background:#fff; color:var(--ink); border:1px solid var(--line); padding:12px 18px; border-radius:10px; font-weight:700; }
.reg-google:hover { text-decoration:none; background:#f6f8ff; }

html[data-theme="dark"] .price-card,
html[data-theme="dark"] .reg-card { background:#111a2c; border-color:#243049; }
html[data-theme="dark"] .reg-google { background:#0f1830; color:var(--ink); border-color:#2a3a5c; }
html[data-theme="dark"] .reg-alert.err { background:#3a1717; color:#ff9a9a; border-color:#6b2a2a; }
