/**
 * GST Calculator Suite - Master Stylesheet
 * Engineered by XESTUS
 * Ultra-Performance, 100/100 Lighthouse, Hack-Proof Architecture
 * 100% Vanilla CSS3 - Zero Framework Bloat
 */

/* ==========================================================================
   1. ROOT VARIABLES & THEMES (NIGHT, DAY, EYE PROTECT)
   ========================================================================== */

:root {
  /* Default: Night Mode (Sleek Dark Fintech) */
  --bg-primary: #0a0f1d;
  --bg-secondary: #111827;
  --bg-tertiary: #1f293d;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(31, 41, 55, 0.9);
  --bg-input: #151d30;
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: #10b981;
  --border-card: rgba(255, 255, 255, 0.12);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-inverse: #0a0f1d;
  
  --accent-primary: #10b981;
  --accent-primary-hover: #059669;
  --accent-primary-subtle: rgba(16, 185, 129, 0.15);
  --accent-secondary: #3b82f6;
  --accent-secondary-subtle: rgba(59, 130, 246, 0.15);
  --accent-gold: #f59e0b;
  --accent-gold-subtle: rgba(245, 158, 11, 0.15);
  --accent-danger: #ef4444;
  --accent-danger-subtle: rgba(239, 68, 68, 0.15);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
  
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "Fira Code", Menlo, Monaco, Consolas, monospace;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

/* Day Mode (Clean White Fintech) */
[data-theme="light"] {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  
  --border-color: #e2e8f0;
  --border-focus: #059669;
  --border-card: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;
  
  --accent-primary: #059669;
  --accent-primary-hover: #047857;
  --accent-primary-subtle: rgba(5, 150, 105, 0.1);
  --accent-secondary: #2563eb;
  --accent-secondary-subtle: rgba(37, 99, 235, 0.1);
  --accent-gold: #d97706;
  --accent-gold-subtle: rgba(217, 119, 6, 0.1);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.18);
}

