/* ============================================
   THUẾ 2026 - CSS STYLES
   Công cụ tính thuế TNCN theo luật mới
   ============================================ */

/* === CSS Variables === */
:root {
  /* Slate Colors */
  --slate-50: #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;

  /* Emerald Colors */
  --emerald-50: #ECFDF5;
  --emerald-100: #D1FAE5;
  --emerald-200: #A7F3D0;
  --emerald-400: #34D399;
  --emerald-500: #10B981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-800: #065F46;
  --emerald-text: #047857;

  /* Other Colors */
  --red-text: #DC2626;
  --amber-500: #F59E0B;
  --rose-500: #F43F5E;

  /* Semantic Colors */
  --bg-page: #F9FAFB;
  --bg-card: #FFFFFF;
  --bg-elevated: #FFFFFF;
  --border-default: rgba(0, 0, 0, 0.06);
  --border-subtle: rgba(0, 0, 0, 0.04);
  --text-primary: var(--slate-900);
  --text-secondary: var(--slate-600);
  --text-muted: var(--slate-500);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.06), 0 4px 8px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.04);
  --shadow-emerald: 0 4px 16px rgba(16, 185, 129, 0.25);
}

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-page);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === Utility Classes === */
.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-green { color: var(--emerald-text); }
.text-red { color: var(--red-text); }
.text-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }

/* === Header === */
.site-header {
  background: transparent;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  border-radius: 9px;
}

.logo-mark svg {
  width: 40px;
  height: 40px;
  border-radius: 9px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.3;
}

.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--emerald-50);
  color: var(--emerald-700);
  font-size: 12px;
  font-weight: 600;
  border-radius: 100px;
  border: 1px solid var(--emerald-100);
}

.header-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--emerald-500);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.9); }
}

/* === Main Layout === */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px 32px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 1024px) {
  main {
    grid-template-columns: 1fr;
    padding: 20px;
  }
}

/* === Input Section === */
.input-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 12px;
}

@media (max-width: 1024px) {
  .input-section {
    position: static;
  }
}

/* === Card === */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-md);
  overflow: visible;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: 24px;
}

/* === Input Groups === */
.input-group {
  margin-bottom: 24px;
}

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

.input-group--compact {
  margin-bottom: 20px;
}

.input-group--compact .input-label-row {
  margin-bottom: 0;
}

.input-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-label svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.input-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.input-label-row .input-label {
  margin-bottom: 0;
}

/* === Input Fields === */
.input-wrapper {
  position: relative;
}

.input-field {
  width: 100%;
  padding: 14px 68px 14px 19px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.input-field:hover {
  border-color: var(--slate-300);
}

.input-field:focus {
  outline: none;
  border-color: var(--emerald-500);
}

.input-field::placeholder {
  color: var(--slate-300);
  font-weight: 600;
}

.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-700);
  background: var(--emerald-50);
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

.input-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Small Input Wrapper */
.input-wrapper--sm {
  height: 44px;
}

.input-wrapper--sm .input-field {
  padding: 10px 60px 10px 14px;
  font-size: 16px;
}

.input-wrapper--sm .input-field::placeholder {
  font-size: 13px;
}

.input-wrapper--sm .input-suffix {
  font-size: 11px;
  padding: 8px 12px;
}

.ins-custom-input {
  margin-top: 8px;
}

/* === Toggle Buttons === */
.period-toggle,
.ins-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  background: var(--slate-100);
  border-radius: var(--radius-sm);
}

.period-btn,
.ins-toggle-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ins-toggle-btn {
  padding: 4px 10px;
  font-size: 11px;
}

.period-btn:hover,
.ins-toggle-btn:hover {
  color: var(--text-primary);
}

.period-btn.active,
.ins-toggle-btn.active {
  background: #fff;
  color: var(--emerald-600);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--slate-100);
  border-radius: var(--radius-md);
}

.mode-btn {
  flex: 1;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-md) - 3px);
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.mode-btn.active {
  background: #fff;
  color: var(--emerald-600);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* === Counter Control === */
.counter-control {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-card);
}

.counter-control--sm {
  border-width: 1px;
  border-radius: var(--radius-sm);
}

.counter-btn {
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
}

.counter-control--sm .counter-btn {
  width: 28px;
  padding: 0;
}

