/* ==========================================================================
   KALKULATOR PAJAK BOSP & INSTANSI — DUAL VIEW & PWA STYLESHEET
   Clean CSS Architecture: No Inline Styles
   Mobile: Native Android / Material 3 Experience (Anura Money Style)
   Desktop: Modern Glassmorphism & Underline Tab Navigation
   ========================================================================== */

:root {
  /* Brand Palette - Emerald Modern */
  --primary: #059669;
  --primary-rgb: 5, 150, 105;
  --primary-dark: #064e3b;
  --primary-light: #10b981;
  --primary-subtle: #ecfdf5;
  
  --accent: #0284c7;
  --accent-light: #e0f2fe;
  
  --warning: #d97706;
  --warning-subtle: #fef3c7;
  
  --danger: #e11d48;
  --danger-subtle: #ffe4e6;
  
  --purple: #7c3aed;
  --purple-subtle: #f3e8ff;

  /* Theme Surfaces (Light Default) */
  --bg-app: #f4f7f6;
  --bg-card: #ffffff;
  --bg-surface-elevated: #ffffff;
  --border-subtle: #e5e7eb;
  --border-card: #edf2f7;
  
  /* Text */
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  /* Shadows & Elevation */
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 16px 36px rgba(15, 23, 42, 0.10);
  --shadow-emerald: 0 12px 28px rgba(5, 150, 105, 0.28);
  
  /* Radii */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Layout Heights */
  --bottom-bar-height: 68px;
  --top-bar-height: 60px;
}

/* Dark Theme */
[data-bs-theme="dark"], body.dark-mode {
  --bg-app: #090d16;
  --bg-card: #131b2e;
  --bg-surface-elevated: #1a243d;
  --border-subtle: #222f4c;
  --border-card: #263554;
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  
  --primary-subtle: rgba(16, 185, 129, 0.15);
  --accent-light: rgba(2, 132, 199, 0.15);
  --warning-subtle: rgba(217, 119, 6, 0.15);
  --danger-subtle: rgba(225, 29, 72, 0.15);
  --purple-subtle: rgba(124, 58, 237, 0.15);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 16px 36px rgba(0, 0, 0, 0.45);
  --shadow-emerald: 0 12px 28px rgba(5, 150, 105, 0.35);
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-app);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   APP HEADER & STATUS BAR
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1020;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.65rem 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #064e3b 0%, #059669 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.3);
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.2px;
  color: var(--text-main);
}

.brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-action-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.header-action-btn:hover {
  background: var(--primary-subtle);
  color: var(--primary);
  border-color: var(--primary-light);
}

.pwa-install-badge {
  border: 1px solid #f59e0b;
  background: #fffbeb;
  color: #b45309;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pwa-install-badge:hover {
  background: #fef3c7;
  transform: translateY(-1px);
}

/* ==========================================================================
   DESKTOP UNDERLINE NAVIGATION (Sesuai Aturan User Dual-View)
   ========================================================================== */
/* ==========================================================================
   DESKTOP UNDERLINE NAVIGATION (Sesuai Aturan User Dual-View)
   ========================================================================== */
.desktop-nav-wrap {
  display: none;
}