/* Eye Protect (Warm Ochre / Low Blue Light) */
[data-theme="ochre"] {
  --bg-primary: #faf6ee;
  --bg-secondary: #f3ece0;
  --bg-tertiary: #ebe1d1;
  --bg-card: rgba(243, 236, 224, 0.95);
  --bg-card-hover: #ebe1d1;
  --bg-input: #fffdf9;
  
  --border-color: #dcd0bc;
  --border-focus: #b45309;
  --border-card: #dcd0bc;
  
  --text-primary: #292524;
  --text-secondary: #57534e;
  --text-muted: #78716c;
  --text-inverse: #faf6ee;
  
  --accent-primary: #b45309;
  --accent-primary-hover: #92400e;
  --accent-primary-subtle: rgba(180, 83, 9, 0.12);
  --accent-secondary: #4338ca;
  --accent-secondary-subtle: rgba(67, 56, 202, 0.1);
  --accent-gold: #b45309;
  --accent-gold-subtle: rgba(180, 83, 9, 0.12);
  
  --shadow-sm: 0 1px 2px 0 rgba(68, 64, 60, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(68, 64, 60, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(68, 64, 60, 0.08);
  --shadow-glow: 0 0 20px rgba(180, 83, 9, 0.15);
}

/* ==========================================================================
   2. GLOBAL BASE & RESET
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

.font-mono, .amount, .tabular-nums, .stat-value, .calc-result {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

img, svg {
  display: inline-block;
  vertical-align: middle;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-primary-subtle);
}

/* ==========================================================================
   3. LAYOUT & CONTAINERS
   ========================================================================== */

.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.container-narrow {
  max-width: 860px;
}

.container-wide {
  max-width: 1360px;
}

.main-content {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.section-spacer {
  margin-top: 3.5rem;
  margin-bottom: 3.5rem;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

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

@media (max-width: 992px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   4. NAVIGATION & HEADER
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-card);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-normal);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  color: var(--text-primary);
  text-decoration: none !important;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-main-title {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-sub-badge {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
}

.nav-link:hover, .nav-link.active {
  color: var(--accent-primary);
  text-decoration: none;
  background-color: var(--accent-primary-subtle);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* Global Currency Selector */
.currency-select-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.65rem;
  transition: all var(--transition-fast);
  cursor: pointer;
}

.currency-select-wrapper:hover {
  border-color: var(--accent-primary);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.currency-select-icon {
  font-size: 0.95rem;
  margin-right: 0.3rem;
  user-select: none;
  pointer-events: none;
}

.currency-select {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0.2rem 0.25rem 0.2rem 0 !important;
  font-size: 0.825rem !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
  cursor: pointer;
  outline: none !important;
  width: auto !important;
  appearance: none;
  -webkit-appearance: none;
}

.currency-select-arrow {
  font-size: 0.55rem;
  color: var(--text-muted);
  pointer-events: none;
  margin-left: 0.2rem;
}

.currency-select option {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  padding: 0.5rem;
}

/* International Country / Tax Jurisdiction Pills */
.country-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.country-pill:hover {
  color: var(--text-primary);
  border-color: var(--accent-primary);
  background-color: var(--bg-secondary);
}

.country-pill.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

.theme-switcher {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.theme-btn svg {
  width: 1.1rem;
  height: 1.1rem;
}

.theme-btn:hover { color: var(--text-primary); }

.theme-btn.active {
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.mobile-toggle {
  display: none;
  padding: 0.5rem;
  color: var(--text-primary);
  border-radius: var(--radius-md);
}

.mobile-toggle svg { width: 1.5rem; height: 1.5rem; }

@media (max-width: 960px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.25rem;
    box-shadow: var(--shadow-lg);
    gap: 0.75rem;
  }
  .nav-links.show { display: flex; }
  .mobile-toggle { display: block; }
}

/* ==========================================================================
   5. HERO & CARDS
   ========================================================================== */

.hero-section {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  background-color: var(--accent-primary-subtle);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  margin-bottom: 1.25rem;
}

.hero-title {
  font-size: clamp(2.2rem, 5.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 740px;
  margin: 0 auto 2rem;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  position: relative;
}

.card:hover {
  border-color: rgba(16, 185, 129, 0.3);
}

.card-clickable { cursor: pointer; }
.card-clickable:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background-color: var(--accent-primary-subtle);
  color: var(--accent-primary);
}

/* ==========================================================================
   6. CALCULATOR WORKSPACE & INTERACTIVE CONTROLS
   ========================================================================== */

.calc-workspace {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 900px) {
  .calc-workspace { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 1.5rem; }

.form-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-currency-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-currency-symbol {
  position: absolute;
  left: 1rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.input-currency {
  padding-left: 2.25rem;
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
}

.range-slider-wrapper { margin-top: 0.65rem; }

.range-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  border: 2px solid #ffffff;
  transition: transform var(--transition-fast);
}

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

.range-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
  border: 2px solid #ffffff;
}

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

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip-btn {
  padding: 0.45rem 0.9rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.chip-btn:hover {
  border-color: var(--accent-primary);
  color: var(--text-primary);
}

.chip-btn.active {
  background-color: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.segmented-control {
  display: inline-flex;
  background-color: var(--bg-tertiary);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  width: 100%;
  border: 1px solid var(--border-color);
}

.segmented-control button {
  flex: 1;
  text-align: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.segmented-control button.active {
  background-color: var(--bg-secondary);
  color: var(--accent-primary);
  box-shadow: var(--shadow-sm);
}

.results-panel {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  position: sticky;
  top: 5.5rem;
}

.result-hero {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px dashed var(--border-color);
  margin-bottom: 1.5rem;
}

.result-hero-label {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.result-hero-amount {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.2;
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.95rem;
}

.breakdown-row:last-child { border-bottom: none; }
.breakdown-label { color: var(--text-secondary); }
.breakdown-value { font-weight: 700; color: var(--text-primary); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  text-decoration: none !important;
}

.btn-primary { background-color: var(--accent-primary); color: #ffffff; }
.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover { background-color: var(--border-color); }
.btn-block { width: 100%; }

/* ==========================================================================
   7. SEO TABLES, ACCORDIONS & CONTENT
   ========================================================================== */

.seo-content { margin-top: 4rem; }
.seo-prose h2 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.seo-prose h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.seo-prose p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.7;
}
.seo-prose ul, .seo-prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-secondary);
}
.seo-prose li { margin-bottom: 0.5rem; }

.formula-box {
  background-color: var(--bg-tertiary);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--text-primary);
  overflow-x: auto;
}

.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.925rem;
}

.data-table th, .data-table td {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--bg-tertiary);
  font-weight: 700;
  color: var(--text-primary);
}

.data-table tr:hover td { background-color: var(--accent-primary-subtle); }
.data-table tr:last-child td { border-bottom: none; }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover { border-color: var(--accent-primary); }

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
  background: none;
}

.faq-icon {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--transition-normal);
  color: var(--accent-primary);
  flex-shrink: 0;
}

.faq-item.open .faq-icon { transform: rotate(180deg); }

.faq-answer {
  display: none;
  padding: 0 1.5rem 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.open .faq-answer { display: block; }

/* ==========================================================================
   8. FOOTER & TRUST BADGES
   ========================================================================== */

.site-footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

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

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

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-primary);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 1rem;
}

.trust-badges {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--accent-primary);
  background: var(--accent-primary-subtle);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* ==========================================================================
   9. COOKIE CONSENT & TOAST
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  right: 1.5rem;
  max-width: 680px;
  margin: 0 auto;
  background-color: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: none;
  animation: slideUp 0.3s ease;
}

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

.toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(120%);
  transition: transform var(--transition-normal);
  font-weight: 600;
}

.toast.show { transform: translateX(0); }

/* ==========================================================================
   10. PRINT INVOICE A4 SPECIFICATIONS
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 10mm;
}

@media print {
  body {
    background-color: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
  }
  
  .site-header, .site-footer, .calc-controls, .btn-print, .cookie-banner, .theme-switcher, .toast, .mobile-toggle, .seo-content {
    display: none !important;
  }
  
  .main-content {
    padding: 0 !important;
  }
  
  .container, .container-wide {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .invoice-editor-layout {
    display: block !important;
  }
  
  .invoice-paper {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }
}
