/* ============================================================================
   BUMIGAS GLASSY DASHBOARD — DESIGN SYSTEM & TOKENS
   Satu-satunya stylesheet untuk seluruh halaman ERP Penawaran CNG PT Bumigas.
   ============================================================================ */

:root {
  /* Warna merek (SITUS) */
  --color-primary: #0057B8;      --color-primary-rgb: 0, 87, 184;
  --color-secondary: #0B3C8C;    --color-secondary-rgb: 11, 60, 140;
  --color-accent: #7AC143;       --color-accent-rgb: 122, 193, 67;
  --color-light-blue: #EAF5FF;
  --color-bg: #FFFFFF;
  --color-light-gray: #F7F9FC;
  --color-dark-text: #1B2B41;    --color-dark-text-rgb: 27, 43, 65;
  --color-border: #DCE5F2;
  --color-success: #32B768;

  /* Teks dan status (TURUNAN, lolos kontras >= 4,5:1 di atas putih) */
  --text-body: #4E5E73;          /* 6,6:1 */
  --text-muted: #5A6B82;         /* 5,4:1 */
  --text-success: #1E7A3C;       /* 5,4:1 — pengganti hijau untuk TEKS */
  --text-danger: #B42318;        /* 6,6:1 */
  --text-warning: #9A5B00;       /* 5,4:1 */
  --fill-danger: #D92D20;        /* hanya isian/ikon, bukan teks kecil */
  --fill-warning: #F5A524;       /* hanya isian/ikon */

  /* RGB turunan dari token status untuk tint 10-18% */
  --text-success-rgb: 30, 122, 60;
  --fill-danger-rgb: 217, 45, 32;
  --fill-warning-rgb: 245, 165, 36;
  --text-muted-rgb: 90, 107, 130;

  /* Tipografi (SITUS) */
  --font-headings: 'Poppins', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Bayangan, radius, transisi (SITUS) */
  --shadow-sm: 0 2px 8px rgba(27,43,65,.04);
  --shadow-md: 0 8px 24px rgba(27,43,65,.06);
  --shadow-lg: 0 16px 48px rgba(27,43,65,.10);
  --shadow-glass: 0 8px 32px 0 rgba(11,60,140,.08);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;
  --transition-fast: all .22s cubic-bezier(.4,0,.2,1);
  --transition-smooth: all .32s cubic-bezier(.22,1,.36,1);
  --transition-normal: all .4s cubic-bezier(.4,0,.2,1);

  /* Layout */
  --sidebar-width: 264px;
  --sidebar-collapsed: 76px;
  --sidebar-gap: 14px;
  --topbar-height: 64px;
}

@keyframes pageReveal {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes swapGlideIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes navProgressSlide {
  0% { transform: translateX(-45%) scaleX(.35); }
  50% { transform: translateX(18%) scaleX(.65); }
  100% { transform: translateX(105%) scaleX(.35); }
}

/* Top Navigation Shimmer Bar */
.nav-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 120;
  pointer-events: none;
  opacity: 0;
  overflow: hidden;
  transition: opacity .18s ease;
}

.nav-progress-bar::after {
  content: '';
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), var(--color-primary), transparent);
  transform-origin: left center;
}

.nav-progress-bar.is-loading {
  opacity: 1;
}

.nav-progress-bar.is-loading::after {
  animation: navProgressSlide 1.05s cubic-bezier(.4, 0, .2, 1) infinite;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-body);
  background-color: var(--color-light-gray);
  min-height: 100vh;
}

/* Latar belakang mesh lembut untuk semua halaman dashboard internal */
body.app-mesh {
  background-color: var(--color-light-gray);
  background-image:
    radial-gradient(circle at 8% 6%, rgba(var(--color-primary-rgb), .16) 0%, transparent 42%),
    radial-gradient(circle at 92% 10%, rgba(var(--color-accent-rgb), .16) 0%, transparent 40%),
    radial-gradient(circle at 52% 96%, rgba(var(--color-secondary-rgb), .10) 0%, transparent 48%),
    url('/images/background.png');
  background-attachment: fixed;
  background-size: cover, cover, cover, 960px auto;
  background-position: top left, top right, bottom center, center;
  background-blend-mode: normal, normal, normal, soft-light;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-headings);
  color: var(--color-secondary);
  margin: 0;
  font-weight: 600;
  line-height: 1.28;
}

p {
  margin: 0 0 0.75rem;
  text-align: left;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--color-secondary);
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.num,
.kpi-value,
td.num,
th.num {
  font-variant-numeric: tabular-nums;
}

td.num,
th.num {
  text-align: right;
  white-space: nowrap;
}

.text-right { text-align: right; }
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-body { color: var(--text-body); }
.text-dark { color: var(--color-dark-text); }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-success { color: var(--text-success); }
.text-danger { color: var(--text-danger); }
.text-warning { color: var(--text-warning); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.small-label { font-size: 0.8125rem; color: var(--text-muted); }
.xs-text { font-size: 0.75rem; color: var(--text-muted); }

/* ============================================================================
   TIGA TINGKAT KACA (GLASS, GLASS-DARK, GLASS-DENSE)
   ============================================================================ */

.glass-card {
  background: rgba(255, 255, 255, .75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: var(--shadow-glass), 0 0 0 1px rgba(220, 229, 242, .55), inset 0 1px 0 rgba(255, 255, 255, .6);
  border-radius: var(--radius-lg);
}

.glass-dark {
  background: linear-gradient(135deg, rgba(var(--color-secondary-rgb), .92), rgba(var(--color-primary-rgb), .82));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, .12);
  color: var(--color-bg);
  box-shadow: var(--shadow-glass);
}

.glass-dense {
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .55);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(220, 229, 242, .7);
  border-radius: var(--radius-lg);
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-card,
  .glass-dense {
    background: rgba(255, 255, 255, .94);
  }
  .glass-dark {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  }
}

.hover-lift {
  transition: var(--transition-fast);
}
.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(var(--color-primary-rgb), .18);
}

/* Motif garis aksen hijau merek */
.with-underline {
  position: relative;
  display: inline-block;
  padding-bottom: 10px;
}
.with-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 60px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
}

/* ============================================================================
   APP SHELL: SIDEBAR + TOPBAR + MAIN
   ============================================================================ */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  border-radius: 0;
  border-left: 0;
  border-top: 0;
  border-bottom: 0;
  transition: width .24s cubic-bezier(.4,0,.2,1), transform .24s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
  overflow-x: hidden;
}

body.sidebar-collapsed .app-sidebar {
  width: var(--sidebar-collapsed);
  padding: 18px 10px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  margin-bottom: 14px;
}

.sidebar-brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-bg);
  min-width: 0;
}

.sidebar-brand-logo {
  height: 36px;
  width: auto;
  max-width: 158px;
  object-fit: contain;
  display: block;
}

body.sidebar-collapsed .sidebar-brand,
body.app-shell-body.sidebar-collapsed .sidebar-brand {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 4px 0 14px;
}

body.sidebar-collapsed .sidebar-brand-link {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-brand-logo {
  width: 26px;
  height: 34px;
  object-fit: cover;
  object-position: left center;
}

body.sidebar-collapsed .sidebar-footer,
body.app-shell-body.sidebar-collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0 2px;
}

