/* =========================================================
   KARYAKU BILLING — Modern Dashboard Theme
   ========================================================= */
:root{
  --kb-primary:#6366f1;
  --kb-primary-dark:#4f46e5;
  --kb-secondary:#0ea5e9;
  --kb-success:#10b981;
  --kb-warning:#f59e0b;
  --kb-danger:#ef4444;
  --kb-info:#0ea5e9;
  --kb-dark:#111827;
  --kb-bg:#f4f6fb;
  --kb-card-radius:16px;
  --kb-shadow:0 4px 24px rgba(17,24,39,.06);
  --kb-shadow-hover:0 10px 30px rgba(17,24,39,.10);
}

*{box-sizing:border-box}
body{
  background:var(--kb-bg);
  font-family:'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
  color:#1f2937;
  font-size:14.5px;
}
a{text-decoration:none}

/* ---------- LAYOUT: TOP NAVBAR (menggantikan sidebar kiri) ---------- */
.kb-navbar{
  background:linear-gradient(90deg,#1e1b4b 0%, #312e81 55%, #1e1b4b 100%);
  padding:10px 0;
  box-shadow:0 4px 20px rgba(30,27,75,.18);
  z-index:1030;
}
.kb-brand{
  display:flex;align-items:center;gap:10px;
  font-weight:700;font-size:16.5px;color:#fff !important;
}
.kb-brand .logo-badge{
  width:36px;height:36px;border-radius:10px;
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-secondary));
  display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;flex-shrink:0;
}
.kb-navbar .navbar-toggler{
  border:none;background:rgba(255,255,255,.1);padding:6px 10px;
}
.kb-navbar .navbar-toggler:focus{box-shadow:0 0 0 3px rgba(99,102,241,.35)}

.kb-nav-main{gap:2px}
.kb-nav-main .nav-link{
  display:flex;align-items:center;gap:8px;
  color:#c7d2fe !important;font-weight:500;font-size:13.8px;
  padding:9px 14px !important;border-radius:10px;transition:.15s;
}
.kb-nav-main .nav-link i{font-size:14.5px}
.kb-nav-main .nav-link:hover{background:rgba(255,255,255,.08);color:#fff !important}
.kb-nav-main .nav-link.active{
  background:linear-gradient(135deg,var(--kb-primary),#818cf8);
  color:#fff !important;box-shadow:0 4px 14px rgba(99,102,241,.35);
}
.kb-nav-main .dropdown-toggle::after{margin-left:6px;vertical-align:2px}
.kb-nav-main .badge-count{
  background:var(--kb-danger);color:#fff;font-size:10px;font-weight:700;
  padding:1px 6px;border-radius:20px;margin-left:2px;
}

.kb-nav-user .nav-link{padding:6px 10px !important;border-radius:30px;transition:.15s}
.kb-nav-user .nav-link:hover{background:rgba(255,255,255,.08)}
.kb-nav-user .avatar{
  width:32px;height:32px;border-radius:50%;flex-shrink:0;
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-secondary));
  color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;
}
.kb-nav-user .dropdown-toggle::after{display:none}

