/* =========================================================
   ContractPulse - Custom Utility Styles
   File Path: css/styles.css
   Batch 6 + Responsive Tables (safe version)
   ========================================================= */

/* =========================================
   1. BASE RESET
   ========================================= */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================
   2. DRAWER SYSTEM
   ========================================= */
.drawer-backdrop { transition: opacity 0.3s ease-in-out; }
.drawer-panel { transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }

.drawer-hidden { pointer-events: none; visibility: hidden; }
.drawer-hidden .drawer-backdrop { opacity: 0; }
.drawer-hidden .drawer-panel { transform: translateX(100%); }

.drawer-visible { pointer-events: auto; visibility: visible; }
.drawer-visible .drawer-backdrop { opacity: 1; }
.drawer-visible .drawer-panel { transform: translateX(0); }

/* =========================================
   3. CUSTOM SCROLLBAR
   ========================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 9999px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
* { scrollbar-width: thin; scrollbar-color: #cbd5e1 #f1f5f9; }

/* =========================================
   4. UTILITY HELPERS
   ========================================= */
.hidden { display: none !important; }
.pointer-events-none { pointer-events: none !important; }
.pointer-events-auto { pointer-events: auto !important; }

/* =========================================
   5. FOCUS VISIBLE
   ========================================= */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* =========================================
   6. CEGAH LAYOUT SHIFT
   ========================================= */
body.no-scroll { overflow: hidden; }

/* ============================================
   HEADER DROPDOWN NAVIGATION
   ============================================ */
.cp-nav-group { position: relative; }

.cp-nav-group > summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cp-nav-group > summary::-webkit-details-marker { display: none; }

.cp-nav-group > summary::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  opacity: 0.6;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cp-nav-group[open] > summary {
  background-color: rgba(30, 41, 59, 0.8);
  color: #fff;
}

.cp-nav-group[open] > summary::after {
  transform: rotate(180deg);
  opacity: 1;
}

.cp-nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 1000;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid #334155;
  box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.5), 0 4px 12px -4px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.cp-nav-group[open] .cp-nav-dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.cp-nav-dropdown.cp-nav-dropdown-right { left: auto; right: 0; }

.cp-nav-dropdown button,
.cp-nav-dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
  text-decoration: none;
  outline: none;
}

.cp-nav-dropdown button:hover,
.cp-nav-dropdown a:hover {
  background-color: rgba(51, 65, 85, 0.7);
  color: #fff;
}

.cp-nav-dropdown .cp-nav-active {
  background-color: rgba(79, 70, 229, 0.15);
  color: #a5b4fc;
}

.cp-nav-dropdown .cp-nav-divider {
  height: 1px;
  margin: 4px 6px;
  background: #1e293b;
}

@media (max-width: 768px) {
  .cp-nav-dropdown { left: 0; right: 0; min-width: 100%; }
}

/* ============================================
   INVOICE TABLE — More Dropdown
   ============================================ */
.cp-invoice-more > summary { list-style: none; }
.cp-invoice-more > summary::-webkit-details-marker { display: none; }
.cp-invoice-more { position: relative; display: inline-block; }

.cp-invoice-more-summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.cp-invoice-more-summary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e293b;
}

.cp-invoice-more-chevron {
  width: 12px;
  height: 12px;
  transition: transform 0.18s ease;
  opacity: 0.7;
}
.cp-invoice-more[open] .cp-invoice-more-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

.cp-invoice-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 9999;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.22), 0 4px 12px -4px rgba(15, 23, 42, 0.12);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  visibility: hidden;
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
}
.cp-invoice-more[open] .cp-invoice-menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.cp-invoice-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.1s ease, color 0.1s ease;
}
.cp-invoice-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.cp-invoice-menu-item-danger { color: #e11d48; }
.cp-invoice-menu-item-danger:hover {
  background: #fff1f2;
  color: #be123c;
}

.cp-invoice-menu-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.75;
}
.cp-invoice-menu-item:hover .cp-invoice-menu-icon { opacity: 1; }

.cp-invoice-menu-divider {
  height: 1px;
  margin: 4px 6px;
  background: #f1f5f9;
}