.sidebar-group {
  margin-bottom: 16px;
}

.sidebar-group-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .62);
  padding: 6px 12px 6px;
  white-space: nowrap;
}

body.sidebar-collapsed .sidebar-group-label {
  text-align: center;
  padding: 6px 0;
  font-size: 0;
}

body.sidebar-collapsed .sidebar-group-label::after {
  content: '•••';
  font-size: 0.6875rem;
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: rgba(255, 255, 255, .86);
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, .10);
  color: var(--color-bg);
}

.sidebar-link.is-active {
  background: rgba(255, 255, 255, .16);
  color: var(--color-bg);
  font-weight: 600;
}

.sidebar-link.is-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  background: var(--color-accent);
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.sidebar-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
}

body.sidebar-collapsed .sidebar-link-text,
body.sidebar-collapsed .sidebar-badge,
body.sidebar-collapsed .sidebar-footer-info {
  display: none;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .28);
  color: var(--color-bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(var(--color-dark-text-rgb), .52);
  z-index: 35;
}

.app-main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  transition: margin-left .24s cubic-bezier(.4,0,.2,1);
}

body.sidebar-collapsed .app-main {
  margin-left: var(--sidebar-collapsed);
}

/* TOPBAR (GLASS, 64px) */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 24px;
  border-radius: 0;
  border-top: 0;
  border-left: 0;
  border-right: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.topbar-search {
  position: relative;
  flex: 1;
  max-width: 380px;
}

.topbar-search input {
  width: 100%;
  height: 40px;
  padding: 0 14px 0 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .88);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-dark-text);
  transition: var(--transition-fast);
}

.topbar-search input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .18);
}

.topbar-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .85);
  color: var(--color-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.icon-btn:hover {
  background: var(--color-light-blue);
  border-color: rgba(var(--color-primary-rgb), .35);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

.notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-full);
  background: var(--fill-danger);
  color: var(--color-bg);
  font-size: 0.6875rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 5px 12px 5px 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .88);
  color: var(--color-dark-text);
  cursor: pointer;
  font-family: var(--font-body);
  transition: var(--transition-fast);
}

.dropdown-trigger:hover {
  background: var(--color-light-blue);
}

.user-pill-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-secondary);
  color: var(--color-bg);
  font-family: var(--font-headings);
  font-size: 0.8125rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 310px;
  padding: 12px;
  z-index: 60;
}

.dropdown.is-open .dropdown-menu {
  display: block;
}

.dropdown-menu-sm {
  width: 240px;
}

.dropdown-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  color: var(--color-dark-text);
  font-size: 0.84rem;
  transition: var(--transition-fast);
}

.dropdown-item:hover {
  background: var(--color-light-blue);
  color: var(--color-secondary);
}

/* Pita INTERNAL (GLASS-DARK) */
.internal-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 24px;
  border-radius: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.internal-ribbon-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.internal-ribbon-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

.internal-ribbon .temp-price-badge {
  background: rgba(255, 255, 255, .94);
  color: var(--text-warning);
  border-color: rgba(255, 255, 255, .6);
}

.internal-ribbon .final-price-badge {
  background: rgba(255, 255, 255, .94);
  color: var(--text-success);
  border-color: rgba(255, 255, 255, .6);
}

.page-content {
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* Breadcrumb & Page Header */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--color-primary);
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.page-subtitle {
  margin-top: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* ============================================================================
   TOMBOL (BUTTONS)
   ============================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: var(--transition-fast);
}

.btn svg {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-secondary);
  color: var(--color-bg);
}

.btn-secondary {
  background: rgba(255, 255, 255, .90);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-light-blue);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

.btn-accent {
  background: var(--color-accent);
  color: var(--color-secondary);
  box-shadow: var(--shadow-sm);
}

.btn-accent:hover {
  filter: brightness(0.95);
  color: var(--color-secondary);
}

.btn-ghost {
  background: transparent;
  color: var(--color-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(var(--color-primary-rgb), .08);
  color: var(--color-secondary);
}

.btn-danger {
  background: var(--fill-danger);
  color: var(--color-bg);
}

.btn-danger:hover {
  background: var(--text-danger);
  color: var(--color-bg);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
}

/* ============================================================================
   STATUS CHIPS & BADGES
   ============================================================================ */

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.status-chip::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.status-neutral {
  background: rgba(var(--text-muted-rgb), .13);
  color: var(--text-body);
}
.status-neutral::before { background: var(--text-muted); }

.status-info {
  background: rgba(var(--color-primary-rgb), .13);
  color: var(--color-secondary);
}
.status-info::before { background: var(--color-primary); }

.status-warning {
  background: rgba(var(--fill-warning-rgb), .18);
  color: var(--text-warning);
}
.status-warning::before { background: var(--fill-warning); }

.status-success {
  background: rgba(var(--text-success-rgb), .13);
  color: var(--text-success);
}
.status-success::before { background: var(--text-success); }

.status-danger {
  background: rgba(var(--fill-danger-rgb), .13);
  color: var(--text-danger);
}
.status-danger::before { background: var(--fill-danger); }

.temp-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: rgba(var(--fill-warning-rgb), .20);
  color: var(--text-warning);
  border: 1px solid rgba(var(--fill-warning-rgb), .42);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.final-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: rgba(var(--text-success-rgb), .14);
  color: var(--text-success);
  border: 1px solid rgba(var(--text-success-rgb), .32);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.version-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-light-blue);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 700;
}

/* ============================================================================
   ALERTS & TOASTS
   ============================================================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 18px;
  font-size: 0.875rem;
  border: 1px solid transparent;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-success {
  background: rgba(var(--text-success-rgb), .11);
  border-color: rgba(var(--text-success-rgb), .28);
  color: var(--text-success);
}

.alert-danger {
  background: rgba(var(--fill-danger-rgb), .11);
  border-color: rgba(var(--fill-danger-rgb), .32);
  color: var(--text-danger);
}

.alert-warning {
  background: rgba(var(--fill-warning-rgb), .16);
  border-color: rgba(var(--fill-warning-rgb), .36);
  color: var(--text-warning);
}

.alert-info {
  background: rgba(var(--color-primary-rgb), .10);
  border-color: rgba(var(--color-primary-rgb), .26);
  color: var(--color-secondary);
}

/* ============================================================================
   GRID, CARDS & KPI
   ============================================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.kpi-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: var(--color-light-blue);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-accent {
  background: rgba(var(--color-accent-rgb), .22);
  color: var(--text-success);
}

.kpi-icon-warning {
  background: rgba(var(--fill-warning-rgb), .20);
  color: var(--text-warning);
}

.kpi-icon svg {
  width: 19px;
  height: 19px;
}

.kpi-value {
  font-family: var(--font-headings);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1.18;
}

.kpi-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.kpi-chip-up {
  background: rgba(var(--text-success-rgb), .12);
  color: var(--text-success);
}

.kpi-chip-down {
  background: rgba(var(--fill-danger-rgb), .12);
  color: var(--text-danger);
}

.kpi-chip-neutral {
  background: rgba(var(--color-primary-rgb), .10);
  color: var(--color-secondary);
}

.kpi-sparkline {
  width: 68px;
  height: 24px;
  flex-shrink: 0;
}

/* 12-col dashboard grid */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.col-span-12 { grid-column: span 12; }
.col-span-8 { grid-column: span 8; }
.col-span-7 { grid-column: span 7; }
.col-span-6 { grid-column: span 6; }
.col-span-5 { grid-column: span 5; }
.col-span-4 { grid-column: span 4; }

