/* ===========================================================
   LAMAN — Design tokens
   Palette grounded in the laundry world: porthole glass, suds,
   folded linen, and the brass coin drawer.
   =========================================================== */
:root{
  --ink-navy:      #16233A;
  --ink-navy-70:   #16233Ab3;
  --suds-blue:     #2F7FD6;
  --suds-blue-dark:#1E5FA8;
  --brand-deep:    #142A4D;
  --brand-grad:    linear-gradient(135deg, #142A4D 0%, #2F7FD6 100%);
  --foam-white:    #F2F6FB;
  --paper:         #FFFFFF;
  --mint:          #21A179;
  --mint-bg:       #E4F5EE;
  --coin:          #D68A2D;
  --coin-bg:       #FCF1E1;
  --rose:          #DC5B54;
  --rose-bg:       #FDECEB;
  --line:          #E3E8F0;
  --text-muted:    #8792A6;

  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --radius-card: 16px;
  --shadow-card: 0 1px 3px rgba(20,42,77,0.07);
}

*{ box-sizing:border-box; }
svg{ width:20px; height:20px; display:inline-block; vertical-align:middle; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-body);
  background: var(--foam-white);
  background-attachment:fixed;
  color:var(--ink-navy);
  -webkit-font-smoothing:antialiased;
  overscroll-behavior-y:none;
}
h1,h2,h3{ font-family:var(--font-display); margin:0; font-weight:600; letter-spacing:-0.01em; }
button{ font-family:inherit; }

/* ---------- Splash Screen ---------- */
#splashScreen{
  position:fixed; inset:0; z-index:9999;
  background:linear-gradient(155deg, var(--brand-deep), var(--ink-navy) 45%, var(--suds-blue));
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  overflow:hidden;
}
#splashScreen.splash-hide{ animation:splashFadeOut .45s ease forwards; pointer-events:none; }
@keyframes splashFadeOut{ to{ opacity:0; transform:scale(1.02); } }

.splash-bg-blob{
  position:absolute; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.16), transparent 70%);
  animation:splashFloat 6s ease-in-out infinite;
}
.splash-blob-1{ width:260px; height:260px; top:-80px; right:-60px; }
.splash-blob-2{ width:200px; height:200px; bottom:-60px; left:-50px; animation-delay:1.5s; }
@keyframes splashFloat{ 0%,100%{ transform:translateY(0) scale(1); } 50%{ transform:translateY(-16px) scale(1.06); } }

.splash-logo{
  width:76px; height:76px; border-radius:22px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.25);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 20px 45px -12px rgba(0,0,0,.4);
  opacity:0; transform:scale(.7);
  animation:splashLogoIn .6s cubic-bezier(.34,1.56,.64,1) .1s forwards, splashBreathe 2.4s ease-in-out 1s infinite;
}
.splash-logo svg{ width:38px; height:38px; }
@keyframes splashLogoIn{ to{ opacity:1; transform:scale(1); } }
@keyframes splashBreathe{ 0%,100%{ transform:scale(1); } 50%{ transform:scale(1.05); } }

.splash-word{
  font-family:var(--font-display); font-weight:700; font-size:30px; color:#fff;
  margin-top:20px; letter-spacing:.02em;
  opacity:0; transform:translateY(10px);
  animation:splashTextIn .5s ease .35s forwards;
}
.splash-tagline{
  font-size:13px; color:rgba(255,255,255,.65); margin-top:4px;
  opacity:0; transform:translateY(8px);
  animation:splashTextIn .5s ease .5s forwards;
}
@keyframes splashTextIn{ to{ opacity:1; transform:translateY(0); } }

.splash-dots{
  display:flex; gap:6px; margin-top:32px;
  opacity:0; animation:splashTextIn .4s ease .75s forwards;
}
.splash-dots span{
  width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.55);
  animation:splashDotBounce 1.1s ease-in-out infinite;
}
.splash-dots span:nth-child(2){ animation-delay:.15s; }
.splash-dots span:nth-child(3){ animation-delay:.3s; }
@keyframes splashDotBounce{ 0%,60%,100%{ transform:translateY(0); opacity:.5; } 30%{ transform:translateY(-7px); opacity:1; } }

.num{ font-family:var(--font-mono); font-variant-numeric:tabular-nums; }
a{ color:var(--suds-blue); }
:focus-visible{ outline:2px solid var(--suds-blue); outline-offset:2px; }