.counter-btn:hover {
  background: var(--slate-100);
  color: var(--emerald-600);
}

.counter-btn:active {
  background: var(--slate-200);
}

.counter-btn svg {
  width: 16px;
  height: 16px;
}

.counter-control--sm .counter-btn svg {
  width: 14px;
  height: 14px;
}

.counter-input {
  width: 48px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-left: 1px solid var(--border-default);
  border-right: 1px solid var(--border-default);
  background: transparent;
  color: var(--text-primary);
  padding: 10px 0;
  -moz-appearance: textfield;
}

.counter-control--sm .counter-input {
  width: 36px;
  font-size: 13px;
  padding: 4px 0;
}

.counter-input::-webkit-inner-spin-button,
.counter-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
}

.counter-input:focus {
  outline: none;
}

/* === Region Grid === */
.region-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.region-option {
  position: relative;
  padding: 12px 14px;
  border: 2px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all 0.2s ease;
}

.region-option:hover {
  border-color: var(--slate-300);
  background: var(--slate-50);
}

.region-option.active {
  border-color: var(--emerald-500);
  background: var(--emerald-50);
}

.region-option input {
  position: absolute;
  opacity: 0;
}

.region-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.region-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.region-option.active .region-name {
  color: var(--emerald-700);
}

.region-radio {
  width: 18px;
  height: 18px;
  border: 2px solid var(--slate-300);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  background: #fff;
}

.region-option.active .region-radio {
  border-color: var(--emerald-500);
  background: var(--emerald-500);
}

.region-radio::after {
  content: "";
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0);
  transition: all 0.15s ease;
}

.region-option.active .region-radio::after {
  opacity: 1;
  transform: scale(1);
}

.region-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.region-option.active .region-amount {
  color: var(--emerald-text);
}

/* === Info Button === */
.info-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0;
  background: var(--slate-200);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  vertical-align: middle;
}

.info-btn:hover {
  background: var(--emerald-500);
  color: #fff;
}

.info-btn svg {
  width: 12px;
  height: 12px;
}

/* === Info Banner === */
.info-banner {
  background: linear-gradient(135deg, var(--emerald-50) 0%, rgba(236, 253, 245, 0.5) 100%);
  border: 1px solid var(--emerald-100);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.info-banner-icon {
  width: 32px;
  height: 32px;
  background: var(--emerald-500);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.info-banner-icon svg {
  width: 16px;
  height: 16px;
}

.info-banner-content h4,
.info-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald-800);
  margin-bottom: 2px;
}

.info-banner-content p {
  font-size: 13px;
  color: var(--emerald-700);
  line-height: 1.5;
}

/* === Results Section === */
.results-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* === Results Grid === */
.results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

/* === Result Card === */
.result-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  overflow: hidden;
}

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

.result-card--default {
  background: linear-gradient(135deg, var(--slate-50) 0%, #fafbfc 100%);
  border: 1px solid var(--slate-200);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.result-card--default .result-badge {
  align-self: flex-start;
}

.result-card--default .result-details {
  margin-top: auto;
}

.result-card--highlight {
  border: 2px solid rgba(16, 185, 129, 0.7);
  background: var(--bg-card);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.08);
}

.result-card--highlight:hover {
  border-color: rgba(5, 150, 105, 0.8);
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.15);
}

/* === Result Badge === */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.result-badge--default {
  background: var(--slate-100);
  color: var(--slate-600);
  border: 1px solid var(--slate-200);
}

.result-badge--success {
  background: var(--emerald-700);
  color: #fff;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.result-badge--success::before {
  content: "";
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

/* === Result Amount === */
.result-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 6px;
}

.result-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.result-card--default .result-amount {
  color: var(--slate-600);
}

.result-card--highlight .result-amount {
  color: var(--emerald-text);
}

.result-amount .currency {
  font-size: 24px;
  opacity: 0.6;
  margin-left: 2px;
}

/* === Net Gain Indicator === */
.net-gain-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--emerald-text);
  background: var(--emerald-50);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-top: -12px;
  margin-bottom: 16px;
  border: 1px solid var(--emerald-100);
}

.net-gain-indicator svg {
  width: 14px;
  height: 14px;
}

/* === Result Details === */
.result-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.result-row-label {
  color: var(--text-muted);
}

.result-row-value {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 13px;
}

.result-card--default .result-row-value {
  color: var(--slate-600);
}

