/* =====================================================================
   SKKP · Tema "Tosca Bersih"
   Dibuat untuk dipakai nyaman di HP (320px ke atas), tablet, dan desktop.
   Dipakai bersama Tailwind CDN. Semua komponen memakai class (bukan @apply).
   ===================================================================== */

:root{
  --brand-50:#f0fdfa; --brand-100:#ccfbf1; --brand-200:#99f6e4; --brand-400:#2dd4bf;
  --brand-500:#14b8a6; --brand-600:#0d9488; --brand-700:#0f766e; --brand-800:#115e59; --brand-900:#134e4a;
  --ink:#0f172a; --ink-2:#334155; --muted:#64748b; --faint:#94a3b8;
  --line:#e6ecf1; --bg:#f2f6f8; --card:#ffffff;
  --blue:#2563eb;   --blue-50:#eff6ff;   --blue-100:#dbeafe;
  --orange:#ea580c; --orange-50:#fff7ed; --orange-100:#ffedd5;
  --green:#059669;  --green-50:#ecfdf5;  --green-100:#d1fae5;
  --indigo:#4f46e5; --indigo-50:#eef2ff; --indigo-100:#e0e7ff;
  --red:#e11d48;    --red-50:#fff1f2;    --red-100:#ffe4e6;
  --amber:#d97706;  --amber-50:#fffbeb;  --amber-100:#fef3c7;
  --radius:18px; --radius-sm:12px;
  --shadow:0 1px 2px rgba(15,23,42,.04),0 8px 24px -10px rgba(15,23,42,.10);
  --shadow-lg:0 24px 60px -16px rgba(15,23,42,.35);
  --topbar-h:56px;
  --sticky-top:calc(var(--topbar-h) + env(safe-area-inset-top,0px));
}

html{ -webkit-text-size-adjust:100%; scroll-behavior:smooth; }
body{
  margin:0; min-height:100vh; min-height:100dvh;
  font-family:'Plus Jakarta Sans',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  color:var(--ink); -webkit-font-smoothing:antialiased;
  background:
    radial-gradient(900px 320px at 100% -80px, rgba(20,184,166,.12), transparent 65%),
    radial-gradient(700px 300px at -10% 0, rgba(37,99,235,.06), transparent 60%),
    var(--bg);
  overflow-x:hidden;
}
body.no-scroll{ overflow:hidden; }
.tnum{ font-variant-numeric:tabular-nums; }
.break-any{ overflow-wrap:anywhere; word-break:break-word; }
:focus-visible{ outline:3px solid rgba(20,184,166,.45); outline-offset:2px; }

/* ---------- Tata letak ---------- */
.app-main{
  width:100%; max-width:1240px; margin:0 auto;
  padding:1rem .9rem calc(6.75rem + env(safe-area-inset-bottom,0px));
}
@media (min-width:640px){ .app-main{ padding:1.25rem 1.25rem calc(6.75rem + env(safe-area-inset-bottom,0px)); } }
@media (min-width:1024px){
  body.app-body{ padding-left:17rem; }
  .app-main{ padding:2rem 2rem 3rem; }
}
.app-footer{ text-align:center; color:var(--faint); font-size:.78rem; padding:0 1rem 7rem; }
@media (min-width:1024px){ .app-footer{ padding-bottom:1.5rem; } }

