/* === RESET & BASE === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4a7c59;
  --primary-dark: #3a6347;
  --primary-light: #e8f0e4;
  --bg: #fdf6ec;
  --accent: #d4a843;
  --accent-light: #f5e6c0;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --white: #ffffff;
  --shadow: 0 2px 16px rgba(44, 44, 44, 0.08);
  --shadow-hover: 0 8px 32px rgba(44, 44, 44, 0.13);
  --radius: 16px;
  --radius-sm: 10px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  line-height: 1.25;
}

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

img, svg {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.4rem;
  text-align: center;
  margin-bottom: 12px;
}

.section-title em {
  color: var(--primary);
  font-style: italic;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 56px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.25s ease;
  font-family: 'Inter', sans-serif;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 124, 89, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(253, 246, 236, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(74, 124, 89, 0.1);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

img.logo-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.88rem;
  color: var(--text);
  position: relative;
  transition: color 0.2s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

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

.nav-links a:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === HERO === */
.hero {
  padding: 140px 0 100px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-title {
  font-size: 3.5rem;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-title em {
  color: var(--primary);
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 480px;
  line-height: 1.8;
}

.hero-cta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

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

.stat-number {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-svg {
  width: 100%;
  max-width: 380px;
  animation: heroFloat 4s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}

.floating-card {
  position: absolute;
  background: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
}

.floating-card strong {
  display: block;
  font-size: 0.85rem;
}

.floating-card small {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.floating-icon {
  font-size: 1.6rem;
}

.floating-card-left {
  left: -10px;
  top: 30%;
  animation: floatLeft 3.5s ease-in-out infinite;
}

.floating-card-right {
  right: -10px;
  bottom: 25%;
  animation: floatRight 4s ease-in-out infinite 0.5s;
}

@keyframes floatLeft {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes floatRight {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-14px) rotate(-1deg); }
}

.bubble {
  position: absolute;
  background: var(--white);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  box-shadow: var(--shadow);
  opacity: 0;
  animation: rise 6s ease-in-out infinite;
}

.bubble-1 {
  right: 10%;
  top: 10%;
  animation-delay: 0s;
}

.bubble-2 {
  left: 5%;
  top: 60%;
  animation-delay: 2s;
}

.bubble-3 {
  right: 20%;
  bottom: 5%;
  animation-delay: 4s;
}

@keyframes rise {
  0% { opacity: 0; transform: translateY(20px); }
  15% { opacity: 1; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-8px); }
  45% { opacity: 0; transform: translateY(-24px); }
  100% { opacity: 0; transform: translateY(-24px); }
}

/* === FITUR === */
.fitur {
  background: var(--white);
}

.fitur-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid transparent;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.card-highlight {
  background: var(--primary-light);
  border-color: rgba(74, 124, 89, 0.2);
}

.card-icon {
  font-size: 2.4rem;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: var(--text);
}

.card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* === TIPS === */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.tip-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tip-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 700;
  color: var(--primary-light);
  position: absolute;
  top: -8px;
  right: 16px;
  line-height: 1;
  pointer-events: none;
}

.tip-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}

.tip-card h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text);
  position: relative;
}

.tip-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
}

/* === CHATBOT === */
.chatbot-section {
  background: var(--white);
}

.chatbot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.chatbot-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 28px;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  background: var(--bg);
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: 24px;
  padding: 10px 18px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Inter', sans-serif;
}

.chip:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.chatbox {
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid rgba(74, 124, 89, 0.15);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 520px;
}

.chatbox-header {
  background: var(--primary);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbox-avatar {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.chatbox-info strong {
  display: block;
  font-size: 0.95rem;
}

.chatbox-status {
  font-size: 0.8rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #6fdc6f;
  border-radius: 50%;
  display: inline-block;
}

.chatbox-badge {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}

.chatbox-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 320px;
}

.message {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  word-wrap: break-word;
}

.message p {
  margin: 0;
}

.bot-message {
  background: var(--white);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.user-message {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 14px 20px;
  align-self: flex-start;
  background: var(--white);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  opacity: 0.4;
  animation: typingDot 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.4; transform: scale(1); }
  30% { opacity: 1; transform: scale(1.2); }
}

.chatbox-input {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(74, 124, 89, 0.1);
  background: var(--white);
}

.chatbox-input input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: 50px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}

