/* ==========================================================================
   WIMS — WBI Integrated Monitoring System (tema Workshop Booth Indonesia)
   Merah WBI #D52246 · Tosca #2FC0C4 · Oranye #FF8F00 · Tinta #17141C
   ========================================================================== */
:root {
  --crimson: #D52246; --crimson-d: #A9142F; --crimson-s: #FCE8EC;
  --teal: #2FC0C4; --teal-d: #0F8589; --teal-s: #E1F6F6;
  --orange: #FF8F00; --orange-d: #B86500; --orange-s: #FFF1DC;
  --green: #1FA971; --green-d: #13784F; --green-s: #E0F5EB;
  --violet: #7B5CD6; --violet-d: #5638B0; --violet-s: #EEE9FB;
  --ink: #17141C; --ink-2: #221E29; --ink-3: #2F2A37;
  --cream: #F6F1E7; --cream-2: #EFE8DA; --paper: #FFFFFF;
  --line: #E7DFD0; --line-2: #D9CFBD;
  --text: #1E1A22; --muted: #7A7280; --muted-2: #A59DAA;
  --shadow-sm: 0 1px 2px rgba(23,20,28,.06), 0 1px 1px rgba(23,20,28,.04);
  --shadow: 0 10px 30px -12px rgba(23,20,28,.18), 0 2px 6px rgba(23,20,28,.05);
  --shadow-lg: 0 30px 70px -20px rgba(23,20,28,.45);
  --r: 16px; --r-sm: 10px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --serif: 'Playfair Display', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.22,1,.36,1);
  --spring: cubic-bezier(.34,1.56,.64,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--cream); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
.ic.flip { transform: rotate(180deg); }
.mono { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--crimson); }
.muted { color: var(--muted); }
.txt-red { color: var(--crimson); } .txt-teal { color: var(--teal-d); } .txt-orange { color: var(--orange-d); } .txt-green { color: var(--green-d); }
#confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 200; }

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 110px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .6; } }

/* ------------------------------------------------------------ teks kinetik */
.kw { display: inline-block; white-space: nowrap; }
.kc { display: inline-block; opacity: 0; transform: translateY(.7em) rotate(8deg); animation: kIn .7s var(--spring) forwards; animation-delay: var(--d, 0ms); }
@keyframes kIn { to { opacity: 1; transform: none; } }
.no-anim .kc { animation: none; opacity: 1; transform: none; }