.card-body {
  padding: 20px 22px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid rgba(220, 229, 242, .75);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-secondary);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================================================
   TABEL (GLASS-DENSE, TANPA BLUR DI BARIS)
   ============================================================================ */

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-light-gray);
  color: var(--color-secondary);
  font-family: var(--font-headings);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 11px 11px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.data-table thead th.num {
  text-align: right;
}

.data-table tbody td {
  padding: 11px 11px;
  border-bottom: 1px solid rgba(220, 229, 242, .7);
  color: var(--color-dark-text);
  vertical-align: middle;
  background: transparent;
  font-size: 0.85rem;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 16px;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 16px;
}

.data-table .status-chip {
  padding: 3px 9px;
  font-size: 0.72rem;
  gap: 6px;
}

.table-col-primary {
  min-width: 195px;
}

.data-table tbody tr:hover td {
  background: var(--color-light-blue);
}

.data-table.is-compact tbody td {
  padding: 8px 12px;
  font-size: 0.825rem;
}

.data-table.is-compact thead th {
  padding: 9px 12px;
}

.data-table tbody tr.row-highlight td {
  background: rgba(var(--color-primary-rgb), .07);
  font-weight: 600;
}

.data-table tfoot td {
  padding: 13px 14px;
  background: var(--color-light-blue);
  color: var(--color-secondary);
  font-weight: 700;
  border-top: 2px solid var(--color-border);
}

.density-toggle {
  display: inline-flex;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--color-bg);
}

.density-btn {
  padding: 6px 11px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

.density-btn.is-active {
  background: var(--color-primary);
  color: var(--color-bg);
}

/* ============================================================================
   FORMS & AKORDEON PENAWARAN
   ============================================================================ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group.span-2 { grid-column: span 2; }
.form-group.span-3 { grid-column: span 3; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-dark-text);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 4px 8px;
  line-height: 1.35;
}

.form-label > a,
.form-label > .status-chip,
.form-label > .xs-text {
  margin-left: auto;
}

.form-label .req {
  color: var(--text-danger);
}

.form-control,
.form-select,
.form-textarea {
  width: 100%;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .92);
  color: var(--color-dark-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.form-textarea {
  min-height: 86px;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .18);
}

.form-control[readonly],
.form-control:disabled {
  background: var(--color-light-gray);
  color: var(--text-muted);
}

.form-control-sm,
.form-select-sm {
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.825rem;
  border-radius: var(--radius-sm);
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.form-error {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-danger);
}

.form-error svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.input-addon-wrap {
  display: flex;
  align-items: stretch;
  min-width: 0;
}

.input-addon-wrap .form-control {
  flex: 1 1 auto;
  min-width: 0;
  padding: 8px 10px;
}

.input-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  background: var(--color-light-gray);
  border: 1px solid var(--color-border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.input-addon-left {
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-addon-right {
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-addon-wrap .has-left {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-addon-wrap .has-right {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Segmented radio pills */
.mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mode-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, .90);
  cursor: pointer;
  transition: var(--transition-fast);
}

.mode-option:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-light-blue);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), .16);
}

.mode-option input {
  margin-top: 3px;
  accent-color: var(--color-primary);
}

/* Layout 2 kolom Form Penawaran (luas & rapi di 100% zoom 1280px–1440px+) */
.quotation-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 20px;
  align-items: start;
}

.quotation-builder > * {
  min-width: 0;
}

/* Grid parameter harga & konversi: 2 kolom lega agar angka + addon tidak pernah terpotong */
.builder-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.builder-pricing-grid .span-full {
  grid-column: 1 / -1;
}

/* Bar Salin Template Biaya rapi 2 baris sejajar */
.template-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: var(--color-light-blue);
  border: 1px solid rgba(var(--color-primary-rgb), .12);
}

.template-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.template-bar-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.template-bar-controls .form-select {
  flex: 1 1 auto;
  min-width: 0;
}

.distance-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.distance-row .input-addon-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

.distance-row .btn {
  min-height: 44px;
  padding: 0 13px;
  flex-shrink: 0;
}

/* Daftar Item Biaya Operasional (kartu 2-baris rapi, 0 scrollbar horizontal di 100% zoom & mobile) */
.cost-items-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.cost-item-row {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: 9px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.cost-item-row:hover {
  border-color: rgba(var(--color-primary-rgb), .28);
  box-shadow: var(--shadow-sm);
}

.cost-item-top {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr) 34px;
  gap: 8px;
  align-items: center;
}

.cost-item-metrics {
  display: grid;
  grid-template-columns: 112px 76px minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 8px;
  align-items: end;
}

.cost-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cost-field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.cost-manual-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  user-select: none;
}

.cost-manual-toggle input {
  margin: 0;
  accent-color: var(--color-primary);
}

.cost-item-row .btn-remove-cost {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
}

.cost-item-row .btn-remove-cost:hover {
  background: rgba(var(--fill-danger-rgb), .12);
  color: var(--text-danger);
}

.cost-total-bar {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-light-blue);
  border: 1px solid rgba(var(--color-primary-rgb), .16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-secondary);
}

.cost-total-bar .num {
  font-size: 0.98rem;
  white-space: nowrap;
}

.builder-sticky {
  position: sticky;
  top: calc(var(--topbar-height) + 18px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* Akordeon */
.accordion-section {
  margin-bottom: 16px;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-headings);
  transition: var(--transition-fast);
}

.accordion-header:hover {
  background: rgba(var(--color-primary-rgb), .04);
}

.accordion-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.accordion-step {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--color-light-blue);
  color: var(--color-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-chevron {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: transform .2s ease;
}

.accordion-section.is-collapsed .accordion-chevron {
  transform: rotate(-90deg);
}

.accordion-section.is-collapsed .accordion-body {
  display: none;
}

.accordion-body {
  padding: 4px 20px 20px;
  border-top: 1px solid rgba(220, 229, 242, .65);
}

/* Panel Hasil Simulasi Real-Time */
.sim-hero-saving {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(var(--color-accent-rgb), .18);
  border: 1px solid rgba(var(--text-success-rgb), .28);
  margin-bottom: 16px;
}

.sim-hero-saving.is-negative {
  background: rgba(var(--fill-danger-rgb), .12);
  border-color: rgba(var(--fill-danger-rgb), .36);
}

.sim-hero-value {
  font-family: var(--font-headings);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 4px;
}

.compare-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0 16px;
}

.compare-bar-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.compare-bar-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.8125rem;
}

.compare-bar-track {
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(var(--color-secondary-rgb), .10);
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width .25s ease;
}

.compare-bar-fill.is-current {
  background: var(--color-secondary);
}

.compare-bar-fill.is-cng {
  background: var(--color-primary);
}

.compare-bar-fill.is-saving {
  background: var(--color-accent);
}