/* ---------- App shell ---------- */
#app{
  min-height:100%;
  display:flex;
  flex-direction:column;
}
.app-header{
  background:var(--brand-grad);
  color:var(--foam-white);
  padding:18px 20px 16px;
  position:sticky;
  top:0;
  z-index:20;
}
.app-header-inner{
  display:flex;
  align-items:center;
  gap:10px;
}
.app-header-inner .titles{
  min-width:0; flex-shrink:1; overflow:hidden;
}
.app-header-inner .titles .biz-name,
.app-header-inner .titles .tagline{
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.header-branch-info{
  margin-left:auto; flex-shrink:0;
}
.hbi-pill{
  position:relative; display:inline-flex; align-items:center; gap:6px;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.3); border-radius:100px;
  padding:6px 10px 6px 12px; max-width:150px;
}
.hbi-pill-static{ padding:6px 12px; }
.hbi-pill svg{ width:13px; height:13px; color:#AFC3CC; flex-shrink:0; }
.hbi-pill-label{
  font-family:var(--font-display); font-weight:700; font-size:12.5px; color:var(--foam-white);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.hbi-pill-select{
  position:absolute; inset:0; width:100%; height:100%;
  opacity:0; border:none; cursor:pointer; appearance:none;
}
@media (max-width:400px){
  .hbi-pill{ max-width:110px; padding:5px 8px 5px 10px; }
  .hbi-pill-label{ font-size:11.5px; }
}
.app-header .brand-mark{
  width:32px; height:32px; border-radius:9px;
  background:var(--brand-grad);
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.app-header .brand-mark svg{ width:20px; height:20px; }
.app-header .titles{ line-height:1.15; }
.app-header .titles .biz-name{ font-family:var(--font-display); font-size:17px; font-weight:600; }
.app-header .titles .tagline{ font-size:11.5px; color:#AFC3CC; }

.app-body{ flex:1; display:flex; }
.app-main{
  flex:1;
  max-width:640px;
  width:100%;
  margin:0;
  padding:16px 16px 96px;
}
@media (min-width:640px) and (max-width:859px){
  .app-main{ margin:0 auto; }
}

/* ---------- Bottom nav (mobile) ---------- */
.fab-quick-action{
  position:fixed; left:50%; bottom:52px; transform:translateX(-50%);
  width:58px; height:58px; border-radius:50%; border:none;
  background:var(--brand-grad); color:#fff;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 8px 20px rgba(47,127,214,.4), 0 0 0 6px var(--foam-white);
  z-index:35; cursor:pointer;
  transition:transform .15s cubic-bezier(.34,1.56,.64,1);
}
.fab-quick-action svg{ width:26px; height:26px; }
.fab-quick-action:active{ transform:translateX(-50%) scale(.92); }
.fab-quick-action.open svg{ transform:rotate(45deg); }
@media (min-width:860px){ .fab-quick-action{ display:none; } }

.fab-menu{
  position:fixed; left:50%; bottom:120px; transform:translateX(-50%);
  background:var(--paper); border-radius:16px; box-shadow:var(--shadow-card);
  padding:8px; z-index:36; display:none; min-width:220px;
}
.fab-menu.open{ display:block; animation:popIn .18s cubic-bezier(.34,1.56,.64,1) both; }
.fab-menu button{
  display:flex; align-items:center; gap:10px; width:100%;
  border:none; background:none; padding:11px 12px; border-radius:10px;
  font-size:14px; font-weight:600; color:var(--ink-navy); cursor:pointer; text-align:left;
}
.fab-menu button:active{ background:var(--foam-white); }
.fab-menu button svg{ width:18px; height:18px; color:var(--suds-blue); flex-shrink:0; }

.bottom-nav{
  position:fixed; left:0; right:0; bottom:0;
  background:var(--paper);
  border-top:1px solid var(--line);
  display:flex;
  z-index:30;
  padding-bottom:env(safe-area-inset-bottom);
}
.bottom-nav button{
  flex:1;
  border:none;
  background:none;
  padding:9px 4px 8px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  color:var(--text-muted);
  font-size:11px;
  cursor:pointer;
}
.bottom-nav button svg{ width:21px; height:21px; transition:transform .25s cubic-bezier(.34,1.56,.64,1); }
.bottom-nav button .nav-pill{
  display:flex; align-items:center; justify-content:center;
  width:40px; height:26px; border-radius:14px; margin-bottom:1px;
  transition:background .2s ease;
}
.bottom-nav button.active{ color:var(--suds-blue-dark); font-weight:600; }
.bottom-nav button.active svg{ stroke:var(--suds-blue-dark); transform:translateY(-1px) scale(1.08); }
.bottom-nav button.active .nav-pill{ background:var(--mint-bg); }

/* ---------- Sidebar (desktop) ---------- */
.sidebar{ display:none; }

@media (min-width: 860px){
  .app-body{ max-width:1300px; margin:0 auto; width:100%; }
  .app-body.wide{ max-width:1500px; }
  .app-header{ padding-left:0; padding-right:0; }
  .app-header-inner{ max-width:1300px; margin:0 auto; padding:0 20px 0 12px; }
  .sidebar{
    display:flex;
    flex-direction:column;
    width:220px;
    padding:24px 12px;
    gap:4px;
    border-right:1px solid var(--line);
  }
  .sidebar button{
    display:flex; align-items:center; gap:10px;
    border:none; background:none; text-align:left;
    padding:10px 12px; border-radius:10px;
    font-size:14.5px; color:var(--text-muted); cursor:pointer;
    transition:background .18s ease, color .18s ease, transform .12s ease;
  }
  .sidebar button svg{ width:18px; height:18px; }
  .sidebar button:hover{ background:var(--foam-white); color:var(--ink-navy); }
  .sidebar button:active{ transform:scale(.97); }
  .sidebar button.active{ background:var(--mint-bg); color:var(--ink-navy); font-weight:600; }
  .bottom-nav{ display:none; }
  .app-main{ max-width:960px; padding:28px 32px 48px; }
}

@media (min-width:1500px){
  .app-body{ max-width:1560px; }
  .app-header-inner{ max-width:1560px; }
  .app-main{ max-width:1100px; padding:32px 40px 56px; }
  .app-main.wide{ max-width:1280px; }
}

/* ---------- Cards ---------- */
.card{
  background:var(--paper);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-card);
  padding:18px;
  margin-bottom:14px;
  animation:fadeInUp .35s ease both;
}
.card[data-action]{ transition:transform .12s ease, box-shadow .15s ease; }
.card[data-action]:hover{ box-shadow:0 4px 14px rgba(20,42,77,.1); }
.card[data-action]:active{ transform:scale(.99); }
.card-title{
  font-size:12.5px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--text-muted); margin-bottom:6px; font-weight:600;
}

@keyframes floatBubble{
  0%,100%{ transform:translateY(0) scale(1); }
  50%{ transform:translateY(-8px) scale(1.04); }
}
@keyframes fadeInUp{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}
@keyframes popIn{
  0%{ transform:scale(.6); opacity:0; }
  70%{ transform:scale(1.06); opacity:1; }
  100%{ transform:scale(1); }
}
@keyframes checkPop{
  0%{ transform:scale(0) rotate(-20deg); opacity:0; }
  60%{ transform:scale(1.2) rotate(6deg); opacity:1; }
  100%{ transform:scale(1) rotate(0); }
}

.branch-switcher, .branch-label-badge{
  display:flex; align-items:center; gap:12px;
  background:var(--paper); border:1.5px solid var(--line); border-radius:14px;
  padding:10px 14px 10px 10px; margin-bottom:14px;
  box-shadow:var(--shadow-card);
}
.branch-switcher .branch-label-icon, .branch-label-badge .branch-label-icon{
  width:36px; height:36px; border-radius:10px; flex-shrink:0;
  background:var(--brand-grad); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.branch-label-icon svg{ width:18px; height:18px; }
.branch-switcher select{
  border:none; outline:none; font-size:15px; font-weight:700; width:100%; background:none; color:var(--ink-navy);
}
.branch-label-badge span{ font-size:16px; font-weight:700; color:var(--ink-navy); }

.hero-branch-row{
  display:flex; align-items:center; gap:10px; margin-bottom:16px;
}
.hero-branch-row .branch-label-icon{
  width:30px; height:30px; border-radius:9px; flex-shrink:0;
  background:rgba(255,255,255,.16); color:#fff;
  display:flex; align-items:center; justify-content:center;
}
.hero-branch-row .branch-label-icon svg{ width:16px; height:16px; }
.hero-branch-row span{ font-size:14.5px; font-weight:700; color:#fff; }

.hero-balance{
  background:linear-gradient(155deg, var(--brand-deep), var(--ink-navy) 45%, var(--suds-blue));
  color:var(--foam-white);
  border-radius:20px;
  padding:24px 22px;
  margin-bottom:14px;
  position:relative;
  overflow:hidden;
  box-shadow:0 10px 28px rgba(20,42,77,.28);
  animation:fadeInUp .35s ease both;
}
.hero-balance::before, .hero-balance::after{
  content:""; position:absolute; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, rgba(255,255,255,.18), transparent 70%);
  animation:floatBubble 7s ease-in-out infinite;
}
.hero-balance::before{ width:150px; height:150px; top:-50px; right:-30px; }
.hero-balance::after{
  width:90px; height:90px; bottom:-30px; right:60px;
  background:radial-gradient(circle at 30% 30%, rgba(201,138,59,.4), transparent 70%);
  animation-delay:1.5s;
}
.hero-balance .card-title{ color:#9FB6BF; position:relative; }
.hero-balance .amount{ font-family:var(--font-mono); font-size:36px; font-weight:700; margin-top:4px; position:relative; letter-spacing:-0.01em; }
.hero-balance .sub{ margin-top:12px; display:flex; gap:18px; font-size:12.5px; color:#C7D6DB; position:relative; }
.hero-balance .sub b{ color:var(--foam-white); font-family:var(--font-mono); }

.stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stat-card{ transition:transform .15s ease, box-shadow .15s ease; }
.stat-card:active{ transform:scale(.98); }
.stat-card .amount{ font-family:var(--font-mono); font-size:17px; font-weight:700; margin-top:3px; }
.stat-card.income .amount{ color:var(--mint); }
.stat-card.expense .amount{ color:var(--rose); }
.stat-card .card-title{ font-size:10.5px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--text-muted); }

.streak-card{
  display:flex; align-items:center; gap:12px;
  background:linear-gradient(120deg, var(--coin-bg), #fff 75%);
  border:1px solid #F0DFC0;
}
.streak-card .streak-emoji{ font-size:26px; flex-shrink:0; animation:floatBubble 3s ease-in-out infinite; }
.streak-card .streak-text{ font-size:13px; line-height:1.4; }
.streak-card .streak-text b{ color:var(--coin); font-family:var(--font-mono); }

/* ---------- Loyalty (self-service) ---------- */
.loyalty-note{
  background:var(--foam-white); border:1px solid var(--line); border-radius:10px;
  padding:10px 12px; margin-top:4px; margin-bottom:14px;
}
.loyalty-note.free{
  background:var(--coin-bg); border-color:#F0DFC0; color:var(--coin);
  font-weight:700; font-size:13.5px; text-align:center; padding:12px;
  animation:popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
.loyalty-bar{ width:100%; height:8px; border-radius:6px; background:var(--line); overflow:hidden; margin-top:6px; }
.loyalty-fill{ height:100%; border-radius:6px; background:linear-gradient(90deg, var(--coin), #E3A75C); transition:width .4s cubic-bezier(.22,1,.36,1); }

/* ---------- Auth (Login/Daftar) ---------- */
.auth-shell{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; background:
    radial-gradient(circle at 85% 10%, rgba(62,124,177,.10), transparent 40%),
    radial-gradient(circle at 10% 85%, rgba(78,156,130,.10), transparent 40%),
    var(--foam-white);
}
.auth-card{
  width:100%; max-width:380px; background:var(--paper);
  border-radius:20px; box-shadow:0 12px 32px rgba(22,35,46,.12);
  padding:32px 28px; animation:popIn .35s cubic-bezier(.34,1.56,.64,1) both;
}
.auth-logo{
  width:52px; height:52px; border-radius:14px; background:var(--brand-grad);
  display:flex; align-items:center; justify-content:center; margin-bottom:16px;
}
.auth-logo svg{ width:28px; height:28px; }
.auth-card h1{ font-size:22px; }
.auth-error{ color:var(--rose); font-size:13px; min-height:18px; margin:-4px 0 10px; }
.auth-card a{ color:var(--suds-blue-dark); font-weight:600; }

/* ---------- Cucian (order tracking) ---------- */

/* Search bar */
.cucian-search{
  display:flex; align-items:center; gap:10px;
  background:var(--paper); border:1.5px solid var(--line); border-radius:12px;
  padding:11px 14px; margin-bottom:14px;
}
.cucian-search svg{ width:18px; height:18px; color:var(--text-muted); flex-shrink:0; }
.cucian-search input{
  border:none; outline:none; font-size:14.5px; width:100%; background:none; color:var(--ink-navy);
}
.cucian-search input::placeholder{ color:var(--text-muted); }

/* Status tabs with counts */
/* Prominent 3-column status summary strip */
.cucian-summary-strip{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:14px;
}
.cucian-summary-item{
  border-radius:12px; padding:12px 8px; text-align:center;
}
.cucian-summary-num{ font-family:var(--font-mono); font-size:22px; font-weight:700; }
.cucian-summary-label{ font-size:10.5px; font-weight:600; color:var(--text-muted); margin-top:2px; }
.cucian-summary-item.status-belum-diproses{ background:#EAF2F9; }
.cucian-summary-item.status-belum-diproses .cucian-summary-num{ color:var(--suds-blue-dark); }
.cucian-summary-item.status-sedang-diproses{ background:var(--coin-bg); }
.cucian-summary-item.status-sedang-diproses .cucian-summary-num{ color:var(--coin); }
.cucian-summary-item.status-selesai{ background:var(--mint-bg); }
.cucian-summary-item.status-selesai .cucian-summary-num{ color:var(--mint); }

.cucian-tabs{
  display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-bottom:12px;
}
.cucian-tab{
  display:flex; flex-direction:column; align-items:center; gap:2px;
  border:1px solid var(--line); background:#F7F9FC; border-radius:11px;
  padding:10px 4px; cursor:pointer; transition:transform .12s ease, border-color .15s ease, background .15s ease;
  font-size:9.5px; font-weight:600; color:var(--text-muted);
}
.cucian-tab:active{ transform:scale(.97); }
.cucian-tab-count{
  font-family:var(--font-mono); font-size:16px; font-weight:700; color:var(--text-muted);
}
.cucian-tab.active{ border:1px solid var(--suds-blue); background:var(--paper); color:var(--suds-blue-dark); }
.cucian-tab.active .cucian-tab-count{ color:var(--ink-navy); }

/* Sort row */
.cucian-sort-row{
  display:flex; align-items:center; gap:8px; margin-bottom:14px;
}
.cucian-sort-row svg{ width:16px; height:16px; color:var(--text-muted); flex-shrink:0; }
.cucian-sort-row select{
  border:1.5px solid var(--line); border-radius:10px; padding:8px 10px;
  font-size:13px; background:var(--paper); color:var(--ink-navy); flex:1;
}

/* Responsive card grid: 1 col phone, 2 col tablet & up (matches the app's centered content column) */
.cucian-grid{
  display:grid; grid-template-columns:1fr; gap:12px;
}
@media (min-width:600px){
  .cucian-grid{ grid-template-columns:repeat(2, minmax(0,1fr)); }
}
@media (min-width:1200px){
  .app-main.wide{ max-width:1080px; }
  .app-main.wide .cucian-grid{ grid-template-columns:repeat(3, minmax(0,1fr)); }
}

/* Order card */
.order-card{
  background:var(--paper); border-radius:14px; border:1px solid var(--line);
  border-left:4px solid var(--suds-blue);
  padding:16px; animation:fadeInUp .3s ease both;
  box-shadow:var(--shadow-card);
  transition:transform .12s ease, box-shadow .15s ease;
}
.order-card:hover{ box-shadow:0 4px 14px rgba(22,35,46,.1); }
.order-card:active{ transform:scale(.99); }
.order-card.status-belum-diproses{ border-left-color:var(--suds-blue); }
.order-card.status-sedang-diproses{ border-left-color:var(--coin); }
.order-card.status-selesai{ border-left-color:var(--mint); opacity:.85; }

.order-card-top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.order-service-icon{
  width:26px; height:26px; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0;
  color:#fff;
}
.order-service-icon svg{ width:14px; height:14px; }
.order-service-icon.status-belum-diproses{ background:#2F7FD6; }
.order-service-icon.status-sedang-diproses{ background:#D68A2D; }
.order-service-icon.status-selesai{ background:#21A179; }
.order-service-icon.overdue{ background:#D9694F; }

.order-card-id{ display:flex; align-items:center; gap:8px; }
.order-id-badge{
  display:flex; align-items:center; gap:3px;
  font-family:var(--font-mono); font-size:11.5px; font-weight:700; color:var(--text-muted);
  background:var(--foam-white); border-radius:8px; padding:4px 8px;
}
.order-id-badge svg{ width:11px; height:11px; }

.status-badge{
  font-size:11px; font-weight:700; padding:4px 10px; border-radius:20px; white-space:nowrap;
}
.status-badge.status-belum-diproses{ background:#E4EEF6; color:var(--suds-blue-dark); }
.status-badge.status-sedang-diproses{ background:var(--coin-bg); color:var(--coin); }
.status-badge.status-selesai{ background:var(--mint-bg); color:var(--mint); }

.delivery-pending-banner{
  background:var(--coin-bg); color:var(--coin); font-size:12.5px; font-weight:600;
  border-radius:8px; padding:8px 10px; margin-bottom:10px;
  display:flex; align-items:center; gap:6px;
}
.delivery-pending-banner svg{ width:15px; height:15px; flex-shrink:0; }
.order-card-customer{ margin-bottom:8px; }
.order-customer-name{ font-weight:700; font-size:15px; color:var(--ink-navy); }
.order-card-items{ font-size:13px; color:var(--ink-navy); margin-bottom:2px; }
.order-card-total{ font-weight:700; color:var(--suds-blue-dark); }
.order-card-meta{ display:flex; gap:6px; font-size:11.5px; color:var(--text-muted); margin-top:8px; flex-wrap:wrap; }

.deadline-badge{
  display:flex; align-items:center; gap:6px; width:fit-content;
  font-size:12px; font-weight:700; border-radius:10px; padding:6px 10px; margin-top:8px;
}
.deadline-badge svg{ width:14px; height:14px; flex-shrink:0; }
.deadline-badge.urgency-normal{ background:var(--mint-bg); color:var(--mint); }
.deadline-badge.urgency-urgent{ background:var(--coin-bg); color:var(--coin); }
.deadline-badge.urgency-overdue{ background:var(--rose-bg); color:var(--rose); }

/* ---------- Cetak struk (jalur dialog print browser) ---------- */
#receiptPrintArea{ display:none; }
body.printing-receipt > *:not(#receiptPrintArea){ display:none !important; }
body.printing-receipt #receiptPrintArea{
  display:block;
  width:100%;
  font-family: "Courier New", monospace;
  color:#000;
  padding:6mm;
}
.print-receipt{ width:100%; }
.print-receipt .pr-logo{ display:block; width:48px; height:48px; object-fit:cover; margin:0 auto 6px; border-radius:6px; }
.print-receipt .pr-biz{ text-align:center; font-weight:700; font-size:15px; text-transform:uppercase; }
.print-receipt .pr-tagline{ text-align:center; font-size:10px; margin-top:2px; }
.print-receipt .pr-date{ text-align:center; font-size:11px; margin-bottom:6px; }
.print-receipt .pr-divider{ border-top:1px dashed #000; margin:6px 0; }
.print-receipt .pr-row{ display:flex; justify-content:space-between; font-size:12px; padding:2px 0; gap:8px; }
.print-receipt .pr-item-desc{ font-size:12px; font-weight:700; margin-top:4px; }
.print-receipt .pr-item-detail{ font-size:11px; }
.print-receipt .pr-badge{ text-align:center; font-weight:700; font-size:12px; margin:6px 0; }
.print-receipt .pr-total{ display:flex; justify-content:space-between; font-weight:700; font-size:15px; padding:4px 0; }
.print-receipt .pr-thanks{ text-align:center; font-size:11px; margin-top:10px; }
@media print{
  @page{ size:58mm auto; margin:0; }
}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  border:none; border-radius:14px; padding:12px 18px;
  font-size:14px; font-weight:600; cursor:pointer;
}
.btn svg{ width:16px; height:16px; flex-shrink:0; }
.btn-primary{ background:var(--brand-grad); color:#fff; box-shadow:0 4px 14px rgba(47,127,214,.35); }
.btn-primary:active{ filter:brightness(.94); transform:scale(.98); }
.btn-outline{ background:var(--paper); border:1.5px solid var(--line); color:var(--ink-navy); }
.btn-outline:active{ transform:scale(.98); background:var(--foam-white); }
.btn-ghost{ background:none; color:var(--suds-blue-dark); padding:8px 6px; }
.btn-danger{ background:var(--rose-bg); color:var(--rose); }
.btn-block{ width:100%; }
.btn-row{ display:flex; gap:10px; }
.btn, .quick-actions button{ transition:transform .12s ease, background .15s ease, box-shadow .15s ease; }

.quick-actions{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:14px; }
.quick-actions button{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:10px; padding:20px 14px; border-radius:14px; border:none; cursor:pointer;
  font-size:13.5px; font-weight:700; background:var(--paper); color:var(--ink-navy);
  box-shadow:var(--shadow-card);
}
.quick-actions button:active{ transform:scale(.96); }
.quick-actions .qa-icon{
  width:42px; height:42px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
}
.quick-actions .qa-icon svg{ width:19px; height:19px; }
.quick-actions button.in .qa-icon{ background:var(--mint-bg); color:var(--mint); }
.quick-actions button.out .qa-icon{ background:var(--rose-bg); color:var(--rose); }

/* ---------- Forms ---------- */
.field{ margin-bottom:14px; }
.field label{ display:block; font-size:12.5px; font-weight:600; color:var(--text-muted); margin-bottom:6px; }
.field input, .field select, .field textarea{
  width:100%; padding:11px 12px; border-radius:10px;
  border:1.5px solid var(--line); background:var(--paper);
  font-size:15px; color:var(--ink-navy); font-family:inherit;
}
.field textarea{ resize:vertical; min-height:60px; }
.field .amount-input{ font-family:var(--font-mono); font-size:20px; font-weight:600; }
.seg{ display:flex; border-radius:10px; overflow:hidden; border:1.5px solid var(--line); }
.seg button{ flex:1; border:none; background:var(--paper); padding:11px; font-size:14px; font-weight:600; color:var(--text-muted); cursor:pointer; }
.seg button.active.in{ background:var(--mint); color:#fff; }
.seg button.active.out{ background:var(--rose); color:#fff; }
.seg.seg-navy{ border:none; background:var(--foam-white); border-radius:11px; padding:3px; gap:0; }
.seg.seg-navy button{ background:transparent; border-radius:9px; font-size:13px; }
.seg.seg-navy button.active{ background:var(--ink-navy); color:#fff; }

/* ---------- Transaction list ---------- */
.tx-item{
  display:flex; align-items:center; gap:11px;
  padding:12px 13px; background:var(--paper); border-radius:12px;
  box-shadow:var(--shadow-card); margin-bottom:10px;
}
.tx-dot{ width:32px; height:32px; border-radius:9px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:16px; }
.tx-dot svg{ width:16px; height:16px; }
.tx-dot.in{ background:var(--mint-bg); color:var(--mint); }
.tx-dot.out{ background:var(--rose-bg); color:var(--rose); }
.tx-info{ flex:1; min-width:0; }
.tx-info .cat{ font-size:12.5px; font-weight:700; color:var(--ink-navy); }
.tx-info .meta{ font-size:11px; color:var(--text-muted); margin-top:1px; }
.tx-amt{ font-weight:700; font-size:13px; white-space:nowrap; font-family:var(--font-mono); }
.tx-amt.in{ color:var(--mint); }
.tx-amt.out{ color:var(--rose); }
.tx-del{ background:none; border:none; color:var(--text-muted); padding:4px; cursor:pointer; opacity:.6; transition:opacity .15s, transform .15s; }
.tx-del svg{ width:14px; height:14px; }
.tx-del:active{ opacity:1; transform:scale(.9); color:var(--rose); }
.tx-item{ animation:fadeInUp .3s ease both; }

/* ---------- Receipt (signature element) ---------- */
.receipt{
  background:var(--paper);
  border-radius:4px;
  box-shadow:var(--shadow-card);
  position:relative;
  padding:22px 20px 26px;
  margin-bottom:18px;
  animation:popIn .35s cubic-bezier(.34,1.56,.64,1) both;
}
.receipt::before, .receipt::after{
  content:"";
  position:absolute; left:0; right:0; height:10px;
  background:
    linear-gradient(135deg, var(--foam-white) 50%, transparent 50%) 0 0/12px 12px repeat-x,
    linear-gradient(-135deg, var(--foam-white) 50%, transparent 50%) 0 0/12px 12px repeat-x;
}
.receipt::before{ top:-1px; transform:rotate(180deg); }
.receipt::after{ bottom:-1px; }
.receipt .r-head{ text-align:center; margin-bottom:14px; }
.receipt .r-head .biz{ font-family:var(--font-display); font-size:18px; font-weight:700; }
.receipt .r-head .period{ font-size:12px; color:var(--text-muted); margin-top:2px; }
.kib-table-wrap{ overflow-x:auto; background:var(--paper); border-radius:14px; border:1px solid var(--line); margin-bottom:10px; }
.kib-table{ width:100%; border-collapse:collapse; font-size:12px; white-space:nowrap; }
.kib-table th, .kib-table td{ padding:8px 10px; border-bottom:1px solid var(--line); text-align:left; }
.kib-table th{ background:var(--foam-white); font-weight:700; color:var(--ink-navy); font-size:11px; text-transform:uppercase; letter-spacing:.03em; }
.kib-table td.num, .kib-table th.num{ text-align:right; font-family:var(--font-mono); }
.kib-table .kib-total-row td{ font-weight:700; border-top:2px solid var(--ink-navy); border-bottom:none; }
@media print{
  .kib-table-wrap{ border:none; overflow:visible; }
  .kib-table{ font-size:9px; table-layout:auto; }
  .kib-table th{ background:none !important; -webkit-print-color-adjust:exact; print-color-adjust:exact; }
}

.cash-calc{ display:flex; flex-direction:column; gap:2px; margin-bottom:4px; }
.cash-calc-row{
  display:flex; align-items:center; gap:12px;
  padding:9px 4px;
}
.cash-calc-op{
  width:26px; height:26px; border-radius:50%; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:14px;
}
.cash-calc-label{ flex:1; font-size:13.5px; color:var(--ink-navy); }
.cash-calc-val{ font-weight:700; font-size:14px; white-space:nowrap; }
.cash-calc-result{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-top:12px; padding:16px; border-radius:14px;
  background:var(--brand-grad); color:#fff;
}
.cash-calc-result span:first-child{ font-size:13px; font-weight:600; opacity:.9; }
.cash-calc-result span:last-child{ font-size:19px; font-weight:700; }

.receipt .r-row{
  display:flex; justify-content:space-between; gap:10px;
  padding:4px 0; font-size:12.5px;
}
.receipt .r-row.section{ padding-top:12px; font-weight:700; text-transform:uppercase; font-size:10.5px; letter-spacing:.05em; color:var(--text-muted); }
.receipt .r-row.total{ font-weight:700; font-size:13.5px; border-top:2px solid var(--ink-navy); border-bottom:none; margin-top:8px; padding-top:10px; }
.receipt .r-row .val{ font-family:var(--font-mono); }
.receipt .r-row .val.neg{ color:var(--rose); }
.receipt .r-row .val.pos{ color:var(--mint); }
.receipt .r-balance-note{
  text-align:center; font-size:11.5px; color:var(--text-muted);
  margin-top:16px; padding-top:10px; border-top:1px dashed var(--line);
}

/* ---------- Analisis Pendapatan Layanan ---------- */
.period-pills{ display:flex; gap:8px; overflow-x:auto; margin-bottom:14px; padding-bottom:2px; }
.period-pill{
  flex-shrink:0; border:1.5px solid var(--line); background:var(--paper); color:var(--text-muted);
  border-radius:20px; padding:7px 14px; font-size:12.5px; font-weight:600; cursor:pointer;
  transition:all .15s ease;
}
.period-pill.active{ background:var(--brand-grad); border-color:transparent; color:#fff; }
.period-pill:active{ transform:scale(.96); }

.op-status-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(96px, 1fr)); gap:8px; margin-bottom:14px;
}
.op-status-item{
  background:var(--paper); border-radius:12px; padding:12px 8px; text-align:center;
  box-shadow:var(--shadow-card); cursor:pointer;
  display:flex; flex-direction:column; align-items:center; gap:6px;
  transition:transform .12s ease, box-shadow .15s ease;
}
.op-status-item:hover{ box-shadow:0 4px 14px rgba(20,42,77,.1); }
.op-status-item:active{ transform:scale(.96); }
.op-status-icon{
  width:32px; height:32px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 3px 8px rgba(0,0,0,.15);
}
.op-status-icon svg{ width:15px; height:15px; }
.op-status-num{ font-family:var(--font-mono); font-size:20px; font-weight:700; }
.op-status-label{ font-size:9.5px; font-weight:600; color:var(--text-muted); line-height:1.3; }

.akun-menu-grid{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:16px; }
.akun-menu-item{
  background:var(--paper); border-radius:16px; padding:16px 14px;
  box-shadow:var(--shadow-card); cursor:pointer;
  transition:transform .12s ease, box-shadow .15s ease;
}
.akun-menu-item:hover{ box-shadow:0 4px 14px rgba(20,42,77,.1); }
.akun-menu-item:active{ transform:scale(.97); }
.akun-menu-icon{
  width:36px; height:36px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
  margin-bottom:10px;
}
.akun-menu-icon svg{ width:18px; height:18px; }
.akun-menu-label{ font-weight:700; font-size:14.5px; }
.akun-menu-desc{ font-size:11.5px; color:var(--text-muted); margin-top:2px; line-height:1.3; }

.service-stat-grid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.service-stat-tile{
  border-radius:14px; padding:14px; background:var(--foam-white);
}
.service-stat-icon{
  width:30px; height:30px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  margin-bottom:9px;
}
.service-stat-icon svg{ width:16px; height:16px; }
.service-stat-tile.total{ background:var(--brand-grad); }
.service-stat-tile.total .service-stat-label{ color:#B9CEEA; }
.service-stat-tile.total .service-stat-amount{ color:#fff; }
.service-stat-tile.total .service-stat-count{ color:#9FB6D6; }
.service-stat-label{ font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.03em; }
.service-stat-amount{ font-size:17px; font-weight:700; margin-top:4px; }
.service-stat-count{ font-size:11px; color:var(--text-muted); margin-top:2px; }

.trend-legend{ display:flex; gap:14px; margin-bottom:10px; flex-wrap:wrap; }
.trend-legend-item{ display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--text-muted); }
.trend-dot{ width:8px; height:8px; border-radius:50%; display:inline-block; }
.trend-chart{ display:flex; align-items:flex-end; gap:10px; height:110px; }
.trend-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.trend-bars{ display:flex; align-items:flex-end; gap:2px; height:90px; }
.trend-bar{ width:7px; border-radius:2px 2px 0 0; min-height:2px; transition:height .4s cubic-bezier(.22,1,.36,1); }
.trend-col .lbl{ font-size:9.5px; color:var(--text-muted); font-weight:600; }

/* ---------- Mini chart ---------- */
@keyframes growBar{ from{ transform:scaleY(0); } to{ transform:scaleY(1); } }
.mini-chart{ display:flex; align-items:flex-end; gap:6px; height:70px; margin-top:10px; }
.mini-chart .bar-wrap{ flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; height:100%; justify-content:flex-end; }
.mini-chart .bar{ width:100%; border-radius:4px 4px 2px 2px; background:var(--suds-blue); min-height:3px; transform-origin:bottom; animation:growBar .55s cubic-bezier(.22,1,.36,1) both; }
.mini-chart .lbl{ font-size:9.5px; color:var(--text-muted); font-weight:600; }

/* ---------- Utility ---------- */
.row-between{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.muted{ color:var(--text-muted); }
.small{ font-size:12.5px; }
.section-title{ font-size:15px; margin:20px 0 10px; }
.section-title:first-child{ margin-top:0; }
.tag-list{ display:flex; flex-wrap:wrap; gap:8px; }
.tag{ background:var(--foam-white); border:1px solid var(--line); border-radius:20px; padding:6px 12px; font-size:12.5px; display:flex; align-items:center; gap:6px; }
.tag button{ background:none; border:none; color:var(--rose); cursor:pointer; font-size:13px; padding:0; }
.empty-state{ text-align:center; padding:40px 16px; color:var(--text-muted); }
.empty-state .es-icon{
  width:64px; height:64px; margin:0 auto 12px; border-radius:50%;
  background:linear-gradient(160deg, var(--mint-bg), var(--foam-white));
  display:flex; align-items:center; justify-content:center;
}
.empty-state svg{ width:28px; height:28px; opacity:.7; color:var(--mint); }
.empty-state .es-msg{ font-size:13.5px; max-width:220px; margin:0 auto; line-height:1.5; }

.modal-backdrop{
  position:fixed; inset:0; background:rgba(22,35,46,.45);
  display:flex; align-items:flex-end; justify-content:center; z-index:50;
}
.modal-sheet{
  background:var(--paper); width:100%; max-width:520px;
  border-radius:18px 18px 0 0; padding:20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height:88vh; overflow-y:auto;
}
@media (min-width:860px){
  .modal-backdrop{ align-items:center; }
  .modal-sheet{ border-radius:16px; max-height:80vh; }
}
.modal-sheet h2{ font-size:18px; margin-bottom:14px; }

.toast{
  position:fixed; bottom:84px; left:50%; transform:translateX(-50%);
  background:var(--ink-navy); color:#fff; padding:11px 20px; border-radius:30px;
  font-size:13.5px; font-weight:600; z-index:60; box-shadow:0 8px 24px rgba(22,35,46,.35);
  display:flex; align-items:center; gap:8px;
  animation:popIn .3s cubic-bezier(.34,1.56,.64,1) both;
}
.toast.toast-warn{ background:var(--rose); }
.toast .toast-check{
  width:20px; height:20px; border-radius:50%; background:var(--mint);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  animation:checkPop .4s cubic-bezier(.34,1.56,.64,1) .05s both;
}
.toast .toast-check svg{ width:12px; height:12px; stroke:#fff; }
@media (min-width:860px){ .toast{ bottom:24px; } }

@keyframes sheetUp{ from{ transform:translateY(24px); opacity:0; } to{ transform:translateY(0); opacity:1; } }
.modal-sheet{ animation:sheetUp .28s cubic-bezier(.22,1,.36,1) both; }
.modal-backdrop{ animation:fadeInUp .2s ease both; }

.camera-overlay{
  position:fixed; inset:0; background:rgba(22,35,46,.65);
  display:flex; align-items:flex-end; justify-content:center;
  animation:fadeInUp .2s ease both;
}
.camera-overlay .modal-sheet{
  background:var(--paper); width:100%; max-width:520px;
  border-radius:18px 18px 0 0; padding:20px 20px calc(20px + env(safe-area-inset-bottom));
  max-height:90vh; overflow-y:auto;
  animation:sheetUp .28s cubic-bezier(.22,1,.36,1) both;
}
@media (min-width:860px){
  .camera-overlay{ align-items:center; }
  .camera-overlay .modal-sheet{ border-radius:16px; max-height:85vh; }
}

.report-tabs{
  display:grid; grid-template-columns:repeat(5, 1fr); gap:3px;
  background:var(--paper); border:1.5px solid var(--line); border-radius:12px;
  padding:4px; margin-bottom:14px;
}
.report-tab-btn{
  border:none; background:none; border-radius:9px;
  padding:9px 4px; font-size:12.5px; font-weight:600; color:var(--text-muted);
  cursor:pointer; transition:background .15s ease, color .15s ease;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.report-tab-btn.active{ background:var(--brand-grad); color:#fff; font-weight:700; }
@media (max-width:360px){ .report-tab-btn{ font-size:11px; padding:9px 2px; } }

.date-range{ display:flex; gap:8px; align-items:center; }
.date-range input{ flex:1; }

@media print{
  .app-header, .bottom-nav, .sidebar, .no-print{ display:none !important; }
  .app-main{ padding:0; max-width:100%; }
  body{ background:#fff; }
  .receipt{ box-shadow:none; }
}
