/* ── HRAPack Custom Styles ─────────────────────────────────────────── */

/* Google Fonts: Inter (body) + Dancing Script (cursive signature) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Dancing+Script:wght@400;500;600;700&display=swap');

/* ── CSS Variables ─────────────────────────────────────────────────── */
:root {
  --brand-50: #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-400: #60a5fa;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;
  --brand-900: #1e3a8a;

  --emerald-500: #10b981;
  --emerald-600: #059669;

  --amber-500: #f59e0b;
  --amber-600: #d97706;

  --surface: #ffffff;
  --surface-secondary: #f8fafc;
  --surface-tertiary: #f1f5f9;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;
  --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 -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-lg: 1rem;
}

/* Dark mode */
[data-theme="dark"] {
  --surface: #0f172a;
  --surface-secondary: #1e293b;
  --surface-tertiary: #334155;
  --border: #334155;
  --border-hover: #475569;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

/* ── Base ──────────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background-color: var(--surface-secondary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Signature Font ────────────────────────────────────────────────── */
.signature-cursive {
  font-family: 'Dancing Script', cursive;
  font-weight: 600;
  font-size: 1.5rem;
  color: #1a365d;
}

.signature-cursive-large {
  font-family: 'Dancing Script', cursive;
  font-weight: 700;
  font-size: 2rem;
  color: #1a365d;
}

[data-theme="dark"] #signaturePreviewTyped {
  color: #93c5fd;
}

/* ── Document Previews (Always realistic crisp white paper) ────────── */
.receipt-preview,
.form12bb-preview,
.declaration-preview {
  background: #ffffff !important;
  color: #111827 !important;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  padding: 2rem;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-lg);
  position: relative;
  max-width: 595px;
  margin: 0 auto;
}

[data-theme="dark"] .receipt-preview,
[data-theme="dark"] .form12bb-preview,
[data-theme="dark"] .declaration-preview {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #94a3b8;
}

.receipt-preview p,
.form12bb-preview p,
.declaration-preview p {
  color: #1f2937 !important;
}

.receipt-preview strong,
.form12bb-preview strong,
.declaration-preview strong {
  color: #111827 !important;
}

.receipt-preview .signature-cursive,
.form12bb-preview .signature-cursive,
.declaration-preview .signature-cursive,
[data-theme="dark"] .receipt-preview .signature-cursive,
[data-theme="dark"] .form12bb-preview .signature-cursive,
[data-theme="dark"] .declaration-preview .signature-cursive {
  color: #1a365d !important;
}

.form12bb-preview th {
  background: #eff6ff !important;
  color: #1e3a8a !important;
  font-weight: 600;
}

.form12bb-preview td {
  background: #ffffff !important;
  color: #111827 !important;
}

.receipt-preview .receipt-header {
  text-align: center;
  border-bottom: 2px solid #1e3a8a;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.receipt-preview .receipt-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.receipt-preview .receipt-number {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
  font-weight: 500;
}

.receipt-preview .receipt-body {
  font-size: 0.875rem;
  line-height: 1.8;
  color: #374151;
}

.receipt-preview .receipt-amount {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111;
  background: #f0f9ff;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  display: inline-block;
  margin: 0.5rem 0;
}

.receipt-preview .receipt-words {
  font-style: italic;
  color: #4b5563;
  font-size: 0.825rem;
}

.receipt-preview .receipt-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px dashed #d1d5db;
}

.revenue-stamp {
  width: 80px;
  height: 80px;
  border: 2px dashed #9ca3af;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 0.65rem;
  color: #9ca3af;
  background: #fefce8;
  flex-shrink: 0;
}

.signature-box {
  text-align: right;
  min-width: 150px;
}

.signature-line {
  border-top: 1px solid #374151;
  margin-bottom: 0.25rem;
  width: 180px;
  margin-left: auto;
}

/* ── Form 12BB Preview ─────────────────────────────────────────────── */
.form12bb-preview {
  background: #fff;
  color: #111;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  padding: 2rem;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-lg);
  max-width: 595px;
  margin: 0 auto;
  font-size: 0.85rem;
}

.form12bb-preview table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.form12bb-preview th,
.form12bb-preview td {
  border: 1px solid #9ca3af;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
}

