/* ============================================================
   BILLINGPRO — style.css
   Design system: "Bali-inspired" — warm cream + dark forest green
   sidebar + teal/gold accents (matched to App Banjar's visual language)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink:            #0a1e1c;
  --ink-2:          #0f2e2c;
  --primary:        #0d9488;
  --primary-2:      #0b7a70;
  --primary-hover:  #0b7a70;
  --primary-light:  #ccfbf1;
  --primary-tint:   #f0fdfa;
  --gold:           #C99A2E;
  --gold-2:         #B8791F;
  --danger:         #dc2626;
  --danger-light:   #fee2e2;
  --success:        #16a34a;
  --success-light:  #dcfce7;
  --warning:        #d97706;
  --warning-light:  #fef3c7;
  --info:           #0e7490;
  --info-light:     #ecfeff;
  --bg:             #F6F3EC;
  --surface:        #ffffff;
  --border:         #e5e7e5;
  --border-soft:    #eeece4;
  --text:           #1C2B29;
  --text-muted:     #6E7C79;
  --text-faint:     #98a2b3;
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      16px;
  --shadow-sm:      0 1px 3px rgba(15,23,42,0.05);
  --shadow-md:      0 6px 20px rgba(15,23,42,0.09);
  --shadow-lg:      0 16px 44px rgba(15,23,42,0.16);
  --shadow-brand:   0 8px 20px rgba(13,148,136,0.3);
  --sidebar-w:      216px;
  --topbar-h:       56px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 13.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .page-title, .stat-value, .login-brand-name, .login-title,
.btn-primary, .btn-secondary, .btn-danger, .sidebar-link, .tb-brand-name,
.modal-title, .form-section-title { font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--primary-light); color: var(--ink); }

/* ── TOPBAR ── */
#topbar {
  height: var(--topbar-h);
  background: radial-gradient(circle at top left, #24365f, var(--ink-2) 40%, var(--ink) 100%);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tb-left  { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: 0; }
.tb-center { flex: 1; text-align: center; }
.tb-right  { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.tb-brand  { display: flex; align-items: center; gap: 10px; }
.tb-brand-icon { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(13,148,136,0.4); flex-shrink: 0; }
.tb-brand-icon svg { display: block; }
.tb-brand-name { font-size: 14.5px; font-weight: 800; color: #fff; letter-spacing: -.2px; line-height: 1.15; }
.tb-brand-sub  { font-size: 9.5px; color: #a9c2be; font-weight: 600; line-height: 1.2; letter-spacing: .2px; }
.tb-page-title { font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.55); }
.tb-date { font-size: 11.5px; color: #a9c2be; }

/* Account dropdown */
.tb-account { position: relative; }
.tb-account-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 5px 10px 5px 5px; font-size: 12px; font-weight: 600; color: #fff; border-radius: 30px; transition: background .15s; }
.tb-account-btn:hover { background: rgba(255,255,255,0.08); }
.tb-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex-shrink: 0; }
.tb-caret { font-size: 9px; color: rgba(255,255,255,0.4); }
.tb-account-menu { display: none; position: absolute; top: 44px; right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); min-width: 200px; z-index: 200; overflow: hidden; }
.tb-account-menu.open { display: block; }
.tb-account-info { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); }
.tb-account-name { font-weight: 700; font-size: 13px; color: var(--text); margin-bottom: 4px; }
.tb-role-badge { display: inline-block; background: var(--primary-tint); color: var(--primary); padding: 2px 9px; border-radius: 20px; font-size: 10px; font-weight: 700; }
.tb-online { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--success); margin-top: 8px; font-weight: 600; }
.tb-online-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.tb-logout-btn { width: 100%; text-align: left; background: none; border: none; padding: 11px 16px; font-size: 12px; font-weight: 600; color: var(--danger); display: flex; align-items: center; gap: 8px; }
.tb-logout-btn:hover { background: var(--danger-light); }