.sim-metric-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sim-metric-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(220, 229, 242, .85);
}

.sim-metric-row strong {
  white-space: nowrap;
  flex-shrink: 0;
}

.sim-metric-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.sim-internal-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--color-light-blue);
  border: 1px solid rgba(var(--color-primary-rgb), .20);
}

/* Google Maps Card */
.map-canvas {
  width: 100%;
  height: 220px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: linear-gradient(135deg, var(--color-light-blue), var(--color-light-gray));
  overflow: hidden;
  position: relative;
}

.map-fallback {
  height: 100%;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* ============================================================================
   TABS, STEPPER TIMELINE, MODAL, EMPTY STATE, PAGINATION
   ============================================================================ */

.tabs-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}

.tab-link:hover {
  color: var(--color-primary);
}

.tab-link.is-active {
  color: var(--color-secondary);
  border-bottom-color: var(--color-primary);
}

/* Approval Progress Stepper (horizontal) */
.workflow-stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px;
}

.stepper-node {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 120px;
}

.stepper-dot {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  background: rgba(var(--text-muted-rgb), .18);
  color: var(--text-muted);
}

.stepper-node.is-done .stepper-dot {
  background: var(--text-success);
  color: var(--color-bg);
}

.stepper-node.is-active .stepper-dot {
  background: var(--color-primary);
  color: var(--color-bg);
  box-shadow: 0 0 0 4px rgba(var(--color-primary-rgb), .22);
  animation: pulseSoft 2s infinite;
}

.stepper-node.is-danger .stepper-dot {
  background: var(--fill-danger);
  color: var(--color-bg);
}

.stepper-line {
  flex: 1;
  height: 2px;
  background: var(--color-border);
  min-width: 18px;
}

.stepper-node.is-done .stepper-line {
  background: var(--text-success);
}

@keyframes pulseSoft {
  0%, 100% { box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .24); }
  50% { box-shadow: 0 0 0 7px rgba(var(--color-primary-rgb), .08); }
}

/* Vertical History Timeline */
.timeline {
  position: relative;
  padding-left: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--color-border);
}

.timeline-item {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .90);
  border: 1px solid var(--color-border);
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 2px rgba(var(--color-primary-rgb), .25);
}

.timeline-item.tone-success::before { background: var(--text-success); }
.timeline-item.tone-danger::before { background: var(--fill-danger); }
.timeline-item.tone-warning::before { background: var(--fill-warning); }

/* Modal */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(var(--color-dark-text-rgb), .60);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-panel {
  width: 100%;
  max-width: 520px;
  padding: 22px 24px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 42px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.empty-state svg {
  width: 52px;
  height: 52px;
  color: var(--color-primary);
  opacity: .55;
}

/* Pagination */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
}

.pagination-links {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-secondary);
  font-size: 0.825rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-btn.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-bg);
}

.page-btn.is-disabled {
  opacity: .45;
  pointer-events: none;
}

/* ============================================================================
   HALAMAN LOGIN
   ============================================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 960px;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.auth-brand-pane {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0;
}

.auth-brand-title {
  color: var(--color-bg);
  font-size: 1.65rem;
  margin-bottom: 12px;
}

.auth-brand-copy {
  color: rgba(255, 255, 255, .86);
  font-size: 0.92rem;
}

.auth-brand-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, .18);
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, .82);
}

.surface-soft-panel {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, .85);
  border: 1px solid var(--color-border);
}

.divider-top-soft {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
}

.auth-form-pane {
  padding: 36px;
  background: rgba(255, 255, 255, .92);
}

.demo-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.demo-account-btn {
  text-align: left;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  transition: var(--transition-fast);
  font-family: var(--font-body);
}

.demo-account-btn:hover {
  border-color: var(--color-primary);
  background: var(--color-light-blue);
}

/* ============================================================================
   TAMPILAN EKSTERNAL (BERSIH ALA BROSUR — TANPA KACA, TANPA ELEMEN INTERNAL)
   ============================================================================ */

body.external-doc-body {
  background: var(--color-light-gray);
  background-image: none;
  color: var(--color-dark-text);
}

.external-toolbar {
  max-width: 860px;
  margin: 20px auto 14px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.external-sheet {
  position: relative;
  max-width: 860px;
  margin: 0 auto 40px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 36px 40px;
  overflow: hidden;
}

.external-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 3;
}

.external-watermark span {
  font-family: var(--font-headings);
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(var(--fill-danger-rgb), .13);
  border: 4px solid rgba(var(--fill-danger-rgb), .16);
  padding: 12px 28px;
  border-radius: var(--radius-md);
  transform: rotate(-28deg);
  text-align: center;
  white-space: nowrap;
}

.external-sheet-inner {
  position: relative;
  z-index: 2;
}

.doc-letterhead {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px solid var(--color-primary);
  margin-bottom: 22px;
}

.doc-section-bar {
  background: var(--color-secondary);
  color: var(--color-bg);
  font-family: var(--font-headings);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  margin-top: 18px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border: 1px solid var(--color-border);
}

.doc-table td,
.doc-table th {
  padding: 9px 14px;
  border-bottom: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
}

.doc-table tr:last-child td {
  border-bottom: 0;
}

.doc-table td:last-child,
.doc-table th:last-child {
  border-right: 0;
}

.doc-table .row-emphasis td {
  background: var(--color-secondary);
  color: var(--color-bg);
  font-weight: 700;
}

.doc-table .row-soft td {
  background: var(--color-light-blue);
  color: var(--color-secondary);
  font-weight: 600;
}

