/* ==========================================================================
   Gold & Silver Daily Rate Card Generator - Design System
   Luxury Indian Jewelry Theme: Deep Obsidian, Royal Emerald, Burnished Gold
   ========================================================================== */

/* Local Font Fallback for 100% Offline Support */
@font-face {
  font-family: 'Anek Telugu';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/anek_telugu.woff2') format('woff2');
}

:root {
  --font-telugu: 'Anek Telugu', 'Telugu Sangam MN', 'Kohinoor Telugu', sans-serif;
  --font-hindi: 'Poppins', 'Kohinoor Devanagari', 'Devanagari Sangam MN', sans-serif;
  --font-en-title: 'Caacupe One', 'Caacupé One', cursive, sans-serif;
  --font-main: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Luxury Gold Palette */
  --gold-100: #fff9db;
  --gold-200: #fff3bf;
  --gold-300: #ffe066;
  --gold-400: #ffd43b;
  --gold-500: #fcc419;
  --gold-primary: #e6b422;
  --gold-dark: #b8860b;
  --gold-border: rgba(230, 180, 34, 0.4);
  --gold-glow: rgba(230, 180, 34, 0.25);

  /* Dark Luxury Base */
  --bg-dark: #070c09;
  --bg-card: rgba(13, 27, 18, 0.85);
  --bg-card-hover: rgba(20, 42, 28, 0.95);
  --bg-glass: rgba(15, 23, 18, 0.75);
  --border-glass: rgba(230, 180, 34, 0.22);
  --text-main: #f8f9fa;
  --text-muted: #a6b2a8;
  --text-gold: #f5d77f;

  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --shadow-gold: 0 8px 32px rgba(230, 180, 34, 0.18);
  --shadow-card: 0 12px 40px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(20, 55, 35, 0.6) 0%, transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(55, 10, 15, 0.4) 0%, transparent 50%),
    linear-gradient(180deg, #050a07 0%, #080f0a 100%);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Header */
.app-header {
  padding: 1.25rem 1rem 1rem;
  text-align: center;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(7, 12, 9, 0.8);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  background: rgba(230, 180, 34, 0.12);
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.brand-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 10px var(--gold-primary);
}

.app-title {
  display: inline-block;
  font-family: var(--font-telugu);
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #fff2b2 0%, #f0c33a 50%, #b8860b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 0 transparent;
  letter-spacing: 0.02em;
}

.app-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Main Layout */
.app-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 960px) {
  .app-container {
    grid-template-columns: 460px 1fr;
    padding: 2rem 1.5rem;
    align-items: start;
  }
}

@media (min-width: 1200px) {
  .app-container {
    grid-template-columns: 500px 1fr;
  }
}

/* Controls Column */
.controls-column {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Glass Panels */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel:hover {
  border-color: rgba(230, 180, 34, 0.35);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(230, 180, 34, 0.15);
}

.panel-title {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-text, #ffd43b);
  letter-spacing: 0.03em;
}

.panel-title span.icon {
  font-size: 1.1rem;
}

/* Language Selection Panel (Positioned Right Above Action Buttons) */
.language-selection-panel {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem 0.95rem;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.language-selection-panel:hover {
  border-color: rgba(230, 180, 34, 0.35);
}

.lang-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(230, 180, 34, 0.15);
}

.lang-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--gold-text, #ffd43b);
  letter-spacing: 0.02em;
}

.lang-panel-title .icon {
  font-size: 1.05rem;
}

.lang-active-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.18rem 0.6rem;
  border-radius: var(--radius-pill);
  background: rgba(230, 180, 34, 0.14);
  border: 1px solid var(--gold-border);
  color: var(--gold-200);
  letter-spacing: 0.02em;
}

/* Language Selector */
.lang-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.lang-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.5rem;
  color: var(--text-main);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-btn .lang-native {
  font-size: 0.95rem;
  font-weight: 700;
}

.lang-btn[data-lang="te"] .lang-native {
  font-family: var(--font-telugu);
}

.lang-btn[data-lang="hi"] .lang-native {
  font-family: var(--font-hindi);
}

.lang-btn .lang-en {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.lang-btn:hover {
  background: rgba(230, 180, 34, 0.1);
  border-color: var(--gold-border);
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(230, 180, 34, 0.25) 0%, rgba(184, 134, 11, 0.35) 100%);
  border-color: var(--gold-primary);
  color: #fff;
  box-shadow: 0 0 16px rgba(230, 180, 34, 0.25);
}