#tabContentInvoices { overflow: visible !important; }
#invoicesTableBody .cp-invoice-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#invoicesTableBody .cp-invoice-btn { white-space: nowrap; }
#floatingTimerWidget { z-index: 40 !important; }

[data-theme="dark"] .cp-invoice-more-summary {
  background: #1a1f2e;
  border-color: #2a3142;
  color: #cbd5e1;
}
[data-theme="dark"] .cp-invoice-more-summary:hover {
  background: #232838;
  border-color: #3a4457;
  color: #ffffff;
}
[data-theme="dark"] .cp-invoice-menu {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] .cp-invoice-menu-item { color: #cbd5e1; }
[data-theme="dark"] .cp-invoice-menu-item:hover {
  background: #232838;
  color: #ffffff;
}
[data-theme="dark"] .cp-invoice-menu-item-danger { color: #fb7185; }
[data-theme="dark"] .cp-invoice-menu-item-danger:hover {
  background: #3f1218;
  color: #fecdd3;
}
[data-theme="dark"] .cp-invoice-menu-divider { background: #2a3142; }

@media (max-width: 768px) {
  .cp-invoice-menu { right: 0; left: auto; min-width: 180px; }
}

/* ============================================
   MESSAGES — WhatsApp-like
   ============================================ */
.cp-messages-wrap {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 0;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  height: calc(100vh - 220px);
  min-height: 520px;
}
.cp-messages-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid #e2e8f0;
  background: #f8fafc;
  min-height: 0;
}
.cp-messages-sidebar-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.cp-messages-list { flex: 1; overflow-y: auto; padding: 4px; }

.cp-msg-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background-color 0.12s ease;
  position: relative;
}
.cp-msg-list-item:hover { background: #eef2ff; }
.cp-msg-list-item-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.cp-msg-list-item-active::before {
  content: "";
  position: absolute;
  left: 0; top: 10px; bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: #6366f1;
}
.cp-msg-list-item-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.cp-msg-list-item-name {
  font-size: 13px; font-weight: 700; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-msg-list-item-preview {
  font-size: 11px; color: #94a3b8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-msg-list-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #10b981; flex-shrink: 0; opacity: 0;
}
.cp-msg-list-item-active .cp-msg-list-item-dot { opacity: 1; }

.cp-msg-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  color: #ffffff; font-size: 13px; font-weight: 800;
  flex-shrink: 0; letter-spacing: 0.5px;
}
.cp-msg-avatar-lg { width: 42px; height: 42px; font-size: 14px; }

.cp-messages-chat {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  background: #efeae2;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.5) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.4) 0%, transparent 40%);
}
.cp-messages-empty {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; padding: 32px;
}
.cp-chat-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: #ffffff; border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.cp-chat-attach {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  background: #f1f5f9; color: #475569;
  border-radius: 10px; font-size: 11px; font-weight: 700;
  cursor: pointer; flex-shrink: 0;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.cp-chat-attach:hover { background: #e2e8f0; color: #1e293b; }
.cp-chat-thread {
  flex: 1; overflow-y: auto; padding: 20px 16px;
  display: flex; flex-direction: column; gap: 4px; min-height: 0;
}
.cp-chat-empty {
  flex: 1; display: flex; align-items: center; justify-content: center;
}
.cp-chat-day { display: flex; justify-content: center; margin: 10px 0; }
.cp-chat-day > span {
  background: rgba(255, 255, 255, 0.9);
  color: #64748b; padding: 4px 12px;
  border-radius: 12px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.cp-chat-row { display: flex; width: 100%; }
.cp-chat-row-in { justify-content: flex-start; }
.cp-chat-row-out { justify-content: flex-end; }
.cp-chat-bubble {
  position: relative; max-width: 75%;
  padding: 8px 12px 6px;
  border-radius: 12px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.08);
  word-wrap: break-word; overflow-wrap: anywhere;
}
.cp-chat-bubble-in {
  background: #ffffff; color: #1e293b;
  border-top-left-radius: 4px;
}
.cp-chat-bubble-out {
  background: #d9fdd3; color: #0f172a;
  border-top-right-radius: 4px;
}
.cp-chat-bubble-pending { opacity: 0.75; }
.cp-chat-text {
  font-size: 13px; line-height: 1.45; white-space: pre-wrap;
}
.cp-chat-meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 4px; margin-top: 2px;
  font-size: 10px; color: #64748b; font-weight: 500;
}
.cp-chat-bubble-out .cp-chat-meta { color: #4d7c0f; }
.cp-chat-ticks {
  font-size: 10px; font-weight: 800;
  letter-spacing: -2px; color: #4d7c0f;
}
.cp-chat-composer {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: #ffffff; border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.cp-chat-input {
  flex: 1; padding: 10px 16px;
  background: #f1f5f9; border: 1px solid transparent;
  border-radius: 22px; font-size: 13px; color: #1e293b;
  outline: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.cp-chat-input:focus {
  background: #ffffff; border-color: #a5b4fc;
  box-shadow: 0 0 0 3px rgba(165, 180, 252, 0.25);
}
.cp-chat-send {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: #6366f1; color: #ffffff;
  border: none; cursor: pointer; flex-shrink: 0;
  transition: background-color 0.12s ease, transform 0.1s ease;
}
.cp-chat-send:hover { background: #4f46e5; }
.cp-chat-send:active { transform: scale(0.95); }
.cp-chat-error {
  padding: 16px; text-align: center;
  color: #e11d48; font-size: 12px;
}

@media (max-width: 768px) {
  .cp-messages-wrap {
    grid-template-columns: 1fr;
    height: auto; min-height: 0;
  }
  .cp-messages-sidebar {
    border-right: none; border-bottom: 1px solid #e2e8f0;
    max-height: 220px;
  }
  .cp-messages-chat { height: 60vh; min-height: 400px; }
  .cp-chat-bubble { max-width: 85%; }
}

/* ============================================
   TAX ESTIMATE BOX
   ============================================ */
.cp-tax-estimate-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.cp-tax-estimate-box .cp-tax-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 12px !important;
}

.cp-tax-estimate-box .cp-tax-row span {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

.cp-tax-estimate-box .cp-tax-row strong {
  flex: 0 0 auto !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  margin-left: auto !important;
}

.cp-tax-estimate-box .cp-tax-total {
  display: flex !important;
  justify-content: space-between !important;
  align-items: baseline !important;
  gap: 12px !important;
  padding-top: 10px !important;
  margin-top: 6px !important;
  border-top: 2px solid #f59e0b !important;
}

.cp-tax-estimate-box .cp-tax-total span { flex: 1 1 auto !important; }

.cp-tax-estimate-box .cp-tax-total strong {
  flex: 0 0 auto !important;
  text-align: right !important;
  font-variant-numeric: tabular-nums !important;
  white-space: nowrap !important;
  margin-left: auto !important;
  color: #78350f !important;
}

.cp-tax-estimate-box .cp-tax-note {
  margin-top: 8px !important;
  font-size: 10px !important;
  font-style: italic !important;
  opacity: 0.85 !important;
}

/* ============================================
   GLOBAL CLIENT CARD / PROJECT ITEM STYLES
   ============================================ */
.client-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.2s ease;
  overflow: visible;
}
.client-card:hover { border-color: #cbd5e1; }

.client-project-item {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.5) 0%, rgba(241, 245, 249, 0.3) 100%);
  border: 1px solid rgba(203, 213, 225, 0.5);
  transition: all 0.2s ease;
}
.client-project-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(248, 250, 252, 1) 100%);
  border-color: rgba(129, 140, 248, 0.5);
  box-shadow: 0 2px 8px -2px rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .client-project-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%);
  border: 1px solid rgba(10, 14, 22, 0.9);
}
[data-theme="dark"] .client-project-item:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  border-color: rgba(129, 140, 248, 0.4);
  box-shadow: 0 2px 8px -2px rgba(99, 102, 241, 0.2);
}
[data-theme="dark"] .client-card {
  background: linear-gradient(180deg, rgba(26, 31, 46, 1) 0%, rgba(22, 26, 38, 1) 100%);
  border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .client-card:hover {
  border-color: rgba(129, 140, 248, 0.2);
}
[data-theme="dark"] .progress-bar-track {
  background-color: rgba(255, 255, 255, 0.08);
}

/* ============================================
   DRAWER FORM — readable labels & inputs
   ============================================ */
#drawerBody label {
  color: #1e293b !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  letter-spacing: 0.01em;
  margin-bottom: 6px !important;
  display: block;
}