.doc-savings-banner {
  margin-top: 22px;
  padding: 18px 22px;
  border-radius: var(--radius-md);
  background: rgba(var(--color-accent-rgb), .18);
  border: 1px solid rgba(var(--text-success-rgb), .32);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.doc-savings-banner.is-negative {
  background: rgba(var(--fill-danger-rgb), .10);
  border-color: rgba(var(--fill-danger-rgb), .35);
}

.doc-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.doc-toolbar-right {
  display: flex;
  gap: 8px;
}

.doc-logo-img {
  height: 48px;
  width: auto;
  margin-bottom: 10px;
}

.doc-company-title {
  font-family: var(--font-headings);
  font-size: 1rem;
}

.doc-header-title {
  font-family: var(--font-headings);
  font-size: 1.1rem;
}

.doc-header-meta {
  margin-top: 4px;
}

.doc-header-badge {
  margin-top: 8px;
}

.doc-cell-label {
  width: 48%;
}

.doc-cell-label-sm {
  width: 38%;
}

.doc-table tr.row-emphasis td.doc-cell-emphasis-label {
  width: 48%;
  background: var(--color-light-blue);
  color: var(--color-secondary);
}

.doc-inline-note {
  margin-left: 8px;
}

.doc-savings-kicker {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.doc-savings-amount {
  font-family: var(--font-headings);
  font-size: 1.65rem;
  margin-top: 2px;
}

.doc-savings-annual {
  margin-top: 2px;
}

.doc-savings-pct {
  font-family: var(--font-headings);
  font-size: 1.85rem;
}

.doc-footer {
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.doc-footer-notes {
  max-width: 480px;
}

.doc-footer-list {
  margin: 4px 0 0;
  padding-left: 16px;
}

.doc-footer-sign {
  margin-top: 34px;
}

/* ============================================================================
   CALM GLASSY SHELL & INTERACTIVE DASHBOARD ENHANCEMENTS
   (GPU-accelerated — tanpa background-attachment:fixed / filter:blur besar)
   ============================================================================ */

body.app-shell-body {
  position: relative;
  font-size: 0.875rem;
  line-height: 1.5;
  background-color: var(--color-light-gray);
  background-image: none;
}

/* Skala tipografi & komponen lebih proporsional dan rapi untuk layar desktop 100% */
body.app-shell-body .page-header {
  margin-bottom: 18px;
  gap: 12px;
}

body.app-shell-body .page-title,
body.app-shell-body .dash-hero-title {
  font-size: 1.35rem;
  letter-spacing: -0.015em;
}

body.app-shell-body .with-underline {
  padding-bottom: 7px;
}

body.app-shell-body .with-underline::after {
  width: 46px;
  height: 3px;
}

body.app-shell-body .page-subtitle,
body.app-shell-body .dash-hero-subtitle {
  margin-top: 5px;
  font-size: 0.835rem;
}

body.app-shell-body .card-header {
  padding: 13px 18px;
}

body.app-shell-body .card-body {
  padding: 16px 18px;
}

body.app-shell-body .card-title {
  font-size: 0.96rem;
}

body.app-shell-body .card-subtitle {
  font-size: 0.775rem;
}

body.app-shell-body .kpi-grid {
  gap: 14px;
  margin-bottom: 18px;
}

body.app-shell-body .kpi-card {
  padding: 15px 17px;
  gap: 8px;
}

body.app-shell-body .kpi-label {
  font-size: 0.78rem;
}

body.app-shell-body .kpi-value {
  font-size: 1.35rem;
}

body.app-shell-body .kpi-value-currency {
  font-size: 1.16rem;
}

body.app-shell-body .btn {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.82rem;
  border-radius: 10px;
}

body.app-shell-body .btn-sm {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.775rem;
  border-radius: 8px;
}

body.app-shell-body .form-control,
body.app-shell-body .form-select {
  min-height: 40px;
  font-size: 0.85rem;
}

body.app-shell-body .form-control-sm,
body.app-shell-body .form-select-sm {
  min-height: 34px;
  font-size: 0.80rem;
}

body.app-shell-body .status-chip,
body.app-shell-body .temp-price-badge,
body.app-shell-body .final-price-badge {
  padding: 3px 9px;
  font-size: 0.71rem;
}

body.app-shell-body .version-pill {
  font-size: 0.71rem;
}

body.app-shell-body .sidebar-link {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.84rem;
}

body.app-shell-body .app-topbar {
  height: 58px;
}

body.app-shell-body .topbar-search input {
  height: 37px;
  font-size: 0.83rem;
}

body.app-shell-body .icon-btn:not(.sidebar-collapse-btn),
body.app-shell-body .dropdown-trigger {
  min-height: 38px;
}

body.app-shell-body .icon-btn:not(.sidebar-collapse-btn) {
  width: 38px;
  height: 38px;
}

body.app-shell-body .internal-ribbon {
  padding: 8px 18px;
  font-size: 0.76rem;
}

body.app-shell-body .dash-hero-strip {
  padding: 18px 22px;
  margin-bottom: 18px;
}

/* Kartu Antrian Review Finance & Persetujuan Manajemen (proporsional & 5 metrik sejajar 1 baris) */
.queue-review-card {
  padding: 18px 20px;
  margin-bottom: 14px;
}

.queue-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  margin-bottom: 14px;
}

.queue-review-info {
  flex: 1 1 360px;
  min-width: 0;
}

.queue-review-title {
  font-family: var(--font-headings);
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--color-secondary);
  line-height: 1.38;
  margin: 0;
}

.queue-review-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.queue-metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.queue-metrics-divider {
  padding-top: 12px;
  border-top: 1px solid var(--color-border);
}

.queue-metric-item {
  min-width: 0;
}

.queue-metric-label {
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.015em;
}

.queue-metric-val {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.32;
  margin: 2px 0;
  white-space: nowrap;
}

.queue-metric-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

@media (max-width: 1180px) {
  .queue-metrics-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .queue-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dedicated GPU-promoted fixed ambient canvas — 0 scroll repaint, 0 blur lag */
.app-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  transform: translateZ(0);
  contain: strict;
  background-color: var(--color-light-gray);
  background-image:
    radial-gradient(640px circle at 92% 6%, rgba(var(--color-primary-rgb), .14) 0%, rgba(var(--color-accent-rgb), .06) 44%, transparent 72%),
    radial-gradient(620px circle at 18% 94%, rgba(var(--color-accent-rgb), .13) 0%, rgba(var(--color-primary-rgb), .06) 46%, transparent 74%),
    radial-gradient(520px circle at 50% 42%, rgba(234, 245, 255, .85) 0%, transparent 70%),
    linear-gradient(155deg, var(--color-light-gray) 0%, var(--color-light-blue) 52%, var(--color-light-gray) 100%);
}

.app-ambient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/images/background.png');
  background-position: center;
  background-size: 1120px auto;
  background-repeat: no-repeat;
  opacity: .055;
  pointer-events: none;
}

/* Kaca internal lembut, jernih, dan 60-120fps saat scroll */
body.app-shell-body .glass-card {
  background: linear-gradient(155deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .66) 100%);
  backdrop-filter: blur(12px) saturate(135%);
  -webkit-backdrop-filter: blur(12px) saturate(135%);
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow:
    0 10px 28px -12px rgba(var(--color-secondary-rgb), .09),
    0 0 0 1px rgba(var(--color-primary-rgb), .06),
    inset 0 1px 0 rgba(255, 255, 255, .95);
}

body.app-shell-body .glass-dense {
  background: linear-gradient(160deg, rgba(255, 255, 255, .90) 0%, rgba(255, 255, 255, .80) 100%);
  backdrop-filter: blur(8px) saturate(125%);
  -webkit-backdrop-filter: blur(8px) saturate(125%);
  border: 1px solid rgba(255, 255, 255, .88);
  box-shadow:
    0 10px 26px -12px rgba(var(--color-secondary-rgb), .08),
    0 0 0 1px rgba(var(--color-primary-rgb), .06),
    inset 0 1px 0 rgba(255, 255, 255, .96);
}

body.app-shell-body .hover-lift {
  transition: transform .24s cubic-bezier(.22, 1, .36, 1), box-shadow .24s cubic-bezier(.22, 1, .36, 1), border-color .22s ease;
}

body.app-shell-body .hover-lift:hover {
  transform: translateY(-2px);
  border-color: rgba(var(--color-primary-rgb), .22);
  box-shadow:
    0 16px 32px -14px rgba(var(--color-secondary-rgb), .15),
    0 0 0 1px rgba(var(--color-primary-rgb), .12),
    inset 0 1px 0 rgba(255, 255, 255, .96);
}