@media (min-width: 992px) {
  .desktop-nav-wrap {
    display: block;
    position: sticky;
    top: 56px;
    z-index: 1015;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
    transition: background 0.25s ease, border-color 0.25s ease;
  }

  .desktop-nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 0.5rem;
    width: 100%;
  }

  .desktop-nav-list {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    overflow: visible;
    flex-wrap: nowrap;
    border-bottom: 0;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .desktop-nav-list .nav-item {
    flex: 1 1 auto;
    text-align: center;
  }

  .desktop-nav-list .nav-link {
    color: #64748b;
    font-weight: 500;
    font-size: 0.81rem;
    padding: 0.72rem 0.3rem;
    border-radius: 6px 6px 0 0;
    border: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.32rem;
    width: 100%;
    transition: color 0.18s ease, background-color 0.18s ease;
    white-space: nowrap;
    position: relative;
    user-select: none;
    text-decoration: none;
  }

  .desktop-nav-list .nav-link::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0.35rem;
    right: 0.35rem;
    height: 2.5px;
    background: transparent;
    border-radius: 4px 4px 0 0;
    transition: background-color 0.2s ease;
  }

  .desktop-nav-list .nav-link i {
    font-size: 0.95rem;
    color: #94a3b8;
    transition: color 0.18s ease, transform 0.18s ease;
  }

  .desktop-nav-list .nav-link:hover {
    color: var(--text-main);
    background: rgba(241, 245, 249, 0.75);
  }

  .desktop-nav-list .nav-link:hover i {
    color: var(--primary);
    transform: translateY(-1px);
  }

  .desktop-nav-list .nav-link.active {
    color: var(--primary);
    font-weight: 700;
    background: rgba(5, 150, 105, 0.08);
  }

  .desktop-nav-list .nav-link.active::after {
    background: var(--primary);
  }

  .desktop-nav-list .nav-link.active i {
    color: var(--primary);
  }

  body.dark-mode .desktop-nav-wrap {
    background: rgba(15, 23, 42, 0.92);
    border-bottom-color: rgba(51, 65, 85, 0.6);
  }

  body.dark-mode .desktop-nav-list .nav-link {
    color: #94a3b8;
  }

  body.dark-mode .desktop-nav-list .nav-link i {
    color: #64748b;
  }

  body.dark-mode .desktop-nav-list .nav-link:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.05);
  }

  body.dark-mode .desktop-nav-list .nav-link:hover i {
    color: #34d399;
  }

  body.dark-mode .desktop-nav-list .nav-link.active {
    color: #34d399;
    background: rgba(16, 185, 129, 0.14);
  }

  body.dark-mode .desktop-nav-list .nav-link.active::after {
    background: #34d399;
  }

  body.dark-mode .desktop-nav-list .nav-link.active i {
    color: #34d399;
  }
}

/* ==========================================================================
   MAIN WRAPPER & CONTAINER
   ========================================================================== */
.app-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.85rem 0.65rem 5rem 0.65rem;
  width: 100%;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  .app-container {
    padding: 1.25rem 1rem 5rem 1rem;
  }
}

@media (min-width: 992px) {
  .app-container {
    padding: 2rem 1.5rem 3rem 1.5rem;
  }
}

/* ==========================================================================
   HERO BALANCE CARD (Anura Style Emerald Gradient)
   ========================================================================== */
.hero-balance-card {
  background: linear-gradient(145deg, #046a4e 0%, #064e3b 50%, #023829 100%);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.4rem;
  color: #ffffff;
  box-shadow: var(--shadow-emerald);
  position: relative;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.hero-balance-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-balance-card::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: 20%;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  position: relative;
  z-index: 2;
}

.hero-chip {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ecfdf5;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.hero-tag-counter {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
}

.hero-title-sub {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  position: relative;
  z-index: 2;
}

.hero-amount {
  font-size: clamp(1.65rem, 5.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 0.45rem;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-terbilang {
  font-size: 0.8rem;
  color: #a7f3d0;
  font-style: italic;
  line-height: 1.4;
  margin-bottom: 1.1rem;
  position: relative;
  z-index: 2;
  max-width: 90%;
}

.hero-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-quick-stats {
  display: flex;
  gap: 1.25rem;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.stat-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
}

.hero-btn-action {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.hero-btn-action:hover {
  background: #ffffff;
  color: #064e3b;
}

/* ==========================================================================
   SECTION HEADER & MENU GRID (Anura Money Style)
   ========================================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0 0.15rem;
}

.section-title {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.section-badge-right {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(5, 150, 105, 0.15);
  display: inline-flex;
  align-items: center;
}

/* Menu Grid: 3 Icon per baris di mobile (sisanya mengalir ke bawah) agar lebih besar */
.menu-grid-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem 0.6rem;
  margin-bottom: 1.5rem;
  width: 100%;
}

.menu-tile-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 0.95rem 0.4rem 0.85rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  user-select: none;
  min-width: 0;
  width: 100%;
  text-decoration: none;
  overflow: hidden;
}

.menu-tile-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-light);
}

.menu-tile-card:active {
  transform: scale(0.96);
  background-color: var(--bg-app);
}

.menu-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease;
}

.menu-tile-card:hover .menu-icon-box {
  transform: scale(1.06);
}