.lang-btn.active .lang-native {
  color: var(--gold-400);
}

.lang-btn.active .lang-en {
  color: var(--gold-200);
}

@media (max-width: 420px) {
  .language-selection-panel {
    padding: 0.75rem 0.75rem 0.85rem;
  }
  .lang-selector {
    gap: 0.35rem;
  }
  .lang-btn {
    padding: 0.55rem 0.25rem;
  }
  .lang-btn .lang-native {
    font-size: 0.88rem;
  }
  .lang-btn .lang-en {
    font-size: 0.65rem;
  }
}

/* Date Picker Group */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .badge-tag {
  font-family: var(--font-telugu);
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-sm);
  background: rgba(230, 180, 34, 0.15);
  color: var(--gold-primary);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-icon .prefix-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  color: var(--gold-primary);
  font-size: 1rem;
  pointer-events: none;
}

.form-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem 0.75rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(230, 180, 34, 0.2);
}

/* Rate Inputs Grid */
.rates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

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

.rate-card-input {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  position: relative;
  transition: border-color 0.2s ease;
}

.rate-card-input:focus-within {
  border-color: var(--gold-primary);
}

.rate-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.rate-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold-primary);
}

.rate-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-300);
}

.rate-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-left: auto;
}

.rate-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.rate-input-wrap .currency-sym {
  position: absolute;
  left: 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--gold-primary);
}

.rate-field {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.6rem 0.55rem 2.1rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}

.rate-field:focus {
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Gold Biscuit Optional Card */
.rate-card-biscuit {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.08), rgba(0, 0, 0, 0.45));
  border: 1px solid rgba(218, 165, 32, 0.35);
  transition: all 0.25s ease;
}

.rate-card-biscuit.active {
  border-color: var(--gold-primary);
  background: linear-gradient(135deg, rgba(218, 165, 32, 0.14), rgba(0, 0, 0, 0.5));
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.15);
}

.rate-card-biscuit .rate-header {
  gap: 0.6rem;
}

.rate-card-biscuit .rate-sub {
  margin-left: 0;
}

.badge-optional {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 215, 0, 0.12);
  color: var(--gold-primary);
  border: 1px solid rgba(255, 215, 0, 0.35);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.switch-sm {
  width: 36px;
  height: 20px;
  margin-left: auto;
}

.switch-sm .slider:before {
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
}

.switch-sm input:checked + .slider:before {
  transform: translateX(16px);
}

.biscuit-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.65rem;
  padding-top: 0.6rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  flex-wrap: wrap;
}

.biscuit-time-label-wrap {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--gold-300);
  font-size: 0.78rem;
  font-weight: 600;
}

.biscuit-time-controls {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 1;
  justify-content: flex-end;
  min-width: 220px;
}

.biscuit-time-field {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  outline: none;
  font-family: inherit;
  width: 110px;
  text-align: center;
  transition: all 0.2s;
}

.biscuit-time-field:focus {
  border-color: var(--gold-primary);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.2);
}

.btn-time-now,
.btn-time-prompt {
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.35);
  border-radius: var(--radius-sm);
  color: var(--gold-primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-time-now:hover,
.btn-time-prompt:hover {
  background: var(--gold-primary);
  color: #000000;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

/* Auto-Calculate Toggle */
.auto-calc-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(230, 180, 34, 0.08);
  border: 1px dashed var(--gold-border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  margin-top: 0.75rem;
}

.auto-calc-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.2);
  transition: .3s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--gold-primary);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

/* ==========================================================================
   Theme & Background Color Customizer (Weekday & Classic Modes)
   ========================================================================== */

/* Divine Watermark Controls */
.watermark-control-box {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08), rgba(0, 0, 0, 0.35));
  border: 1px solid rgba(234, 179, 8, 0.3);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.watermark-control-box:hover {
  border-color: rgba(234, 179, 8, 0.45);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 12px rgba(234, 179, 8, 0.12);
}

.watermark-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.watermark-info {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.watermark-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
}

.watermark-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.watermark-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.watermark-subtitle {
  font-size: 0.72rem;
  color: var(--gold-300);
  font-weight: 500;
}

.watermark-slider-wrap {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: opacity 0.25s ease, filter 0.25s ease;
}

.watermark-slider-wrap.disabled {
  opacity: 0.38;
  pointer-events: none;
  filter: grayscale(0.6);
}