.chatbox-input input:focus {
  border-color: var(--primary);
}

.chatbox-input button {
  width: 46px;
  height: 46px;
  border: none;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.chatbox-input button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.chatbox-disclaimer {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 8px 20px 14px;
  background: var(--white);
}

/* === BUDGET PLANNER === */
.budget-section {
  background: var(--bg);
}

.budget-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.budget-intro p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-top: 16px;
}

.budget-hero {
  padding: 130px 0 40px;
  text-align: center;
}

.budget-form-section {
  padding-top: 0;
}

.budget-form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
}

.budget-form-section .budget-form-card {
  max-width: 600px;
  margin: 0 auto 48px;
}

.budget-form-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.budget-form-icon {
  font-size: 2.4rem;
}

.budget-form-header h2 {
  font-size: 1.3rem;
  margin-bottom: 2px;
}

.budget-form-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.budget-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.budget-form .form-group:last-of-type,
.tools-panel-form .form-group:last-of-type {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
  color: var(--text);
}

.input-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg);
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: var(--radius-sm);
  padding: 0 16px;
  transition: border-color 0.2s;
}

.input-wrapper:focus-within {
  border-color: var(--primary);
}

.input-prefix {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.95rem;
  margin-right: 8px;
  flex-shrink: 0;
}

.input-suffix {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-left: 8px;
  flex-shrink: 0;
}

.input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 0;
  font-size: 1.05rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: var(--text);
  min-width: 0;
}

.btn-generate {
  margin-top: 8px;
  width: 100%;
  padding: 16px;
  font-size: 1rem;
}

.btn-generate:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.88rem;
}

/* Budget Result */
.budget-result {
  max-width: 900px;
  margin: 0 auto;
}