.result-card--highlight .result-row-value {
  color: var(--emerald-text);
}

/* === Tooltip === */
.tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-radius: 50%;
  cursor: help;
  position: relative;
  margin-left: 4px;
  vertical-align: middle;
}

.tooltip--sm {
  width: 14px;
  height: 14px;
  font-size: 9px;
}

.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--slate-800);
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
}

.tooltip:hover::after,
.tooltip:focus::after {
  opacity: 1;
  visibility: visible;
}

/* === Sticky Input Bar === */
.sticky-input-bar {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  padding: 6px;
  z-index: 1000;
  gap: 6px;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.sticky-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 12px;
  padding: 12px 14px;
  transition: background 0.2s ease;
}

.sticky-input-wrapper:focus-within {
  background: rgba(0, 0, 0, 0.06);
}

.sticky-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-800);
  padding: 0;
  outline: none;
  min-width: 0;
}

.sticky-input::placeholder {
  color: var(--slate-400);
  font-weight: 500;
}

.sticky-suffix {
  font-size: 11px;
  font-weight: 700;
  color: var(--slate-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.sticky-result {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  color: #fff;
  padding: 12px 16px;
  border-radius: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3), inset 0 1px rgba(255, 255, 255, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sticky-result:active {
  transform: scale(0.98);
}

.sticky-result svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.sticky-result.no-gain {
  background: linear-gradient(135deg, var(--slate-400), var(--slate-500));
  box-shadow: 0 2px 8px rgba(100, 116, 139, 0.2), inset 0 1px rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
  .sticky-input-bar.visible {
    display: flex;
    animation: stickySlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  body.sticky-bar-visible {
    padding-bottom: 90px;
  }
}

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

/* === Chart Card === */
.chart-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  padding: 28px;
  box-shadow: var(--shadow-md);
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.chart-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.chart-legend {
  display: flex;
  gap: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-dot--old {
  background: var(--slate-300);
}

.legend-dot--new {
  background: var(--emerald-500);
}

.chart-container {
  height: 180px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 80px;
  padding-bottom: 40px;
}

.chart-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.chart-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 120px;
}

.chart-bar {
  width: 48px;
  border-radius: 6px 6px 0 0;
  position: relative;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar--old {
  background: linear-gradient(180deg, var(--slate-300), var(--slate-400));
}

.chart-bar--new {
  background: linear-gradient(180deg, var(--emerald-400), var(--emerald-500));
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.chart-bar-value {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  margin-bottom: 8px;
}

.chart-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

/* === Monthly Breakdown === */
.monthly-breakdown {
  margin-bottom: 32px;
}

/* === Details Grid === */
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

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

/* === Detail Card === */
.detail-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-default);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.detail-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.detail-card > p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* === Detail Table === */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.detail-table th {
  text-align: left;
  padding: 12px 0;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-default);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.detail-table th:not(:first-child) {
  text-align: right;
}

.detail-table td {
  padding: 12px 0;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}

.detail-table td:not(:first-child) {
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.detail-table .text-green {
  color: var(--emerald-text);
  font-weight: 600;
}

.detail-table .text-red {
  color: var(--red-text);
}

.detail-table .text-bold {
  font-weight: 700;
  color: var(--text-primary);
}

/* === FAQ Section === */
.faq-section {
  margin-top: 32px;
}

.faq-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 20px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.faq-item strong {
  color: var(--emerald-600);
  font-weight: 600;
}

/* === Modal === */
.modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 400px;
  width: calc(100% - 32px);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: var(--slate-100);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: var(--slate-200);
  color: var(--text-primary);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.modal-body {
  font-size: 14px;
  line-height: 1.6;
}

.modal-desc {
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-style: italic;
}

.modal-provinces {
  color: var(--text-primary);
  font-weight: 500;
}

.modal-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-default);
  font-style: italic;
}

/* === Footer === */
.site-footer {
  text-align: center;
  padding: 32px 20px;
  color: var(--text-muted);
  font-size: 12px;
}

/* === No Tax State === */
.no-tax-state {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
}

/* === Responsive === */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
  }

  .header-badge {
    display: none;
  }

  main {
    padding: 16px;
    gap: 20px;
  }

  .result-amount {
    font-size: 28px;
  }

  .chart-container {
    gap: 40px;
  }
}