/* Theme Mode Tabs (Weekday vs Classic) */
.theme-mode-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(230, 180, 34, 0.2);
  margin-bottom: 1rem;
}

.theme-mode-tab {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.25s ease;
  font-family: var(--font-main);
}

.theme-mode-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
}

.theme-mode-tab.active {
  background: linear-gradient(135deg, rgba(230, 180, 34, 0.22), rgba(230, 180, 34, 0.08));
  border-color: var(--gold-primary);
  color: var(--gold-100);
  box-shadow: 0 0 15px rgba(230, 180, 34, 0.2);
}

.tab-icon {
  font-size: 1.15rem;
}

.tab-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.tab-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gold-400);
  opacity: 0.85;
}

.theme-mode-content {
  display: block;
}

.hidden,
.theme-mode-content.hidden,
.weekday-chips.hidden {
  display: none !important;
}

/* Auto Sync Switch Row */
.auto-sync-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.85rem;
}

.auto-sync-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.auto-sync-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-main);
}

.auto-sync-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Weekday Chips (7 Days: Sun - Sat) */
.weekday-chips {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 480px) {
  .weekday-chips {
    grid-template-columns: repeat(4, 1fr);
  }
}

.weekday-chip {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.2s ease;
  text-align: center;
  position: relative;
}

.weekday-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(230, 180, 34, 0.5);
  color: var(--text-main);
  transform: translateY(-1px);
}

.weekday-chip.active {
  border-color: var(--gold-primary);
  background: linear-gradient(180deg, rgba(230, 180, 34, 0.22), rgba(230, 180, 34, 0.06));
  color: #ffffff;
  box-shadow: 0 0 12px rgba(230, 180, 34, 0.22);
}

.weekday-chip.is-today::before {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-primary);
  box-shadow: 0 0 6px var(--gold-primary);
}

.day-symbol {
  font-size: 0.95rem;
  line-height: 1;
}

.day-abbr {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
}

.day-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Planetary Info Card */
.planetary-info-card {
  background: linear-gradient(135deg, rgba(230, 180, 34, 0.08), rgba(0, 0, 0, 0.45));
  border: 1px solid rgba(230, 180, 34, 0.25);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.planetary-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.planetary-badge {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(230, 180, 34, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.planetary-titles {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  overflow: hidden;
}

.planetary-day {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-200);
  letter-spacing: 0.2px;
}

.planetary-significance {
  font-size: 0.73rem;
  color: #d1d5db;
  line-height: 1.3;
}

/* Dual Color (Body + Separate Footer) Preview */
.dual-color-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(230, 180, 34, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  gap: 0.5rem;
}

.dual-color-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
  flex: 1;
}

.dual-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.dual-color-desc {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dual-color-tag {
  font-size: 0.58rem;
  font-weight: 800;
  color: var(--gold-400);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.1;
}

.dual-color-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dual-color-divider {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gold-primary);
  opacity: 0.8;
  padding: 0 0.15rem;
  flex-shrink: 0;
}

.dual-swatch-pair {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.dual-swatch-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

/* Shade Variants */
.shade-variants-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.5rem;
}

.shade-variants-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.shade-variant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.shade-variant-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.73rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.shade-variant-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold-border);
}

.shade-variant-btn.active {
  background: rgba(230, 180, 34, 0.22);
  border-color: var(--gold-primary);
  color: var(--gold-100);
  box-shadow: 0 0 10px rgba(230, 180, 34, 0.2);
}

.shade-variant-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.5);
  flex-shrink: 0;
}

/* Classic Theme Presets */
.theme-chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.theme-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.theme-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold-border);
}

.theme-chip.active {
  border-color: var(--gold-primary);
  background: rgba(230, 180, 34, 0.15);
  box-shadow: 0 0 12px rgba(230, 180, 34, 0.2);
}

.color-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

/* Collapsible Fine-Tune Custom Color Pickers */
details.custom-color-details {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.6rem;
  margin-top: 0.4rem;
}

details.custom-color-details summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.2s;
  user-select: none;
}

details.custom-color-details summary::-webkit-details-marker {
  display: none;
}

details.custom-color-details summary:hover {
  color: var(--gold-primary);
}

.color-pickers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 0.6rem;
}

.color-input-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
}

.color-input-box input[type="color"] {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}

.color-input-box span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Collapsible Section */
details.custom-details {
  border: 1px solid rgba(230, 180, 34, 0.15);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
}