#drawerBody input[type="text"],
#drawerBody input[type="email"],
#drawerBody input[type="tel"],
#drawerBody input[type="number"],
#drawerBody input[type="date"],
#drawerBody select,
#drawerBody textarea {
  color: #0f172a !important;
  background-color: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  font-weight: 500 !important;
  font-size: 13px !important;
  padding: 9px 12px !important;
  border-radius: 10px !important;
}

#drawerBody input::placeholder,
#drawerBody textarea::placeholder {
  color: #94a3b8 !important;
  opacity: 1 !important;
  font-weight: 400 !important;
}

#drawerBody input:focus,
#drawerBody select:focus,
#drawerBody textarea:focus {
  border-color: #4f46e5 !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15) !important;
  outline: none !important;
}

#drawerBody h4 {
  color: #0f172a !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
}

#drawerBody p,
#drawerBody .text-slate-400,
#drawerBody .text-slate-500 {
  color: #475569 !important;
}

#drawerBody p.italic {
  color: #64748b !important;
}

[data-theme="dark"] #drawerBody {
  background-color: #1a1f2e !important;
}
[data-theme="dark"] #drawerBody label {
  color: #e4e7eb !important;
}
[data-theme="dark"] #drawerBody input,
[data-theme="dark"] #drawerBody select,
[data-theme="dark"] #drawerBody textarea {
  color: #e4e7eb !important;
  background-color: #232838 !important;
  border-color: #2a3142 !important;
}
[data-theme="dark"] #drawerBody input::placeholder {
  color: #6b7280 !important;
}
[data-theme="dark"] #drawerBody p {
  color: #9ca3af !important;
}