.hamburger { display: none; background: none; border: none; font-size: 20px; color: #fff; padding: 4px 6px; border-radius: 6px; line-height: 1; }
.hamburger:hover { background: rgba(255,255,255,0.08); }

/* ── APP SHELL ── */
.app-shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: radial-gradient(circle at top left, #24365f, var(--ink-2) 35%, var(--ink) 100%);
  display: flex; flex-direction: column;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto; padding-top: 14px;
}
.sidebar-links { flex: 1; padding: 0 10px 10px; }
.nav-section-label { padding: 0 10px; margin-bottom: 8px; font-size: 9.5px; text-transform: uppercase; letter-spacing: 1.4px; color: rgba(255,255,255,0.3); font-weight: 700; }
.sidebar-link { display: flex; align-items: center; gap: 10px; padding: 9px 11px; margin-bottom: 2px; border-radius: var(--radius-sm); color: #a9c2be; font-size: 12.5px; font-weight: 600; transition: all .15s; }
.sidebar-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar-link.active { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 4px 14px rgba(13,148,136,0.4); }
.sidebar-icon { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sidebar-icon svg { width: 18px; height: 18px; }
.sidebar-version { padding: 8px 16px 14px; font-size: 10px; font-weight: 600; color: rgba(255,255,255,0.22); }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(10,30,28,0.55); z-index: 98; }
.sidebar-backdrop.show { display: block; }

/* ── MAIN ── */
.page-main { flex: 1; padding: 24px 28px; min-width: 0; }

/* ── STAT CARDS — bold gradient, Bali-inspired teal/gold family ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }
.stat-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border: none; border-radius: 14px;
  padding: 18px; display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden; box-shadow: 0 10px 24px rgba(13,148,136,0.25);
  color: #fff;
}
.stat-card::after { content: ""; position: absolute; right: -28px; top: -28px; width: 100px; height: 100px; background: rgba(255,255,255,0.1); border-radius: 50%; }
.stat-card:nth-child(1) { background: linear-gradient(135deg, var(--gold), var(--gold-2)); box-shadow: 0 10px 24px rgba(201,154,46,0.3); }
.stat-card:nth-child(2) { background: linear-gradient(135deg, #fb7185, #ef4444); box-shadow: 0 10px 24px rgba(239,68,68,0.25); }
.stat-card:nth-child(3) { background: linear-gradient(135deg, #fbbf24, #f59e0b); box-shadow: 0 10px 24px rgba(245,158,11,0.25); }
.stat-card:nth-child(4) { background: linear-gradient(135deg, #2dd4bf, var(--primary)); box-shadow: 0 10px 24px rgba(13,148,136,0.25); }
.stat-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: rgba(255,255,255,0.2) !important; color: #fff !important; position: relative; }
.stat-icon svg { width: 19px; height: 19px; }
.stat-icon.blue, .stat-icon.purple, .stat-icon.orange, .stat-icon.green { background: rgba(255,255,255,0.2) !important; color: #fff !important; }
.stat-value { font-size: 24px; font-weight: 800; color: #fff; line-height: 1.1; letter-spacing: -.3px; position: relative; }
.stat-label { font-size: 11.5px; color: rgba(255,255,255,0.85); font-weight: 600; margin-top: 3px; position: relative; }

/* ── PAGE ELEMENTS ── */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.page-title { font-size: 20px; font-weight: 800; color: var(--text); letter-spacing: -.4px; }
.page-subtitle { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.breadcrumb { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--primary); font-weight: 600; }
.breadcrumb a:hover { text-decoration: underline; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 10px; }
.section-title { font-size: 15px; font-weight: 700; color: var(--text); }
.link-more { font-size: 12.5px; color: var(--primary); font-weight: 600; }
.link-more:hover { text-decoration: underline; }

/* ── TABLE ── */
.table-card { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: #161d2f; }
.data-table th { color: #c3c9da; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; padding: 10px 16px; text-align: left; white-space: nowrap; }
.data-table td { padding: 9px 16px; border-bottom: 1px solid var(--border-soft); font-size: 13px; line-height: 1.35; vertical-align: middle; color: var(--text); white-space: nowrap; }
.data-table td.wrap { white-space: normal; }
.data-table tbody tr { background: var(--surface); transition: background .12s; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--primary-tint); }
.empty-row { text-align: center; color: var(--text-faint); padding: 36px !important; background: #fff !important; font-size: 13px; }

/* ── ICON ACTION BUTTONS (row-level "Aksi") ── */
.action-btns { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; white-space: nowrap; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 8px; border: none; cursor: pointer;
  transition: transform .12s, filter .12s, background .12s; flex-shrink: 0;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { transform: translateY(-1px); filter: brightness(0.96); }
.btn-icon:active { transform: translateY(0); }
.btn-icon-edit       { background: #fdf3df; color: var(--gold-2); }
.btn-icon-delete     { background: var(--danger-light); color: var(--danger); }
.btn-icon-view       { background: var(--success-light); color: #15803d; }
.btn-icon-pay        { background: var(--warning-light); color: var(--warning); }
.btn-icon-renew      { background: var(--info-light); color: var(--info); }
.btn-icon-terminate  { background: #fff1e8; color: #c2410c; }
.btn-icon-reactivate { background: var(--success-light); color: var(--success); }

/* Solid icon buttons (primary page-level actions, all icon-only per spec) */
.btn-icon-solid {
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-brand); transition: filter .15s, transform .12s;
}
.btn-icon-solid svg { width: 17px; height: 17px; }
.btn-icon-solid:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-icon-solid.btn-icon-sm { width: 32px; height: 32px; border-radius: 9px; }
.btn-icon-solid.btn-icon-sm svg { width: 15px; height: 15px; }

.btn-icon-outline {
  width: 38px; height: 38px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.btn-icon-outline svg { width: 16px; height: 16px; }
.btn-icon-outline:hover { background: var(--bg); border-color: #d6d3c5; }
.btn-icon-outline.btn-icon-sm { width: 32px; height: 32px; border-radius: 9px; }
.btn-icon-outline.btn-icon-sm svg { width: 14px; height: 14px; }

.btn-icon-danger-solid {
  width: 38px; height: 38px; border-radius: 10px; border: none; cursor: pointer;
  background: linear-gradient(135deg, #fb7185, #ef4444); color: #fff; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(220,38,38,0.3); transition: filter .15s, transform .12s;
}
.btn-icon-danger-solid svg { width: 16px; height: 16px; }
.btn-icon-danger-solid:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Tooltip for icon-only actions */
[data-tooltip] { position: relative; }
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%) translateY(3px);
  background: #1b2236; color: #fff; font-size: 10.5px; font-weight: 600; letter-spacing: .1px;
  padding: 5px 9px; border-radius: 6px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity .12s ease, transform .12s ease; z-index: 60;
  box-shadow: 0 6px 16px rgba(0,0,0,0.22);
}
[data-tooltip]::before {
  content: ""; position: absolute; bottom: calc(100% + 3px); left: 50%; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: #1b2236; opacity: 0; transition: opacity .12s ease; pointer-events: none; z-index: 60;
}
[data-tooltip]:hover::after, [data-tooltip]:hover::before,
[data-tooltip]:focus-visible::after, [data-tooltip]:focus-visible::before { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── FILTER BAR ── */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 180px; }
.search-wrap svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); }
.search-input { width: 100%; padding: 9px 12px 9px 35px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); outline: none; color: var(--text); transition: all .15s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.filter-select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); color: var(--text); outline: none; }
.tab-filters { display: flex; gap: 6px; }
.tab-btn { padding: 7px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 12.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all .15s; }
.tab-btn.active { color: #fff; border-color: transparent; background: linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow: 0 4px 12px rgba(13,148,136,0.3); }

/* ── BADGES ── */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; border: none; font-family: inherit; }
button.badge { cursor: pointer; transition: filter .15s; }
button.badge:hover { filter: brightness(0.95); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge-paid   { background: var(--success-light); color: #16a34a; }
.badge-unpaid { background: var(--warning-light); color: var(--warning); }
.badge-active   { background: var(--success-light); color: #16a34a; }
.badge-inactive { background: #f1f0e9; color: var(--text-muted); }
.badge-terminated { background: var(--danger-light); color: var(--danger); }
.badge-pending { background: #fdf3df; color: var(--gold-2); }
.badge-overdue { background: var(--danger-light); color: var(--danger); }
.badge-mono { font-family: 'SFMono-Regular', Consolas, monospace; font-size: 12px; color: var(--primary); font-weight: 700; }
.badge-category { background: var(--primary-tint); color: var(--primary); padding: 3px 10px; border-radius: 6px; font-size: 11.5px; font-weight: 700; }

/* ── BUTTONS (text buttons — page-level primary actions not in an Aksi column) ── */
.btn-primary { background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; border: none; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-brand); transition: filter .15s, transform .1s; display: inline-flex; align-items: center; gap: 6px; }
.btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.btn-secondary:hover { background: var(--bg); }
.btn-sm { padding: 7px 14px; font-size: 12.5px; }
.btn-danger { background: linear-gradient(135deg, #fb7185, #ef4444); color: #fff; border: none; padding: 9px 18px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 700; cursor: pointer; }

/* ── MODAL ── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(10,30,28,0.5); z-index: 200; align-items: center; justify-content: center; padding: 16px; backdrop-filter: blur(1px); }
.modal-overlay.show { display: flex; }
.modal { background: var(--surface); border-radius: 14px; padding: 22px; width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,0.18); animation: modalIn .18s ease; }
@keyframes modalIn { from { opacity:0; transform: translateY(10px) scale(.98); } to { opacity:1; transform: none; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-size: 16px; font-weight: 800; color: var(--text); }
.modal-close { background: var(--bg); border: none; cursor: pointer; color: var(--text-muted); padding: 7px; border-radius: 9px; display: flex; }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close svg { width: 15px; height: 15px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding-top: 14px; margin-top: 6px; border-top: 1px solid var(--border); }

/* ── FORM ── */
.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
.required { color: var(--danger); }
.form-input { width: 100%; padding: 8.5px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; color: var(--text); background: var(--surface); outline: none; transition: all .15s; }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-card { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); padding: 22px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.form-section-title { font-size: 13px; font-weight: 800; color: var(--text); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.form-hint { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; margin-top: -6px; }
.form-hint code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); align-items: center; }

/* ── PRICE PREVIEW ── */
.price-preview { display: none; background: var(--primary-tint); border: 1px solid #99d9d4; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; justify-content: space-between; align-items: center; }
.price-preview.show { display: flex; }
.price-label { font-size: 11px; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.price-value { font-size: 20px; font-weight: 800; color: var(--primary); }
.price-note { font-size: 11px; color: var(--text-muted); }

/* ── ALERT ── */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.alert-warning { background: var(--warning-light); border: 1px solid #fde68a; color: #92400e; }
.alert-error   { background: var(--danger-light); border: 1px solid #fecaca; color: #991b1b; }
.alert-warning svg, .alert-error svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── TOAST ── */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 999; display: flex; flex-direction: column; gap: 8px; }
.toast { display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; min-width: 240px; box-shadow: var(--shadow-md); animation: toastIn .2s ease; background: #1b2236; color: #fff; }
@keyframes toastIn { from { opacity:0; transform: translateX(16px); } to { opacity:1; transform: none; } }
.toast.success { background: #1b2236; border-left: 4px solid var(--success); }
.toast.error   { background: linear-gradient(135deg, #fb7185, #ef4444); border-left: none; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg   { color: #fff; }

/* ── SETTINGS ── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.settings-card { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; cursor: pointer; transition: all .15s; }
.settings-card:hover { border-color: var(--primary); box-shadow: 0 8px 24px rgba(13,148,136,0.15); transform: translateY(-2px); }
.settings-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.settings-icon svg { width: 20px; height: 20px; }
.settings-icon.blue   { background: var(--primary-tint); color: var(--primary); }
.settings-icon.purple { background: #fdf3df; color: var(--gold-2); }
.settings-info { flex: 1; min-width: 0; }
.settings-title { font-size: 13.5px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.settings-desc  { font-size: 12px; color: var(--text-muted); }
.settings-arrow { width: 16px; height: 16px; color: var(--text-faint); flex-shrink: 0; }

/* ── LOGIN ── */
body.login-body { background: radial-gradient(circle at top left, #123a37, var(--ink) 60%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login-wrapper { width: 100%; max-width: 400px; }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo { width: 64px; height: 64px; border-radius: 18px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; box-shadow: 0 10px 28px rgba(13,148,136,0.45); }
.login-logo svg { display: block; }
.login-brand-name { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: -.4px; margin-bottom: 4px; }
.login-tagline { font-size: 12.5px; color: #a9c2be; }
.login-card { background: #fff; border-radius: 16px; padding: 28px 26px; box-shadow: 0 24px 64px rgba(0,0,0,0.35); border: 1px solid var(--border); }
.login-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.login-subtitle { font-size: 12.5px; color: var(--text-muted); margin-bottom: 22px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); display: flex; }
.input-icon svg { width: 16px; height: 16px; }
.login-input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13.5px; color: var(--text); outline: none; font-family: inherit; }
.login-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(13,148,136,0.12); }
.toggle-pwd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--text-muted); cursor: pointer; display: flex; padding: 2px; }
.toggle-pwd svg { width: 16px; height: 16px; }
.remember-row { display: flex; align-items: center; margin: 12px 0 16px; }
.checkbox-label { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; }
.btn-login { width: 100%; padding: 12px; background: linear-gradient(135deg,var(--primary),var(--primary-2)); color: #fff; border: none; border-radius: 10px; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; box-shadow: var(--shadow-brand); transition: filter .15s, transform .1s; font-family: 'Plus Jakarta Sans', 'Inter', sans-serif; }
.btn-login:hover { filter: brightness(1.05); transform: translateY(-1px); }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.security-note { display: flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 11.5px; color: var(--primary); background: var(--primary-tint); padding: 9px 13px; border-radius: var(--radius-sm); }
.security-note svg { width: 14px; height: 14px; flex-shrink: 0; }
.login-footer { text-align: center; margin-top: 20px; font-size: 11.5px; color: rgba(255,255,255,0.35); }

/* ── MISC ── */
.text-muted { color: var(--text-muted); }
.text-truncate { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-blue { color: var(--primary); font-size: 12.5px; font-weight: 600; }
.link-blue:hover { text-decoration: underline; }

/* ── BOTTOM NAV (mobile only) ── */
.bottom-nav { display: none; }

/* ── AUTOCOMPLETE (client search di Order) ── */
.autocomplete-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); max-height: 230px; overflow-y: auto; z-index: 80; display: none;
}
.autocomplete-list.show { display: block; }
.autocomplete-item { padding: 10px 13px; cursor: pointer; border-bottom: 1px solid var(--border-soft); transition: background .1s; }
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--primary-tint); }
.ac-name { font-size: 13px; font-weight: 700; color: var(--text); }
.ac-email { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.autocomplete-empty { padding: 14px; font-size: 12.5px; color: var(--text-faint); text-align: center; }

/* ── PAGINATION ── */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; gap: 8px; }
.pagination-info { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.pagination-btns { display: flex; gap: 4px; flex-wrap: wrap; }
.page-btn { padding: 5px 11px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 12px; font-weight: 700; color: var(--text); cursor: pointer; transition: all .15s; }
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: linear-gradient(135deg,var(--primary),var(--primary-2)); border-color: transparent; color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .tb-page-title { display: none; }
  .tb-account-btn span:not(.tb-caret) { display: none; }
  .tb-date { display: none; }

  .sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    z-index: 99; padding-top: calc(var(--topbar-h) + 8px);
    transform: translateX(-100%); transition: transform .22s ease;
  }
  .sidebar.open { transform: translateX(0); }

  .page-main { padding: 12px 12px 80px; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: stretch; gap: 10px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: none; }
  .modal { padding: 16px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; }
  .toast-container { left: 12px; right: 12px; bottom: 72px; }
  .toast { min-width: unset; width: 100%; }
  .form-card { padding: 16px; }

  .data-table { min-width: 600px; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 97;
    background: radial-gradient(circle at top left, #24365f, var(--ink-2) 45%, var(--ink) 100%);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(0,0,0,0.2);
  }
  .bottom-nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 4px 2px; text-decoration: none; color: rgba(255,255,255,0.45); font-size: 9.5px; font-weight: 700; border-radius: 8px; transition: all .15s; }
  .bottom-nav-item.active { color: #5eead4; }
  .bottom-nav-item svg { width: 18px; height: 18px; }

  .pagination { padding: 10px 12px; }
  .pagination-info { font-size: 11px; }
  .page-btn { padding: 5px 9px; font-size: 11.5px; }
}