/* ------------------------------------------------------------ LOGIN */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.login.leaving { animation: leave .42s var(--ease) forwards; }
@keyframes leave { to { opacity: 0; transform: scale(.98); filter: blur(4px); } }
.login-art { position: relative; overflow: hidden; background: var(--ink); color: #fff; padding: 36px 48px 0; display: flex; flex-direction: column; isolation: isolate; }
.grid-bg { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at 40% 40%, #000 30%, transparent 75%); animation: gridMove 18s linear infinite; }
@keyframes gridMove { to { background-position: 44px 44px; } }
.blob { position: absolute; z-index: -2; border-radius: 50%; filter: blur(70px); opacity: .55; animation: float 14s ease-in-out infinite alternate; }
.b1 { width: 420px; height: 420px; background: var(--crimson); top: -140px; left: -80px; }
.b2 { width: 360px; height: 360px; background: var(--teal); bottom: 40px; right: -120px; animation-delay: -5s; opacity: .4; }
.b3 { width: 260px; height: 260px; background: var(--orange); top: 45%; left: 35%; animation-delay: -9s; opacity: .32; }
@keyframes float { 0% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-30px) scale(1.1); } 100% { transform: translate(-30px,40px) scale(.95); } }
.login-brand { display: flex; align-items: center; gap: 12px; animation: fadeDown .7s var(--ease) both; }
.login-brand b { display: block; font-size: 16px; } .login-brand small { color: rgba(255,255,255,.6); font-size: 12px; }
.logo-badge { width: 52px; height: 52px; border-radius: 50%; background: #fff; display: grid; place-items: center; padding: 3px; box-shadow: 0 0 0 3px rgba(255,255,255,.1), 0 8px 24px rgba(0,0,0,.3); flex: none; }
.logo-badge img { width: 100%; height: 100%; object-fit: contain; }
.logo-badge.sm { width: 42px; height: 42px; }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } }
.hero { margin-top: clamp(28px, 6vh, 64px); max-width: 560px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--teal); }
.eyebrow.light { color: rgba(255,255,255,.75); }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(47,192,196,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgba(47,192,196,0); } 100% { box-shadow: 0 0 0 0 rgba(47,192,196,0); } }
.kinetic-h { font-size: clamp(34px, 4.4vw, 62px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 14px 0 18px; }
.kinetic-h .line { display: block; }
.kinetic-h .serif { font-family: var(--serif); font-style: italic; font-weight: 700; letter-spacing: -.01em; color: rgba(255,255,255,.92); }
.rotator { display: inline-block; min-width: 4ch; position: relative; }
.rotator .rw { display: inline-block; }
.rotator .kc { animation-name: kFlip; transform: translateY(.9em) rotateX(-80deg); }
@keyframes kFlip { to { opacity: 1; transform: none; } }
.rotator.tone-crimson { color: #FF5A7A; } .rotator.tone-orange { color: var(--orange); } .rotator.tone-teal { color: var(--teal); }
.rotator::after { content: ''; position: absolute; left: 0; right: 0; bottom: .02em; height: .1em; border-radius: 4px; background: currentColor; transform-origin: left; animation: underline 2.6s var(--ease) infinite; opacity: .7; }
@keyframes underline { 0% { transform: scaleX(0); } 25%, 80% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }
.lead { color: rgba(255,255,255,.7); max-width: 470px; font-size: 15px; animation: fadeUp .8s 1.2s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } }

.cart-stage { position: relative; flex: 1; min-height: 300px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 70px; }
.cart { width: min(300px, 62%); overflow: visible; animation: rollIn 1.6s .4s var(--ease) both; }
@keyframes rollIn { from { transform: translateX(-120%); } }
.cart-body { animation: bob 1.6s ease-in-out infinite; transform-origin: 178px 296px; }
@keyframes bob { 50% { transform: translateY(-3px) rotate(-.4deg); } }
.c-awning { transform-origin: 178px 64px; animation: sway 3s ease-in-out infinite; }
@keyframes sway { 50% { transform: skewX(-2deg); } }
.wheel { animation: spin 1.6s .4s linear 1 both, spinSlow 6s 2s linear infinite; }
@keyframes spin { from { transform: rotate(-720deg); } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.cart-shadow { fill: rgba(0,0,0,.35); }
.c-text { font-family: var(--font); font-weight: 800; font-size: 34px; fill: var(--ink); letter-spacing: 2px; }
.c-scan { transition: width .6s var(--ease); }
.float-card { position: absolute; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-radius: 14px; color: #fff; box-shadow: 0 20px 40px -20px rgba(0,0,0,.6); }
.fc-progress { left: 0; top: 10%; width: 230px; padding: 14px 16px; animation: fadeUp .8s 1.6s var(--ease) both, hover 5s 2.4s ease-in-out infinite; }
.fc-progress b { display: block; margin: 4px 0 10px; }
.fc-progress small { display: block; margin-top: 8px; color: rgba(255,255,255,.7); font-size: 11.5px; }
.fc-progress.done { border-color: rgba(31,169,113,.7); box-shadow: 0 0 0 4px rgba(31,169,113,.2); }
.fc-head { display: flex; justify-content: space-between; align-items: center; }
.fc-head .mono { color: var(--teal); }
.fc-pct { font-weight: 800; font-size: 18px; }
.fc-list { right: 0; top: 4%; list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 6px; font-size: 12.5px; animation: fadeUp .8s 1.8s var(--ease) both, hover 6s 2.6s ease-in-out infinite reverse; }
.fc-list li { display: flex; align-items: center; gap: 8px; color: rgba(255,255,255,.5); transition: color .3s; }
.fc-list .tick { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid rgba(255,255,255,.3); display: grid; place-items: center; transition: all .35s var(--spring); }
.fc-list .tick .ic { width: 12px; height: 12px; opacity: 0; transform: scale(0); transition: all .35s var(--spring); stroke-width: 3; }
.fc-list li.on { color: #fff; }
.fc-list li.on .tick { background: var(--green); border-color: var(--green); }
.fc-list li.on .tick .ic { opacity: 1; transform: scale(1); }
@keyframes hover { 50% { transform: translateY(-10px); } }
.marquee { position: absolute; left: 0; right: 0; bottom: 0; background: var(--crimson); transform: rotate(-1.5deg) translateY(10px); padding: 12px 0; overflow: hidden; white-space: nowrap; box-shadow: 0 -10px 30px rgba(0,0,0,.25); }
.marquee .track { display: inline-flex; gap: 22px; animation: marquee 32s linear infinite; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.marquee i { font-style: normal; color: var(--orange); }
@keyframes marquee { to { transform: translateX(-50%); } }

.login-panel { display: grid; place-items: center; padding: 40px 24px; background: radial-gradient(circle at 80% 0%, rgba(255,143,0,.12), transparent 40%), radial-gradient(circle at 0% 100%, rgba(47,192,196,.14), transparent 40%), var(--cream); }
.login-card { width: 100%; max-width: 420px; background: var(--paper); border-radius: 24px; padding: 34px 32px 26px; box-shadow: var(--shadow); border: 1px solid var(--line); animation: cardIn .9s .2s var(--spring) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.login-logo { width: 76px; height: 76px; display: block; margin-bottom: 14px; animation: logoIn 1s .3s var(--spring) both; }
@keyframes logoIn { from { opacity: 0; transform: rotate(-120deg) scale(.4); } }
.login-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; }
.login-card > .muted { font-size: 13px; margin-bottom: 20px; }
.login-err { min-height: 20px; color: var(--crimson); font-size: 13px; font-weight: 500; margin: 2px 0 8px; }
.login-card.busy { opacity: .7; pointer-events: none; }
.input-ic { position: relative; }
.input-ic > .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); pointer-events: none; }
.input-ic input { padding-left: 40px !important; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--muted); padding: 6px; border-radius: 8px; }
.pw-toggle:hover { background: var(--cream); }
.demo { margin-top: 22px; padding: 14px; border: 1px dashed var(--line-2); border-radius: 14px; background: #FCFAF6; }
.demo p { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-btn { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; transition: all .2s var(--ease); }
.demo-btn i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.demo-btn:hover { border-color: var(--c); transform: translateY(-2px); box-shadow: 0 6px 16px -8px var(--c); }
.login-foot { text-align: center; color: var(--muted-2); font-size: 11.5px; margin-top: 18px; }

/* warna per tone (dipakai badge, chip, dsb.) */
.tone-crimson, .tone-red { --c: var(--crimson); --cd: var(--crimson-d); --cs: var(--crimson-s); }
.tone-teal { --c: var(--teal); --cd: var(--teal-d); --cs: var(--teal-s); }
.tone-orange, .tone-amber { --c: var(--orange); --cd: var(--orange-d); --cs: var(--orange-s); }
.tone-green { --c: var(--green); --cd: var(--green-d); --cs: var(--green-s); }
.tone-violet { --c: var(--violet); --cd: var(--violet-d); --cs: var(--violet-s); }
.tone-gray { --c: #9A92A0; --cd: #645C6A; --cs: #F0ECE6; }
.tone-ink { --c: var(--ink); --cd: var(--ink); --cs: #ECE7DE; }

/* ------------------------------------------------------------ tombol & form */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; font-size: 13.5px; transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; position: relative; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary { background: var(--crimson); color: #fff; box-shadow: 0 8px 18px -8px rgba(213,34,70,.7); }
.btn-primary:hover { background: var(--crimson-d); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 8px 18px -8px rgba(47,192,196,.8); }
.btn-teal:hover { background: var(--teal-d); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-d); }
.btn-danger { background: var(--crimson); color: #fff; }
.btn-ghost { background: var(--paper); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--line-2); background: #FDFBF7; }
.btn-light { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.25); }
.btn-light:hover { background: rgba(255,255,255,.22); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 48px; font-size: 15px; border-radius: 13px; }
.btn-block { width: 100%; }
.btn.loading { color: transparent; }
.btn.loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; animation: spinSlow .7s linear infinite; }
.btn-primary .ic.flip { transition: transform .2s; } .btn-primary:hover .ic.flip { transform: rotate(180deg) translateX(-3px); }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--muted); transition: all .15s; flex: none; }
.icon-btn:hover { background: var(--cream); color: var(--text); border-color: var(--line); }
.icon-btn.danger:hover { color: var(--crimson); background: var(--crimson-s); border-color: transparent; }
.icon-btn.light { color: rgba(255,255,255,.6); }
.icon-btn.light:hover { color: #fff; background: rgba(255,255,255,.1); border-color: transparent; }
.link { border: 0; background: none; color: var(--crimson); font-weight: 600; font-size: 12.5px; padding: 0; }
.link:hover { text-decoration: underline; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: #4A4350; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea, .search input { width: 100%; height: 42px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line); background: #FDFCF9; transition: border-color .15s, box-shadow .15s, background .15s; outline: none; }
.field textarea { height: auto; padding: 10px 13px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(47,192,196,.18); }
.field input:disabled { background: var(--cream); color: var(--muted); }
.check-field { flex-direction: row; align-items: center; gap: 10px; }
.check-field input { width: 18px; height: 18px; accent-color: var(--crimson); }
.check-field span { font-weight: 500; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.span-2 { grid-column: span 2; }
.hint { font-size: 12.5px; color: var(--muted); background: var(--cream); border-radius: 10px; padding: 9px 12px; margin-bottom: 14px; }
.hint a { color: var(--crimson); font-weight: 600; }
.total-line { text-align: right; font-size: 13px; color: var(--muted); padding: 4px 0 6px; }
.total-line b { color: var(--text); font-size: 16px; }

.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.seg-2 { grid-template-columns: 1fr 1fr; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: block; height: 100%; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: all .2s var(--ease); }
.seg-opt b { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.seg-opt small { display: block; color: var(--muted); font-size: 11.5px; line-height: 1.35; margin-top: 2px; }
.seg-opt input:checked + span { border-color: var(--crimson); background: var(--crimson-s); box-shadow: 0 6px 16px -10px var(--crimson); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.design-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 2px; margin: 6px 0 0; background: #FDFBF7; }
.design-box legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.type-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tchip input { position: absolute; opacity: 0; pointer-events: none; }
.tchip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s var(--spring); }
.tchip .ic { width: 0; opacity: 0; transition: all .2s var(--spring); stroke-width: 3; }
.tchip input:checked + span { background: var(--orange); border-color: var(--orange); color: #fff; transform: scale(1.04); }
.tchip input:checked + span .ic { width: 14px; opacity: 1; }
.tchip input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ------------------------------------------------------------ SHELL */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 18px 14px; overflow-y: auto; z-index: 40; }
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 14px; }
.side-brand b { display: block; font-size: 15px; } .side-brand small { font-size: 11px; color: rgba(255,255,255,.55); }
.side-stripe { display: flex; height: 4px; border-radius: 4px; overflow: hidden; margin: 0 6px 18px; }
.side-stripe i { flex: 1; background: var(--crimson); transform-origin: left; animation: grow .8s var(--ease) both; }
.side-stripe i:nth-child(2) { background: var(--teal); animation-delay: .12s; } .side-stripe i:nth-child(3) { background: var(--orange); animation-delay: .24s; }
@keyframes grow { from { transform: scaleX(0); } }
.side-nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; color: rgba(255,255,255,.68); font-weight: 500; transition: all .2s var(--ease); animation: navIn .5s calc(var(--i) * 60ms) var(--ease) both; }
@keyframes navIn { from { opacity: 0; transform: translateX(-14px); } }
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item:hover .ic { transform: scale(1.12) rotate(-6deg); }
.nav-item .ic { transition: transform .25s var(--spring); }
.nav-item.on { background: linear-gradient(90deg, rgba(213,34,70,.95), rgba(213,34,70,.75)); color: #fff; box-shadow: 0 10px 22px -12px rgba(213,34,70,.9); }
.nav-item span { flex: 1; }
.nav-n { font-style: normal; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav-n.red { background: #fff; color: var(--crimson); }
.nav-item.on .nav-n { background: #fff; color: var(--crimson); }
.side-user { display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; margin-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.side-user div { flex: 1; min-width: 0; }
.side-user b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user small { color: rgba(255,255,255,.55); font-size: 11.5px; }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: inline-grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; font-size: 13px; flex: none; }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 11px; vertical-align: middle; margin-right: 6px; }
.side-scrim { display: none; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; height: 68px; padding: 0 28px; background: rgba(246,241,231,.82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.menu-btn { display: none; }
.top-title { font-size: 20px; font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.top-right { display: flex; align-items: center; gap: 10px; }
.top-clock { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.top-clock span { display: flex; flex-direction: column; line-height: 1.15; }
.top-clock b { font-family: var(--mono); font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; }
.top-clock small { font-size: 10.5px; }
.bell-wrap { position: relative; }
.bell { width: 40px; height: 40px; background: var(--paper); border-color: var(--line); position: relative; }
.bell-n { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; display: grid; place-items: center; border: 2px solid var(--cream); animation: popIn .5s var(--spring); }
@keyframes popIn { from { transform: scale(0); } }
.bell-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 32px); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; animation: dropIn .25s var(--ease); }
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.bell-pop header { padding: 14px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; }
.bell-pop header small { color: var(--muted); }
.bell-list { max-height: 380px; overflow-y: auto; }
.bell-item { display: flex; gap: 11px; padding: 11px 16px; border-bottom: 1px solid #F3EEE5; transition: background .15s; }
.bell-item:hover { background: #FBF8F2; }
.bell-item > span { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--cs); color: var(--cd); flex: none; }
.bell-item b { display: block; font-size: 13px; font-weight: 600; }
.bell-item small { color: var(--muted); font-size: 12px; }
.role-pill { padding: 6px 12px; border-radius: 99px; background: var(--cs); color: var(--cd); font-weight: 600; font-size: 12px; white-space: nowrap; }

.page { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }
.page.enter > * { animation: rise .6s var(--ease) both; }
.page.enter > *:nth-child(2) { animation-delay: .06s; } .page.enter > *:nth-child(3) { animation-delay: .12s; }
.page.enter > *:nth-child(4) { animation-delay: .18s; } .page.enter > *:nth-child(5) { animation-delay: .24s; } .page.enter > *:nth-child(n+6) { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.page > * + * { margin-top: 18px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.025em; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 680px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------ komponen */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--cs); color: var(--cd); white-space: nowrap; }
.badge .ic { width: 13px; height: 13px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 16px; font-weight: 700; }
.panel-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stack > * + * { margin-top: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stats + .stats { margin-top: 14px; }
.stat { position: relative; overflow: hidden; display: flex; gap: 14px; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s; }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--cs); opacity: .7; transition: transform .5s var(--ease); }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat:hover::after { transform: scale(1.4); }
.stat-ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--c); color: #fff; flex: none; position: relative; z-index: 1; box-shadow: 0 8px 18px -8px var(--c); }
.stat-ic .ic { width: 21px; height: 21px; }
.stat div { position: relative; z-index: 1; min-width: 0; }
.stat small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.stat b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat b[data-fmt="rp"] { font-size: clamp(15px, 1.5vw, 21px); white-space: normal; overflow-wrap: anywhere; }
.stat em { display: block; font-style: normal; font-size: 11.5px; color: var(--cd); margin-top: 2px; }

.bar { flex: 1; height: 8px; border-radius: 99px; background: #EFE9DE; overflow: hidden; min-width: 40px; }
.bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--c, var(--teal)); animation: barIn 1s var(--ease) both; position: relative; overflow: hidden; }
.bar i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); transform: translateX(-100%); animation: shimmer 2.4s 1s ease-in-out infinite; }
@keyframes barIn { from { width: 0; } }
@keyframes shimmer { to { transform: translateX(100%); } }
.no-anim .bar i, .no-anim .bar i::after { animation: none; }
.bar.crimson { --c: var(--crimson); } .bar.teal { --c: var(--teal); } .bar.orange { --c: var(--orange); } .bar.green { --c: var(--green); }
.ring { position: relative; width: var(--size); height: var(--size); flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; }
.ring-bg { stroke: #EFE9DE; }
.ring-fg { stroke: var(--teal); stroke-linecap: round; animation: ringIn 1.2s var(--ease) forwards; }
@keyframes ringIn { from { stroke-dashoffset: var(--c); } to { stroke-dashoffset: var(--o); } }
.no-anim .ring-fg { animation-duration: .01s; }
.ring b { font-weight: 800; font-size: calc(var(--size) * .24); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring.green .ring-fg { stroke: var(--green); } .ring.crimson .ring-fg { stroke: var(--crimson); }
.ring.light .ring-bg { stroke: rgba(255,255,255,.18); } .ring.light .ring-fg { stroke: #fff; } .ring.light b { color: #fff; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.fchips { display: flex; gap: 6px; flex-wrap: wrap; }
.fchip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--line); background: var(--paper); font-size: 13px; font-weight: 500; transition: all .2s var(--ease); }
.fchip i { font-style: normal; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--cream); color: var(--muted); }
.fchip:hover { border-color: var(--line-2); }
.fchip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fchip.on i { background: var(--crimson); color: #fff; }
.search { position: relative; display: block; width: 280px; max-width: 100%; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); }
.search input { padding-left: 38px; background: var(--paper); }
.sum-pill { padding: 7px 14px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.sum-pill b { color: var(--text); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 16px; color: var(--muted); gap: 4px; }
.empty .ic { width: 34px; height: 34px; color: var(--muted-2); margin-bottom: 6px; animation: wobble 3s ease-in-out infinite; }
@keyframes wobble { 50% { transform: rotate(-8deg) scale(1.06); } }
.empty b { color: var(--text); }
.empty p { font-size: 12.5px; }
.note { margin-top: 12px; padding: 10px 12px; background: #FFF8EC; border-left: 3px solid var(--orange); border-radius: 8px; font-size: 13px; color: #5B4A33; }

/* hero dashboard */
.hero-band { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 85% 20%, rgba(47,192,196,.4), transparent 45%), radial-gradient(circle at 60% 120%, rgba(255,143,0,.35), transparent 50%), linear-gradient(120deg, var(--ink) 30%, #3A1320); box-shadow: var(--shadow); }
.hero-band h2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; letter-spacing: -.03em; margin: 6px 0 4px; }
.hero-band p { color: rgba(255,255,255,.72); }
.hb-stripes { position: absolute; right: -40px; top: 0; bottom: 0; width: 240px; display: flex; gap: 14px; transform: skewX(-18deg); opacity: .22; }
.hb-stripes i { flex: 1; background: var(--crimson); animation: stripe 3s ease-in-out infinite; }
.hb-stripes i:nth-child(2) { background: var(--teal); animation-delay: .3s; } .hb-stripes i:nth-child(3) { background: var(--orange); animation-delay: .6s; }
@keyframes stripe { 50% { transform: translateY(12px); } }
.hb-text { position: relative; z-index: 1; min-width: 0; }
.hb-clock { position: relative; z-index: 1; text-align: right; }
.hb-clock b { font-family: var(--mono); font-size: clamp(26px, 3.4vw, 42px); font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hb-clock small { display: block; color: rgba(255,255,255,.6); font-weight: 600; letter-spacing: .2em; }

.stage-rows { display: grid; gap: 11px; }
.stage-row { display: grid; grid-template-columns: 26px 110px 1fr 48px; align-items: center; gap: 10px; font-size: 13px; }
.sr-n { width: 24px; height: 24px; border-radius: 7px; background: var(--cream); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sr-l { font-weight: 500; }
.stage-row b { text-align: right; font-variant-numeric: tabular-nums; }
.att-list { display: grid; gap: 10px; }
.att-item { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; transition: all .2s var(--ease); }
.att-item:hover { border-color: var(--teal); transform: translateX(4px); box-shadow: -4px 0 0 var(--teal); }
.att-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.att-item > b { display: block; margin: 3px 0; }
.att-item small { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; }
.att-item small .ic { width: 14px; height: 14px; }
.att-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 12px; font-weight: 700; }
.chip-mini { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--cream); color: var(--muted); font-size: 11px; font-weight: 500; }
.chip-mini.done { background: var(--green-s); color: var(--green-d); text-decoration: line-through; text-decoration-thickness: 1px; }

.log-list { list-style: none; margin: 0; padding: 0; }
.log-item { position: relative; display: flex; gap: 12px; padding: 10px 0 10px 2px; }
.log-item + .log-item { border-top: 1px dashed #EEE7DA; }
.log-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--muted-2); box-shadow: 0 0 0 4px #F3EEE5; }
.mod-booth .log-dot { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-s); }
.mod-desain .log-dot { background: var(--orange); box-shadow: 0 0 0 4px var(--orange-s); }
.mod-inventory .log-dot { background: var(--violet); box-shadow: 0 0 0 4px var(--violet-s); }
.mod-akun .log-dot { background: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-s); }
.log-item b { font-size: 13px; font-weight: 600; }
.log-item p { font-size: 13px; color: #4A4350; }
.log-item small { font-size: 11.5px; color: var(--muted); }
.log-day h4 { font-size: 13px; font-weight: 700; color: var(--crimson); margin-bottom: 4px; text-transform: capitalize; }
.mini-list { display: grid; }
.mini-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; }
.mini-row + .mini-row { border-top: 1px dashed #EEE7DA; }
.mini-row > div { min-width: 0; flex: 1; }
.mini-row small { display: block; color: var(--muted); font-size: 12px; }
.mini-row small .ic { width: 13px; height: 13px; }
.mini-row.late b { color: var(--crimson); }
.txn-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--cs); color: var(--cd); flex: none; }

/* ------------------------------------------------------------ booth */
.booth-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 430px), 1fr)); gap: 18px; }
.booth-card, .task-card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow-sm); animation: cardRise .6s calc(var(--i) * 60ms) var(--ease) both; transition: box-shadow .25s, transform .25s var(--ease); display: flex; flex-direction: column; gap: 14px; }
.no-anim .booth-card, .no-anim .task-card { animation: none; }
@keyframes cardRise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.booth-card:hover, .task-card:hover { box-shadow: var(--shadow); }
.booth-card::before { content: ''; position: absolute; left: 18px; right: 18px; top: 0; height: 4px; border-radius: 0 0 6px 6px; background: var(--teal); }
.booth-card.st-terlambat::before { background: var(--crimson); }
.booth-card.st-selesai::before { background: var(--green); }
.booth-card.st-belum::before { background: var(--line-2); }
.bc-head { display: flex; justify-content: space-between; gap: 12px; }
.bc-code { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.bc-head h3 { font-size: 17px; font-weight: 700; margin: 6px 0 3px; }
.bc-head h3 a:hover { color: var(--crimson); }
.bc-meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.bc-meta .ic { width: 14px; height: 14px; }
.bc-dates { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); padding: 9px 12px; background: #FBF8F2; border-radius: 10px; }
.bc-dates .ic { width: 14px; height: 14px; }
.bc-dates b { color: var(--text); font-weight: 600; }
.bc-dates .ok, .bc-dates .ok b { color: var(--green-d); }
.bc-progress { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.bc-progress b { color: var(--text); min-width: 38px; text-align: right; }
.stages { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stage { display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 11px; border: 1px solid var(--line); background: #fff; transition: all .2s var(--ease); min-width: 0; }
.stage:not(:disabled):hover { border-color: var(--c); background: var(--cs); }
.stage:disabled { cursor: default; }
.st-txt { min-width: 0; }
.st-txt b { display: block; font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-txt small { display: block; font-size: 11px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbox { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; background: #fff; transition: all .3s var(--spring); }
.cbox .ic { width: 14px; height: 14px; stroke-width: 3.2; color: #fff; opacity: 0; transform: scale(.2) rotate(-30deg); transition: all .35s var(--spring); }
.stage.done { background: var(--cs); border-color: transparent; }
.stage.done .cbox { background: var(--c); border-color: var(--c); }
.stage.done .cbox .ic, .done > .cbox .ic, .ditem.done .cbox .ic, .cbox-btn.on .cbox .ic, .chip-toggle.on .cbox .ic { opacity: 1; transform: none; }
.stage.done small { color: var(--cd); }
.stage.pop .cbox, .cbox-btn.pop .cbox { animation: cpop .45s var(--spring); }
@keyframes cpop { 40% { transform: scale(1.35); } }
.dsum { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.dsum-items { display: flex; flex-wrap: wrap; gap: 4px; }
.chip-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 5px; border-radius: 99px; border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 500; }
.chip-toggle .cbox { width: 18px; height: 18px; border-radius: 6px; }
.chip-toggle .cbox .ic { width: 11px; height: 11px; }
.chip-toggle.on { background: var(--green-s); border-color: transparent; color: var(--green-d); }
.chip-toggle.on .cbox { background: var(--green); border-color: var(--green); }
.chip-toggle:disabled { cursor: default; }
.bc-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); margin-top: auto; flex-wrap: wrap; }
.bc-foot > small { color: var(--muted); font-size: 11.5px; }
.bc-foot > small .ic { width: 13px; height: 13px; }
.bc-actions { display: flex; align-items: center; gap: 4px; }

.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; }
.back:hover { color: var(--crimson); }
.detail-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 28px; border-radius: 20px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(255,143,0,.45), transparent 45%), linear-gradient(120deg, var(--crimson-d), var(--crimson) 50%, #E8475F); box-shadow: 0 20px 40px -20px rgba(213,34,70,.7); }
.detail-hero h2 { font-size: clamp(22px, 3vw, 32px); font-weight: 800; margin: 8px 0 4px; letter-spacing: -.03em; }
.detail-hero p { color: rgba(255,255,255,.85); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.detail-hero .mono { color: #fff; opacity: .85; }
.detail-hero .badge { background: rgba(255,255,255,.18); color: #fff; }
.detail-hero .ph-actions { margin-top: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.tl:not(:last-child)::before { content: ''; position: absolute; left: 17px; top: 36px; bottom: 0; width: 2px; background: var(--line); }
.tl.done:not(:last-child)::before { background: var(--c); }
.tl-dot { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line-2); background: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); flex: none; transition: all .3s var(--spring); position: relative; z-index: 1; }
.tl-dot:not(:disabled):hover { border-color: var(--c); transform: scale(1.08); }
.tl-dot:disabled { cursor: default; }
.tl-dot .ic { stroke-width: 3; }
.tl.done .tl-dot { background: var(--c); border-color: var(--c); color: #fff; }
.tl.next .tl-dot { border-color: var(--c); color: var(--cd); box-shadow: 0 0 0 0 var(--c); animation: ringPulse 2s infinite; }
@keyframes ringPulse { 0% { box-shadow: 0 0 0 0 rgba(213,34,70,.35); } 70% { box-shadow: 0 0 0 10px rgba(213,34,70,0); } 100% { box-shadow: 0 0 0 0 rgba(213,34,70,0); } }
.tl-body { padding-top: 6px; }
.tl-body b { display: block; font-size: 14px; }
.tl-body small { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 4px; }
.tl-body small .ic { width: 13px; height: 13px; }
.tl.done .tl-body small { color: var(--cd); }
.info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin: 0; }
.info dt { font-size: 11.5px; color: var(--muted); font-weight: 500; }
.info dd { margin: 1px 0 0; font-weight: 600; font-size: 13px; }
.dlist { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 7px; }
.dlist li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #FBF8F2; font-size: 13px; }
.dlist li small { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.dlist li.done { background: var(--green-s); }
.dlist li.done .cbox { background: var(--green); border-color: var(--green); }
.dlist li.done small { color: var(--green-d); }
.dlist a { color: var(--teal-d); }

/* ------------------------------------------------------------ desain */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.task-card { border-top: 4px solid var(--orange); overflow: hidden; }
.task-card.complete { border-top-color: var(--green); }
.task-card header h3 { font-size: 17px; font-weight: 700; margin: 6px 0 3px; }
.ribbon { position: absolute; top: 14px; right: -30px; transform: rotate(40deg); background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 800; letter-spacing: .12em; padding: 3px 34px; animation: ribbon 1.6s ease-in-out infinite; }
@keyframes ribbon { 50% { background: var(--orange); } }
.ditems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ditem { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; transition: all .25s var(--ease); }
.ditem.done { background: var(--green-s); border-color: transparent; }
.ditem.done .cbox { background: var(--green); border-color: var(--green); }
.ditem.done .di-txt b { text-decoration: line-through; text-decoration-color: rgba(19,120,79,.5); }
.cbox-btn { border: 0; background: none; padding: 4px; border-radius: 9px; display: grid; place-items: center; }
.cbox-btn .cbox { width: 26px; height: 26px; border-radius: 8px; }
.cbox-btn .cbox .ic { width: 16px; height: 16px; }
.cbox-btn:not(:disabled):hover .cbox { border-color: var(--orange); transform: scale(1.08); }
.cbox-btn.on .cbox { background: var(--green); border-color: var(--green); }
.cbox-btn:disabled { cursor: default; }
.di-txt { flex: 1; min-width: 0; }
.di-txt b { display: block; font-size: 14px; }
.di-txt small { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11.5px; }
.di-txt small .ic { width: 12px; height: 12px; }
.ditem.done small { color: var(--green-d); }
.di-txt em { display: block; font-style: normal; font-size: 12px; color: var(--orange-d); }
.assignee { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--orange-d); background: var(--orange-s); padding: 4px 10px; border-radius: 99px; }
.assignee .ic { width: 14px; height: 14px; }

/* ------------------------------------------------------------ tabel & tab */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--cream-2); border-radius: 14px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 11px; font-weight: 500; font-size: 13px; color: var(--muted); white-space: nowrap; transition: all .2s var(--ease); }
.tab:hover { color: var(--text); }
.tab.on { background: var(--paper); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 600; }
.tab.on .ic { color: var(--crimson); }
.tab i { font-style: normal; background: var(--crimson); color: #fff; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 12px 14px; background: #FBF8F2; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid #F1EBE0; vertical-align: middle; }
.table tbody tr { transition: background .15s; }
.table tbody tr:hover { background: #FDFBF6; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .r { text-align: right; white-space: nowrap; } .table .c { text-align: center; }
.table td .bar { margin-top: 5px; height: 5px; }
.table tr.low { background: #FFF6F7; }
.table tr.inactive { opacity: .55; }
.sub { display: block; font-size: 11.5px; color: var(--muted); }
.sub .ic { width: 12px; height: 12px; }
.t-actions { white-space: nowrap; text-align: right; }
.table td .ic { width: 15px; height: 15px; }
.table td.mono { white-space: nowrap; }

.role-legend { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rl { padding: 14px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--c); }
.rl b { display: block; font-size: 13.5px; }
.rl small { color: var(--muted); font-size: 12px; }
.rl i { display: none; }

/* ------------------------------------------------------------ modal & toast */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(23,20,28,.55); backdrop-filter: blur(4px); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: 100%; max-width: 520px; max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--paper); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modalIn .4s var(--spring) both; }
.modal-wide { max-width: 760px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(30px) scale(.95); } }
.modal-wrap.closing .modal { animation: modalOut .2s var(--ease) forwards; }
.modal-wrap.closing .modal-backdrop { animation: fade .2s reverse forwards; }
@keyframes modalOut { to { opacity: 0; transform: translateY(14px) scale(.97); } }
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 700; }
.modal-head p { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.modal-body { padding: 18px 22px 6px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); background: #FCFAF6; border-radius: 0 0 20px 20px; }
.modal-err { flex: 1; color: var(--crimson); font-size: 13px; font-weight: 500; }
.confirm-text { font-size: 14px; color: #4A4350; padding-bottom: 12px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 150; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 13px; background: var(--ink); color: #fff; font-weight: 500; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .45s var(--spring) both; max-width: 380px; }
.toast .ic { color: var(--teal); }
.toast-err .ic { color: #FF6B86; } .toast-info .ic { color: var(--orange); }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ------------------------------------------------------------ responsif */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .role-legend { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 24px 22px 0; min-height: 0; }
  .cart-stage { min-height: 250px; padding-bottom: 64px; }
  .fc-list { display: none; }
  .fc-progress { top: 0; width: 200px; }
  .grid-2 { grid-template-columns: 1fr; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .35s var(--ease); }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: rgba(23,20,28,.5); z-index: 35; animation: fade .2s; }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 16px; }
  .page { padding: 20px 16px 50px; }
  .top-clock small, .role-pill { display: none; }
}
@media (max-width: 640px) {
  .kinetic-h { font-size: 34px; }
  .lead { font-size: 14px; }
  .cart-stage { min-height: 210px; }
  .fc-progress { width: 180px; padding: 10px 12px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px; gap: 10px; flex-direction: column; align-items: flex-start; }
  .stat b { font-size: 20px; }
  .stage-row { grid-template-columns: 24px 88px 1fr 40px; gap: 6px; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .seg { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr 1fr; }
  .hero-band { flex-direction: column; align-items: flex-start; padding: 20px; }
  .hb-clock { text-align: left; }
  .detail-hero { flex-direction: column-reverse; align-items: flex-start; padding: 20px; }
  .info { grid-template-columns: 1fr; }
  .role-legend { grid-template-columns: 1fr; }
  .top-clock { display: none; }
  .search { width: 100%; }
  .login-card { padding: 26px 20px 20px; }
  .modal-wrap { padding: 0; align-items: end; }
  .modal { max-height: 92vh; border-radius: 20px 20px 0 0; }
  .modal-foot { border-radius: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------ daftar akun */
.auth-form.swap-in, .auth-done.swap-in { animation: rise .45s var(--ease) both; }
.login-card.busy { opacity: .7; pointer-events: none; }
.auth-switch { text-align: center; font-size: 13px; color: var(--muted); margin-top: 16px; }
.auth-switch .link { font-size: 13px; }
.role-pick { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.role-pick input { position: absolute; opacity: 0; pointer-events: none; }
.role-pick span { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 11px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; text-align: center; cursor: pointer; transition: all .2s var(--spring); }
.role-pick span .ic { width: 22px; height: 22px; color: var(--c); }
.role-pick input:checked + span { border-color: var(--c); background: var(--cs); color: var(--cd); transform: translateY(-2px); box-shadow: 0 8px 18px -10px var(--c); }
.role-pick input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.auth-done { text-align: center; }
.auth-done h2 { font-size: 22px; margin: 12px 0 6px; }
.auth-done .muted { margin-bottom: 20px; }
.done-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--green); color: #fff; display: inline-grid; place-items: center; animation: popIn .6s var(--spring); box-shadow: 0 12px 26px -10px var(--green); }
.done-ic .ic { width: 32px; height: 32px; stroke-width: 3; }
.approve-row { display: flex; gap: 6px; margin-top: 6px; }

/* ------------------------------------------------------------ HRD / absensi */
.person { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.person .avatar.sm { margin: 0; }
.person b { display: block; font-size: 13px; line-height: 1.2; }
.r-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.day-info { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.day-info b { color: var(--text); }
.date-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.date-nav input[type=date], .mini-field input { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); outline: none; }
.date-nav input:focus, .mini-field input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,192,196,.18); }
.mini-field { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.chip-mini.bad { background: var(--crimson-s); color: var(--crimson-d); }
.att-table td { vertical-align: top; }
.att-table td .badge { margin-top: 3px; }
.t-time { display: block; font-family: var(--mono); font-size: 14px; }
.pct-cell { min-width: 130px; display: flex; align-items: center; gap: 8px; }
.pct-cell .bar { margin: 0 !important; height: 7px !important; }
.span-all { grid-column: 1 / -1; }
.rekap-grid { grid-template-columns: 1fr; }
.rank { display: flex; align-items: center; gap: 10px; }
.rank > span { width: 26px; height: 26px; border-radius: 8px; background: var(--crimson); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.person-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pchip { padding: 6px 12px; border-radius: 99px; background: var(--orange-s); color: var(--orange-d); font-size: 13px; }
.seg-4 { grid-template-columns: repeat(4, 1fr); }
.seg-4 .seg-opt span { text-align: center; padding: 9px; }
.seg-4 .seg-opt b { justify-content: center; }
.sched-grid { display: grid; gap: 8px; }
.sched-row { display: grid; grid-template-columns: 90px 120px 1fr 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: #FDFBF7; transition: opacity .2s; }
.sched-row.off { opacity: .6; background: var(--cream); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 38px; height: 22px; border-radius: 99px; background: var(--line-2); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--spring); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.switch em { font-style: normal; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.attr-area { width: 100%; padding: 10px 13px; border-radius: 11px; border: 1px solid var(--line); background: #FDFCF9; outline: none; resize: vertical; }
.attr-area:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(47,192,196,.18); }
@media (max-width: 640px) {
  .sched-row { grid-template-columns: 1fr 1fr; }
  .seg-4 { grid-template-columns: 1fr 1fr; }
}

.weak-banner { display: flex; align-items: center; gap: 10px; margin: 16px 28px 0; padding: 11px 14px; border-radius: 13px; background: var(--orange-s); color: var(--orange-d); border: 1px solid #FFD9A8; font-size: 13px; animation: rise .5s var(--ease) both; }
.weak-banner span { flex: 1; }
@media (max-width: 980px) { .weak-banner { margin: 12px 16px 0; flex-wrap: wrap; } }

/* HRD: selfie & lokasi */
.ci { display: flex; align-items: flex-start; gap: 9px; }
.selfie-thumb { width: 42px; height: 42px; flex: none; padding: 0; border: 2px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--cream); transition: transform .2s var(--spring); }
.selfie-thumb:hover { transform: scale(1.08); border-color: var(--teal); }
.selfie-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.selfie-thumb.missing { opacity: .35; }
.sub.place { display: flex; align-items: center; gap: 4px; color: var(--teal-d); }
.selfie-full { border-radius: 14px; overflow: hidden; background: var(--ink); text-align: center; margin-bottom: 12px; }
.selfie-full img { max-width: 100%; max-height: 62vh; display: block; margin: 0 auto; }
.loc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 4px; }
.loc-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px 4px; background: #FDFBF7; }
.loc-card h4 { display: flex; align-items: center; gap: 7px; font-size: 14px; margin-bottom: 12px; }
.loc-card .form-grid { gap: 0 10px; }
.loc-card .btn { width: 100%; }
.hint.warn { background: var(--orange-s); color: var(--orange-d); }
.my-net { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 11px; background: var(--teal-s); color: var(--teal-d); font-size: 13px; margin-bottom: 12px; }
.my-net span { flex: 1; }
.loc-modes .seg-opt span { text-align: left; }
.loc-modes .seg-opt b { justify-content: flex-start; }
@media (max-width: 980px) { .loc-grid { grid-template-columns: 1fr; } }

.sess-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; border: 0; background: var(--violet-s); color: var(--violet-d); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.sess-link .ic { width: 13px; height: 13px; }
.sess-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.sess-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; }
.sl-n { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.selfie-thumb.big { width: 64px; height: 64px; border-radius: 14px; display: inline-block; }

/* input tersembunyi (radio/checkbox bergaya kartu) tetap di dalam kotaknya — mencegah halaman melebar ke samping */
.seg-opt, .tchip, .role-pick label, .attr-pick label, .switch { position: relative; }

/* ==========================================================================
   LAPORAN BULANAN — tampilan kertas A4 di layar + aturan cetak
   ========================================================================== */
.lap-ctrl select { height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); }
.report-wrap { display: flex; flex-direction: column; align-items: center; gap: 28px; padding: 8px 0 40px; }
.report { width: 210mm; max-width: 100%; min-height: 297mm; background: #fff; color: #1E1A22; padding: 14mm 14mm 12mm; box-shadow: 0 18px 50px -20px rgba(23,20,28,.35), 0 0 0 1px var(--line); border-radius: 4px; font-size: 10pt; line-height: 1.45; display: flex; flex-direction: column; }
.report.rp-loading { min-height: 120px; justify-content: center; }
.rp-head { display: grid; grid-template-columns: 22mm 1fr auto; align-items: center; gap: 5mm; }
.rp-logo { width: 22mm; height: 22mm; object-fit: contain; }
.rp-org b { display: block; font-size: 13pt; letter-spacing: .04em; color: var(--crimson); }
.rp-org span { display: block; font-weight: 600; font-size: 9.5pt; }
.rp-org small { color: #6b6470; font-size: 8pt; }
.rp-meta { text-align: right; font-size: 8.5pt; color: #4A4350; display: flex; flex-direction: column; gap: 1px; }
.rp-meta b { font-size: 11pt; color: #17141C; letter-spacing: .08em; }
.rp-stripe { display: flex; height: 2.2mm; margin: 4mm 0 5mm; border-radius: 2px; overflow: hidden; }
.rp-stripe i { flex: 1; background: var(--crimson); } .rp-stripe i:nth-child(2) { background: var(--teal); } .rp-stripe i:nth-child(3) { background: var(--orange); }
.rp-title { font-size: 15pt; font-weight: 800; letter-spacing: -.01em; margin: 0 0 1.5mm; }
.rp-desc { color: #4A4350; font-size: 9pt; margin: 0 0 4mm; }
.report h2 { font-size: 10.5pt; font-weight: 700; margin: 5mm 0 2mm; padding-left: 2.5mm; border-left: 1mm solid var(--crimson); }
.rp-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(30mm, 1fr)); gap: 2.5mm; margin-bottom: 2mm; }
.rp-kpi { border: 1px solid #E3DCCF; border-top: 1mm solid #17141C; border-radius: 2mm; padding: 2mm 3mm; background: #FCFAF6; }
.rp-kpi.teal { border-top-color: var(--teal); } .rp-kpi.green { border-top-color: var(--green); } .rp-kpi.orange { border-top-color: var(--orange); } .rp-kpi.red { border-top-color: var(--crimson); }
.rp-kpi small { display: block; font-size: 7.5pt; color: #6b6470; text-transform: uppercase; letter-spacing: .03em; }
.rp-kpi b { display: block; font-size: 13pt; font-weight: 800; line-height: 1.25; }
.rp-kpi em { display: block; font-style: normal; font-size: 7.5pt; color: #6b6470; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; margin-bottom: 1mm; }
.rp-table th { background: #17141C; color: #fff; font-weight: 600; text-align: left; padding: 1.6mm 2mm; font-size: 7.8pt; text-transform: uppercase; letter-spacing: .03em; }
.rp-table td { padding: 1.5mm 2mm; border-bottom: 1px solid #E6DFD3; vertical-align: top; }
.rp-table tbody tr:nth-child(even) td { background: #FAF7F1; }
.rp-table td small { display: block; color: #6b6470; font-size: 7.5pt; }
.rp-table td b { font-weight: 600; }
.rp-table .r { text-align: right; white-space: nowrap; } .rp-table .c { text-align: center; width: 7mm; }
.rp-table .mono { font-family: var(--mono); font-size: 7.8pt; color: var(--crimson); white-space: nowrap; }
.rp-table .w50 { width: 50%; }
.rp-table tr.warn td { background: #FDECEF !important; }
.rp-table tr.total td { font-weight: 700; border-top: 1.5px solid #17141C; background: #F3EEE5 !important; }
.rp-table .rp-empty { text-align: center; color: #8a828f; font-style: italic; padding: 3mm; }
.rp-table.rp-small { font-size: 7.8pt; } .rp-table.rp-small td, .rp-table.rp-small th { padding: 1.2mm 1.4mm; }
.rp-bar { display: block; height: 1.3mm; background: #EFE9DE; border-radius: 1mm; margin-top: .8mm; overflow: hidden; min-width: 12mm; }
.rp-bar i { display: block; height: 100%; background: var(--teal); }
.rp-chip { display: inline-block; font-size: 7.5pt; padding: .3mm 1.6mm; border-radius: 1.5mm; background: #F1ECE3; margin: .3mm 0; white-space: nowrap; }
.rp-chip.ok { background: #E0F5EB; color: #13784F; }
.rp-chip small { display: inline !important; }
.rp-two { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.rp-sum { margin-bottom: 1mm; }
.rp-notes { margin-top: 5mm; padding: 3mm 4mm; background: #FFF8EC; border: 1px solid #F5E1BF; border-radius: 2mm; font-size: 8.3pt; color: #4A3E2C; }
.rp-notes h3 { font-size: 9pt; margin: 0 0 1mm; color: #17141C; }
.rp-notes ol { margin: 0; padding-left: 4.5mm; }
.rp-notes li + li { margin-top: .6mm; }
.rp-sign { margin-top: auto; padding-top: 7mm; break-inside: avoid; }
.rp-place { text-align: right; font-size: 9pt; margin: 0 0 2mm; }
.rp-sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm; text-align: center; font-size: 9pt; }
.rp-sign-grid i { display: block; height: 18mm; }
.rp-sign-grid b { display: block; border-top: 1px solid #17141C; padding-top: 1mm; font-weight: 600; }
.rp-sign-grid small { color: #6b6470; font-size: 8pt; }
.rp-foot { margin-top: 5mm; padding-top: 2mm; border-top: 1px solid #E6DFD3; font-size: 7.5pt; color: #8a828f; text-align: center; }
@media screen and (max-width: 860px) { .report { padding: 6mm; min-height: 0; } .rp-head { grid-template-columns: 16mm 1fr; } .rp-meta { grid-column: span 2; text-align: left; } .rp-two { grid-template-columns: 1fr; } }

@page {
  size: A4 portrait; margin: 11mm 11mm 13mm;
  @bottom-right { content: "Halaman " counter(page) " dari " counter(pages); font: 7.5pt Poppins, sans-serif; color: #8a828f; }
  @bottom-left { content: "WIMS - WBI Integrated Monitoring System"; font: 7.5pt Poppins, sans-serif; color: #8a828f; }
}
@media print {
  html, body { background: #fff !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; animation: none !important; transition: none !important; }
  .side, .side-scrim, .top, .weak-banner, .no-print, #toasts, #modal-root, #confetti { display: none !important; }
  .shell, .main { display: block !important; }
  .page { padding: 0 !important; max-width: none !important; }
  .page > * + * { margin-top: 0 !important; }
  .report-wrap { display: block; padding: 0; }
  .report { width: auto; min-height: 0; box-shadow: none; border-radius: 0; padding: 0; break-after: page; }
  .report:last-child { break-after: auto; }
  .rp-table thead { display: table-header-group; }
  .rp-table tr, .rp-kpi, .rp-notes, .rp-two > div { break-inside: avoid; }
  .report h2 { break-after: avoid; }
}

/* ==========================================================================
   INVOICE KLIEN — layout mengikuti invoice WBI, siap cetak A4
   ========================================================================== */
.inv-layout { display: grid; grid-template-columns: minmax(320px, 420px) 1fr; gap: 18px; align-items: start; }
.inv-form { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.inv-form h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 18px 0 10px; padding-top: 14px; border-top: 1px dashed var(--line); }
.inv-form h3:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.inv-form .form-grid { gap: 0 10px; }
.inv-item { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px 2px; margin-bottom: 10px; background: #FDFBF7; }
.inv-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.inv-item-head b { flex: 1; font-size: 13px; }
.inv-add { display: flex; flex-wrap: wrap; gap: 6px; }
.inv-pay { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 0 8px; align-items: end; }
.inv-pay .icon-btn { margin-bottom: 14px; }
.inv-co-edit { margin-top: 16px; border: 1px dashed var(--line-2); border-radius: 12px; padding: 4px 12px 12px; }
.inv-co-edit summary { cursor: pointer; padding: 8px 0; font-weight: 600; font-size: 13px; display: flex; align-items: center; gap: 7px; }
.inv-preview { min-width: 0; }
.inv-preview-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
#invPreview { overflow-x: auto; }

.invoice-sheet { page: invoice; width: 210mm; min-height: 297mm; margin: 0 auto; background: #fff; color: #111; padding: 10mm 9mm 12mm; font-family: 'Mulish', 'Poppins', system-ui, sans-serif; font-size: 10.5pt; line-height: 1.38; box-shadow: 0 18px 50px -20px rgba(23,20,28,.35), 0 0 0 1px var(--line); display: flex; flex-direction: column; }
@media screen { .inv-preview .invoice-sheet { zoom: .78; } }
@media screen and (max-width: 1280px) { .inv-preview .invoice-sheet { zoom: .62; } }
@media screen and (max-width: 980px) { .inv-layout { grid-template-columns: 1fr; } .inv-form { position: static; max-height: none; } .inv-preview .invoice-sheet { zoom: .45; } }
.iv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10mm; padding: 0 0 6mm; }
.iv-logo { width: 41mm; height: 41mm; border: 1px solid #E8CDD3; display: grid; place-items: center; padding: 2mm; flex: none; }
.iv-logo img { width: 100%; height: 100%; object-fit: contain; }
.iv-co { text-align: right; }
.iv-co h1 { font-size: 34pt; font-weight: 300; letter-spacing: .02em; line-height: 1; margin: 0 0 1.5mm; color: #000; }
.iv-co p { margin: 0; font-size: 10.5pt; }
.iv-co .iv-legal { color: #8a8f94; font-size: 10.5pt; letter-spacing: .02em; margin-bottom: 7mm; }
.iv-co .iv-brand { font-weight: 800; }
.iv-rule { height: 1px; background: #DADADA; margin: 0 -9mm; }
.iv-rule.thick { height: 2px; background: #DADADA; }
.iv-info { display: flex; justify-content: space-between; gap: 10mm; padding: 5mm 0 4mm; }
.iv-bill { display: flex; flex-direction: column; font-size: 10.5pt; }
.iv-bill small { color: #8a8f94; font-size: 10.5pt; letter-spacing: .02em; }
.iv-bill b { font-weight: 800; }
.iv-bill .gap { height: 5mm; }
.iv-meta { border-collapse: collapse; align-self: flex-start; }
.iv-meta th { text-align: right; font-weight: 800; padding: 1mm 4mm 1mm 8mm; white-space: nowrap; }
.iv-meta td { padding: 1mm 8mm 1mm 0; white-space: nowrap; }
.iv-meta tr.due th, .iv-meta tr.due td { background: #F2F2F2; font-weight: 800; }
.iv-items { width: calc(100% + 18mm); margin: 0 -9mm; border-collapse: collapse; }
.iv-items th { background: #F7941D; color: #111; font-weight: 800; text-align: left; padding: 3.2mm 9mm; font-size: 10.5pt; }
.iv-items th.c, .iv-items td.c { text-align: center; }
.iv-items th.r, .iv-items td.r { text-align: right; white-space: nowrap; }
.iv-items th + th, .iv-items td + td { padding-left: 4mm; }
.iv-items td { padding: 4mm 9mm 2mm; vertical-align: top; }
.iv-items td:first-child span { display: block; }
.iv-items td b { font-weight: 800; }
.iv-items tr { break-inside: avoid; }
.iv-totals { margin: 5mm 0 0 auto; border-collapse: collapse; min-width: 50%; }
.iv-totals th { text-align: right; font-weight: 400; padding: 1.4mm 8mm 1.4mm 0; }
.iv-totals td { text-align: right; padding: 1.4mm 0; white-space: nowrap; }
.iv-totals tr.strong th, .iv-totals tr.strong td { font-weight: 800; }
.iv-totals tr.sep td { padding: 1.5mm 0; border-bottom: 2px solid #DADADA; }
.iv-totals tr.sep + tr th, .iv-totals tr.sep + tr td { padding-top: 4mm; }
.iv-notes { margin-top: 14mm; color: #555; font-size: 10.5pt; break-inside: avoid; }
.iv-notes b { display: block; font-weight: 800; color: #555; margin-bottom: 1mm; }
.iv-notes p { margin: 0 0 1.4mm; }
.iv-thanks { margin-top: auto; padding-top: 12mm; text-align: center; color: #8a8f94; font-size: 10.5pt; }
.inv-chip { display: inline-flex; align-items: center; gap: 4px; }

@media print {
  .invoice-sheet { width: auto; min-height: 270mm; box-shadow: none; padding: 0; zoom: 1 !important; }
  .inv-layout { display: block; }
  .inv-preview-label, .back { display: none !important; }
  #invPreview { overflow: visible; }
  .iv-rule { margin: 0; } .iv-items { width: 100%; margin: 0; } .iv-items th:first-child, .iv-items td:first-child { padding-left: 2mm; } .iv-items th:last-child, .iv-items td:last-child { padding-right: 2mm; }
}

/* form proyek baru: harga & pembayaran */
.price-box { margin-top: 14px; }
.price-box legend { display: inline-flex; align-items: center; gap: 6px; }
.price-box legend small { font-weight: 400; color: var(--muted); }
.pr-label { font-weight: 600; font-size: 12.5px; color: #4A4350; margin: 6px 0 8px; }
.pr-label small { font-weight: 400; color: var(--muted); }
.pr-adds { display: grid; gap: 8px; margin-bottom: 8px; }
.pr-adds:empty { display: none; }
.pr-add { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; align-items: center; }
.pr-add input { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; outline: none; }
.pr-add input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(47,192,196,.18); }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.pr-sum { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; padding: 12px 14px; border-radius: 12px; background: var(--ink); color: rgba(255,255,255,.7); font-size: 13px; margin: 2px 0 14px; }
.pr-sum b { display: block; color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; }
.pr-sum b.txt-green { color: #6EE7B7; } .pr-sum b.txt-red { color: #FF8FA3; }
@media (max-width: 640px) { .pr-add { grid-template-columns: 1fr 110px auto; } .seg-3 { grid-template-columns: 1fr; } }