.budget-result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.budget-result-header h2 {
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.budget-result-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.budget-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

/* Budget Table */
.budget-table-wrap {
  overflow-x: auto;
  margin-bottom: 16px;
}

.budget-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.budget-table thead {
  background: var(--primary);
  color: var(--white);
}

.budget-table th {
  padding: 14px 18px;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.budget-table td {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(74, 124, 89, 0.08);
  font-size: 0.92rem;
  vertical-align: middle;
}

.budget-table tbody tr:hover {
  background: var(--primary-light);
}

.budget-table tfoot td {
  padding: 14px 18px;
  background: var(--bg);
  border-bottom: none;
}

.cell-kategori {
  font-weight: 500;
  min-width: 160px;
}

.cell-kategori[contenteditable="true"] {
  outline: 2px solid var(--primary);
  border-radius: 4px;
  padding: 4px 8px;
}

.cell-jumlah {
  min-width: 140px;
}

.edit-jumlah {
  width: 100%;
  max-width: 140px;
  border: 1px solid rgba(74, 124, 89, 0.15);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  text-align: right;
  outline: none;
  transition: border-color 0.2s;
}

.edit-jumlah:focus {
  border-color: var(--primary);
}

.cell-pct {
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  min-width: 50px;
}

.cell-catatan {
  color: var(--text-muted);
  font-size: 0.85rem;
  min-width: 140px;
}

.cell-action {
  width: 40px;
  text-align: center;
}

.btn-delete {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #ccc;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.btn-delete:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

.budget-diff.positive {
  color: var(--primary);
}

.budget-diff.negative {
  color: #e74c3c;
}

.btn-add-row {
  margin-bottom: 40px;
}

/* Budget Chart */
.budget-chart-section {
  margin-top: 8px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

.budget-chart-section h3 {
  font-size: 1.15rem;
  margin-bottom: 24px;
}

.bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.bar-label {
  width: 140px;
  font-size: 0.82rem;
  font-weight: 500;
  flex-shrink: 0;
  text-align: right;
  color: var(--text);
}

.bar-track {
  flex: 1;
  height: 24px;
  background: var(--bg);
  border-radius: 12px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 12px;
  transition: width 0.5s ease;
  min-width: 2px;
}

.bar-value {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 120px;
  flex-shrink: 0;
}

/* Budget Error */
.budget-error {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  max-width: 600px;
  margin: 24px auto 0;
}

.error-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.budget-error p {
  flex: 1;
  font-size: 0.92rem;
  color: #991b1b;
}

/* Nav active link */
.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-links a.active::after {
  width: 100%;
}

/* Print styles */
@media print {
  .navbar, .budget-hero, .budget-form-card,
  .budget-actions, .btn-add-row, .budget-chart-section,
  .cell-action, .footer, .budget-error {
    display: none !important;
  }

  .budget-form-section {
    padding: 0;
  }

  .budget-result {
    display: block !important;
    max-width: 100%;
  }

  .budget-result-header {
    margin-bottom: 16px;
  }

  .budget-table {
    box-shadow: none;
    border: 1px solid #ddd;
  }

  .edit-jumlah {
    border: none;
    background: transparent;
    padding: 0;
  }

  body {
    background: white;
  }
}

/* === TOOLS (KALKULATOR + AMPLOP + STRATEGI) === */
.tools-section {
  background: var(--white);
}

.tools-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.tools-tab,
.darurat-tab,
.hutang-tab {
  padding: 12px 24px;
  border-radius: 50px;
  border: 2px solid rgba(74, 124, 89, 0.2);
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s ease;
}

.tools-tab:hover,
.darurat-tab:hover,
.hutang-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tools-tab.active,
.darurat-tab.active,
.hutang-tab.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.tools-panel {
  display: none;
}

.tools-panel.active {
  display: block;
}

.tools-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.tools-panel-info h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.tools-panel-info p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.tools-panel-example {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding: 14px 18px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.tools-panel-example strong {
  color: var(--text);
}

.tools-panel-form {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
}

.tools-panel-form form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Calc Result */
.calc-result-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 32px;
  border: 1px solid rgba(74, 124, 89, 0.15);
}

.calc-target-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  text-align: center;
}

.calc-progress-bar {
  height: 32px;
  background: rgba(74, 124, 89, 0.1);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  margin-bottom: 28px;
}

.calc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 16px;
  transition: width 0.6s ease;
  min-width: 4px;
}

.calc-progress-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.calc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  text-align: center;
}

.calc-stat-value {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.calc-stat-value.calc-highlight {
  color: var(--primary);
  font-size: 1.6rem;
}

.calc-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.calc-done {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 20px;
  padding: 16px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}

.calc-tip {
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

/* Amplop Grid */
.amplop-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
  margin-bottom: 20px;
}

.amplop-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  position: relative;
  border: 1px solid rgba(74, 124, 89, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.amplop-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.amplop-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

.amplop-nama {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 10px;
  color: var(--text);
}

.amplop-input {
  width: 100%;
  text-align: center;
  padding: 8px;
  border: 1px solid rgba(74, 124, 89, 0.15);
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.amplop-input:focus {
  border-color: var(--primary);
}

.amplop-pct {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 6px;
}

.amplop-delete {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #ccc;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s;
  line-height: 1;
}

.amplop-delete:hover {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.08);
}

.amplop-summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  margin-bottom: 16px;
}

.amplop-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.92rem;
}

.amplop-summary-row.positive strong {
  color: var(--primary);
}

.amplop-summary-row.negative strong {
  color: #e74c3c;
}

/* Strategy Panel */
.tools-strategy-intro {
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
  padding: 20px 0;
}

.strategy-intro-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.tools-strategy-intro h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.tools-strategy-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.strategy-checklist {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
}

.strategy-check {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.check-icon {
  font-size: 1rem;
}

.btn-strategy {
  padding: 16px 40px;
  font-size: 1rem;
}

.btn-strategy:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Strategy Result */
.strategy-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
  margin-top: 28px;
  border: 1px solid rgba(74, 124, 89, 0.15);
}

.strategy-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(74, 124, 89, 0.1);
}

