/* SQUAD TEKNIK — admin.css */
:root {
  --navy: #102B46; --navy-2: #0B1F33; --blue: #1677D2; --accent: #16B8D4; --wa: #1FAF55;
  --ink: #0E1F33; --text: #33465B; --muted: #64778C; --bg: #F2F5F9; --white: #FFFFFF; --line: #DCE5EE;
  --danger: #D23B3B; --warn-bg: #FFF4D6; --warn-ink: #6B4E00; --ok: #178A43;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Sora", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --r: 14px; --shadow: 0 1px 2px rgba(16,43,70,.06), 0 6px 18px -8px rgba(16,43,70,.18);
  --sb-w: 260px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); margin: 0; line-height: 1.25; }
code { font-family: var(--font-mono); font-size: .85em; background: rgba(16,43,70,.07); padding: .1em .35em; border-radius: 5px; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Tombol */
.abtn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .62rem 1rem; border-radius: 10px; border: 1.5px solid transparent; font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, transform .15s; white-space: nowrap; background: none; color: var(--ink); }
.abtn:active { transform: translateY(1px); }
.abtn-sm { padding: .42rem .75rem; font-size: .82rem; }
.abtn-block { width: 100%; }
.abtn-primary { background: var(--blue); color: var(--white); }
.abtn-primary:hover { background: color-mix(in srgb, var(--blue) 85%, #000); }
.abtn-outline { border-color: var(--line); background: var(--white); color: var(--navy); }
.abtn-outline:hover { border-color: var(--blue); color: var(--blue); }
.abtn-ghost { color: var(--navy); }
.abtn-ghost:hover { background: rgba(16,43,70,.06); }
.abtn-danger-outline { border-color: #F1C4C4; color: var(--danger); background: var(--white); }
.abtn-danger-outline:hover { background: #FFF2F2; }
.icon-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: var(--white); color: var(--navy); cursor: pointer; padding: 0; flex: none; }
.icon-btn:hover:not(:disabled) { border-color: var(--blue); color: var(--blue); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.btn-col { display: grid; gap: .6rem; }
.btn-col .abtn { justify-content: flex-start; }

/* Login */
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; background: radial-gradient(90% 70% at 90% 0%, rgba(22,119,210,.45), transparent 60%), var(--navy); background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px), radial-gradient(90% 70% at 90% 0%, rgba(22,119,210,.45), transparent 60%); background-size: 44px 44px, 44px 44px, auto; }
.login-card { width: min(420px, 100%); background: var(--white); border-radius: 20px; padding: 2rem 1.6rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,.45); }
.login-brand { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.login-brand strong { display: block; font-family: var(--font-head); color: var(--navy); letter-spacing: .03em; }
.login-brand small { color: var(--muted); font-size: .8rem; }
.login-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: var(--accent); display: grid; place-items: center; flex: none; }
.login-mark .icon { width: 22px; height: 22px; }
.login-card h1 { font-size: 1.35rem; margin-bottom: 1.2rem; }
.login-hint { font-size: .82rem; color: var(--muted); text-align: center; margin: 1rem 0; }
.login-back { display: block; text-align: center; margin-top: 1rem; font-size: .88rem; font-weight: 600; }

.notice { font-size: .82rem; border-radius: 10px; padding: .8rem .9rem; }
.notice strong { display: block; margin-bottom: .2rem; }
.notice-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #F1D98A; }

/* Layout aplikasi */
.app { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sb-w); background: var(--navy-2); color: rgba(255,255,255,.75); display: flex; flex-direction: column; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
.sidebar.is-open { transform: none; box-shadow: 20px 0 40px rgba(0,0,0,.25); }
.sb-overlay { position: fixed; inset: 0; background: rgba(6,18,32,.5); z-index: 40; }
.sb-brand { display: flex; align-items: center; gap: .7rem; padding: 1.2rem 1.1rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sb-brand strong { display: block; color: var(--white); font-family: var(--font-head); font-size: .95rem; letter-spacing: .03em; }
.sb-brand small { font-size: .74rem; color: var(--accent); font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.sb-brand .login-mark { background: rgba(255,255,255,.08); }
.sb-nav { flex: 1; overflow-y: auto; padding: .8rem .6rem; display: flex; flex-direction: column; gap: 2px; }
.sb-nav a, .sb-link { display: flex; align-items: center; gap: .7rem; padding: .62rem .8rem; border-radius: 9px; color: rgba(255,255,255,.72); text-decoration: none; font-weight: 600; font-size: .9rem; border: 0; background: none; font-family: inherit; cursor: pointer; width: 100%; text-align: left; }
.sb-nav a:hover, .sb-link:hover { background: rgba(255,255,255,.06); color: var(--white); }
.sb-nav a.is-active { background: var(--blue); color: var(--white); }
.sb-nav a.is-active .icon { color: var(--white); }
.sb-nav .icon { color: var(--accent); }
.sb-foot { padding: .6rem; border-top: 1px solid rgba(255,255,255,.08); }
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 1.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.save-status { margin: 0; font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: .35rem; }
.save-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.save-status.is-saved::before { background: var(--wa); }
.save-status.is-saving::before { background: #F5B301; }
.save-status.is-error { color: var(--danger); }
.save-status.is-error::before { background: var(--danger); }
.topbar-actions { display: flex; gap: .5rem; }
.topbar-actions .abtn span { display: none; }
.content { padding: 1.2rem 1rem 4rem; max-width: 1100px; }
.panel-desc { color: var(--muted); margin: 0 0 1rem; }
@media (min-width: 640px) { .topbar-actions .abtn span { display: inline; } }
@media (min-width: 1024px) {
  .sidebar { transform: none; }
  .sb-overlay { display: none !important; }
  .main { margin-left: var(--sb-w); }
  .topbar-menu { display: none; }
  .topbar { padding: .9rem 2rem; }
  .content { padding: 1.6rem 2rem 4rem; }
}

/* Kartu */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 1.2rem; }
.card-head { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.2rem .3rem; }
.card-head h2 { font-size: 1.02rem; }
.card-head p { margin: .25rem 0 0; color: var(--muted); font-size: .86rem; }
.card-body { padding: 1rem 1.2rem 1.2rem; }
.card-danger { border-color: #F1C4C4; }
.two-col { display: grid; gap: 0 1.2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: 1fr 1fr; } }

/* Form */
.fld-grid { display: grid; gap: .9rem 1rem; }
@media (min-width: 720px) { .fld-grid { grid-template-columns: 1fr 1fr; } .fld-wide { grid-column: 1 / -1; } }
.fld { min-width: 0; margin-bottom: .2rem; }
.login-card .fld { margin-bottom: .9rem; }
.fld > label { display: block; font-weight: 700; font-size: .83rem; color: var(--ink); margin-bottom: .3rem; }
.req { color: var(--danger); }
.input { width: 100%; font: inherit; font-size: .93rem; color: var(--ink); background: var(--white); border: 1.5px solid var(--line); border-radius: 10px; padding: .6rem .75rem; transition: border-color .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,119,210,.15); }
textarea.input { resize: vertical; min-height: 64px; }
.input-sm { padding: .45rem .65rem; font-size: .84rem; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.help { font-size: .78rem; color: var(--muted); margin: .3rem 0 0; }
.fld-error { color: var(--danger); font-size: .8rem; margin: .25rem 0 0; }
.fld-error:empty { display: none; }
.counter { display: block; text-align: right; font-size: .74rem; color: var(--muted); margin-top: .2rem; }
.counter.is-over { color: #B76E00; font-weight: 700; }
.switch { display: inline-flex; align-items: center; gap: .6rem; cursor: pointer; font-weight: 600; font-size: .88rem; color: var(--ink); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 40px; height: 22px; border-radius: 999px; background: #C7D3DF; position: relative; transition: background .2s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .switch-ui { background: var(--wa); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--accent); outline-offset: 2px; }
.toggle-row { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; padding: .3rem 0 1.2rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--line); }
.color-field { display: flex; gap: .5rem; align-items: center; }
.color-field input[type=color] { width: 46px; height: 40px; border: 1.5px solid var(--line); border-radius: 10px; padding: 3px; background: var(--white); cursor: pointer; flex: none; }
.icon-field { display: flex; gap: .5rem; align-items: center; }
.icon-preview { width: 40px; height: 40px; border-radius: 10px; background: var(--navy); color: var(--accent); display: grid; place-items: center; flex: none; }

/* Gambar */
.img-field { display: flex; gap: .9rem; align-items: flex-start; flex-wrap: wrap; }
.img-preview { width: 132px; height: 96px; border-radius: 10px; overflow: hidden; background: var(--bg); border: 1px dashed var(--line); display: grid; place-items: center; color: var(--muted); flex: none; }
.img-preview img { width: 100%; height: 100%; object-fit: cover; }
.img-preview.is-contain img { object-fit: contain; padding: 6px; }
.img-preview .icon { width: 28px; height: 28px; }
.img-ctrl { flex: 1; min-width: 200px; display: grid; gap: .5rem; }

/* List */
.list { display: grid; gap: .55rem; margin-bottom: .9rem; }
.list-item { border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.list-item.is-off .li-headl { opacity: .55; }
.li-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .6rem; flex-wrap: wrap; }
.li-headl { display: flex; align-items: center; gap: .6rem; flex: 1; min-width: 200px; }
.li-thumb { width: 52px; height: 40px; border-radius: 8px; overflow: hidden; background: var(--bg); display: grid; place-items: center; color: var(--muted); flex: none; }
.li-thumb img { width: 100%; height: 100%; object-fit: cover; }
.li-icon { background: var(--navy); color: var(--accent); width: 40px; }
.li-initial { font-weight: 800; color: var(--navy); font-family: var(--font-head); }
.li-title-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: .6rem; background: none; border: 0; padding: .2rem; font: inherit; text-align: left; cursor: pointer; color: inherit; }
.li-pos { font-family: var(--font-mono); font-size: .72rem; color: var(--muted); }
.li-texts { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.li-title { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-chev { color: var(--muted); transition: transform .2s; }
.li-title-btn[aria-expanded="true"] .li-chev { transform: rotate(180deg); }
.li-actions { display: flex; gap: .3rem; }
.li-body { padding: 1rem; border-top: 1px solid var(--line); background: #FAFCFE; border-radius: 0 0 12px 12px; }
.list-foot { display: flex; flex-wrap: wrap; gap: .6rem; }
.empty { color: var(--muted); text-align: center; padding: 1.2rem; border: 1px dashed var(--line); border-radius: 12px; margin: 0; }
.pill { display: inline-block; font-size: .7rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; background: var(--bg); color: var(--text); border: 1px solid var(--line); }
.pill-on { background: #E6F6EC; color: var(--ok); border-color: #BFE8CB; }
.pill-off { background: #F3F3F3; color: #777; }
.pill-demo { background: #FFF1C2; color: #7A5500; border-color: #F0D27A; font-family: var(--font-mono); }

/* Dashboard */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; gap: .8rem; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; text-decoration: none; color: inherit; box-shadow: var(--shadow); transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--blue); transform: translateY(-2px); }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--navy); color: var(--accent); display: grid; place-items: center; flex: none; }
.stat small { display: block; font-size: .76rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.5rem; color: var(--ink); line-height: 1.1; }
.stat em { font-style: normal; font-size: .76rem; color: var(--muted); }
.info-dl { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; margin: 0; }
.info-dl dt { font-size: .74rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.info-dl dd { margin: .1rem 0 0; color: var(--ink); font-weight: 600; word-break: break-word; }
.dl-wide { grid-column: 1 / -1; }
.meter { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin: .35rem 0 .25rem; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--blue)); border-radius: inherit; }
.meter.is-warn span { background: linear-gradient(90deg, #F5B301, var(--danger)); }
.info-dl small { color: var(--muted); font-weight: 500; }
.action-grid { display: grid; gap: .6rem; }
@media (min-width: 520px) { .action-grid { grid-template-columns: 1fr 1fr; } }
.mode-grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .mode-grid { grid-template-columns: 1fr 1fr; } }
.mode { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; background: #FAFCFE; }
.mode h3 { font-size: .98rem; margin: .4rem 0; }
.mode p { margin: 0; font-size: .88rem; }
.mode-tag { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .12em; color: var(--blue); font-weight: 600; }
.steps { margin: 0 0 1rem; padding-left: 1.2rem; display: grid; gap: .35rem; font-size: .9rem; }

/* Alert */
.alert { display: flex; gap: .7rem; align-items: flex-start; padding: .8rem 1rem; border-radius: 12px; font-size: .88rem; margin-bottom: 1rem; }
.alert .icon { margin-top: .15rem; }
.alert-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid #F1D98A; }
.main > .alert { margin: 1rem 1rem 0; }
@media (min-width: 1024px) { .main > .alert { margin: 1rem 2rem 0; } }
.alert-info { background: #E8F3FD; color: #0D4A82; border: 1px solid #BBD9F5; }
.alert-error { background: #FFF2F2; color: var(--danger); border: 1px solid #F1C4C4; }

/* Pratinjau warna */
.swatch-preview { margin: 1rem 0 .8rem; }
.sw-hero { border-radius: 12px; padding: 1rem 1.1rem; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; color: #fff; }
.sw-hero strong { font-family: var(--font-head); font-size: .95rem; flex: 1; min-width: 160px; }
.sw-btn { padding: .45rem .9rem; border-radius: 999px; font-weight: 700; font-size: .8rem; color: #fff; }
.sw-link { font-size: .78rem; font-weight: 600; width: 100%; }
.sw-row { display: flex; gap: .4rem; margin-top: .5rem; }
.sw-row span { flex: 1; height: 14px; border-radius: 6px; }

/* Modal */
.amodal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.amodal-backdrop { position: absolute; inset: 0; background: rgba(6,18,32,.55); }
.amodal-panel { position: relative; background: var(--white); border-radius: 16px; padding: 1.5rem; width: min(540px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); }
.amodal-panel h2 { font-size: 1.15rem; margin-bottom: .6rem; padding-right: 2.5rem; }
.amodal-close { position: absolute; top: 1rem; right: 1rem; }

/* Toast */
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 200; display: grid; gap: .5rem; max-width: min(380px, calc(100% - 2rem)); }
.toast { display: flex; gap: .6rem; align-items: flex-start; background: var(--navy); color: var(--white); padding: .75rem 1rem; border-radius: 12px; font-size: .88rem; box-shadow: 0 14px 30px -12px rgba(0,0,0,.4); animation: tin .25s ease; }
.toast .icon { color: var(--accent); margin-top: .1rem; }
.toast-error { background: #7A1F1F; }
.toast-error .icon { color: #FFB4B4; }
.toast-warn { background: #6B4E00; }
.toast.out { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