/* Pastel Variations matching reference screenshot */
.box-pink { background: #ffe4e6; color: #e11d48; }
.box-amber { background: #fef3c7; color: #d97706; }
.box-emerald { background: #d1fae5; color: #059669; }
.box-cyan { background: #e0f2fe; color: #0284c7; }
.box-purple { background: #ede9fe; color: #7c3aed; }
.box-blue { background: #dbeafe; color: #2563eb; }
.box-indigo { background: #e0e7ff; color: #4f46e5; }
.box-slate { background: #f1f5f9; color: #475569; }

.menu-tile-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin-bottom: 0.15rem;
  word-break: normal;
  text-align: center;
}

.menu-tile-sub {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .menu-grid-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
  }
  .menu-tile-card {
    padding: 1.15rem 0.65rem;
  }
  .menu-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
  }
  .menu-tile-title {
    font-size: 0.86rem;
  }
  .menu-tile-sub {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   CALCULATOR CARD & FORM CONTROLS (Glassmorphism & Crisp Form Elements)
   ========================================================================== */
.calc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  position: relative;
}

@media (min-width: 768px) {
  .calc-card {
    padding: 1.8rem;
  }
}

.calc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.calc-title-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.calc-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
}

.calc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

.form-label-custom {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.input-money-group {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-app);
  border: 2px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 0.35rem 0.85rem;
  transition: all 0.2s ease;
}

.input-money-group:focus-within {
  border-color: var(--primary);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--primary-subtle);
}

.money-prefix {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  margin-right: 0.5rem;
  user-select: none;
}

.input-money-control {
  border: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 800;
  width: 100%;
  font-variant-numeric: tabular-nums;
  outline: none;
}

.input-money-control::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.btn-clear-input {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  display: none;
}

.btn-clear-input.show {
  display: block;
}

/* Quick Amount Pills */
.quick-pills-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.quick-pills-row::-webkit-scrollbar {
  display: none;
}

.quick-pill {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-pill:hover {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary);
}

/* Radio Switch Segmented Control */
.segmented-switch {
  display: flex;
  background: var(--bg-app);
  border-radius: var(--radius-pill);
  padding: 0.25rem;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.1rem;
}

.segmented-btn {
  flex: 1;
  text-align: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

/* ==========================================================================
   QUICK RULES CARD (Aturan Singkat Pajak BOSP)
   ========================================================================== */
.quick-rule-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.quick-rule-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.75rem 0.9rem;
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.quick-rule-item:hover {
  background: #ffffff;
  border-color: var(--primary-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.quick-rule-label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.quick-rule-label i {
  font-size: 1.05rem;
  flex-shrink: 0;
}

.quick-rule-badge-wrap {
  display: flex;
  align-items: center;
}

.quick-rule-item .badge {
  font-size: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  text-align: left;
}

@media (min-width: 576px) {
  .quick-rule-item {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }
  .quick-rule-item .badge {
    text-align: right;
  }
}

/* ==========================================================================
   RESULT BOX & COPY ROW (Clean Finance Design)
   ========================================================================== */
.result-card-box {
  background: var(--bg-app);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 1.25rem;
}

.result-header-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed var(--border-subtle);
}

@media (min-width: 576px) {
  .result-header-wrap {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.result-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border-subtle);
  gap: 0.75rem;
}

.result-row-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.result-row-item.highlight {
  background: var(--primary-subtle);
  margin: 0.4rem -1.15rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius-sm);
  border-bottom: 0;
}

.result-item-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.result-row-item > div:last-child {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  white-space: nowrap;
}

.result-item-value {
  font-size: 1.05rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  text-align: right;
  letter-spacing: -0.2px;
  white-space: nowrap !important;
  flex-shrink: 0;
  display: inline-block;
}

@media (min-width: 576px) {
  .result-item-label {
    font-size: 0.86rem;
  }
  .result-item-value {
    font-size: 1.15rem;
  }
}

.val-primary { color: var(--primary); }
.val-danger { color: var(--danger); }
.val-accent { color: var(--accent); }

.copy-mini-btn {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 1rem;
  margin-left: 0.45rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.copy-mini-btn:hover {
  color: var(--primary);
  background: var(--primary-subtle);
}

.copy-mini-btn:active {
  transform: scale(0.9);
}

/* ==========================================================================
   TERBILANG BANNER & SHOWCASE (Modern Financial Certificate Style)
   ========================================================================== */
.terbilang-banner {
  background: linear-gradient(135deg, rgba(240, 253, 244, 0.95) 0%, #ffffff 100%);
  border: 1px solid rgba(16, 185, 129, 0.28);
  border-left: 4.5px solid #059669;
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.05);
}

.terbilang-banner-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #059669;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.25rem;
}

.terbilang-text {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.45;
  margin: 0;
  font-style: normal;
}

/* Dedicated Terbilang Showcase Box (Tab Terbilang) */
.terbilang-showcase-box {
  background: linear-gradient(145deg, #f0fdf4 0%, #f8fafc 45%, #ecfdf5 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.35);
  border-radius: 18px;
  padding: 1.25rem 1.35rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.08);
  transition: all 0.25s ease;
}

.terbilang-showcase-box:hover {
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(5, 150, 105, 0.12);
}

.terbilang-showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed rgba(16, 185, 129, 0.25);
}

.terbilang-chip {
  font-size: 0.76rem;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.3px;
}

.btn-copy-terbilang {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-pill);
  padding: 0.42rem 1.05rem;
  font-size: 0.82rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.28);
  transition: all 0.2s ease;
}

.btn-copy-terbilang:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.38);
}