/* ============================================================
   ★★★ BATCH 6 — CRITICAL LAYOUT CSS ★★★
   ------------------------------------------------------------
   Tailwind Play CDN tidak scan class yang di-render JS setelah
   initial load. Section ini menyediakan styling pengganti untuk
   komponen yang di-render JS.
   ============================================================ */

/* ---------- KPI GRID (dashboard.js patch) ---------- */
#cpKpiGrid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
@media (max-width: 1280px) {
  #cpKpiGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  #cpKpiGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  #cpKpiGrid { grid-template-columns: 1fr; }
}

.cp-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  min-width: 0;
}
.cp-kpi-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px -4px rgba(15, 23, 42, 0.08);
}

.cp-kpi-tag {
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 7px;
  border-radius: 6px;
  align-self: flex-start;
}
.cp-kpi-tag-timer {
  background: #eef2ff;
  color: #4f46e5;
}
.cp-kpi-tag-ms {
  background: #f5f3ff;
  color: #7c3aed;
}

.cp-kpi-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  margin-top: 4px;
  line-height: 1.3;
}

.cp-kpi-value {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.cp-kpi-accent-slate   { color: #0f172a; }
.cp-kpi-accent-amber   { color: #d97706; }
.cp-kpi-accent-violet  { color: #7c3aed; }
.cp-kpi-accent-emerald { color: #059669; }

.cp-kpi-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 4px;
  line-height: 1.4;
}

[data-theme="dark"] .cp-kpi-card {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] .cp-kpi-card:hover { border-color: #3a4457; }
[data-theme="dark"] .cp-kpi-tag-timer {
  background: #1e3a8a;
  color: #93c5fd;
}
[data-theme="dark"] .cp-kpi-tag-ms {
  background: #4c1d95;
  color: #ddd6fe;
}
[data-theme="dark"] .cp-kpi-label { color: #a3adbf; }
[data-theme="dark"] .cp-kpi-accent-slate { color: #e4e7eb; }
[data-theme="dark"] .cp-kpi-sub { color: #7c8798; }

/* ---------- LOG CARDS (dashboard.js patch) ---------- */
#recentActivityContainer { display: block; }

#recentActivityContainer > .cp-log-card {
  margin-bottom: 16px;
}

.cp-log-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}
.cp-log-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.cp-log-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
}
.cp-log-card-count {
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
}
.cp-log-scroll {
  max-height: 420px;
  overflow-y: auto;
}
.cp-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
.cp-log-table th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  text-align: left;
  padding: 8px 12px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
.cp-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}
.cp-log-table tr:last-child td { border-bottom: none; }
.cp-log-table tr:hover td { background: #f8fafc; }
.cp-log-empty {
  text-align: center;
  padding: 32px 12px;
  color: #94a3b8;
  font-style: italic;
  font-size: 11px;
}
.cp-log-loading {
  text-align: center;
  padding: 10px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}
.cp-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.cp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}
.cp-badge-invoiced {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.cp-badge-unbilled {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}
.cp-badge-neutral {
  background: #f1f5f9;
  color: #64748b;
  border-color: #e2e8f0;
}

[data-theme="dark"] .cp-log-card {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] .cp-log-card-header {
  background: #131824;
  border-bottom-color: #2a3142;
}
[data-theme="dark"] .cp-log-card-title { color: #e4e7eb; }
[data-theme="dark"] .cp-log-table th {
  background: #131824;
  color: #a3adbf;
  border-bottom-color: #2a3142;
}
[data-theme="dark"] .cp-log-table td { border-bottom-color: #232838; }
[data-theme="dark"] .cp-log-table tr:hover td { background: #232838; }
[data-theme="dark"] .cp-badge-invoiced {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #065f46;
}
[data-theme="dark"] .cp-badge-unbilled {
  background: #78350f;
  color: #fcd34d;
  border-color: #92400e;
}
[data-theme="dark"] .cp-badge-neutral {
  background: #232838;
  color: #94a3b8;
  border-color: #2a3142;
}

/* ---------- CHART CARDS (dashboard.js patch) ---------- */
#cpChartsRow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 1024px) {
  #cpChartsRow { grid-template-columns: 1fr; }
}

.cp-chart-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}
.cp-chart-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.cp-chart-card-title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
}
.cp-chart-card-sub {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}
.cp-chart-tag {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.cp-chart-tag-timer {
  background: #eef2ff;
  color: #4f46e5;
}
.cp-chart-tag-milestone {
  background: #f5f3ff;
  color: #7c3aed;
}
.cp-chart-canvas-wrap {
  position: relative;
  height: 180px;
  padding: 12px 16px 16px;
}

[data-theme="dark"] .cp-chart-card {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] .cp-chart-card-header { border-bottom-color: #2a3142; }
[data-theme="dark"] .cp-chart-card-title { color: #e4e7eb; }
[data-theme="dark"] .cp-chart-tag-timer {
  background: #1e3a8a;
  color: #93c5fd;
}
[data-theme="dark"] .cp-chart-tag-milestone {
  background: #4c1d95;
  color: #ddd6fe;
}

/* ---------- FINANCIAL SUMMARY (dashboard.js) ---------- */
#financialSummaryContainer { margin-bottom: 24px; }
#financialSummaryContainer > .grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 768px) {
  #financialSummaryContainer > .grid { grid-template-columns: 1fr; }
}
#financialSummaryContainer .bg-white {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
}
#financialSummaryContainer .text-xs { font-size: 10px; }
#financialSummaryContainer .text-xl { font-size: 20px; }
[data-theme="dark"] #financialSummaryContainer .bg-white {
  background: #1a1f2e;
  border-color: #2a3142;
}

/* ---------- PROJECT ALERTS & MILESTONES (dashboard.js) ---------- */
#projectAlertsMilestonesContainer { margin-bottom: 24px; }
#projectAlertsMilestonesContainer > .bg-white {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
#projectAlertsMilestonesContainer .border.border-slate-100 {
  border: 1px solid #f1f5f9;
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
}
[data-theme="dark"] #projectAlertsMilestonesContainer > .bg-white {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] #projectAlertsMilestonesContainer .border.border-slate-100 {
  border-color: #2a3142;
  background: #131824;
}

/* ---------- OVERDUE BANNER ---------- */
#overdueReminderBanner > div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  color: #9f1239;
  font-size: 12px;
  margin-bottom: 20px;
}
[data-theme="dark"] #overdueReminderBanner > div {
  background: #4c0519;
  border-color: #9f1239;
  color: #fecdd3;
}

/* ---------- SETTINGS FORM ---------- */
#tabContentSettings .bg-white {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
}
#tabContentSettings h3 {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
}
#tabContentSettings h4 {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1e293b;
  margin-bottom: 4px;
}
#tabContentSettings label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}
#tabContentSettings input[type="text"],
#tabContentSettings input[type="email"],
#tabContentSettings input[type="tel"],
#tabContentSettings input[type="number"],
#tabContentSettings input[type="date"],
#tabContentSettings select,
#tabContentSettings textarea {
  width: 100%;
  padding: 8px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 12px;
  color: #0f172a;
  background: #ffffff;
}
#tabContentSettings input:focus,
#tabContentSettings select:focus,
#tabContentSettings textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
#tabContentSettings button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: #4f46e5;
  color: #ffffff;
  font-weight: 800;
  font-size: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
