/* =================================================================
   UmrohPlan — Kalkulator Biaya Umroh Mandiri
   Stylesheet utama dengan desain premium, dark theme, glassmorphism
   ================================================================= */

/* ─────────── CSS Variables / Design Tokens ─────────── */
:root {
  /* Warna utama — terinspirasi warna emas & hijau islami */
  --color-primary: #c8a951;
  --color-primary-dark: #a88b3d;
  --color-primary-light: #f0d98a;
  --color-primary-glow: rgba(200, 169, 81, 0.25);

  --color-accent: #2ecc71;
  --color-accent-dark: #27ae60;

  --color-danger: #e74c3c;
  --color-warning: #f39c12;
  --color-info: #3498db;

  /* Background & Surface — dark theme */
  --bg-body: #0a0e17;
  --bg-surface: rgba(18, 24, 38, 0.85);
  --bg-card: rgba(22, 30, 48, 0.75);
  --bg-card-hover: rgba(30, 40, 62, 0.85);
  --bg-input: rgba(12, 16, 28, 0.8);
  --bg-header: linear-gradient(135deg, #0a0e17 0%, #141e30 50%, #1a2740 100%);

  /* Teks */
  --text-primary: #f0f0f5;
  --text-secondary: #a0a8c0;
  --text-muted: #6b7394;
  --text-gold: #c8a951;

  /* Border */
  --border-color: rgba(200, 169, 81, 0.12);
  --border-active: rgba(200, 169, 81, 0.4);

  /* Shadow */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(200, 169, 81, 0.1);
  --shadow-glow: 0 0 20px rgba(200, 169, 81, 0.15);

  /* Radius & Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Tipografi */
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-arabic: 'Amiri', serif;

  /* Transisi */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Subtle animated background pattern */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200, 169, 81, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(46, 204, 113, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(52, 152, 219, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ─────────── HERO / HEADER ─────────── */
.hero {
  position: relative;
  background: var(--bg-header);
  padding: 20px 24px 16px;
  text-align: center;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(
      rgba(200, 169, 81, 0.02) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 60px 60px;
  animation: patternShift 60s linear infinite;
}

@keyframes patternShift {
  to { background-position: 60px 60px; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-icon {
  font-size: 2rem;
  flex-shrink: 0;
  animation: gentlePulse 3s ease-in-out infinite;
}

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hero-title {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.02em;
}

.hero-title-arabic {
  display: block;
  font-family: var(--font-arabic);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 400;
  color: var(--color-primary);
  margin-bottom: 8px;
  letter-spacing: 0.05em;
}

.hero-subtitle {
  display: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-secondary);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  animation: dotBlink 2s ease-in-out infinite;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ─────────── MAIN CONTAINER ─────────── */
.main-container {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

/* ─────────── ALERTS ─────────── */
.alerts-container {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.alert-warning {
  background: rgba(243, 156, 18, 0.1);
  border-color: rgba(243, 156, 18, 0.3);
  color: #f5c842;
}

.alert-danger {
  background: rgba(231, 76, 60, 0.1);
  border-color: rgba(231, 76, 60, 0.3);
  color: #f07070;
}

.alert-info {
  background: rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.3);
  color: #5dade2;
}

.alert-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ─────────── SECTION ─────────── */
.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border-color);
}

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

.section-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ─────────── FORM GRID ─────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
}

@media (max-width: 480px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ─────────── KHUSUS INFO JAMAAH ─────────── */
#card-jamaah {
  grid-column: 1 / -1;
}

#card-jamaah .card-body {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  #card-jamaah .card-body {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  #card-jamaah .card-body {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  #card-jamaah .card-body {
    grid-template-columns: 1fr;
  }
}

/* ─────────── CARD (Glassmorphism) ─────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

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

.card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  background: rgba(200, 169, 81, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.card-icon {
  font-size: 1.3rem;
}

.card-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-body {
  padding: 20px;
}

/* ─────────── FORM ELEMENTS ─────────── */
.form-group {
  margin-bottom: 16px;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Input & Select styling */
input[type="text"],
input[type="number"],
input[type="month"],
input[type="date"],
select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="month"]:focus,
input[type="date"]:focus,
select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-glow);
}

input[type="text"]::placeholder,
input[type="number"]::placeholder {
  color: var(--text-muted);
}

/* Override autofill background in Chrome to match dark theme */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 30px #0c101c inset !important;
  -webkit-text-fill-color: var(--text-primary) !important;
  transition: background-color 5000s ease-in-out 0s;
}