/* Floating Frosted Glass Sidebar (Desktop) */
body.app-shell-body .app-sidebar {
  top: var(--sidebar-gap);
  left: var(--sidebar-gap);
  bottom: var(--sidebar-gap);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(var(--color-secondary-rgb), .89) 0%, rgba(var(--color-primary-rgb), .83) 100%);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow:
    0 18px 40px -16px rgba(var(--color-secondary-rgb), .30),
    inset 0 1px 0 rgba(255, 255, 255, .28);
  transform: translateZ(0);
  transition:
    width .26s cubic-bezier(.22, 1, .36, 1),
    transform .26s cubic-bezier(.22, 1, .36, 1),
    padding .26s cubic-bezier(.22, 1, .36, 1);
}

body.app-shell-body .sidebar-brand {
  padding: 2px 4px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

/* Tombol ciutkan sidebar menyatu tenang dengan kaca biru */
.sidebar-collapse-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .20);
  background: rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .92);
  flex-shrink: 0;
}

.sidebar-collapse-btn:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .36);
  color: var(--color-bg);
}

body.app-shell-body .sidebar-link {
  border-radius: 13px;
  transition:
    background-color .22s ease,
    color .22s ease,
    transform .22s cubic-bezier(.22, 1, .36, 1),
    box-shadow .22s ease;
}

body.app-shell-body .sidebar-link:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateX(2px);
}

body.app-shell-body .sidebar-link.is-active {
  background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .12));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 6px 16px -8px rgba(var(--color-dark-text-rgb), .25);
  transform: none;
}

body.app-shell-body .sidebar-link.is-active::before {
  left: 3px;
  top: 10px;
  bottom: 10px;
  width: 3.5px;
  border-radius: var(--radius-full);
  box-shadow: 0 0 10px rgba(var(--color-accent-rgb), .75);
}

body.app-shell-body.sidebar-collapsed .sidebar-link:hover {
  transform: none;
}

body.app-shell-body .sidebar-footer {
  padding: 12px 6px 2px;
  border-top: 1px solid rgba(255, 255, 255, .14);
}

body.app-shell-body .app-main {
  margin-left: calc(var(--sidebar-width) + var(--sidebar-gap));
  transition: margin-left .28s cubic-bezier(.22, 1, .36, 1);
}

body.app-shell-body.sidebar-collapsed .app-main {
  margin-left: calc(var(--sidebar-collapsed) + var(--sidebar-gap));
}

/* Floating Frosted Glass Topbar */
body.app-shell-body .app-topbar {
  top: var(--sidebar-gap);
  margin: var(--sidebar-gap) 24px 0;
  padding: 0 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .82) 0%, rgba(255, 255, 255, .68) 100%);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow:
    0 10px 26px -12px rgba(var(--color-secondary-rgb), .10),
    0 0 0 1px rgba(var(--color-primary-rgb), .05),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateZ(0);
}

body.app-shell-body .topbar-search {
  max-width: 400px;
}

body.app-shell-body .topbar-search input {
  padding: 0 64px 0 40px;
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(var(--color-primary-rgb), .14);
  box-shadow: inset 0 1px 2px rgba(var(--color-secondary-rgb), .04);
}

body.app-shell-body .topbar-search input:focus {
  background: rgba(255, 255, 255, .94);
  border-color: rgba(var(--color-primary-rgb), .42);
  box-shadow: 0 0 0 3px rgba(var(--color-primary-rgb), .14);
}

.search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-primary-rgb), .16);
  background: rgba(255, 255, 255, .78);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

body.app-shell-body .icon-btn:not(.sidebar-collapse-btn),
body.app-shell-body .dropdown-trigger {
  background: rgba(255, 255, 255, .66);
  border: 1px solid rgba(var(--color-primary-rgb), .13);
}

body.app-shell-body .icon-btn:not(.sidebar-collapse-btn):hover,
body.app-shell-body .dropdown-trigger:hover {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(var(--color-primary-rgb), .30);
}

body.app-shell-body .dropdown.is-open .dropdown-menu {
  animation: popIn .2s cubic-bezier(.22, 1, .36, 1);
}

/* Internal Ribbon selaras dengan floating topbar */
body.app-shell-body .internal-ribbon {
  margin: 12px 24px 0;
  border-radius: 14px;
  padding: 10px 20px;
}

/* Swappable content region untuk SPA-like menu transition tanpa reload sidebar/topbar */
.app-swap-region {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: opacity .12s ease, transform .14s cubic-bezier(.4, 0, .2, 1);
}

.app-swap-region.is-swapping-out {
  opacity: 0;
  transform: translateY(-4px);
}

.app-swap-region.is-swapping-in {
  animation: swapGlideIn .22s cubic-bezier(.22, 1, .36, 1) both;
}

/* Page content */
body.app-shell-body .page-content {
  padding: 20px 24px 32px;
}

body.app-shell-body .builder-sticky {
  top: calc(var(--topbar-height) + var(--sidebar-gap) + 16px);
}

@supports not (backdrop-filter: blur(1px)) {
  body.app-shell-body .glass-card,
  body.app-shell-body .glass-dense,
  body.app-shell-body .app-topbar {
    background: rgba(255, 255, 255, .95);
  }
  body.app-shell-body .app-sidebar {
    background: linear-gradient(165deg, var(--color-secondary), var(--color-primary));
  }
}

/* ============================================================================
   DASHBOARD MODERN: HERO STRIP, INTERACTIVE KPI, PILLS, DONUT, QUEUE
   ============================================================================ */

.dash-hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 22px 26px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.dash-hero-strip::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 92% 18%, rgba(var(--color-accent-rgb), .12) 0%, transparent 46%),
    radial-gradient(circle at 8% 95%, rgba(var(--color-primary-rgb), .09) 0%, transparent 44%);
  pointer-events: none;
}

.dash-hero-strip > * {
  position: relative;
  z-index: 1;
}

.dash-hero-copy {
  flex: 1 1 360px;
  min-width: 0;
}

.dash-hero-strip .page-actions {
  flex-shrink: 0;
  max-width: 100%;
}

.dash-hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.live-clock-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(var(--color-primary-rgb), .14);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 600;
}

.live-clock-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(var(--color-accent-rgb), .24);
}

.dash-hero-title {
  font-size: 1.62rem;
  font-weight: 700;
  color: var(--color-secondary);
  letter-spacing: -0.01em;
}

.dash-hero-subtitle {
  margin: 8px 0 0;
  font-size: 0.89rem;
  color: var(--text-muted);
}

/* Interactive Spotlight Glass KPI Cards */
.kpi-card-link {
  position: relative;
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

.kpi-card-link:hover {
  color: inherit;
}

.glass-spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--color-primary-rgb), .09), transparent 64%);
  opacity: 0;
  transition: opacity .28s ease;
  pointer-events: none;
}

.glass-spotlight:hover::after {
  opacity: 1;
}

.kpi-card-link .kpi-icon {
  background: linear-gradient(145deg, rgba(var(--color-primary-rgb), .13), rgba(var(--color-primary-rgb), .06));
  border: 1px solid rgba(var(--color-primary-rgb), .14);
  transition: transform .25s cubic-bezier(.22, 1, .36, 1), background-color .22s ease;
}

.kpi-card-link .kpi-icon-accent {
  background: linear-gradient(145deg, rgba(var(--color-accent-rgb), .24), rgba(var(--color-accent-rgb), .10));
  border: 1px solid rgba(var(--text-success-rgb), .18);
}