#tabContentSettings button[type="submit"]:hover {
  background: #4338ca;
}
[data-theme="dark"] #tabContentSettings .bg-white {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] #tabContentSettings h3 { color: #e4e7eb; }
[data-theme="dark"] #tabContentSettings h4 { color: #cbd5e1; }
[data-theme="dark"] #tabContentSettings label { color: #cbd5e1; }
[data-theme="dark"] #tabContentSettings input,
[data-theme="dark"] #tabContentSettings select,
[data-theme="dark"] #tabContentSettings textarea {
  background: #232838;
  border-color: #2a3142;
  color: #e4e7eb;
}

/* ---------- EXPENSE STATS CARDS ---------- */
#tabContentExpenses .grid.grid-cols-1.sm\:grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 768px) {
  #tabContentExpenses .grid.grid-cols-1.sm\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
}
#tabContentExpenses .grid.grid-cols-1.sm\:grid-cols-3 > div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px 20px;
}
[data-theme="dark"] #tabContentExpenses .grid.grid-cols-1.sm\:grid-cols-3 > div {
  background: #1a1f2e;
  border-color: #2a3142;
}

/* ============================================================
   INVOICE / EXPENSE / REPORT TABLES (LEGACY — untuk Expenses,
   Reports, Estimates yang masih pakai .bg-white.rounded-2xl)
   ------------------------------------------------------------
   ⚠️ #tabContentInvoices DIKELUARKAN dari selector ini karena
   sekarang pakai .cp-table-card / .cp-table-scroll yang punya
   style sendiri di bawah.
   ============================================================ */