input[type="date"] {
  color-scheme: dark;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23a0a8c0' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Input with unit badge */
.input-with-unit {
  position: relative;
}

.input-with-unit input {
  padding-right: 50px;
}

.input-with-unit .unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  pointer-events: none;
}

/* Input with button (kurs) */
.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.btn-kurs {
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-body);
  font-family: var(--font-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-kurs:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-glow);
}

.btn-kurs:active {
  transform: scale(0.98);
}

.btn-kurs.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Checkbox */
.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.88rem !important;
  color: var(--text-secondary) !important;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--color-primary);
  cursor: pointer;
}

/* Slider (range) */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--color-primary-dark), var(--color-primary));
  outline: none;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-body);
  box-shadow: 0 0 8px var(--color-primary-glow);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 3px solid var(--bg-body);
  box-shadow: 0 0 8px var(--color-primary-glow);
  cursor: pointer;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Hotel info badges */
.hotel-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.hotel-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: rgba(200, 169, 81, 0.08);
  border: 1px solid rgba(200, 169, 81, 0.15);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--color-primary-light);
}

/* ─────────── SUMMARY CARDS ─────────── */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.summary-card {
  padding: 24px;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid;
  backdrop-filter: blur(12px);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.summary-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.summary-total {
  background: linear-gradient(135deg, rgba(200, 169, 81, 0.12), rgba(200, 169, 81, 0.04));
  border-color: rgba(200, 169, 81, 0.25);
}

.summary-perpax {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(46, 204, 113, 0.04));
  border-color: rgba(46, 204, 113, 0.25);
}

.summary-daily {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.12), rgba(52, 152, 219, 0.04));
  border-color: rgba(52, 152, 219, 0.25);
}

.summary-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-value {
  font-size: clamp(1.4rem, 3.5vw, 1.9rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.summary-total .summary-value { color: var(--color-primary-light); }
.summary-perpax .summary-value { color: #5dde9e; }
.summary-daily .summary-value { color: #7ec8f0; }

.summary-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ─────────── BREAKDOWN TABLE ─────────── */
.table-wrapper {
  overflow-x: auto;
}

.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.breakdown-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
}

.breakdown-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(200, 169, 81, 0.06);
  color: var(--text-secondary);
  transition: background var(--transition-fast);
}

.breakdown-table tbody tr:hover td {
  background: rgba(200, 169, 81, 0.04);
}

.breakdown-table .text-right {
  text-align: right;
}

.breakdown-table .row-subtotal td {
  font-weight: 600;
  color: var(--text-primary);
  border-top: 2px solid var(--border-color);
}

.breakdown-table .row-emergency td {
  color: var(--color-warning);
  font-style: italic;
}

.breakdown-table tfoot td {
  padding: 16px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--color-primary-light);
  border-top: 2px solid var(--color-primary-dark);
  background: rgba(200, 169, 81, 0.06);
}

/* ─────────── CHART ─────────── */
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 480px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

.chart-container {
  position: relative;
  min-height: 300px;
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chart-container canvas {
  max-width: 100%;
  max-height: 380px;
}

/* ─────────── SAVINGS RESULT ─────────── */
.savings-result {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.2);
  border-radius: var(--radius-md);
  margin-top: 8px;
}

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

.savings-text {
  display: flex;
  flex-direction: column;
}

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

.savings-amount {
  font-size: 1.3rem;
  font-weight: 700;
  color: #5dde9e;
}

.savings-period {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* ─────────── EXPORT BUTTONS ─────────── */
.export-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), opacity var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  color: var(--bg-body);
  box-shadow: 0 4px 16px rgba(200, 169, 81, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(200, 169, 81, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, var(--color-accent-dark), var(--color-accent));
  color: var(--bg-body);
  box-shadow: 0 4px 16px rgba(46, 204, 113, 0.25);
}

.btn-success:hover {
  box-shadow: 0 8px 24px rgba(46, 204, 113, 0.35);
}

/* Copy toast */
.copy-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 12px 24px;
  background: var(--color-accent);
  color: var(--bg-body);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(46, 204, 113, 0.4);
  z-index: 1000;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

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

/* ─────────── FOOTER ─────────── */
.footer {
  text-align: center;
  padding: 32px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(10, 14, 23, 0.9);
}

.footer p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer-sub {
  font-size: 0.78rem !important;
  color: var(--text-muted) !important;
  margin-top: 4px;
}

/* ─────────── PDF PRINT STYLES ─────────── */
.pdf-export-container {
  background: #fff !important;
  color: #1a1a1a !important;
  padding: 32px;
  font-family: 'Inter', sans-serif;
}

.pdf-export-container h1 {
  color: #8b6914;
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.pdf-export-container h2 {
  color: #333;
  font-size: 1.1rem;
  margin: 20px 0 8px;
  border-bottom: 2px solid #c8a951;
  padding-bottom: 4px;
}

.pdf-export-container .pdf-summary {
  display: flex;
  gap: 16px;
  margin: 16px 0;
}

.pdf-export-container .pdf-summary-card {
  flex: 1;
  padding: 12px;
  background: #f8f4e8;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #e5d9b5;
}

.pdf-export-container .pdf-summary-label {
  font-size: 0.72rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pdf-export-container .pdf-summary-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: #8b6914;
}

.pdf-export-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.pdf-export-container th {
  background: #f0eadb;
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  border-bottom: 2px solid #c8a951;
}

.pdf-export-container td {
  padding: 6px 12px;
  border-bottom: 1px solid #eee;
}

.pdf-export-container .text-right {
  text-align: right;
}

.pdf-export-container tfoot td {
  font-weight: 700;
  font-size: 0.95rem;
  background: #f8f4e8;
  border-top: 2px solid #c8a951;
  color: #8b6914;
}

.pdf-export-container .pdf-footer {
  margin-top: 24px;
  font-size: 0.7rem;
  color: #999;
  text-align: center;
  border-top: 1px solid #eee;
  padding-top: 12px;
}

/* ─────────── HERO BADGES ─────────── */
.hero-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-history-badge {
  cursor: pointer;
  background: rgba(200, 169, 81, 0.1);
  transition: all 0.2s ease;
}

.btn-history-badge:hover {
  background: rgba(200, 169, 81, 0.2);
  transform: translateY(-2px);
  border-color: var(--color-primary);
}

/* ─────────── MODAL ─────────── */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 14, 23, 0.8);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 450px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  overflow: hidden;
}