.kpi-card-link .kpi-icon-warning {
  background: linear-gradient(145deg, rgba(var(--fill-warning-rgb), .22), rgba(var(--fill-warning-rgb), .09));
  border: 1px solid rgba(var(--fill-warning-rgb), .24);
}

.kpi-card-link:hover .kpi-icon {
  transform: scale(1.06);
}

.kpi-chip {
  white-space: nowrap;
}

.kpi-value-currency {
  font-size: 1.34rem;
  letter-spacing: -0.015em;
}

.kpi-hover-cue {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-primary);
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity .22s ease, transform .22s cubic-bezier(.22, 1, .36, 1);
}

.kpi-card-link:hover .kpi-hover-cue {
  opacity: 1;
  transform: translateX(0);
}

/* Calm Frosted Glass Warning Notice */
.glass-notice-warning {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px 18px 14px 20px;
  margin-bottom: 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .78), rgba(255, 255, 255, .64));
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  border: 1px solid rgba(var(--fill-warning-rgb), .32);
  box-shadow: 0 8px 24px -12px rgba(var(--color-secondary-rgb), .10), inset 4px 0 0 var(--fill-warning);
  color: var(--color-dark-text);
  font-size: 0.865rem;
}

.glass-notice-body {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.glass-notice-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(var(--fill-warning-rgb), .16);
  color: var(--text-warning);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.glass-notice-icon svg {
  width: 19px;
  height: 19px;
}

.glass-notice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.notice-dismiss-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-fast);
}

.notice-dismiss-btn:hover {
  background: rgba(var(--color-dark-text-rgb), .07);
  color: var(--color-dark-text);
}

/* Segmented Glass Pill Tabs (Chart Mode & Table Filter) */
.pill-tabs {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: rgba(var(--color-primary-rgb), .07);
  border: 1px solid rgba(var(--color-primary-rgb), .12);
}

.pill-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.pill-tab:hover {
  color: var(--color-secondary);
  background: rgba(255, 255, 255, .52);
}

.pill-tab.is-active {
  background: var(--color-bg);
  color: var(--color-secondary);
  box-shadow: 0 2px 8px rgba(var(--color-secondary-rgb), .11);
}

.pill-tab-count {
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: rgba(var(--color-primary-rgb), .10);
  color: var(--color-secondary);
  font-size: 0.6875rem;
  font-weight: 700;
}

.pill-tab.is-active .pill-tab-count {
  background: var(--color-primary);
  color: var(--color-bg);
}

.chart-stage-fin {
  height: 296px;
  position: relative;
}

.chart-hint-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(220, 229, 242, .62);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Interactive Queue Item Cards */
.queue-card-panel {
  display: flex;
  flex-direction: column;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  flex: 1;
}

.queue-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 18px;
  border-top: 1px solid rgba(220, 229, 242, .68);
  background: rgba(255, 255, 255, .36);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.queue-mini-stats {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.queue-mini-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
}

.queue-mini-stat strong {
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums;
}

.queue-item-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .64);
  border: 1px solid rgba(255, 255, 255, .82);
  box-shadow: 0 2px 10px rgba(var(--color-secondary-rgb), .04), 0 0 0 1px rgba(var(--color-primary-rgb), .06);
  transition: var(--transition-fast);
}

.queue-item-card:hover {
  background: rgba(255, 255, 255, .90);
  border-color: rgba(var(--color-primary-rgb), .24);
  transform: translateX(3px);
  box-shadow: 0 8px 20px -10px rgba(var(--color-secondary-rgb), .15);
}

.queue-item-main {
  min-width: 0;
  flex: 1;
}

.queue-item-top {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.queue-item-actions {
  flex-shrink: 0;
}

/* Interactive Doughnut Status Chart & Clickable Legend */
.donut-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.donut-stage {
  position: relative;
  height: 196px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  text-align: center;
  padding: 0 32px;
}

.donut-center-val {
  font-family: var(--font-headings);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.donut-center-lbl {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
  max-width: 118px;
  line-height: 1.25;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.donut-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .52);
  border: 1px solid rgba(var(--color-primary-rgb), .07);
  color: var(--color-dark-text);
  font-size: 0.80rem;
  transition: var(--transition-fast);
}

.donut-legend-item:hover,
.donut-legend-item.is-hovered {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(var(--color-primary-rgb), .24);
  transform: translateX(2px);
  color: var(--color-secondary);
}

.donut-dot {
  width: 9px;
  height: 9px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.donut-dot-neutral { background: var(--text-muted); }
.donut-dot-info { background: var(--color-primary); }
.donut-dot-warning { background: var(--fill-warning); }
.donut-dot-success { background: var(--color-accent); }
.donut-dot-secondary { background: var(--color-secondary); }
.donut-dot-danger { background: var(--fill-danger); }

.donut-legend-label {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.donut-bar-track {
  width: 52px;
  height: 5px;
  border-radius: var(--radius-full);
  background: rgba(var(--color-secondary-rgb), .09);
  overflow: hidden;
  flex-shrink: 0;
}

.donut-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--color-primary);
}

.donut-bar-fill-success { background: var(--color-accent); }
.donut-bar-fill-warning { background: var(--fill-warning); }
.donut-bar-fill-danger { background: var(--fill-danger); }
.donut-bar-fill-neutral { background: var(--text-muted); }
.donut-bar-fill-secondary { background: var(--color-secondary); }

.donut-legend-count {
  min-width: 24px;
  text-align: right;
  font-weight: 700;
  color: var(--color-secondary);
  font-variant-numeric: tabular-nums;
}

/* Dashboard Recent Table enhancements */
.dash-table-card {
  overflow: hidden;
}

.dash-table-card .data-table thead th {
  padding: 10px 8px;
}

.dash-table-card .data-table tbody td {
  padding: 10px 8px;
  font-size: 0.82rem;
}

.dash-table-card .data-table th:first-child,
.dash-table-card .data-table td:first-child {
  padding-left: 14px;
}

.dash-table-card .data-table th:last-child,
.dash-table-card .data-table td:last-child {
  padding-right: 14px;
}

.dash-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 22px;
  border-bottom: 1px solid rgba(220, 229, 242, .68);
  background: rgba(255, 255, 255, .36);
}

.dash-table-row {
  transition: background-color .18s ease;
}

.dash-table-row.is-hidden {
  display: none;
}

.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.action-btn-group .btn-sm {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.78rem;
}

.btn-icon-sm {
  min-width: 32px;
  width: 32px;
  min-height: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(var(--color-primary-rgb), .16);
  background: rgba(255, 255, 255, .72);
  color: var(--color-secondary);
}