/* ---------- Sidebar (desktop) ---------- */
.sidebar{
  position:fixed; inset:0 auto 0 0; width:17rem; z-index:40;
  display:none; flex-direction:column; padding:1.25rem 1rem;
  background:linear-gradient(185deg,#0a2a2f 0%,#0b2230 60%,#0a1b28 100%);
  color:#cfe7e6;
}
@media (min-width:1024px){ .sidebar{ display:flex; } }
.brand{ display:flex; align-items:center; gap:.75rem; padding:.25rem .5rem 1.1rem; }
.brand-mark{
  width:2.6rem; height:2.6rem; border-radius:.9rem; flex:none;
  display:grid; place-items:center; color:#fff; font-size:1.1rem;
  background:linear-gradient(135deg,var(--brand-400),var(--brand-700));
  box-shadow:0 8px 20px -6px rgba(20,184,166,.7);
}
.brand b{ display:block; color:#fff; font-size:1.05rem; letter-spacing:.02em; line-height:1.1; }
.brand small{ display:block; color:#8fb9b8; font-size:.7rem; margin-top:.15rem; line-height:1.25; overflow-wrap:anywhere; }
.side-title{ font-size:.68rem; letter-spacing:.12em; text-transform:uppercase; color:#6f9a9a; padding:.9rem .75rem .4rem; font-weight:700; }
.side-link{
  display:flex; align-items:center; gap:.75rem; padding:.7rem .85rem; margin:.1rem 0;
  border-radius:.85rem; color:#cfe7e6; font-weight:600; font-size:.9rem; text-decoration:none;
  transition:background .15s,color .15s,transform .15s;
}
.side-link i{ width:1.15rem; text-align:center; opacity:.85; }
.side-link:hover{ background:rgba(255,255,255,.07); color:#fff; }
.side-link.is-active{ background:rgba(45,212,191,.16); color:#5eead4; box-shadow:inset 3px 0 0 var(--brand-400); }
.side-user{
  margin-top:auto; display:flex; align-items:center; gap:.7rem; padding:.8rem;
  border-radius:1rem; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08);
}
.avatar{
  width:2.4rem; height:2.4rem; border-radius:50%; flex:none; display:grid; place-items:center;
  font-weight:800; color:var(--brand-900); background:linear-gradient(135deg,#99f6e4,#5eead4);
}
.side-user p{ margin:0; line-height:1.2; min-width:0; }
.side-user .nm{ color:#fff; font-weight:700; font-size:.85rem; overflow-wrap:anywhere; }
.side-user .rl{ color:#8fb9b8; font-size:.72rem; text-transform:capitalize; }
.side-logout{
  margin-left:auto; flex:none; width:2.3rem; height:2.3rem; border-radius:.75rem; display:grid; place-items:center;
  color:#fda4af; background:rgba(244,63,94,.12); text-decoration:none; transition:background .15s;
}
.side-logout:hover{ background:rgba(244,63,94,.25); }

/* ---------- Topbar & bottom nav (HP) ---------- */
.topbar{
  position:sticky; top:0; z-index:35; height:calc(var(--topbar-h) + env(safe-area-inset-top,0px));
  padding:env(safe-area-inset-top,0px) .9rem 0; display:flex; align-items:center; gap:.7rem;
  background:rgba(255,255,255,.86); backdrop-filter:saturate(1.6) blur(14px); -webkit-backdrop-filter:saturate(1.6) blur(14px);
  border-bottom:1px solid var(--line);
}
@media (min-width:1024px){ .topbar{ display:none; } }
.topbar .brand-mark{ width:2.2rem; height:2.2rem; border-radius:.75rem; font-size:.95rem; }
.topbar .tt{ min-width:0; flex:1; line-height:1.15; }
.topbar .tt b{ display:block; font-size:.98rem; font-weight:800; }
.topbar .tt small{ display:block; color:var(--muted); font-size:.7rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.icon-btn{
  width:2.6rem; height:2.6rem; border-radius:.85rem; display:grid; place-items:center; flex:none;
  background:var(--brand-50); color:var(--brand-700); border:1px solid var(--brand-100); cursor:pointer;
}
.bottom-nav{
  position:fixed; left:0; right:0; bottom:0; z-index:45;
  display:grid; grid-template-columns:repeat(5,1fr); gap:.15rem;
  padding:.4rem .5rem calc(.4rem + env(safe-area-inset-bottom,0px));
  background:rgba(255,255,255,.94); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px);
  border-top:1px solid var(--line); box-shadow:0 -8px 30px -12px rgba(15,23,42,.18);
}
@media (min-width:1024px){ .bottom-nav{ display:none; } }
.bn-item{
  display:flex; flex-direction:column; align-items:center; gap:.15rem; padding:.2rem 0;
  color:var(--muted); font-size:.66rem; font-weight:700; text-decoration:none; background:none; border:0; cursor:pointer;
  min-width:0; font-family:inherit;
}
.bn-item span{ max-width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bn-item i{ font-size:1.05rem; width:3.1rem; height:1.9rem; display:grid; place-items:center; border-radius:999px; transition:background .2s,color .2s; }
.bn-item.is-active{ color:var(--brand-700); }
.bn-item.is-active i{ background:var(--brand-100); color:var(--brand-700); }

/* Lembar menu (HP) */
.menu-layer{ position:fixed; inset:0; z-index:70; }
.menu-layer .backdrop{ position:absolute; inset:0; background:rgba(8,20,28,.55); backdrop-filter:blur(3px); animation:fade .2s ease; }
.menu-sheet{
  position:absolute; left:0; right:0; bottom:0; max-height:88dvh; overflow-y:auto;
  background:#fff; border-radius:1.6rem 1.6rem 0 0; padding:.6rem 1rem calc(1.2rem + env(safe-area-inset-bottom,0px));
  animation:slideUp .28s cubic-bezier(.2,.8,.2,1); box-shadow:var(--shadow-lg);
}
.grabber{ width:2.6rem; height:.3rem; border-radius:999px; background:#d5dde4; margin:.2rem auto .9rem; }
.menu-grid{ display:grid; grid-template-columns:1fr 1fr; gap:.55rem; }
.menu-tile{
  display:flex; align-items:center; gap:.7rem; padding:.85rem .8rem; border-radius:1rem;
  background:#f6f9fb; border:1px solid var(--line); color:var(--ink-2); font-weight:700; font-size:.86rem; text-decoration:none; min-height:3.4rem;
}
.menu-tile i{ width:2rem; height:2rem; border-radius:.65rem; display:grid; place-items:center; background:#fff; color:var(--brand-600); box-shadow:0 1px 2px rgba(0,0,0,.06); flex:none; }
.menu-tile.is-active{ background:var(--brand-50); border-color:var(--brand-200); color:var(--brand-800); }

/* ---------- Kartu & judul halaman ---------- */
.ui-card{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); }
.pad{ padding:1rem; } @media (min-width:640px){ .pad{ padding:1.25rem; } }
.page-head{ display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:.9rem; }
.eyebrow{ margin:0 0 .25rem; font-size:.72rem; font-weight:800; letter-spacing:.12em; text-transform:uppercase; color:var(--brand-600); }
.h-title{ margin:0; font-size:1.45rem; line-height:1.2; font-weight:800; letter-spacing:-.01em; }
@media (min-width:640px){ .h-title{ font-size:1.8rem; } }
.h-sub{ margin:.35rem 0 0; color:var(--muted); font-size:.88rem; line-height:1.5; }
.h-sec{ margin:0; font-size:1.02rem; font-weight:800; }
.anim-in{ animation:rise .5s cubic-bezier(.2,.8,.2,1) both; }
.anim-in:nth-child(2){ animation-delay:.05s } .anim-in:nth-child(3){ animation-delay:.1s } .anim-in:nth-child(4){ animation-delay:.15s }

/* ---------- Tombol ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
  min-height:2.9rem; padding:.55rem 1.05rem; border-radius:var(--radius-sm); border:1px solid transparent;
  font-family:inherit; font-weight:700; font-size:.9rem; line-height:1.1; text-decoration:none; cursor:pointer;
  transition:transform .12s, box-shadow .15s, background .15s, color .15s; -webkit-tap-highlight-color:transparent; white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-sm{ min-height:2.35rem; padding:.4rem .75rem; font-size:.8rem; border-radius:.7rem; }
.btn-block{ width:100%; }
.btn-primary{ color:#fff; background:linear-gradient(135deg,var(--brand-500),var(--brand-700)); box-shadow:0 8px 18px -8px rgba(13,148,136,.8); }
.btn-primary:hover{ filter:brightness(1.05); box-shadow:0 10px 22px -8px rgba(13,148,136,.9); }
.btn-soft{ color:var(--brand-800); background:var(--brand-50); border-color:var(--brand-100); }
.btn-soft:hover{ background:var(--brand-100); }
.btn-gray{ color:var(--ink-2); background:#eef2f6; }
.btn-gray:hover{ background:#e3e9ef; }
.btn-blue{ color:#1d4ed8; background:var(--blue-50); } .btn-blue:hover{ background:var(--blue-100); }
.btn-red-soft{ color:#be123c; background:var(--red-50); } .btn-red-soft:hover{ background:var(--red-100); }
.btn-red{ color:#fff; background:var(--red); box-shadow:0 8px 18px -8px rgba(225,29,72,.7); }
.btn-green{ color:#fff; background:linear-gradient(135deg,#10b981,#047857); box-shadow:0 8px 18px -8px rgba(5,150,105,.8); }
.btn-wa{ color:#15803d; background:#dcfce7; } .btn-wa:hover{ background:#bbf7d0; }
.btn-excel{ color:#fff; background:#16a34a; } .btn-excel:hover{ background:#15803d; }
.btn-pdf{ color:#fff; background:#e11d48; } .btn-pdf:hover{ background:#be123c; }
.fab{
  position:fixed; right:1rem; z-index:44; bottom:calc(5.1rem + env(safe-area-inset-bottom,0px));
  min-height:3.4rem; padding:.7rem 1.2rem; border-radius:999px; box-shadow:0 14px 30px -10px rgba(13,148,136,.85);
}
@media (min-width:1024px){ .fab{ display:none; } }

/* ---------- Formulir ---------- */
.label{ display:block; margin:0 0 .35rem; font-size:.8rem; font-weight:700; color:var(--ink-2); }
.label .req{ color:var(--red); }
.hint{ margin:.35rem 0 0; font-size:.74rem; color:var(--muted); line-height:1.4; }
.input{
  width:100%; min-height:2.9rem; padding:.6rem .85rem; border-radius:var(--radius-sm);
  border:1.5px solid #dbe3ea; background:#f8fafc; color:var(--ink); font-family:inherit; font-size:.92rem;
  transition:border-color .15s, box-shadow .15s, background .15s; appearance:none; -webkit-appearance:none;
}
select.input{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 6 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right .8rem center; padding-right:2.3rem; text-overflow:ellipsis;
}
textarea.input{ min-height:5.5rem; resize:vertical; }
.input::placeholder{ color:#a3b0bd; }
.input:focus{ outline:none; border-color:var(--brand-500); background:#fff; box-shadow:0 0 0 4px rgba(20,184,166,.15); }
@media (max-width:639px){ .input{ font-size:16px; } } /* cegah iOS memperbesar layar saat mengetik */
.input-icon{ position:relative; }
.input-icon > i.lead{ position:absolute; left:.9rem; top:50%; transform:translateY(-50%); color:#94a3b8; pointer-events:none; }
.input-icon .input{ padding-left:2.6rem; }
.input-icon .trail{ position:absolute; right:.35rem; top:50%; transform:translateY(-50%); width:2.5rem; height:2.5rem; display:grid; place-items:center; color:#94a3b8; background:none; border:0; cursor:pointer; }

.choice{ position:relative; display:block; cursor:pointer; }
.choice input{ position:absolute; opacity:0; pointer-events:none; }
.choice > div{
  display:flex; flex-direction:column; align-items:center; gap:.3rem; text-align:center; padding:.9rem .6rem;
  border:1.5px solid #dbe3ea; border-radius:var(--radius-sm); font-weight:700; font-size:.9rem; color:var(--ink-2); background:#fff; transition:all .15s;
}
.choice > div small{ font-weight:500; font-size:.72rem; color:var(--muted); }
.choice > div i{ font-size:1.15rem; }
.choice input:checked + div{ border-color:var(--brand-500); background:var(--brand-50); color:var(--brand-800); box-shadow:0 0 0 4px rgba(20,184,166,.13); }
.choice input:checked + div.is-no{ border-color:#94a3b8; background:#f1f5f9; color:#334155; box-shadow:0 0 0 4px rgba(148,163,184,.18); }
.choice input:focus-visible + div{ outline:3px solid rgba(20,184,166,.45); outline-offset:2px; }

.fieldset{ border:1px solid var(--line); border-radius:var(--radius-sm); padding:1rem; background:#fff; }
.group-title{ margin:0 0 .75rem; padding-bottom:.45rem; border-bottom:1px dashed var(--line); font-size:.78rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--brand-700); }
.calc-box{
  display:flex; align-items:center; justify-content:space-between; gap:.75rem; margin-top:.85rem; padding:.7rem .9rem;
  border-radius:var(--radius-sm); background:var(--brand-50); border:1px dashed var(--brand-200); color:var(--brand-800); font-size:.82rem; font-weight:600;
}
.calc-box b{ font-size:1.1rem; font-weight:800; }

/* ---------- Lencana ---------- */
.chip{ display:inline-flex; align-items:center; gap:.35rem; padding:.22rem .6rem; border-radius:999px; font-size:.72rem; font-weight:700; line-height:1.2; }
.chip-brand{ background:var(--brand-100); color:var(--brand-800); }
.chip-blue{ background:var(--blue-100); color:#1d4ed8; }
.chip-orange{ background:var(--orange-100); color:#c2410c; }
.chip-green{ background:var(--green-100); color:#047857; }
.chip-indigo{ background:var(--indigo-100); color:#4338ca; }
.chip-red{ background:var(--red-100); color:#be123c; }
.chip-amber{ background:var(--amber-100); color:#b45309; }
.chip-gray{ background:#eef2f6; color:#475569; }

/* ---------- Kartu statistik ---------- */
.stat{ position:relative; overflow:hidden; display:flex; flex-direction:column; gap:.55rem; padding:.95rem; border-radius:var(--radius); background:#fff; border:1px solid var(--line); box-shadow:var(--shadow); }
@media (min-width:640px){ .stat{ padding:1.15rem; } }
.stat-ico{ width:2.4rem; height:2.4rem; border-radius:.8rem; display:grid; place-items:center; font-size:1rem; }
.stat .lbl{ margin:0; font-size:.76rem; font-weight:700; color:var(--muted); line-height:1.25; }
.stat .val{ margin:0; font-size:1.55rem; line-height:1.05; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums; }
@media (min-width:640px){ .stat .val{ font-size:1.9rem; } }
.stat .sub{ margin:0; font-size:.7rem; color:var(--faint); line-height:1.3; }
.stat.is-blue .stat-ico{ background:var(--blue-50); color:var(--blue); }   .stat.is-blue .val{ color:var(--blue); }
.stat.is-orange .stat-ico{ background:var(--orange-50); color:var(--orange); } .stat.is-orange .val{ color:var(--orange); }
.stat.is-green .stat-ico{ background:var(--green-50); color:var(--green); }  .stat.is-green .val{ color:var(--green); }
.stat.is-indigo .stat-ico{ background:var(--indigo-50); color:var(--indigo); } .stat.is-indigo .val{ color:var(--indigo); }
.stat.is-red .stat-ico{ background:var(--red-50); color:var(--red); } .stat.is-red .val{ color:var(--red); }
.stat.is-slate .stat-ico{ background:#f1f5f9; color:#475569; } .stat.is-slate .val{ color:#334155; }
.stat.is-hero{ color:#fff; border:0; background:linear-gradient(140deg,var(--brand-600),var(--brand-800) 70%,#0b3b3a); box-shadow:0 18px 36px -16px rgba(13,148,136,.9); }
.stat.is-hero::after{ content:''; position:absolute; right:-2.2rem; top:-2.2rem; width:8rem; height:8rem; border-radius:50%; background:rgba(255,255,255,.09); }
.stat.is-hero .stat-ico{ background:rgba(255,255,255,.18); color:#fff; }
.stat.is-hero .lbl,.stat.is-hero .sub{ color:rgba(255,255,255,.78); } .stat.is-hero .val{ color:#fff; }

/* ---------- Peringatan ---------- */
.alert{ display:flex; gap:.8rem; align-items:flex-start; padding:.95rem 1rem; border-radius:var(--radius-sm); border:1px solid; font-size:.86rem; line-height:1.5; }
.alert i{ margin-top:.15rem; font-size:1.1rem; }
.alert-warn{ background:var(--amber-50); border-color:#fcd34d; color:#92400e; }
.alert-danger{ background:var(--red-50); border-color:#fda4af; color:#9f1239; }
.alert-ok{ background:var(--green-50); border-color:#6ee7b7; color:#065f46; }

/* ---------- Tabel modern (desktop) ---------- */
.tbl-wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
.tbl{ width:100%; border-collapse:separate; border-spacing:0; font-size:.86rem; }
.tbl thead th{
  position:sticky; top:0; padding:.8rem .75rem; text-align:center; white-space:nowrap;
  font-size:.7rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted);
  background:#f6f9fb; border-bottom:1px solid var(--line);
}
.tbl thead th.l, .tbl td.l{ text-align:left; }
.tbl tbody td{ padding:.85rem .75rem; text-align:center; border-bottom:1px solid #eef2f6; vertical-align:middle; }
.tbl tbody tr:hover td{ background:#f9fcfc; }
.tbl tbody tr:last-child td{ border-bottom:0; }
.tbl tfoot td{ padding:.9rem .75rem; text-align:center; font-weight:800; background:#f6f9fb; border-top:2px solid var(--line); }
.tbl.dark thead th{ background:#0f2e33; color:#b8dcdb; border-bottom:0; }
.tbl.dark thead th:first-child{ border-top-left-radius:var(--radius-sm); } .tbl.dark thead th:last-child{ border-top-right-radius:var(--radius-sm); }
.num-blue{ color:var(--blue); font-weight:800; } .num-orange{ color:var(--orange); font-weight:800; }
.num-green{ color:var(--green); font-weight:800; } .num-indigo{ color:var(--indigo); font-weight:800; } .num-red{ color:var(--red); font-weight:700; }

/* ---------- Kartu baris (HP) ---------- */
.row-card{ background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:.95rem; }
.mini{ display:flex; flex-direction:column; gap:.15rem; padding:.65rem .75rem; border-radius:.85rem; background:#f6f9fb; min-width:0; }
.mini .k{ font-size:.68rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; }
.mini .v{ font-size:.95rem; font-weight:800; line-height:1.2; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.mini .s{ font-size:.7rem; color:var(--muted); overflow-wrap:anywhere; }
.mini.is-blue{ background:var(--blue-50); } .mini.is-blue .v{ color:var(--blue); }
.mini.is-orange{ background:var(--orange-50); } .mini.is-orange .v{ color:var(--orange); }
.mini.is-red{ background:var(--red-50); } .mini.is-red .v{ color:var(--red); }
.mini.is-green{ background:var(--green-50); } .mini.is-green .v{ color:var(--green); }
.mini.is-indigo{ background:var(--indigo-50); } .mini.is-indigo .v{ color:var(--indigo); }
.result-bar{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.8rem .9rem; border-radius:.95rem; background:linear-gradient(135deg,#ecfdf5,#d1fae5); color:#065f46; }
.result-bar .t{ font-size:.78rem; font-weight:700; line-height:1.3; }
.result-bar .n{ font-size:1.5rem; font-weight:800; line-height:1; }

/* ---------- Kondisi kosong ---------- */
.empty{ text-align:center; padding:3rem 1.25rem; }
.empty .ico{ width:4.2rem; height:4.2rem; margin:0 auto 1rem; display:grid; place-items:center; font-size:1.7rem; border-radius:1.3rem; background:var(--brand-50); color:var(--brand-500); }
.empty h3{ margin:0; font-size:1.05rem; font-weight:800; }
.empty p{ margin:.4rem auto 0; max-width:26rem; font-size:.86rem; color:var(--muted); line-height:1.55; }

/* ---------- Modal / lembar bawah ---------- */
.modal-bg{ position:fixed; inset:0; z-index:80; align-items:flex-end; justify-content:center; padding:0; background:rgba(8,20,28,.6); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); animation:fade .2s ease; }
@media (min-width:640px){ .modal-bg{ align-items:center; padding:1.25rem; } }
.modal-panel{
  width:100%; max-width:42rem; max-height:94dvh; display:flex; flex-direction:column; overflow:hidden;
  background:#fff; border-radius:1.6rem 1.6rem 0 0; box-shadow:var(--shadow-lg); animation:slideUp .3s cubic-bezier(.2,.8,.2,1);
}
@media (min-width:640px){ .modal-panel{ border-radius:1.4rem; max-height:90vh; } }
.modal-panel.sm{ max-width:30rem; }
.modal-head{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.9rem 1.1rem; border-bottom:1px solid var(--line); }
.modal-head h3{ margin:0; font-size:1.05rem; font-weight:800; }
.modal-body{ padding:1.1rem; overflow-y:auto; flex:1; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
.modal-foot{ display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:.85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom,0px)); border-top:1px solid var(--line); background:#f8fafc; }
.x-btn{ width:2.4rem; height:2.4rem; border-radius:.8rem; display:grid; place-items:center; background:#f1f5f9; color:#64748b; border:0; cursor:pointer; font-size:1.1rem; }
.x-btn:hover{ background:#e2e8f0; }
.steps{ display:flex; gap:.35rem; padding:.75rem 1.1rem 0; }
.steps i{ flex:1; height:.32rem; border-radius:999px; background:#e2e8f0; transition:background .25s; }
.steps i.on{ background:var(--brand-500); }
.step-title{ margin:0 0 .15rem; font-size:1rem; font-weight:800; }
.step-desc{ margin:0 0 1rem; font-size:.82rem; color:var(--muted); line-height:1.5; }

/* ---------- Grid Input (quick_input) ---------- */
/* Di bawah 1280px: tiap hari tampil sebagai kartu (1 kolom di HP, 2 kolom di tablet).
   Di 1280px ke atas: tampil sebagai tabel ala Excel. */
.gi-toolbar{
  display:flex; flex-direction:column; gap:.6rem; padding:.75rem; border-radius:var(--radius-sm);
  background:#fff; border:1px solid var(--line); box-shadow:var(--shadow);
}
@media (min-width:768px){ .gi-toolbar{ flex-direction:row; align-items:center; justify-content:space-between; } }
.gi-table{ width:100%; border-collapse:separate; border-spacing:0; font-size:.86rem; }
.grid-input{
  width:100%; min-height:2.6rem; padding:.45rem .6rem; border:1.5px solid #dbe3ea; border-radius:.65rem; background:#fff;
  font-family:inherit; font-size:.9rem; outline:none; transition:border-color .15s, box-shadow .15s; font-variant-numeric:tabular-nums; min-width:0;
}
.grid-input:focus{ border-color:var(--brand-500); box-shadow:0 0 0 3px rgba(20,184,166,.18); }
.grid-input.in-use{ border-color:#fdba74; } .grid-input.in-cancel{ border-color:#fda4af; }
.gi-sub{ display:block; margin-bottom:.2rem; font-size:.65rem; font-weight:700; color:var(--muted); }
.gi-add{ width:2rem; height:2rem; border-radius:50%; border:0; cursor:pointer; font-weight:800; background:var(--brand-100); color:var(--brand-800); transition:transform .12s, background .15s; }
.gi-add:hover{ background:var(--brand-200); transform:scale(1.08); }
.gi-add.is-del{ background:var(--red-100); color:#be123c; } .gi-add.is-del:hover{ background:#fecdd3; }
.gi-date{ font-weight:800; color:var(--ink-2); font-variant-numeric:tabular-nums; }
.save-fab{
  position:fixed; right:1rem; z-index:44; bottom:calc(5.1rem + env(safe-area-inset-bottom,0px));
  min-height:3.4rem; padding:.7rem 1.3rem; border-radius:999px; box-shadow:0 14px 30px -10px rgba(5,150,105,.85);
}
@media (min-width:1024px){ .save-fab{ bottom:1.5rem; right:2rem; } }

@media (max-width:1279px){
  .grid-input{ font-size:16px; min-height:2.9rem; }
  .gi-table, .gi-table tbody{ display:block; }
  .gi-table thead{ display:none; }
  .gi-table tbody{ display:grid; grid-template-columns:minmax(0,1fr); gap:.9rem; align-items:start; }
  .gi-row{ display:block; background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; min-width:0; }
  .gi-row > td{ display:block; padding:.75rem .95rem; border-bottom:1px dashed var(--line); }
  .gi-row > td:last-child{ border-bottom:0; }
  .gi-row > .gi-d-only{ display:none !important; }
  .gi-row > .gi-m-head{ display:flex !important; align-items:center; justify-content:space-between; gap:.5rem; background:#10343a; color:#fff; font-weight:800; border-bottom:0; }
  .gi-label{ display:block; margin-bottom:.4rem; font-size:.7rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
  .gi-fields{ display:flex; gap:.5rem; align-items:flex-end; }
  .gi-fields > div{ flex:1; min-width:0; }
  .gi-fields > .sep{ flex:none; color:#94a3b8; padding-bottom:.7rem; }
}
@media (min-width:700px) and (max-width:1279px){
  .gi-table tbody{ grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (min-width:1280px){
  .gi-row > .gi-m-head{ display:none !important; }
  .gi-label, .gi-sub{ display:none; }
  .gi-table thead th{ position:sticky; top:0; z-index:5; padding:.7rem .4rem; background:#0f2e33; color:#b8dcdb; font-size:.66rem; font-weight:800; letter-spacing:.06em; text-transform:uppercase; text-align:center; }
  .gi-table thead th:first-child{ border-top-left-radius:.8rem; } .gi-table thead th:last-child{ border-top-right-radius:.8rem; }
  .gi-row > td{ padding:.4rem .3rem; border-bottom:1px solid #eef2f6; vertical-align:middle; background:#fff; text-align:center; }
  .gi-row:hover > td{ background:#f9fcfc; }
  .gi-fields{ display:flex; gap:.3rem; align-items:center; justify-content:center; }
  .gi-fields > .sep{ color:#94a3b8; }
  .gi-fields .grid-input{ text-align:center; padding:.4rem .3rem; }
  .gi-num .grid-input{ width:4.4rem; }
  .gi-batal .grid-input{ width:5.6rem; } .gi-batal .gi-fields{ flex-direction:column; align-items:stretch; }
  .gi-nt .grid-input{ width:3.4rem; }
  .gi-pet .grid-input{ width:7.2rem; text-align:left; padding-left:.5rem; }
}
@media (min-width:1280px) and (max-width:1439px){
  .gi-num .grid-input{ width:4rem; } .gi-nt .grid-input{ width:3.1rem; } .gi-pet .grid-input{ width:6.2rem; }
}
.gi-row.row-has-data > td{ background:#f1fbf6; }
.gi-row.row-has-data{ box-shadow:inset 4px 0 0 var(--brand-500), var(--shadow); }
@media (min-width:1280px){ .gi-row.row-has-data{ box-shadow:none; } .gi-row.row-has-data > td:nth-child(2){ box-shadow:inset 4px 0 0 var(--brand-500); } }

/* ---------- Kalender hari libur ---------- */
.cal-head{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.3rem; margin-bottom:.4rem; }
.cal-head div{ padding:.45rem 0; text-align:center; font-size:.66rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; color:#64748b; background:#fff; border:1px solid var(--line); border-radius:.6rem; }
.cal-head div.sun{ color:var(--red); }
@media (min-width:640px){ .cal-head{ gap:.5rem; } .cal-head div{ font-size:.75rem; padding:.6rem 0; } }
.cal-grid{ display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:.3rem; }
@media (min-width:640px){ .cal-grid{ gap:.5rem; } }
.cal-cell{ position:relative; min-height:3.6rem; padding:.35rem; border-radius:.75rem; border:1px solid var(--line); background:#fff; display:flex; flex-direction:column; transition:transform .15s, box-shadow .15s, border-color .15s; text-align:left; font-family:inherit; }
@media (min-width:640px){ .cal-cell{ min-height:6.5rem; padding:.6rem; border-radius:1rem; } }
.cal-cell.is-free{ cursor:pointer; } .cal-cell.is-free:hover{ border-color:var(--brand-400); transform:translateY(-2px); box-shadow:0 10px 18px -10px rgba(13,148,136,.5); }
.cal-cell.is-sun{ background:#fff7f8; border-color:#fecdd3; }
.cal-cell.is-today{ border-color:var(--brand-500); box-shadow:0 0 0 3px rgba(20,184,166,.25); }
.cal-cell .d{ font-size:.85rem; font-weight:800; line-height:1; color:#334155; text-align:right; }
.cal-cell.is-sun .d{ color:var(--red); }
@media (min-width:640px){ .cal-cell .d{ font-size:1.15rem; } }
.cal-cell .lab{ margin-top:auto; font-size:.58rem; line-height:1.2; font-weight:700; border-radius:.4rem; padding:.2rem .3rem; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; word-break:break-word; }
@media (min-width:640px){ .cal-cell .lab{ font-size:.72rem; -webkit-line-clamp:3; padding:.3rem .45rem; } }
.cal-cell .hint-add{ position:absolute; inset:0; display:none; align-items:center; justify-content:center; border-radius:inherit; background:rgba(13,148,136,.1); }
.cal-cell .hint-add span{ background:var(--brand-600); color:#fff; font-size:.7rem; font-weight:800; padding:.3rem .7rem; border-radius:999px; box-shadow:0 6px 14px -4px rgba(13,148,136,.7); }
@media (hover:hover) and (min-width:640px){ .cal-cell.is-free:hover .hint-add{ display:flex; } }
.cal-cell .free-txt{ margin-top:auto; font-size:.65rem; color:#b6c2cd; font-weight:600; display:none; }
@media (min-width:640px){ .cal-cell .free-txt{ display:block; } }
.cal-cell.is-holiday{ cursor:pointer; }
.cal-cell.is-holiday:hover{ transform:translateY(-2px); box-shadow:0 10px 18px -10px rgba(15,23,42,.35); }
.cal-blank{ min-height:3.6rem; } @media (min-width:640px){ .cal-blank{ min-height:6.5rem; } }
.no-scrollbar::-webkit-scrollbar{ display:none; } .no-scrollbar{ -ms-overflow-style:none; scrollbar-width:none; }

/* ---------- Halaman login ---------- */
.login-wrap{ min-height:100vh; min-height:100dvh; display:grid; }
@media (min-width:1024px){ .login-wrap{ grid-template-columns:1.05fr 1fr; } }
.login-hero{
  position:relative; overflow:hidden; color:#fff; padding:calc(2rem + env(safe-area-inset-top,0px)) 1.5rem 4.5rem;
  background:
    radial-gradient(520px 320px at 90% 0, rgba(94,234,212,.35), transparent 60%),
    radial-gradient(480px 320px at 0 100%, rgba(37,99,235,.35), transparent 60%),
    linear-gradient(150deg,#0b3b3a,#0a2b3a 70%,#0a1f2e);
}
@media (min-width:1024px){ .login-hero{ padding:3rem; display:flex; flex-direction:column; justify-content:space-between; } }
.login-hero::before{ content:''; position:absolute; inset:0; opacity:.35; background-image:radial-gradient(rgba(255,255,255,.35) 1px,transparent 1.5px); background-size:22px 22px; mask-image:linear-gradient(180deg,#000,transparent 85%); -webkit-mask-image:linear-gradient(180deg,#000,transparent 85%); }
.login-hero > *{ position:relative; }
.feature{ display:flex; gap:.8rem; align-items:flex-start; }
.feature i{ width:2.4rem; height:2.4rem; border-radius:.8rem; display:grid; place-items:center; flex:none; background:rgba(255,255,255,.12); color:#5eead4; }
.feature b{ display:block; font-size:.92rem; } .feature span{ display:block; font-size:.8rem; color:#b6d6d5; line-height:1.45; margin-top:.1rem; }
.login-panel{ display:flex; align-items:center; justify-content:center; padding:0 1rem 2rem; }
@media (min-width:1024px){ .login-panel{ padding:3rem; background:transparent; } }
.login-card{ width:100%; max-width:26rem; margin-top:-3rem; padding:1.5rem 1.25rem; background:#fff; border-radius:1.6rem; box-shadow:var(--shadow-lg); border:1px solid var(--line); }
@media (min-width:640px){ .login-card{ padding:2rem; } }
@media (min-width:1024px){ .login-card{ margin-top:0; box-shadow:var(--shadow); } }
.spin{ animation:spin .8s linear infinite; }

/* ---------- Animasi ---------- */
@keyframes rise{ from{ opacity:0; transform:translateY(10px); } to{ opacity:1; transform:none; } }
@keyframes fade{ from{ opacity:0; } to{ opacity:1; } }
@keyframes slideUp{ from{ transform:translateY(40px); opacity:.4; } to{ transform:none; opacity:1; } }
@keyframes spin{ to{ transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce){ *,*::before,*::after{ animation-duration:.01ms !important; transition-duration:.01ms !important; scroll-behavior:auto !important; } }

/* ---------- SweetAlert2 ---------- */
.swal2-popup{ font-family:inherit !important; border-radius:1.4rem !important; padding:1.4rem 1.2rem !important; }
.swal2-title{ font-size:1.2rem !important; font-weight:800 !important; }
.swal2-html-container{ font-size:.92rem !important; }
.swal2-styled{ border-radius:.8rem !important; font-weight:700 !important; min-height:2.6rem; }
.swal2-input{ border-radius:.8rem !important; font-size:16px !important; }

/* ---------- Cetak ---------- */
@media print{ .sidebar,.topbar,.bottom-nav,.fab,.no-print{ display:none !important; } body.app-body{ padding-left:0; } }