#tabContentExpenses .bg-white.rounded-2xl,
#tabContentReports .bg-white.rounded-2xl,
#tabContentEstimates .bg-white.rounded-2xl {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}
#tabContentExpenses table,
#tabContentEstimates table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
#tabContentExpenses thead,
#tabContentEstimates thead {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
#tabContentExpenses thead th,
#tabContentEstimates thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
#tabContentExpenses tbody tr,
#tabContentEstimates tbody tr {
  border-bottom: 1px solid #f1f5f9;
}
#tabContentExpenses tbody tr:hover,
#tabContentEstimates tbody tr:hover {
  background: #f8fafc;
}
#tabContentExpenses tbody td,
#tabContentEstimates tbody td {
  padding: 14px 16px;
  vertical-align: top;
}

[data-theme="dark"] #tabContentExpenses .bg-white.rounded-2xl,
[data-theme="dark"] #tabContentReports .bg-white.rounded-2xl,
[data-theme="dark"] #tabContentEstimates .bg-white.rounded-2xl {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] #tabContentExpenses thead,
[data-theme="dark"] #tabContentEstimates thead {
  background: #131824;
  border-bottom-color: #2a3142;
}
[data-theme="dark"] #tabContentExpenses tbody tr,
[data-theme="dark"] #tabContentEstimates tbody tr {
  border-bottom-color: #232838;
}
[data-theme="dark"] #tabContentExpenses tbody tr:hover,
[data-theme="dark"] #tabContentEstimates tbody tr:hover {
  background: #232838;
}

/* ============================================================
   RESPONSIVE TABLES — hanya untuk #tabContentInvoices
   ------------------------------------------------------------
   Struktur:
     <div class="cp-table-card">
       <div class="cp-table-scroll">
         <table class="cp-invoices-table"> ... </table>
       </div>
     </div>
   ============================================================ */