.strategy-avatar {
  font-size: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.strategy-header strong {
  display: block;
  font-size: 1rem;
}

.strategy-header small {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.strategy-body {
  font-size: 0.92rem;
  line-height: 1.8;
  color: var(--text);
}

.strategy-empty,
.strategy-error {
  text-align: center;
  padding: 24px;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-sm);
  margin-top: 20px;
}

.strategy-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* === DANA DARURAT === */
.darurat-section {
  background: var(--bg);
}

.darurat-panel {
  display: none;
}

.darurat-panel.active {
  display: block;
}

/* Select styling */
.darurat-section select {
  flex: 1;
  border: none;
  background: transparent;
  padding: 14px 0;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Calc Result */
.darurat-calc-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 32px;
  text-align: center;
  box-shadow: var(--shadow);
}

.darurat-calc-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.darurat-calc-card h3 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.darurat-calc-status {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
}

.darurat-target-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.darurat-target-box {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px 28px;
  min-width: 200px;
  border: 1px solid rgba(74, 124, 89, 0.12);
}

.darurat-target-ideal {
  background: var(--primary-light);
  border-color: rgba(74, 124, 89, 0.25);
}

.darurat-target-label {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.darurat-target-value {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.darurat-target-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.darurat-target-divider {
  font-size: 1.5rem;
  color: var(--text-muted);
}

.darurat-breakdown {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 20px 28px;
  margin-bottom: 20px;
  text-align: left;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.darurat-breakdown h4 {
  font-size: 0.88rem;
  margin-bottom: 12px;
  color: var(--text);
}

.darurat-breakdown-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.darurat-breakdown-row strong {
  color: var(--text);
}

.darurat-tip {
  font-size: 0.88rem;
  color: var(--text-muted);
  background: var(--primary-light);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
  text-align: left;
  max-width: 500px;
  margin: 0 auto;
}

/* Progress Tracker */
.darurat-progress-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px;
  margin-top: 32px;
  box-shadow: var(--shadow);
}

.darurat-progress-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 28px;
}

.darurat-progress-status.done { background: #ecfdf5; color: #065f46; }
.darurat-progress-status.great { background: #fef3c7; color: #92400e; }
.darurat-progress-status.good { background: var(--primary-light); color: var(--primary-dark); }
.darurat-progress-status.growing { background: #eff6ff; color: #1e40af; }
.darurat-progress-status.start { background: var(--bg); color: var(--text); }

.darurat-status-emoji {
  font-size: 1.4rem;
}

.darurat-progress-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.darurat-progress-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.darurat-ring {
  width: 100%;
  height: 100%;
}

.darurat-ring circle:last-child {
  transition: stroke-dashoffset 0.8s ease;
}

.darurat-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.darurat-ring-pct {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.darurat-ring-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.darurat-progress-detail {
  text-align: left;
}

.darurat-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  padding: 8px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(74, 124, 89, 0.06);
}

.darurat-detail-row span {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary) !important;
}

.text-accent {
  color: var(--accent) !important;
}

/* Milestones */
.darurat-milestones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.darurat-milestone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.darurat-milestone span {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.milestone-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e5e7eb;
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px #e5e7eb;
  transition: all 0.3s;
}

.darurat-milestone.reached .milestone-dot {
  background: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.darurat-milestone.reached span {
  color: var(--primary);
}

.darurat-milestone-line {
  width: 48px;
  height: 3px;
  background: #e5e7eb;
  margin: 0 4px;
  margin-bottom: 22px;
  border-radius: 2px;
  transition: background 0.3s;
}

.darurat-milestone-line.filled {
  background: var(--primary);
}

/* Skenario */
.skenario-intro {
  text-align: center;
  margin-bottom: 32px;
}

.skenario-intro h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.skenario-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 560px;
  margin: 0 auto;
}

.skenario-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skenario-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  border: 2px solid transparent;
  transition: all 0.25s;
}

.skenario-card.safe {
  border-color: rgba(74, 124, 89, 0.2);
}

.skenario-card.danger {
  border-color: rgba(231, 76, 60, 0.2);
}

.skenario-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.skenario-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.skenario-header h4 {
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.skenario-header p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.skenario-cost {
  margin-bottom: 14px;
}

.skenario-cost-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.skenario-cost-value {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.skenario-input-wrap {
  margin-top: 6px;
}

.skenario-bar {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.skenario-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.skenario-bar-fill.over {
  background: #e74c3c;
}

.skenario-verdict {
  font-size: 0.84rem;
  line-height: 1.5;
}

.skenario-verdict.safe {
  color: var(--primary-dark);
}

.skenario-verdict.danger {
  color: #c0392b;
}

.darurat-empty {
  text-align: center;
  padding: 32px;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--white);
  border-radius: var(--radius-sm);
  grid-column: 1 / -1;
}

/* === ANTI HUTANG === */
.hutang-section {
  background: var(--white);
}

.hutang-panel {
  display: none;
}

.hutang-panel.active {
  display: block;
}

/* Danger Zone Checker */
.danger-intro {
  text-align: center;
  margin-bottom: 28px;
}

.danger-intro h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.danger-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.danger-questions {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.danger-question {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.danger-question:hover {
  border-color: rgba(74, 124, 89, 0.2);
}

.danger-question input[type="checkbox"] {
  display: none;
}

.danger-checkbox {
  width: 22px;
  height: 22px;
  border: 2px solid #ccc;
  border-radius: 6px;
  flex-shrink: 0;
  position: relative;
  transition: all 0.2s;
}

.danger-question input:checked ~ .danger-checkbox {
  background: #e74c3c;
  border-color: #e74c3c;
}

.danger-question input:checked ~ .danger-checkbox::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.danger-question input:checked ~ .danger-q-text {
  color: #c0392b;
}

.danger-q-text {
  font-size: 0.92rem;
  line-height: 1.5;
  flex: 1;
}

.danger-badge {
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  flex-shrink: 0;
}

/* Danger Result */
.danger-result-card {
  max-width: 640px;
  margin: 32px auto 0;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
}

.danger-meter {
  margin-bottom: 24px;
}

.danger-meter-bar {
  height: 14px;
  background: #e5e7eb;
  border-radius: 7px;
  overflow: hidden;
  position: relative;
}

.danger-meter-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.6s ease;
}

.danger-meter-needle {
  position: absolute;
  top: -4px;
  width: 3px;
  height: 22px;
  background: var(--text);
  border-radius: 2px;
  transition: left 0.6s ease;
  transform: translateX(-50%);
}

.danger-meter-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.danger-level {
  text-align: center;
  margin-bottom: 16px;
}

.danger-level-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 4px;
}

.danger-level-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
}

.danger-message {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
  line-height: 1.6;
}

.danger-tips {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.danger-tips h4 {
  font-size: 0.92rem;
  margin-bottom: 12px;
}

.danger-tips ul {
  list-style: none;
  padding: 0;
}

.danger-tips li {
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-muted);
  padding-left: 20px;
  position: relative;
}

.danger-tips li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* Ratio Result */
.ratio-result-card {
  max-width: 700px;
  margin: 32px auto 0;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px;
}

.ratio-gauge {
  position: relative;
  margin-bottom: 28px;
}

.ratio-gauge-bg {
  display: flex;
  height: 16px;
  border-radius: 8px;
  overflow: hidden;
}

.ratio-zone {
  height: 100%;
}

.ratio-safe { background: #bbf7d0; }
.ratio-warn { background: #fde68a; }
.ratio-danger { background: #fecaca; }

.ratio-needle {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: left 0.6s ease;
}

.ratio-needle-dot {
  width: 14px;
  height: 28px;
  border-radius: 7px;
  border: 3px solid var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ratio-needle-label {
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 4px;
}

.ratio-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.ratio-verdict {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border-left: 4px solid;
  margin-bottom: 24px;
}

.ratio-verdict-emoji {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.ratio-verdict p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.ratio-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.ratio-detail-item {
  background: var(--white);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.ratio-detail-item span {
  color: var(--text-muted);
}

.ratio-ideal {
  background: var(--primary-light);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  text-align: center;
  border-left: 3px solid var(--primary);
}

/* Negosiasi Chat */
.nego-intro {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 0;
}

.nego-intro-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.nego-intro h3 {
  font-size: 1.4rem;
  margin-bottom: 12px;
}

.nego-intro p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.nego-tips-box {
  text-align: left;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  margin-bottom: 28px;
  font-size: 0.88rem;
}

.nego-tips-box ul {
  margin-top: 8px;
  padding-left: 20px;
  color: var(--text-muted);
}

.nego-tips-box li {
  padding: 3px 0;
  line-height: 1.6;
}

.nego-chat-area {
  max-width: 700px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(74, 124, 89, 0.15);
}

.nego-chat-header {
  background: #2c2c2c;
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
}

.nego-chat-header span:first-child {
  font-size: 1.3rem;
}

.nego-chat-header small {
  opacity: 0.7;
  font-size: 0.78rem;
  display: block;
}

.nego-chat-header .btn {
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
  padding: 6px 14px;
  font-size: 0.78rem;
}

.nego-chat-messages {
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--bg);
}

.nego-msg {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.65;
  word-wrap: break-word;
}

.nego-msg p {
  margin: 0;
}

.nego-bot {
  background: var(--white);
  color: var(--text);
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  border: 1px solid rgba(231, 76, 60, 0.15);
}

.nego-user {
  background: var(--primary);
  color: var(--white);
  border-bottom-right-radius: 4px;
  align-self: flex-end;
}

.nego-chat-input {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid rgba(74, 124, 89, 0.1);
  background: var(--white);
}

.nego-chat-input input {
  flex: 1;
  padding: 12px 18px;
  border: 1px solid rgba(74, 124, 89, 0.2);
  border-radius: 50px;
  font-size: 0.92rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  background: var(--bg);
  transition: border-color 0.2s;
}

.nego-chat-input input:focus {
  border-color: var(--primary);
}

.nego-chat-input button {
  width: 46px;
  height: 46px;
  border: none;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  flex-shrink: 0;
}

.nego-chat-input button:hover {
  background: var(--primary-dark);
  transform: scale(1.05);
}

.nego-chat-input button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nego-chat-messages::-webkit-scrollbar {
  width: 5px;
}

.nego-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(74, 124, 89, 0.25);
  border-radius: 10px;
}

/* === FOOTER === */
.footer {
  background: var(--text);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-links h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer-links ul {
  list-style: none;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
}

/* === SCROLLBAR (chat) === */
.chatbox-messages::-webkit-scrollbar {
  width: 5px;
}

.chatbox-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chatbox-messages::-webkit-scrollbar-thumb {
  background: rgba(74, 124, 89, 0.25);
  border-radius: 10px;
}

/* ======================= */
/*      RESPONSIVE         */
/* ======================= */

/* Tablet / Medium */
@media (max-width: 900px) {
  .hero {
    padding: 120px 0 60px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero-title {
    font-size: 2.6rem;
  }

  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-visual {
    max-width: 340px;
    margin: 0 auto;
  }

  .fitur-grid,
  .tips-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chatbot-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .chatbot-intro {
    text-align: center;
  }

  .chatbot-intro .section-title {
    text-align: center !important;
  }

  .suggestion-chips {
    justify-content: center;
  }

  .chatbox {
    max-height: 480px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .section-title {
    font-size: 2rem;
  }

  .section {
    padding: 72px 0;
  }

  .tools-panel-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .amplop-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .skenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .darurat-target-range {
    flex-direction: column;
    gap: 16px;
  }

  .darurat-target-divider {
    transform: rotate(90deg);
  }

  .calc-stats {
    gap: 12px;
  }

  .budget-intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .budget-intro {
    text-align: center;
  }

  .budget-intro .section-title {
    text-align: center !important;
  }

  .budget-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .bar-label {
    width: 100px;
    font-size: 0.78rem;
  }

  .bar-value {
    width: 90px;
    font-size: 0.75rem;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(253, 246, 236, 0.98);
    backdrop-filter: blur(12px);
    flex-direction: column;
    padding: 24px;
    gap: 0;
    border-bottom: 1px solid rgba(74, 124, 89, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    border-bottom: 1px solid rgba(74, 124, 89, 0.08);
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
  }

  .nav-links a::after {
    display: none;
  }

  .nav-toggle {
    display: flex;
  }


  .hero {
    padding: 110px 0 48px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-desc {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .stat-number {
    font-size: 1.4rem;
  }

  .fitur-grid,
  .tips-grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 28px 22px;
  }

  .tip-card {
    padding: 24px 22px;
  }

  .tip-number {
    font-size: 3rem;
  }

  .section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.7rem;
  }

  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 36px;
  }

  .chatbot-grid {
    gap: 28px;
  }

  .chatbox {
    max-height: 440px;
  }

  .chatbox-messages {
    min-height: 260px;
  }

  .chip {
    font-size: 0.82rem;
    padding: 8px 14px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-brand {
    grid-column: auto;
  }

  .bubble {
    display: none;
  }

  .btn {
    padding: 12px 24px;
    font-size: 0.9rem;
  }

  .budget-hero {
    padding: 110px 0 24px;
  }

  .budget-form-card {
    padding: 24px;
  }

  .budget-form-header {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .budget-chart-section {
    padding: 20px;
  }

  .bar-row {
    flex-wrap: wrap;
    gap: 4px;
  }

  .bar-label {
    width: 100%;
    text-align: left;
    font-size: 0.8rem;
  }

  .bar-track {
    flex: 1;
  }

  .bar-value {
    width: auto;
  }

  .tools-tab,
  .darurat-tab,
  .hutang-tab {
    padding: 10px 18px;
    font-size: 0.84rem;
  }

  .tools-panel-form {
    padding: 20px;
  }

  .amplop-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .calc-stats {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .calc-stat-value.calc-highlight {
    font-size: 1.3rem;
  }

  .strategy-checklist {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }

  .budget-table th,
  .budget-table td {
    padding: 10px 12px;
  }

  .cell-catatan {
    display: none;
  }

  .budget-table th:nth-child(4) {
    display: none;
  }

  .skenario-grid {
    grid-template-columns: 1fr;
  }

  .darurat-progress-visual {
    gap: 24px;
  }

  .darurat-calc-card,
  .darurat-progress-card {
    padding: 24px;
  }

  .darurat-milestone-line {
    width: 24px;
  }

  .danger-question {
    padding: 12px 16px;
    gap: 10px;
  }

  .danger-result-card,
  .ratio-result-card {
    padding: 24px;
  }

  .ratio-details {
    grid-template-columns: 1fr;
  }

  .nego-chat-messages {
    min-height: 240px;
  }

  .darurat-breakdown {
    padding: 16px 20px;
  }

  .floating-card {
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .floating-card-left {
    left: -5px;
    top: 20%;
  }

  .floating-card-right {
    right: -5px;
    bottom: 20%;
  }
}

/* Extra small */
@media (max-width: 380px) {
  .hero-title {
    font-size: 1.7rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  .floating-card {
    display: none;
  }
}

/* === 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;
  }
}