.modal-content.modal-large {
  max-width: 600px;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(200, 169, 81, 0.04);
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.close-modal {
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.close-modal:hover {
  color: var(--color-primary);
}

.modal-body {
  padding: 20px;
}

/* ─────────── HISTORY LIST ─────────── */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.history-item:hover {
  border-color: var(--color-primary);
  background: rgba(200, 169, 81, 0.05);
}

.history-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.history-name {
  font-weight: 600;
  color: var(--text-primary);
}

.history-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.history-actions {
  display: flex;
  gap: 8px;
}

.btn-history-load, .btn-history-del {
  padding: 6px 12px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-history-load {
  background: rgba(46, 204, 113, 0.1);
  color: #5dde9e;
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.btn-history-load:hover {
  background: rgba(46, 204, 113, 0.2);
}

.btn-history-del {
  background: rgba(231, 76, 60, 0.1);
  color: #f07070;
  border: 1px solid rgba(231, 76, 60, 0.3);
}

.btn-history-del:hover {
  background: rgba(231, 76, 60, 0.2);
}

.empty-history {
  text-align: center;
  color: var(--text-muted);
  padding: 20px 0;
  font-style: italic;
}

/* ─────────── SECONDARY BUTTON ─────────── */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
}

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 768px) {
  .hero {
    padding: 14px 16px 12px;
  }

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

  .hero-content {
    gap: 10px;
  }
  .main-container {
    padding: 20px 12px 40px;
  }

  .summary-cards {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .export-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .pdf-export-container .pdf-summary {
    flex-direction: column;
  }
}

@media (max-width: 400px) {
  .card-body {
    padding: 14px;
  }

  .breakdown-table {
    font-size: 0.8rem;
  }

  .breakdown-table th,
  .breakdown-table td {
    padding: 8px 10px;
  }
}

/* ─────────── SCROLLBAR ─────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: rgba(200, 169, 81, 0.2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(200, 169, 81, 0.4);
}

/* ─────────── NUMBER INPUT SPIN BUTTONS ─────────── */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  opacity: 0.5;
}