.cp-table-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.cp-table-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.cp-table-scroll::-webkit-scrollbar { height: 6px; }
.cp-table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}

table.cp-invoices-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 12px;
  table-layout: auto;
}
table.cp-invoices-table thead {
  background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
table.cp-invoices-table thead th {
  text-align: left;
  padding: 12px 16px;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  white-space: nowrap;
}
table.cp-invoices-table thead th.text-right { text-align: right; }
table.cp-invoices-table thead th.text-center { text-align: center; }
table.cp-invoices-table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.12s ease;
}
table.cp-invoices-table tbody tr:hover {
  background: #f8fafc;
}
table.cp-invoices-table tbody td {
  padding: 14px 16px;
  vertical-align: middle;
}
table.cp-invoices-table tbody td.text-right { text-align: right; }
table.cp-invoices-table tbody td.text-center { text-align: center; }
table.cp-invoices-table .cp-table-empty {
  text-align: center;
  padding: 40px 16px;
  color: #94a3b8;
  font-style: italic;
  font-weight: 500;
}

[data-theme="dark"] .cp-table-card {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] table.cp-invoices-table thead {
  background: #131824;
  border-bottom-color: #2a3142;
}
[data-theme="dark"] table.cp-invoices-table tbody tr {
  border-bottom-color: #232838;
}
[data-theme="dark"] table.cp-invoices-table tbody tr:hover {
  background: #232838;
}

/* ---------- MOBILE CARD LAYOUT (≤640px) ---------- */
@media (max-width: 640px) {
  .cp-table-scroll { overflow-x: visible; }

  table.cp-invoices-table { min-width: 0; }
  table.cp-invoices-table thead { display: none; }
  table.cp-invoices-table,
  table.cp-invoices-table tbody,
  table.cp-invoices-table tr,
  table.cp-invoices-table td {
    display: block;
    width: 100%;
  }
  table.cp-invoices-table tr[data-invoice-row] {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin: 10px;
    padding: 12px;
    position: relative;
  }
  table.cp-invoices-table tr[data-invoice-row] td {
    padding: 6px 0 !important;
    border: none !important;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    text-align: left !important;
  }
  table.cp-invoices-table tr[data-invoice-row] td::before {
    content: attr(data-label);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    flex-shrink: 0;
  }
  table.cp-invoices-table tr[data-invoice-row] td:first-child {
    position: absolute; top: 12px; right: 12px;
    width: auto; padding: 0 !important;
  }
  table.cp-invoices-table tr[data-invoice-row] td:first-child::before { content: none; }

  table.cp-invoices-table tr[data-invoice-row] td:last-child {
    display: block; padding-top: 10px !important;
    margin-top: 6px;
    border-top: 1px dashed #e2e8f0 !important;
  }
  table.cp-invoices-table tr[data-invoice-row] td:last-child::before { content: none; }

  table.cp-invoices-table .cp-invoice-actions {
    display: flex !important; flex-wrap: wrap; gap: 6px;
  }
  table.cp-invoices-table .cp-invoice-btn {
    flex: 1; min-width: 90px; text-align: center;
  }
  table.cp-invoices-table td[colspan] {
    border: 1px dashed #e2e8f0 !important;
    border-radius: 14px;
    padding: 32px 16px !important;
    display: block;
  }
  table.cp-invoices-table td[colspan]::before { content: none; }

  [data-theme="dark"] table.cp-invoices-table tr[data-invoice-row] {
    background: #1a1f2e;
    border-color: #2a3142;
  }
  [data-theme="dark"] table.cp-invoices-table tr[data-invoice-row] td:last-child {
    border-top-color: #2a3142 !important;
  }
}