.btn-copy-terbilang:active {
  transform: scale(0.96);
}

.terbilang-content-wrap {
  position: relative;
  padding: 0.6rem 0 0.95rem;
  min-height: 70px;
  display: flex;
  align-items: center;
}

.terbilang-watermark {
  position: absolute;
  right: -5px;
  bottom: -20px;
  font-size: 5.5rem;
  color: rgba(16, 185, 129, 0.12);
  pointer-events: none;
  line-height: 1;
}

.terbilang-quote-text {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.55;
  color: #064e3b;
  letter-spacing: -0.2px;
  margin: 0;
  position: relative;
  z-index: 1;
  font-style: normal;
}

.terbilang-showcase-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.25);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.terbilang-footer-tip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.badge-info-tax {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  line-height: 1.4;
  width: 100%;
}

.result-header-wrap .badge-info-tax {
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.75rem;
  width: fit-content;
  align-items: center;
  margin-top: 0;
}

.badge-tax-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-tax-warning {
  background: #fef3c7;
  color: #92400e;
}

/* Action Buttons */
.btn-action-primary {
  background: var(--primary);
  color: #ffffff;
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.btn-action-primary:hover {
  background: #047857;
  transform: translateY(-1px);
}

.btn-action-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-outline:hover {
  background: var(--bg-app);
  color: var(--text-main);
}

/* ==========================================================================
   BOTTOM NAVIGATION BAR (Mobile Native Material App Experience)
   ========================================================================== */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-bar-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border-subtle);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1040;
  padding: 0 0.5rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

@media (min-width: 992px) {
  .bottom-nav-bar {
    display: none; /* Sembunyikan di desktop karena menggunakan top underline tab */
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius-sm);
  transition: all 0.18s ease;
  min-width: 58px;
}

.bottom-nav-item i {
  font-size: 1.25rem;
  margin-bottom: 0.15rem;
  transition: transform 0.15s ease;
}

.bottom-nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.bottom-nav-item.active i {
  transform: translateY(-2px);
}

/* Center Floating Action Button (Anura Money center green plus / calc button) */
.fab-center-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: 4px solid var(--bg-card);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-top: -24px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fab-center-btn:hover, .fab-center-btn:active {
  transform: scale(1.08);
}

/* ==========================================================================
   TAB PANES & ANIMATION
   ========================================================================== */
.tax-pane {
  display: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.tax-pane.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Toast Notification (Copy success) */
.toast-notice {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 2000;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Recent Calculations / History Pill */
.history-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.history-item-row:last-child {
  border-bottom: 0;
}

/* Search Kode Rekening Box (No inline styles) */
.card-search-box {
  max-width: 620px;
  width: 100%;
}

.select2-container .select2-selection {
  height: 46px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
}

/* Accessibility & Print */
@media print {
  .app-header, .desktop-nav-wrap, .bottom-nav-bar, .quick-pills-row, .btn-action-primary, .btn-action-outline {
    display: none !important;
  }
  .app-container {
    padding: 0 !important;
  }
}
