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

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

.tools-tab,
.darurat-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 {
  border-color: var(--primary);
  color: var(--primary);
}

.tools-tab.active,
.darurat-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;
}