/* ---------- INVOICE ACTION BAR (dari invoicing-core.js) ---------- */
#invoiceActionBar {
  margin-bottom: 24px;
}
#invoiceActionBar > div {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}
#invoiceActionBar select,
#invoiceActionBar input[type="text"],
#invoiceActionBar input[type="number"] {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 12px;
  padding: 8px 12px;
  background: #f8fafc;
  color: #0f172a;
}
#invoiceActionBar select:focus,
#invoiceActionBar input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
  background: #ffffff;
}
#invoiceActionBar button#btnGenerateInvoice {
  background: #4f46e5;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px -4px rgba(79, 70, 229, 0.4);
}
#invoiceActionBar button#btnGenerateInvoice:hover {
  background: #4338ca;
}
[data-theme="dark"] #invoiceActionBar > div {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] #invoiceActionBar select,
[data-theme="dark"] #invoiceActionBar input {
  background: #232838;
  border-color: #2a3142;
  color: #e4e7eb;
}

/* ---------- REPORT TABS ---------- */
#tabContentReports .bg-white.p-4 {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}
.report-tab-btn {
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.report-tab-btn:hover { background: #f1f5f9; color: #1e293b; }
.report-tab-btn.bg-indigo-50 {
  background: #eef2ff;
  color: #4f46e5;
  font-weight: 800;
}
[data-theme="dark"] #tabContentReports .bg-white.p-4 {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] .report-tab-btn:hover { background: #232838; color: #e4e7eb; }

/* ---------- REPORTS CONTENT (reportFrame, card, dll) ---------- */
#reportContent {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  min-height: 300px;
}
#reportContent .grid {
  display: grid;
  gap: 16px;
}
#reportContent .grid.sm\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#reportContent .grid.sm\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 768px) {
  #reportContent .grid { grid-template-columns: 1fr !important; }
}
#reportContent table { width: 100%; border-collapse: collapse; font-size: 12px; }
#reportContent thead { background: #f8fafc; }
#reportContent th {
  text-align: left;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  border-bottom: 1px solid #e2e8f0;
}
#reportContent td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}
[data-theme="dark"] #reportContent {
  background: #1a1f2e;
  border-color: #2a3142;
}
[data-theme="dark"] #reportContent thead { background: #131824; }
[data-theme="dark"] #reportContent th { border-bottom-color: #2a3142; color: #a3adbf; }
[data-theme="dark"] #reportContent td { border-bottom-color: #232838; }

/* ---------- UPGRADE MODAL ---------- */
.upgrade-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.7);
  padding: 24px;
}
.upgrade-modal-backdrop.active { display: flex; }
.upgrade-modal-panel {
  background: #ffffff;
  border-radius: 24px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.4);
}
.feature-compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.feature-compare-table th,
.feature-compare-table td {
  text-align: left;
  padding: 8px 12px;
  border-bottom: 1px solid #f1f5f9;
}
.feature-compare-table thead th {
  background: #f8fafc;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 800;
}
[data-theme="dark"] .upgrade-modal-panel {
  background: #1a1f2e;
}
[data-theme="dark"] .feature-compare-table th,
[data-theme="dark"] .feature-compare-table td {
  border-bottom-color: #232838;
}
[data-theme="dark"] .feature-compare-table thead th {
  background: #131824;
  color: #a3adbf;
}

/* ---------- UPGRADE BANNER ---------- */
.upgrade-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border: 1px solid #c7d2fe;
  border-radius: 16px;
  margin-bottom: 20px;
}
.upgrade-banner-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #4f46e5;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.upgrade-banner-text { flex: 1; min-width: 0; }
.upgrade-banner-title {
  font-size: 13px;
  font-weight: 800;
  color: #1e1b4b;
}
.upgrade-banner-desc {
  font-size: 11px;
  color: #475569;
  margin-top: 2px;
}
.upgrade-banner-cta {
  padding: 8px 14px;
  background: #4f46e5;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.upgrade-banner-cta:hover { background: #4338ca; }
[data-theme="dark"] .upgrade-banner {
  background: linear-gradient(135deg, #1e1b4b 0%, #4c1d95 100%);
  border-color: #4338ca;
}
[data-theme="dark"] .upgrade-banner-title { color: #e0e7ff; }
[data-theme="dark"] .upgrade-banner-desc { color: #c7d2fe; }

/* ---------- HELP: fallback utility class umum ---------- */
#tabContentDashboard > .space-y-8,
#tabContentDashboard > .space-y-6 { display: block; }

/* ✅ Cegah layout shift saat scrollbar hilang (drawer/modal dibuka) */
html {
  scrollbar-gutter: stable;
}