.form12bb-preview th {
  background: #f0f4f8;
  font-weight: 600;
  color: #1e3a8a;
}

/* ── Declaration Preview ───────────────────────────────────────────── */
.declaration-preview {
  background: #fff;
  color: #111;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  padding: 2rem;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-lg);
  max-width: 595px;
  margin: 0 auto;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* ── Card Styles ───────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.card-body {
  padding: 1.5rem;
}

/* ── Form Elements ─────────────────────────────────────────────────── */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  letter-spacing: 0.01em;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-input.error,
.form-select.error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 0.25rem;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-input-group {
  display: flex;
  align-items: center;
}

.form-input-group.relative {
  display: block;
  position: relative;
}

.form-input-group .input-prefix {
  padding: 0.625rem 0.75rem;
  background: var(--surface-tertiary);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.form-input-group .form-input {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--brand-600);
  cursor: pointer;
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  gap: 0;
}

.tab-btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-tertiary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-secondary);
}

.tab-btn.active {
  color: var(--brand-600);
  border-bottom-color: var(--brand-600);
}

[data-theme="dark"] .tab-btn.active {
  color: var(--brand-400);
  border-bottom-color: var(--brand-400);
}

.tab-panel {
  display: none;
  padding-top: 1rem;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--brand-600);
  color: white;
}
.btn-primary:hover:not(:disabled) {
  background: var(--brand-700);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-success {
  background: var(--emerald-600);
  color: white;
}
.btn-success:hover:not(:disabled) {
  background: #047857;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-tertiary);
  border-color: var(--border-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-tertiary);
}

.btn-amber {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
}
.btn-amber:hover:not(:disabled) {
  background: linear-gradient(135deg, #d97706, #b45309);
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
}

.btn-full {
  width: 100%;
}

/* ── Badge / Pill ──────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  letter-spacing: 0.01em;
}

.badge-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-blue {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.badge-amber {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

[data-theme="dark"] .badge-success {
  background: #064e3b;
  color: #6ee7b7;
  border-color: #065f46;
}

[data-theme="dark"] .badge-blue {
  background: #1e3a8a;
  color: #93c5fd;
  border-color: #1e40af;
}

[data-theme="dark"] .badge-amber {
  background: #78350f;
  color: #fcd34d;
  border-color: #92400e;
}

/* ── Privacy Trust Banner ──────────────────────────────────────────── */
.privacy-banner {
  background: linear-gradient(135deg, #ecfdf5, #eff6ff);
  border: 1px solid #a7f3d0;
  border-radius: var(--radius);
  padding: 0.875rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: #065f46;
  font-weight: 500;
}

[data-theme="dark"] .privacy-banner {
  background: linear-gradient(135deg, #064e3b, #1e3a8a);
  border-color: #065f46;
  color: #6ee7b7;
}

.hero-gradient .privacy-banner {
  background: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  backdrop-filter: blur(8px);
}

/* ── Calculator Card ───────────────────────────────────────────────── */
.calc-card {
  background: linear-gradient(135deg, var(--brand-50), #f0fdf4);
  border: 1px solid var(--brand-200);
  border-radius: var(--radius);
}

[data-theme="dark"] .calc-card {
  background: linear-gradient(135deg, #1e293b, #1e3a5f);
  border-color: #334155;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
}

.calc-row + .calc-row {
  border-top: 1px solid var(--border);
}

.calc-row .calc-label {
  color: var(--text-secondary);
}

.calc-row .calc-value {
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.calc-row.highlight {
  padding: 0.75rem 0;
}

.calc-row.highlight .calc-value {
  font-size: 1.125rem;
  color: var(--brand-700);
}

[data-theme="dark"] .calc-row.highlight .calc-value {
  color: var(--brand-400);
}

/* ── Modal ─────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 1.5rem 1.5rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 0 1.5rem 1.5rem;
}

/* ── Tooltip ───────────────────────────────────────────────────────── */
.tooltip {
  position: relative;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
}

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

/* ── Section Divider ───────────────────────────────────────────────── */
.section-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.section-divider span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Mobile Panel Switcher ─────────────────────────────────────────── */
.mobile-switcher {
  display: none;
}

@media (max-width: 767px) {
  .mobile-switcher {
    display: flex;
    position: sticky;
    top: 64px;
    z-index: 40;
    margin-bottom: 1rem;
  }
}

/* ── Animations ────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* ── Scrollbar ─────────────────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* ── FAQ Accordion ─────────────────────────────────────────────────── */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item + .faq-item {
  margin-top: 0.5rem;
}

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

.faq-question {
  width: 100%;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: none;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: inherit;
}

.faq-question:hover {
  background: var(--surface-secondary);
}

.faq-question .faq-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: var(--text-tertiary);
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-answer-inner {
  padding: 0 1.25rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ── Responsive Layout ─────────────────────────────────────────────── */
.app-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 767px) {
  .app-layout {
    display: block !important;
  }

  .app-layout .form-panel {
    display: none;
  }

  .app-layout .preview-panel {
    display: none;
  }

  .app-layout .form-panel.mobile-active {
    display: block !important;
  }

  .app-layout .preview-panel.mobile-active {
    display: block !important;
  }

  /* Paper Preview responsive scaling */
  .receipt-preview,
  .form12bb-preview,
  .declaration-preview {
    padding: 1.25rem 0.875rem !important;
    border-radius: 0.75rem !important;
    font-size: 0.875rem !important;
    max-width: 100% !important;
    overflow-x: auto;
  }

  .receipt-preview .receipt-amount {
    font-size: 1.15rem !important;
    padding: 0.35rem 0.6rem !important;
  }

  .receipt-preview .receipt-words {
    font-size: 0.75rem !important;
    word-break: break-word;
  }

  .receipt-preview .receipt-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1.25rem !important;
  }

  .receipt-preview .signature-box {
    text-align: left !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  .receipt-preview .signature-line {
    margin-left: 0 !important;
    width: 140px !important;
  }
}

@media (min-width: 768px) {
  .mobile-switcher {
    display: none !important;
  }

  .app-layout .form-panel,
  .app-layout .preview-panel {
    display: block !important;
  }
}

/* ── Hero Section ──────────────────────────────────────────────────── */
.hero-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #06b6d4 100%);
}

[data-theme="dark"] .hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #164e63 100%);
}

/* ── Print Styles ──────────────────────────────────────────────────── */
@media print {
  header,
  nav,
  .hero-gradient,
  .form-panel,
  .mobile-switcher,
  .tab-buttons,
  .preview-actions,
  .month-grid,
  .month-selector-container,
  footer,
  #compliance-tools,
  #tax-guide,
  #faq,
  .toast,
  .privacy-banner,
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #app-section {
    padding: 0 !important;
    margin: 0 !important;
  }

  .app-layout {
    display: block !important;
  }

  .preview-panel {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .sticky-preview {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
  }

  .tab-panel:not(.active) {
    display: none !important;
  }

  .tab-panel.active {
    display: block !important;
  }

  .receipt-preview,
  .form12bb-preview,
  .declaration-preview {
    box-shadow: none !important;
    border: 1.5px solid #1e3a8a !important;
    padding: 1.5rem !important;
    break-inside: avoid;
    page-break-inside: avoid;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 8px !important;
  }
}

/* ── Signature Upload Area ─────────────────────────────────────────── */
.signature-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.signature-upload-area:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

[data-theme="dark"] .signature-upload-area:hover {
  background: rgba(59, 130, 246, 0.1);
}

.signature-upload-area img {
  max-height: 60px;
  margin: 0 auto;
}

/* ── Loading Spinner ───────────────────────────────────────────────── */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ── Misc ──────────────────────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sticky-preview {
  position: sticky;
  top: 1rem;
}

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

.section-header h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.section-header .section-icon {
  color: var(--brand-500);
  flex-shrink: 0;
}

/* ── Month Selector ────────────────────────────────────────────────── */
.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.375rem;
}

.month-btn {
  padding: 0.5rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.month-btn:hover {
  border-color: var(--brand-400);
  background: var(--brand-50);
}

.month-btn.active {
  background: var(--brand-600);
  color: white;
  border-color: var(--brand-600);
}

[data-theme="dark"] .month-btn:hover {
  background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .month-btn.active {
  background: var(--brand-600);
}

/* ── Toast Notification ────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #1e293b;
  color: white;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 2000;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.toast.visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 640px) {
  .toast {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    justify-content: center;
    text-align: center;
    max-width: calc(100% - 2rem);
  }
}