.quotations-filter-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.35fr) repeat(3, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

@media (max-width: 1400px) {
  .data-table thead th,
  .data-table tbody td {
    padding: 10px 8px;
    font-size: 0.81rem;
  }
  .data-table th:first-child,
  .data-table td:first-child {
    padding-left: 12px;
  }
  .data-table th:last-child,
  .data-table td:last-child {
    padding-right: 12px;
  }
  .table-col-primary {
    min-width: 155px;
  }
  .dash-table-card .data-table thead th,
  .dash-table-card .data-table tbody td {
    padding: 9px 6px;
    font-size: 0.78rem;
  }
  .dash-table-card .data-table th:first-child,
  .dash-table-card .data-table td:first-child {
    padding-left: 11px;
  }
  .dash-table-card .data-table th:last-child,
  .dash-table-card .data-table td:last-child {
    padding-right: 11px;
  }
  .dash-table-card .data-table .status-chip {
    padding: 2px 7px;
    font-size: 0.69rem;
    gap: 5px;
  }
  .dash-table-card .data-table .xs-text {
    font-size: 0.70rem;
  }
}

@media (max-width: 1180px) {
  .quotations-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .quotations-filter-grid {
    grid-template-columns: 1fr;
  }
}

.btn-icon-sm:hover {
  background: var(--color-light-blue);
  border-color: rgba(var(--color-primary-rgb), .35);
  color: var(--color-primary);
}

.btn-icon-sm svg {
  width: 15px;
  height: 15px;
}

.btn-icon-sm.btn-icon-danger {
  color: var(--text-danger);
  border-color: rgba(var(--fill-danger-rgb), .20);
}

.btn-icon-sm.btn-icon-danger:hover {
  background: rgba(var(--fill-danger-rgb), .11);
  border-color: rgba(var(--fill-danger-rgb), .38);
  color: var(--text-danger);
}

.dash-grid-spacer {
  margin-bottom: 22px;
}

/* Subtle lightweight reveal for dashboard panels (tidak menunda tampilan saat SPA swap) */
.reveal-up {
  animation: pageReveal .26s cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: calc(var(--stagger, 0) * 30ms);
}

.app-swap-region.is-swapping-in .reveal-up {
  animation: none;
}

/* ============================================================================
   RESPONSIF (1440px, 1024px, 390px) & AKSESIBILITAS
   ============================================================================ */

.mobile-menu-btn {
  display: none;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .quotation-builder {
    grid-template-columns: 1fr;
  }
  .builder-sticky {
    position: static;
  }
  .col-span-8,
  .col-span-7,
  .col-span-5,
  .col-span-4 {
    grid-column: span 12;
  }
}

@media (max-width: 1024px) {
  .app-sidebar,
  body.app-shell-body .app-sidebar {
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 0 22px 22px 0;
    transform: translateX(-104%);
    width: var(--sidebar-width);
  }
  body.sidebar-open .app-sidebar,
  body.app-shell-body.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  body.sidebar-open .sidebar-backdrop {
    display: block;
  }
  .app-main,
  body.sidebar-collapsed .app-main,
  body.app-shell-body .app-main,
  body.app-shell-body.sidebar-collapsed .app-main {
    margin-left: 0;
  }
  body.app-shell-body .app-topbar {
    margin: 10px 16px 0;
    top: 10px;
  }
  body.app-shell-body .internal-ribbon {
    margin: 10px 16px 0;
  }
  body.app-shell-body .page-content {
    padding: 18px 16px 28px;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .desktop-collapse-btn {
    display: none;
  }
  .auth-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .glass-card,
  .glass-dark,
  body.app-shell-body .glass-card,
  body.app-shell-body .app-topbar {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .app-topbar,
  body.app-shell-body .app-topbar {
    margin: 0;
    top: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    padding: 0 14px;
  }
  body.app-shell-body .internal-ribbon {
    margin: 0;
    border-radius: 0;
    padding: 10px 14px;
  }
  .topbar-search {
    display: none;
  }
  .page-content,
  body.app-shell-body .page-content {
    padding: 16px 14px 28px;
  }
  .dash-hero-strip {
    padding: 18px 18px;
  }
  .dash-hero-strip .page-actions {
    flex-shrink: 1;
    width: 100%;
  }
  .dash-hero-title {
    font-size: 1.35rem;
  }
  .dash-table-toolbar {
    padding: 10px 14px;
  }
  .page-title {
    font-size: 1.4rem;
  }
  .form-grid,
  .form-grid-3,
  .builder-pricing-grid,
  .mode-switch {
    grid-template-columns: 1fr;
  }
  .template-bar-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .cost-item-top {
    grid-template-columns: minmax(0, 1fr) 34px;
  }
  .cost-item-top .cost-kategori {
    grid-column: 1;
    grid-row: 1;
  }
  .cost-item-top .btn-remove-cost {
    grid-column: 2;
    grid-row: 1;
  }
  .cost-item-top .cost-nama {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .cost-item-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-group.span-2,
  .form-group.span-3 {
    grid-column: span 1;
  }
  .col-span-6 {
    grid-column: span 12;
  }
  .external-sheet {
    padding: 20px 16px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .doc-letterhead {
    flex-direction: column;
  }
  .doc-table {
    font-size: 0.82rem;
    table-layout: fixed;
  }
  .doc-table td,
  .doc-table th {
    padding: 8px 10px;
    word-break: break-word;
  }
  .doc-table td.num {
    white-space: normal;
  }
  .doc-cell-label,
  .doc-cell-label-sm,
  .doc-table tr.row-emphasis td.doc-cell-emphasis-label {
    width: 42%;
  }
  .doc-inline-note {
    display: block;
    margin-left: 0;
    margin-top: 2px;
  }
  .external-watermark span {
    font-size: 1.35rem;
    padding: 8px 14px;
  }
  /* Kolom pertama sticky di mobile untuk tabel */
  .data-table th.sticky-col,
  .data-table td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: var(--color-bg);
    box-shadow: 2px 0 6px rgba(var(--color-dark-text-rgb), .06);
  }
  .data-table thead th.sticky-col {
    z-index: 4;
    background: var(--color-light-gray);
  }
}

@media (max-width: 640px) {
  .glass-notice-warning {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .glass-notice-body {
    align-items: flex-start;
  }
  .glass-notice-actions {
    justify-content: space-between;
    padding-top: 2px;
  }
}

@media (max-width: 520px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .demo-account-grid {
    grid-template-columns: 1fr;
  }
  .user-pill-meta {
    display: none;
  }
  .queue-item-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .queue-item-actions {
    width: 100%;
  }
  .queue-item-actions .btn {
    width: 100%;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hover-lift:hover,
  body.app-shell-body .hover-lift:hover,
  body.app-shell-body .sidebar-link:hover,
  .queue-item-card:hover {
    transform: none;
  }
}

/* ============================================================================
   CETAK / SIMPAN PDF (A4, MARGIN 15mm, LATAR PUTIH BERSIH)
   ============================================================================ */

@page {
  size: A4 portrait;
  margin: 15mm;
}

@media print {
  body,
  body.app-mesh,
  body.app-shell-body,
  body.external-doc-body {
    background: var(--color-bg) !important;
    background-image: none !important;
    color: var(--color-dark-text) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .app-ambient-bg,
  .nav-progress-bar {
    display: none !important;
  }

  .no-print,
  .app-sidebar,
  .app-topbar,
  .internal-ribbon,
  .external-toolbar,
  .sidebar-backdrop,
  .btn,
  .page-actions {
    display: none !important;
  }

  .app-main,
  body.app-shell-body .app-main {
    margin-left: 0 !important;
  }

  .glass-card,
  .glass-dense,
  .glass-dark {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  .external-sheet {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
}