.navbar .dropdown-menu{
  border:none;border-radius:12px;box-shadow:var(--kb-shadow-hover);
  padding:8px;margin-top:8px;
}
.navbar .dropdown-item{
  border-radius:8px;padding:9px 12px;font-size:13.8px;font-weight:500;color:#374151;
}
.navbar .dropdown-item:hover{background:#f3f4ff;color:var(--kb-primary)}
.navbar .dropdown-item.text-danger:hover{background:#fef2f2}

/* ---------- MAIN CONTENT ---------- */
.kb-main{flex:1;min-width:0;display:flex;flex-direction:column}
.kb-content{padding:24px 26px 60px;max-width:1600px;width:100%;margin:0 auto}

@media (max-width: 991px){
  .kb-navbar .navbar-collapse{
    background:#1e1b4b;margin-top:10px;padding:10px;border-radius:12px;
  }
  .kb-nav-main{gap:0}
  .kb-nav-user{border-top:1px solid rgba(255,255,255,.1);margin-top:8px;padding-top:8px}
  .kb-nav-user .nav-link{color:#fff !important}
}

/* ---------- CARDS ---------- */
.kb-card{
  background:#fff;border-radius:var(--kb-card-radius);
  box-shadow:var(--kb-shadow);border:1px solid #f0f1f6;
  transition:.2s;
}
.kb-card:hover{box-shadow:var(--kb-shadow-hover)}
.kb-card .kb-card-header{
  padding:18px 22px;border-bottom:1px solid #f2f3f8;
  display:flex;align-items:center;justify-content:space-between;
}
.kb-card .kb-card-header h3{font-size:15.5px;font-weight:700;margin:0}
.kb-card .kb-card-body{padding:22px}

.stat-card{
  border-radius:var(--kb-card-radius);padding:20px 22px;color:#fff;
  position:relative;overflow:hidden;box-shadow:var(--kb-shadow);
}
.stat-card::after{
  content:'';position:absolute;right:-20px;top:-20px;width:110px;height:110px;
  background:rgba(255,255,255,.12);border-radius:50%;
}
.stat-card .icon{
  width:44px;height:44px;border-radius:12px;background:rgba(255,255,255,.18);
  display:flex;align-items:center;justify-content:center;font-size:19px;margin-bottom:14px;
}
.stat-card .value{font-size:26px;font-weight:800;line-height:1.1}
.stat-card .label{font-size:12.5px;opacity:.9;margin-top:4px}
.stat-card.bg-1{background:linear-gradient(135deg,#6366f1,#8b5cf6)}
.stat-card.bg-2{background:linear-gradient(135deg,#0ea5e9,#06b6d4)}
.stat-card.bg-3{background:linear-gradient(135deg,#10b981,#059669)}
.stat-card.bg-4{background:linear-gradient(135deg,#f59e0b,#f97316)}
.stat-card.bg-5{background:linear-gradient(135deg,#ef4444,#dc2626)}

/* ---------- BADGES ---------- */
.badge{padding:5px 11px;border-radius:20px;font-size:11.5px;font-weight:600;display:inline-block}
.badge-success{background:#d1fae5;color:#047857}
.badge-warning{background:#fef3c7;color:#b45309}
.badge-danger{background:#fee2e2;color:#b91c1c}
.badge-info{background:#e0f2fe;color:#0369a1}
.badge-secondary{background:#f1f2f6;color:#4b5563}
.badge-primary{background:#e0e7ff;color:#4338ca}

/* ---------- TABLE ---------- */
.kb-table{width:100%;border-collapse:collapse}
.kb-table th{
  text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.04em;
  color:#9ca3af;padding:10px 16px;border-bottom:2px solid #f2f3f8;font-weight:700;
}
.kb-table td{padding:13px 16px;border-bottom:1px solid #f5f6fa;font-size:13.8px;vertical-align:middle}
.kb-table tbody tr:hover{background:#fafbff}
.table-responsive-kb{overflow-x:auto;border-radius:var(--kb-card-radius)}

/* ---------- FORMS ---------- */
.kb-label{font-weight:600;font-size:13px;margin-bottom:6px;display:block;color:#374151}
.form-control,.form-select{
  border-radius:10px;border:1.5px solid #e5e7eb;padding:9px 13px;font-size:13.8px;
}
.form-control:focus,.form-select:focus{
  border-color:var(--kb-primary);box-shadow:0 0 0 3px rgba(99,102,241,.12);
}

/* ---------- BUTTONS ---------- */
.btn{border-radius:10px;font-weight:600;font-size:13.5px;padding:9px 18px}
.btn-primary{background:var(--kb-primary);border-color:var(--kb-primary)}
.btn-primary:hover{background:var(--kb-primary-dark);border-color:var(--kb-primary-dark)}
.btn-soft{background:#eef0ff;color:var(--kb-primary);border:none}
.btn-soft:hover{background:#e0e3ff;color:var(--kb-primary-dark)}
.btn-icon{width:34px;height:34px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:9px}

/* ---------- LOGIN PAGE ---------- */
.kb-login-wrap{
  min-height:100vh;display:flex;align-items:center;justify-content:center;
  background:radial-gradient(circle at top left,#312e81,#1e1b4b 60%);
  padding:20px;
}
.kb-login-card{
  background:#fff;border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.35);
  max-width:400px;width:100%;padding:38px 34px;
}
.kb-login-card .logo-badge{
  width:56px;height:56px;border-radius:16px;margin:0 auto 16px;
  background:linear-gradient(135deg,var(--kb-primary),var(--kb-secondary));
  display:flex;align-items:center;justify-content:center;font-weight:800;color:#fff;font-size:22px;
}

/* ---------- PASAL EDITOR (dynamic template builder) ---------- */
.pasal-item{
  border:1.5px solid #eef0f5;border-radius:14px;padding:16px 18px;margin-bottom:14px;background:#fbfbfe;
}
.pasal-item .pasal-num{
  width:30px;height:30px;border-radius:9px;background:var(--kb-primary);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:12.5px;
}
.pasal-drag-handle{cursor:grab;color:#9ca3af}

/* ---------- PRINT DOCUMENT VIEW (kontrak / BAST) ---------- */
.doc-paper{
  background:#fff;max-width:820px;margin:0 auto;padding:60px 65px;
  box-shadow:var(--kb-shadow);border-radius:6px;font-size:13.5px;line-height:1.7;color:#111827;
}
.doc-paper h1{font-size:17px;text-align:center;font-weight:800;letter-spacing:.02em}
.doc-paper h2{font-size:15px;text-align:center;font-weight:700;margin-top:4px}
.doc-paper .doc-pasal-title{font-weight:700;font-size:14px;margin:22px 0 8px;text-transform:uppercase}
.doc-paper .ttd-row{display:flex;justify-content:space-between;margin-top:60px}
.doc-paper .ttd-box{width:46%;text-align:center;position:relative}
.doc-paper .ttd-line{border-bottom:1px solid #111827;width:80%;margin:70px auto 6px}

/* ---------- WATERMARK DRAFT (kolom tanda tangan dokumen yang belum ditandatangani) ---------- */
.ttd-watermark{
  position:absolute;top:50%;left:50%;
  transform:translate(-50%,-50%) rotate(-28deg);
  font-size:34px;font-weight:800;letter-spacing:.12em;
  color:rgba(220,38,38,.35);
  border:3px solid rgba(220,38,38,.35);
  padding:4px 18px;border-radius:8px;
  pointer-events:none;user-select:none;
  white-space:nowrap;z-index:1;
}
.doc-status-badge{
  display:inline-block;font-size:11px;font-weight:700;letter-spacing:.05em;
  padding:4px 12px;border-radius:20px;margin-bottom:10px;
}
.doc-status-badge.signed{background:#d1fae5;color:#047857}
.doc-status-badge.draft{background:#fee2e2;color:#b91c1c}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px){
  .doc-paper{padding:34px 22px}
}
@media (max-width: 576px){
  .kb-content{padding:16px}
  .stat-card .value{font-size:21px}
}

/* ---------- PRINT MODE ---------- */
@media print{
  .kb-navbar,.no-print{display:none !important}
  .kb-content{padding:0 !important}
  .doc-paper{box-shadow:none;padding:0;max-width:100%}
  body{background:#fff}
}

.empty-state{text-align:center;padding:50px 20px;color:#9ca3af}
.empty-state i{font-size:42px;margin-bottom:12px;display:block;color:#d1d5db}

/* =========================================================
   PORTAL CLIENT — tema modern tersendiri (hero, kartu, progress)
   ========================================================= */
:root{
  --pc-primary:#0d9488;
  --pc-primary-dark:#0f766e;
  --pc-accent:#14b8a6;
  --pc-glow:#5eead4;
}

/* Navbar dalam mode Portal Client memakai gradasi teal/emerald,
   supaya langsung terasa berbeda dari mode staff/admin (indigo) */
.kb-navbar.portal-mode{
  background:linear-gradient(90deg,#134e4a 0%, #0f766e 55%, #134e4a 100%);
}
.portal-mode .kb-nav-main .nav-link.active{
  background:linear-gradient(135deg,var(--pc-primary),var(--pc-accent));
  box-shadow:0 4px 14px rgba(13,148,136,.35);
}
.portal-mode .kb-brand .logo-badge,
.portal-mode .kb-nav-user .avatar{
  background:linear-gradient(135deg,var(--pc-primary),var(--pc-accent));
}
.portal-badge-pill{
  display:inline-flex;align-items:center;gap:6px;
  background:rgba(255,255,255,.14);color:#99f6e4;
  font-size:11px;font-weight:700;letter-spacing:.03em;
  padding:5px 12px;border-radius:20px;
}

/* ---------- HERO BANNER ---------- */
.portal-hero{
  background:linear-gradient(120deg,#0f766e 0%, #0d9488 45%, #14b8a6 100%);
  border-radius:22px;padding:32px 34px;color:#fff;position:relative;overflow:hidden;
  box-shadow:0 14px 34px rgba(13,148,136,.28);margin-bottom:22px;
}
.portal-hero::before{
  content:'';position:absolute;right:-60px;top:-60px;width:260px;height:260px;
  background:radial-gradient(circle,rgba(255,255,255,.16),transparent 70%);border-radius:50%;
}
.portal-hero::after{
  content:'';position:absolute;left:-40px;bottom:-70px;width:200px;height:200px;
  background:radial-gradient(circle,rgba(255,255,255,.10),transparent 70%);border-radius:50%;
}
.portal-hero .hero-greeting{font-size:13px;opacity:.85;font-weight:500;letter-spacing:.02em}
.portal-hero .hero-company{font-size:26px;font-weight:800;margin:4px 0 2px;line-height:1.2}
.portal-hero .hero-sub{font-size:13px;opacity:.85;max-width:520px}
.portal-hero .hero-stats{
  display:flex;gap:28px;margin-top:22px;flex-wrap:wrap;position:relative;z-index:1;
}
.portal-hero .hero-stat .num{font-size:22px;font-weight:800;line-height:1.1}
.portal-hero .hero-stat .lbl{font-size:11.5px;opacity:.82;margin-top:2px}
.portal-hero .hero-progress-wrap{
  position:relative;z-index:1;margin-top:22px;background:rgba(255,255,255,.14);
  border-radius:14px;padding:14px 18px;backdrop-filter:blur(6px);
}
.portal-hero .hero-progress-label{display:flex;justify-content:space-between;font-size:12px;font-weight:600;margin-bottom:8px}
.portal-hero .progress-track{height:9px;border-radius:20px;background:rgba(255,255,255,.22);overflow:hidden}
.portal-hero .progress-fill{
  height:100%;border-radius:20px;background:linear-gradient(90deg,#5eead4,#a7f3d0);
  transition:width .6s ease;
}

/* ---------- QUICK ACTIONS ---------- */
.portal-quick-actions{display:flex;gap:12px;flex-wrap:wrap;margin-bottom:22px}
.portal-quick-btn{
  flex:1 1 150px;background:#fff;border:1.5px solid #eef0f5;border-radius:16px;
  padding:16px 18px;text-align:left;text-decoration:none;color:#111827;
  transition:.18s;box-shadow:var(--kb-shadow);
}
.portal-quick-btn:hover{transform:translateY(-3px);box-shadow:var(--kb-shadow-hover);border-color:#99f6e4}
.portal-quick-btn .qa-icon{
  width:38px;height:38px;border-radius:11px;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--pc-primary),var(--pc-accent));color:#fff;font-size:16px;margin-bottom:10px;
}
.portal-quick-btn .qa-title{font-weight:700;font-size:13.5px}
.portal-quick-btn .qa-sub{font-size:11.5px;color:#9ca3af;margin-top:1px}

/* ---------- STAT MINI CARDS (portal) ---------- */
.pc-stat{
  background:#fff;border-radius:16px;padding:16px 18px;box-shadow:var(--kb-shadow);
  border:1px solid #f0f1f6;display:flex;align-items:center;gap:12px;height:100%;
}
.pc-stat .pc-stat-icon{
  width:42px;height:42px;border-radius:12px;flex-shrink:0;
  display:flex;align-items:center;justify-content:center;font-size:17px;color:#fff;
}
.pc-stat .pc-stat-icon.teal{background:linear-gradient(135deg,#0d9488,#14b8a6)}
.pc-stat .pc-stat-icon.amber{background:linear-gradient(135deg,#f59e0b,#f97316)}
.pc-stat .pc-stat-icon.rose{background:linear-gradient(135deg,#ef4444,#dc2626)}
.pc-stat .pc-stat-icon.violet{background:linear-gradient(135deg,#8b5cf6,#7c3aed)}
.pc-stat .pc-stat-value{font-size:17px;font-weight:800;color:#111827;line-height:1.15}
.pc-stat .pc-stat-label{font-size:11.5px;color:#9ca3af;margin-top:1px}

/* ---------- CARD GRID: KONTRAK & TAGIHAN (tampilan client, mobile-friendly) ---------- */
.pc-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:14px}
.pc-item-card{
  background:#fff;border-radius:16px;padding:18px 20px;box-shadow:var(--kb-shadow);
  border:1px solid #f0f1f6;transition:.18s;position:relative;overflow:hidden;
}
.pc-item-card:hover{box-shadow:var(--kb-shadow-hover);transform:translateY(-2px)}
.pc-item-card .pc-ribbon{
  position:absolute;top:0;left:0;width:5px;height:100%;
}
.pc-item-card .pc-ribbon.st-aktif,.pc-item-card .pc-ribbon.st-lunas{background:#10b981}
.pc-item-card .pc-ribbon.st-menunggu_ttd,.pc-item-card .pc-ribbon.st-belum_bayar{background:#f59e0b}
.pc-item-card .pc-ribbon.st-terlambat,.pc-item-card .pc-ribbon.st-berhenti{background:#ef4444}
.pc-item-card .pc-ribbon.st-draft,.pc-item-card .pc-ribbon.st-selesai{background:#9ca3af}
.pc-item-card .pc-product-icon{
  width:34px;height:34px;border-radius:10px;background:#f0fdfa;color:var(--pc-primary);
  display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;
}
.pc-item-card .pc-title{font-weight:700;font-size:14px;color:#111827}
.pc-item-card .pc-sub{font-size:11.5px;color:#9ca3af}
.pc-item-card .pc-value{font-size:16px;font-weight:800;color:var(--pc-primary-dark);margin-top:10px}
.pc-item-card .pc-progress-track{height:6px;border-radius:20px;background:#eef2f7;overflow:hidden;margin-top:10px}
.pc-item-card .pc-progress-fill{height:100%;border-radius:20px;background:linear-gradient(90deg,#0d9488,#14b8a6)}
.pc-item-card .pc-progress-txt{font-size:10.5px;color:#9ca3af;margin-top:4px}

/* ---------- RESPONSIVE: PORTAL CLIENT ---------- */
@media (max-width: 767px){
  .portal-hero{padding:24px 20px;border-radius:18px}
  .portal-hero .hero-company{font-size:21px}
  .portal-hero .hero-stats{gap:18px}
  .portal-hero .hero-stat .num{font-size:19px}
  .portal-quick-actions{flex-direction:column}
  .pc-card-grid{grid-template-columns:1fr}
}
@media (max-width: 420px){
  .portal-hero{padding:20px 16px}
  .portal-hero .hero-stats{gap:14px}
}

/* =====================================================================
   v1.1.0 — RESPONSIVE LAYER, BOTTOM NAV (mobile), TABEL KARTU, DOKUMEN, PENAWARAN
   ===================================================================== */
html{-webkit-text-size-adjust:100%}
body{padding-bottom:env(safe-area-inset-bottom)}
img{max-width:100%}
.kb-brand-text{display:inline}
.kb-user-meta{display:none}
.kb-user-name{font-weight:600;font-size:13px;color:#c7d2fe}
.kb-user-role{font-size:11px;color:#9ca3af;text-transform:capitalize}
@media (min-width:768px){ .kb-user-meta{display:flex} }
.kb-page-head h4{font-size:22px;letter-spacing:-.01em}
.kb-footer{margin-top:36px;text-align:center;font-size:12px;color:#9ca3af}
.btn{min-height:36px}
.btn-icon{min-width:36px}
.kb-card-header{display:flex;align-items:center;justify-content:space-between;gap:10px}
.kb-card-header h3{margin:0}
.badge{white-space:nowrap}
.form-control,.form-select{min-height:40px}
.text-wrap-anywhere{overflow-wrap:anywhere}
@media (min-width:1400px){ body{font-size:15px} .kb-content{padding:28px 36px 70px} }

/* ---------- Navbar mobile: dropdown tampil sebagai daftar bertingkat ---------- */
@media (max-width:991px){
  .kb-navbar .navbar-collapse{max-height:calc(100vh - 90px);overflow-y:auto;-webkit-overflow-scrolling:touch}
  .kb-navbar .nav-link{color:#e0e7ff !important;padding:11px 12px;border-radius:10px}
  .kb-navbar .nav-link.active,.kb-navbar .nav-link:hover{background:rgba(255,255,255,.1)}
  .kb-navbar .dropdown-menu{position:static !important;transform:none !important;background:rgba(255,255,255,.06);box-shadow:none;margin:2px 0 6px 10px;border-radius:10px}
  .kb-navbar .dropdown-item{color:#e0e7ff;padding:10px 14px}
  .kb-navbar .dropdown-item:hover{background:rgba(255,255,255,.12);color:#fff}
  .kb-navbar .dropdown-divider{border-color:rgba(255,255,255,.12)}
  .kb-user-meta{display:flex}
  .kb-user-name{color:#fff}
  body{padding-bottom:calc(68px + env(safe-area-inset-bottom))}
}

/* ---------- Bottom navigation (mobile) ---------- */
.kb-bottom-nav{display:none}
@media (max-width:991px){
  .kb-bottom-nav{
    display:flex;position:fixed;left:0;right:0;bottom:0;z-index:1040;
    background:#fff;border-top:1px solid #e5e7eb;box-shadow:0 -6px 24px rgba(17,24,39,.08);
    padding:6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .kb-bottom-nav a,.kb-bottom-nav button{
    flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
    background:none;border:0;color:#6b7280;font-size:10.5px;font-weight:600;padding:6px 2px;border-radius:12px;
  }
  .kb-bottom-nav i{font-size:19px;line-height:1}
  .kb-bottom-nav a.active{color:var(--kb-primary);background:#eef0ff}
  .portal-mode ~ .kb-bottom-nav a.active{color:var(--pc-primary-dark);background:#f0fdfa}
}

/* ---------- Tabel -> kartu di layar kecil (otomatis; label diisi oleh app.js dari <th>) ---------- */
@media (max-width:767px){
  .kb-content{padding:14px 12px 40px}
  .kb-card-header{flex-wrap:wrap}
  .kb-card-header .d-flex,.kb-card-header form{width:100%}
  .kb-card-header .js-search-input{width:100% !important}
  .kb-table.js-stack{display:block;border:0}
  .kb-table.js-stack thead{display:none}
  .kb-table.js-stack tbody{display:block;padding:10px}
  .kb-table.js-stack tbody tr{
    display:block;background:#fff;border:1px solid #eef0f6;border-radius:14px;
    padding:10px 14px;margin-bottom:12px;box-shadow:0 2px 10px rgba(17,24,39,.04);
  }
  .kb-table.js-stack tbody tr:hover{background:#fff}
  .kb-table.js-stack td{
    display:flex;justify-content:space-between;align-items:flex-start;gap:14px;
    padding:8px 0;border-bottom:1px dashed #eef0f6;text-align:right;white-space:normal;
  }
  .kb-table.js-stack td:last-child{border-bottom:0}
  .kb-table.js-stack td::before{
    content:attr(data-label);flex:0 0 38%;max-width:38%;text-align:left;
    font-size:11px;font-weight:700;color:#9ca3af;text-transform:uppercase;letter-spacing:.03em;padding-top:2px;
  }
  .kb-table.js-stack td[data-label=""]::before,.kb-table.js-stack td:not([data-label])::before{display:none}
  .kb-table.js-stack td.text-end{justify-content:flex-end;gap:6px;flex-wrap:wrap}
  .kb-table.js-stack td[colspan]{display:block;text-align:center}
  .kb-table.js-stack td[colspan]::before{display:none}
  .stat-card{padding:16px}
  .stat-card .value{font-size:20px}
  .modal-dialog{margin:12px}
  .doc-paper{padding:22px 16px;font-size:13px}
  .doc-paper .ttd-row{flex-direction:column;gap:30px;align-items:center}
  .doc-paper .ttd-box{width:100%}
  h4.fw-bold{font-size:19px}
  .btn-toolbar-stack>*{width:100%}
}
.kb-table.no-stack{min-width:520px}

/* ---------- Dokumen: tabel dalam pasal ---------- */
.doc-paper .doc-ayat{padding-left:22px;text-indent:-22px;margin-bottom:6px;text-align:justify}
.doc-paper p{margin-bottom:8px}
.doc-paper table.doc-table{width:100%;border-collapse:collapse;font-size:12.5px;margin:8px 0 12px}
.doc-paper table.doc-table th,.doc-paper table.doc-table td{border:1px solid #cbd5e1;padding:6px 8px;vertical-align:top}
.doc-paper table.doc-table th{background:#f1f5f9;font-weight:700;text-align:left}
.doc-paper .doc-lampiran{page-break-before:always;margin-top:36px}
.doc-paper .tick{font-family:'Segoe UI Symbol','DejaVu Sans',sans-serif;font-size:15px}

/* ---------- PENAWARAN (Quotation) — meniru template surat penawaran ---------- */
.qt-paper{background:#fff;max-width:860px;margin:0 auto;padding:38px 56px 28px;box-shadow:var(--kb-shadow);border-radius:6px;color:#111827;font-size:13.5px;line-height:1.6}
.qt-head{display:flex;align-items:center;gap:12px;padding-bottom:6px;margin-bottom:2px}
.qt-head img{height:46px;width:auto}
.qt-brand-title{font-weight:800;font-size:15px}
.qt-brand-tag{font-style:italic;font-size:11.5px;color:#4b5563}
.qt-rule{border:0;border-top:2px solid #94a3b8;margin:8px 0 14px}
.qt-meta{width:100%;font-size:13px}
.qt-meta td{padding:1px 0;vertical-align:top}
.qt-meta td:first-child{width:110px;font-weight:700}
.qt-h{color:#1f4e79;font-weight:800;font-size:13.5px;margin:20px 0 8px;text-transform:uppercase}
.qt-table{width:100%;border-collapse:collapse;font-size:12.5px}
.qt-table th{background:#1f4e79;color:#fff;padding:5px 8px;text-align:left;font-weight:700}
.qt-table td{border:1px solid #111827;padding:4px 8px;vertical-align:top}
.qt-table td.num,.qt-table th.num{text-align:right}
.qt-table td.ctr,.qt-table th.ctr{text-align:center}
.qt-table tr.selected td{background:#ecfdf5;font-weight:700}
.qt-terms{margin-left:14px;font-size:13.5px}
.qt-terms .row-t{display:flex;gap:8px;margin-bottom:2px}
.qt-terms .row-t .l{min-width:170px}
.qt-sign{display:flex;justify-content:space-between;margin-top:30px;gap:20px}
.qt-sign .box{width:46%}
.qt-sign .ttl{font-weight:800;color:#1f4e79}
.qt-sign .line{border-bottom:1px solid #111827;margin:62px 0 4px;width:80%}
.qt-foot{margin-top:28px;border-top:1px solid #e5e7eb;padding-top:8px;text-align:center;font-size:11px;color:#374151}
.qt-lampiran img{width:100%;height:auto;border:1px solid #e5e7eb;border-radius:6px}
.qt-status-bar{display:inline-block;padding:3px 12px;border-radius:20px;font-size:11px;font-weight:700}
.qt-ribbon-draft{position:absolute;top:26px;right:-34px;transform:rotate(35deg);background:#fee2e2;color:#b91c1c;padding:3px 40px;font-size:11px;font-weight:800;letter-spacing:.1em}
@media (max-width:767px){
  .qt-paper{padding:22px 16px}
  .qt-sign{flex-direction:column}.qt-sign .box{width:100%}
  .qt-terms .row-t{flex-direction:column;gap:0}.qt-terms .row-t .l{min-width:0;font-weight:700}
  .qt-meta td:first-child{width:86px}
  .qt-table-wrap{overflow-x:auto}.qt-table{min-width:560px}
}
.item-row{background:#f8fafc;border:1px solid #eef0f6;border-radius:12px;padding:12px;margin-bottom:10px}

/* ---------- Kartu pilihan paket/opsi pada form ---------- */
.pasal-item.pick{transition:.15s;border:2px solid transparent}
.pasal-item.pick:hover{border-color:#c7d2fe}
.pasal-item.pick:has(input:checked){border-color:var(--kb-primary);background:#f5f6ff}
.progress-slim{height:8px;border-radius:20px;background:#eef2f7;overflow:hidden}
.progress-slim>div{height:100%;background:linear-gradient(90deg,#6366f1,#0ea5e9)}
.attention-item{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f1f2f6}
.attention-item:last-child{border-bottom:0}
.attention-item .ic{width:34px;height:34px;border-radius:10px;display:flex;align-items:center;justify-content:center;flex:0 0 34px}
.ic-warn{background:#fef3c7;color:#b45309}.ic-danger{background:#fee2e2;color:#b91c1c}.ic-info{background:#e0f2fe;color:#0369a1}.ic-ok{background:#d1fae5;color:#047857}

/* ---------- PRINT ---------- */
@page{size:A4;margin:16mm 14mm}
@media print{
  html,body{background:#fff !important;padding:0 !important;font-size:12px}
  .kb-bottom-nav,.kb-footer,.no-print,.alert{display:none !important}
  .kb-content{padding:0 !important;max-width:100%}
  .qt-paper,.doc-paper{box-shadow:none !important;padding:0 !important;max-width:100% !important;border-radius:0}
  .qt-paper{font-size:12px}
  .qt-h,.qt-sign,.doc-pasal-title{break-after:avoid}
  .qt-table tr,.doc-paper table tr,.ttd-row,.qt-sign{break-inside:avoid}
  .qt-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .qt-table tr.selected td{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .doc-paper table.doc-table th{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .qt-lampiran{break-before:page}
  .row>[class*="col-"]{width:100% !important;max-width:100% !important;flex:0 0 100% !important}
}