details.custom-details:hover {
  border-color: rgba(230, 180, 34, 0.35);
}

details.custom-details summary {
  padding: 1rem 1.25rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  transition: background 0.2s ease, color 0.2s ease;
}

details.custom-details summary:hover {
  background: rgba(230, 180, 34, 0.05);
  color: var(--gold-100);
}

details.custom-details summary::-webkit-details-marker {
  display: none;
}

details.custom-details summary::after {
  content: '▼';
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  color: var(--gold-primary);
}

details.custom-details[open] summary::after {
  transform: rotate(180deg);
}

.details-body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.details-body > *:first-child {
  margin-top: 0;
}

.details-body .form-input {
  padding-left: 0.85rem;
  font-size: 0.85rem;
}

/* Typography & Position Controls */
.typography-controls-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(230, 180, 34, 0.25);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.controls-subheading {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-300);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.slider-control-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.slider-val {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold-primary);
  background: rgba(230, 180, 34, 0.12);
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(230, 180, 34, 0.3);
}

.custom-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

.custom-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-primary));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(230, 180, 34, 0.5);
  border: 2px solid #fff;
  transition: transform 0.15s ease;
}

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

.custom-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-primary));
  cursor: pointer;
  box-shadow: 0 0 8px rgba(230, 180, 34, 0.5);
  border: 2px solid #fff;
}

/* Preview Column */
.preview-column {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.preview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.preview-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(230, 180, 34, 0.15);
}

.preview-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-300);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.res-tag {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(230, 180, 34, 0.12);
  border: 1px solid var(--gold-border);
  color: var(--gold-200);
}

/* Canvas Wrapper */
.canvas-wrapper {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  aspect-ratio: 1364 / 2048;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.8), 0 0 30px rgba(230, 180, 34, 0.15);
  background: #062016;
}

#rateCardCanvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.canvas-loading {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(6, 32, 22, 0.95);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  z-index: 10;
  transition: opacity 0.3s ease;
}

.canvas-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(230, 180, 34, 0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Action Buttons */
.action-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  width: 100%;
}

.btn-primary-gold {
  background: linear-gradient(135deg, #ffd700 0%, #d49b28 50%, #aa6c09 100%);
  color: #1a1002;
  box-shadow: 0 8px 24px rgba(212, 155, 40, 0.35);
  border: 1px solid rgba(255, 240, 160, 0.6);
  position: relative;
  overflow: hidden;
}

.btn-primary-gold::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.25),
    transparent
  );
  transform: rotate(45deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  20%, 100% { transform: translateX(100%) rotate(45deg); }
}

.btn-primary-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 155, 40, 0.5);
  background: linear-gradient(135deg, #ffe033 0%, #e0a733 50%, #b8750a 100%);
}

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

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(37, 211, 102, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--gold-border);
}

.btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(20, 36, 26, 0.95);
  border: 1px solid var(--gold-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 16px var(--gold-glow);
  backdrop-filter: blur(12px);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
}

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

/* Confirmation Dialog Modal */
.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.25rem;
}

.confirm-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal-card {
  background: linear-gradient(145deg, rgba(20, 36, 26, 0.98), rgba(10, 20, 14, 0.98));
  border: 1.5px solid var(--gold-primary);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px var(--gold-glow);
  max-width: 420px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.confirm-modal-overlay.show .confirm-modal-card {
  transform: scale(1) translateY(0);
}

.confirm-modal-icon-wrap {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(234, 179, 8, 0.15);
  border: 1.5px solid rgba(234, 179, 8, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #facc15;
  box-shadow: 0 0 20px rgba(234, 179, 8, 0.25);
}

.confirm-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}

.confirm-modal-desc {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin: 0.25rem 0 0;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.5rem;
}

.confirm-modal-actions .btn {
  flex: 1;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  justify-content: center;
}

/* Modal Info Box for Date & Rate Confirmations */
.confirm-info-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(230, 180, 34, 0.25);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  margin: 0.5rem 0 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.confirm-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.86rem;
}

.confirm-info-label {
  color: var(--text-muted);
  font-weight: 500;
}

.confirm-info-val {
  font-size: 0.88rem;
  font-weight: 700;
}

.confirm-info-val.warn {
  color: #ffd43b;
}

.confirm-info-val.success {
  color: #34d399;
}

.confirm-warning-note {
  font-size: 0.82rem;
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  margin-top: 0.4rem;
  text-align: left;
  line-height: 1.4;
}



