
/* ═══════════════════════════════════════════════════════════════
   PUBLIC.CSS — All public zone styles
   CloudFlare SaaS Base v2.0
   ═══════════════════════════════════════════════════════════════ */

/* ── Section 1: Reset & Base ─────────────────────────────────── */

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

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

body {
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* ── Section 2: CSS Variables ────────────────────────────────── */

:root {
  --color-bg:           #ffffff;
  --color-surface:      #f8fafc;
  --color-surface-2:    #f1f5f9;
  --color-border:       #e2e8f0;
  --color-text:         #0f172a;
  --color-text-muted:   #64748b;
  --color-primary:      #4f46e5;
  --color-primary-hover:#4338ca;
  --color-primary-light:rgba(79, 70, 229, 0.06);
  --color-danger:       #ef4444;
  --color-danger-light: rgba(239, 68, 68, 0.08);
  --color-success:      #10b981;
  --color-success-light:rgba(16, 185, 129, 0.08);
  --color-warning:      #f59e0b;
  --color-warning-light:rgba(245, 158, 11, 0.1);
  --color-info:         #3b82f6;
  --color-info-light:   rgba(59, 130, 246, 0.08);
  --sidebar-width:      260px;
  --header-height:      64px;
  --radius-sm:          6px;
  --radius-md:          10px;
  --radius-lg:          16px;
  --radius-xl:          24px;
  --shadow-xs:          0 1px 2px rgba(0,0,0,.04);
  --shadow-sm:          0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:          0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.04);
  --shadow-lg:          0 10px 15px -3px rgba(0,0,0,.07), 0 4px 6px -4px rgba(0,0,0,.03);
  --shadow-xl:          0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.03);
  --font-sans:          -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono:          'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
  --transition:         150ms ease;
  --transition-slow:    250ms ease;
}

[data-theme="dark"] {
  --color-bg:           #0c0e16;
  --color-surface:      #151823;
  --color-surface-2:    #1e2231;
  --color-border:       #2a2f42;
  --color-text:         #e8ecf4;
  --color-text-muted:   #8b95ad;
  --color-primary:      #818cf8;
  --color-primary-hover:#a5b4fc;
  --color-primary-light:rgba(129, 140, 248, 0.1);
  --color-danger-light: rgba(239, 68, 68, 0.12);
  --color-success-light:rgba(16, 185, 129, 0.12);
  --color-warning-light:rgba(245, 158, 11, 0.15);
  --color-info-light:   rgba(59, 130, 246, 0.12);
  --shadow-xs:          0 1px 2px rgba(0,0,0,.2);
  --shadow-sm:          0 1px 3px rgba(0,0,0,.25), 0 1px 2px rgba(0,0,0,.18);
  --shadow-md:          0 4px 6px -1px rgba(0,0,0,.25), 0 2px 4px -2px rgba(0,0,0,.18);
  --shadow-lg:          0 10px 15px -3px rgba(0,0,0,.3), 0 4px 6px -4px rgba(0,0,0,.2);
  --shadow-xl:          0 20px 25px -5px rgba(0,0,0,.3), 0 8px 10px -6px rgba(0,0,0,.2);
}

/* ── Section 3: Typography ───────────────────────────────────── */

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

a:not(.btn) {
  color: var(--color-primary);
  transition: color var(--transition);
}

a:not(.btn):hover {
  color: var(--color-primary-hover);
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

code {
  background: var(--color-surface-2);
  padding: 0.125rem 0.375rem;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--color-surface-2);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
}

/* ── Section 4: Layout Primitives ────────────────────────────── */

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 720px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

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

.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); }

.flex {
  display: flex;
}

.flex--center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex--between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex--col {
  display: flex;
  flex-direction: column;
}

.flex--wrap {
  flex-wrap: wrap;
}

.gap-1   { gap: 0.5rem; }
.gap-2   { gap: 1rem; }
.gap-3   { gap: 1.5rem; }
.gap-4   { gap: 2rem; }

/* ── Section 5: Components ───────────────────────────────────── */

/* ── 5.1 Buttons ─────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.btn:hover {
  background: var(--color-surface-2);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn:disabled, .btn.loading {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn--primary, .btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn--primary:hover, .btn-primary:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn--danger {
  background: var(--color-danger);
  color: #fff;
  border-color: var(--color-danger);
}

.btn--danger:hover {
  opacity: 0.9;
}

.btn--success {
  background: var(--color-success);
  color: #fff;
  border-color: var(--color-success);
}

.btn--success:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background: var(--color-primary);
  color: #fff;
}

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

.btn--full {
  width: 100%;
}

/* ── 5.2 Form Inputs ─────────────────────────────────────────── */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text);
}

.input, input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="url"], input[type="search"], input[type="tel"] {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.input:focus, input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input:disabled {
  background: var(--color-surface);
  cursor: not-allowed;
}

.input--error {
  border-color: var(--color-danger);
}

.input--error:focus {
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
  min-height: 120px;
  font-family: var(--font-sans);
}

textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.5rem;
}

select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-error {
  font-size: 0.8125rem;
  color: var(--color-danger);
}

/* ── 5.3 Cards ─────────────────────────────────────────────── */

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-slow), transform var(--transition);
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
}

/* ── 5.4 Tables ──────────────────────────────────────────────── */

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

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

.table th {
  text-align: start;
  font-weight: 600;
  padding: 0.75rem 1rem;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

.table tbody tr:hover {
  background: var(--color-surface);
}

.table tbody tr:nth-child(even) {
  background: var(--color-surface);
}

.table tbody tr:nth-child(even):hover {
  background: var(--color-surface-2);
}

/* ── 5.5 Badges & Pills ─────────────────────────────────────── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.1875rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  line-height: 1.5;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}

.badge--active {
  background: var(--color-success-light);
  color: var(--color-success);
}

.badge--blocked {
  background: var(--color-danger-light);
  color: var(--color-danger);
}

.badge--pending {
  background: var(--color-warning-light);
  color: #b45309;
}

[data-theme="dark"] .badge--pending {
  color: var(--color-warning);
}

.badge--user {
  background: var(--color-info-light);
  color: var(--color-info);
}

.badge--admin {
  background: var(--color-primary-light);
  color: var(--color-primary);
}

/* ── 5.6 Alerts & Toasts ────────────────────────────────────── */

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  margin-bottom: 1rem;
}

.alert--danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.alert--success {
  background: var(--color-success-light);
  color: var(--color-success);
  border-color: rgba(16, 185, 129, 0.2);
}

.alert--warning {
  background: var(--color-warning-light);
  color: #b45309;
  border-color: rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .alert--warning {
  color: var(--color-warning);
}

.alert--info {
  background: var(--color-info-light);
  color: var(--color-info);
  border-color: rgba(59, 130, 246, 0.2);
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: auto;
  animation: toast-in 0.3s ease forwards;
  max-width: 400px;
}

.toast--success { border-inline-start: 3px solid var(--color-success); }
.toast--danger  { border-inline-start: 3px solid var(--color-danger); }
.toast--warning { border-inline-start: 3px solid var(--color-warning); }
.toast--info    { border-inline-start: 3px solid var(--color-info); }

.toast-dismiss {
  margin-inline-start: auto;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.5;
  padding: 0 0.25rem;
}

.toast-dismiss:hover {
  opacity: 1;
}

.toast.removing {
  animation: toast-out 0.3s ease forwards;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(-1rem); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-1rem); }
}

/* ── 5.7 Modals ──────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  animation: fade-in 0.2s ease;
}

.modal {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-md);
  animation: modal-in 0.2s ease;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.modal-body {
  margin-bottom: 1.5rem;
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── 5.11 Language Switcher ──────────────────────────────────── */

.lang-switcher {
  display: inline-flex;
  align-items: center;
}

.lang-select {
  appearance: none;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.3125rem 1.75rem 0.3125rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color var(--transition);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}

.lang-select:focus {
  border-color: var(--color-primary);
  outline: none;
}

/* ── 5.12 Theme Toggle ───────────────────────────────────────── */

.theme-toggle {
  display: inline-flex;
  align-items: center;
}

.theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-sm);
  font-size: 1.125rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}

.theme-toggle-btn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
}

/* ── 5.13 Pagination ─────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  margin-top: 1.5rem;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  transition: all var(--transition);
  cursor: pointer;
}

.page-btn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
}

.page-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

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

/* ── 5.14 Avatar ─────────────────────────────────────────────── */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.875rem;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-initial {
  line-height: 1;
}

/* ── Section 6: Page-Specific ────────────────────────────────── */

/* ── 6.1 Home Hero ───────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 6rem 1.5rem 5rem;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 40%, #faf5ff 100%);
  position: relative;
  overflow: hidden;
}

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

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(168,85,247,.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-title {
  font-size: 3.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--color-text) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  line-height: 1.75;
  position: relative;
}

.hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── 6.2 Pricing ─────────────────────────────────────────────── */

.pricing-section {
  padding: 4rem 0;
}

.pricing-section h2 {
  text-align: center;
  margin-bottom: 2.5rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.pricing-card.featured {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 1px var(--color-primary);
}

.pricing-card.featured::before {
  content: attr(data-badge);
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
}

.pricing-tier {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-muted);
}

.pricing-features {
  text-align: start;
  margin: 1.5rem 0;
}

.pricing-features li {
  padding: 0.375rem 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

.pricing-features li::before {
  content: '✓ ';
  color: var(--color-success);
  font-weight: 700;
}

/* ── 6.2b Pricing Page Extras ─────────────────────────────────── */

.pricing-page-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.pricing-page-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

.pricing-toggle-wrapper {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-bottom: 2.5rem;
}

.pricing-toggle-btn {
  padding: 0.5rem 1.5rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  cursor: pointer;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background var(--transition), color var(--transition);
}

.pricing-toggle-btn:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.pricing-toggle-btn:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  border-left: none;
}

.pricing-toggle-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.pricing-description {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.btn--disabled {
  opacity: 0.6;
  pointer-events: none;
  cursor: default;
}

/* ── 6.3 FAQ ─────────────────────────────────────────────────── */

.faq-section {
  padding: 4rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

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

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-inline-start: 1rem;
}

.faq-item.open .faq-question::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding: 0 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

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

/* ── 6.4 Contact / Support Forms ─────────────────────────────── */

.contact-form,
.support-form {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.contact-form h2,
.support-form h2 {
  margin-bottom: 1.5rem;
}

/* ── 6.5 Auth Pages ──────────────────────────────────────────── */

.auth-card {
  max-width: 440px;
  margin: 4rem auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 0.5rem;
}

.auth-card p {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-border);
  margin-bottom: 1.5rem;
  gap: 0;
}

.auth-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  transition: color var(--transition), border-color var(--transition);
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.auth-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}

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

.auth-tab-panel {
  display: none;
}

.auth-tab-panel.active {
  display: block;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

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

.auth-link {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.auth-link a {
  color: var(--color-primary);
  font-weight: 600;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem;
}

[dir="rtl"] .password-toggle {
  right: auto;
  left: 0.75rem;
}

.password-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--color-border);
  margin-top: 0.375rem;
  overflow: hidden;
}

.password-strength-bar {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
  width: 0%;
}

.password-strength-bar.weak   { width: 33%; background: var(--color-danger); }
.password-strength-bar.medium { width: 66%; background: var(--color-warning); }
.password-strength-bar.strong { width: 100%; background: var(--color-success); }

/* ── 6.6 Setup Page ──────────────────────────────────────────── */

.setup-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--color-bg);
  padding: 2rem 1rem;
}

.setup-card {
  max-width: 520px;
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.setup-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.setup-card h1 {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.setup-subtitle {
  color: var(--color-text-muted);
  margin-bottom: 2rem;
}

.setup-card .form-group {
  text-align: start;
}

/* ── Section 7: Utilities ────────────────────────────────────── */

.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-center  { text-align: center; }
.text-start   { text-align: start; }
.text-end     { text-align: end; }
.text-muted   { color: var(--color-text-muted); }
.text-danger  { color: var(--color-danger); }
.text-success { color: var(--color-success); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.w-full { width: 100%; }

.d-none    { display: none; }
.d-block   { display: block; }
.d-flex    { display: flex; }
.d-grid    { display: grid; }

.hidden { display: none !important; }

/* ── Section 8: Responsive ───────────────────────────────────── */

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .hero { padding: 4rem 1rem 3rem; }
  .hero-title { font-size: 2.25rem; }
  .hero-subtitle { font-size: 1.0625rem; }

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

  .auth-card {
    margin: 2rem auto;
    padding: 1.5rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card {
    padding: 1.5rem;
  }

  .pricing-price {
    font-size: 2rem;
  }

  .container { padding-inline: 1rem; }

  .contact-form,
  .support-form {
    padding: 1.5rem 1rem;
  }

  .modal {
    padding: 1.5rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
  }

  .legal-page {
    padding-block: 2rem 2.5rem;
    padding-inline: 1.25rem;
  }

  .public-footer {
    padding: 2rem 1rem;
  }

  .footer-links {
    gap: 1rem;
  }

  .toast-container {
    right: 0.5rem;
    left: 0.5rem;
  }

  .toast {
    max-width: 100%;
  }

  .otp-inputs {
    gap: 0.5rem;
  }

  .otp-input {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.25rem;
  }

  .header-logo-text {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .auth-card {
    margin: 1rem;
    padding: 1.25rem;
  }

  .setup-card {
    padding: 2rem 1.25rem;
  }

  .hero-title { font-size: 1.75rem; }
  .hero-cta { flex-direction: column; }

  .pricing-card {
    padding: 1.25rem;
  }

  .otp-input {
    width: 2.25rem;
    height: 2.75rem;
    font-size: 1.125rem;
  }

  .cookie-banner-actions {
    flex-direction: column;
  }

  .cookie-banner-actions .btn {
    width: 100%;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .container--narrow {
    padding-inline: 1rem;
  }

  .legal-page {
    padding-inline: 1rem;
  }

  .legal-section h2 {
    font-size: 1.125rem;
  }
}

/* Above mobile: hide hamburger */
@media (min-width: 769px) {
  .header-menu-toggle {
    display: none;
  }
}

/* ── Section 9: RTL Overrides ────────────────────────────────── */

[dir="rtl"] select {
  background-position: left 0.75rem center;
  padding-right: 0.875rem;
  padding-left: 2.5rem;
}

[dir="rtl"] .toast-container {
  right: auto;
  left: 1rem;
}

[dir="rtl"] .btn + .btn {
  margin-right: 0.5rem;
  margin-left: 0;
}

[dir="rtl"] .faq-question::after {
  margin-inline-start: 0;
  margin-inline-end: 1rem;
}

/* ── Public Header & Footer ──────────────────────────────────── */

.public-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-theme="dark"] .public-header {
  background: rgba(12, 14, 22, 0.85);
}

.header-inner, .public-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--header-height);
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--color-text);
}

.header-logo-img {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
}

.header-nav, .public-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

.header-nav-link:hover {
  color: var(--color-text);
}

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

.header-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.hamburger-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  position: relative;
  transition: background 0.3s ease;
}

.hamburger-icon::before,
.hamburger-icon::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  left: 0;
  transition: top 0.3s ease, transform 0.3s ease;
}

.hamburger-icon::before { top: -6px; }
.hamburger-icon::after  { top: 6px; }

.header-menu-toggle[aria-expanded="true"] .hamburger-icon {
  background: transparent;
}

.header-menu-toggle[aria-expanded="true"] .hamburger-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.header-menu-toggle[aria-expanded="true"] .hamburger-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ── Mobile Sidebar ──────────────────────────────────────────── */

.mobile-overlay,
.mobile-sidebar {
  display: none;
}

body.mobile-menu-open {
  overflow: hidden;
}

.mobile-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  height: var(--header-height);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mobile-sidebar-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}

.mobile-sidebar-close:hover {
  color: var(--color-text);
  background: var(--color-surface-2);
}

.mobile-sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
  flex: 1;
  overflow-y: auto;
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav-link:hover {
  color: var(--color-text);
  background: var(--color-primary-light);
}

.mobile-sidebar-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  flex-shrink: 0;
}

.mobile-sidebar-actions .lang-switcher,
.mobile-sidebar-actions .theme-toggle {
  align-self: flex-start;
}

.mobile-sidebar-btn {
  width: 100%;
  text-align: center;
}

@media (max-width: 768px) {
  .header-nav,
  .header-actions {
    display: none;
  }

  .header-menu-toggle {
    display: flex;
  }

  .mobile-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-overlay.open {
    opacity: 1;
    pointer-events: auto;
  }

  .mobile-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    z-index: 1200;
    background: var(--color-bg);
    border-right: 1px solid var(--color-border);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .mobile-sidebar.open {
    transform: translateX(0);
  }

  [dir="rtl"] .mobile-sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--color-border);
    transform: translateX(100%);
  }

  [dir="rtl"] .mobile-sidebar.open {
    transform: translateX(0);
  }
}

.main-content {
  flex: 1;
  animation: page-in 0.35s ease;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.public-footer {
  text-align: center;
  padding: 3rem 1.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.footer-links a,
.footer-link-btn {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  padding: 0;
}

.footer-links a:hover,
.footer-link-btn:hover {
  color: var(--color-primary);
}

/* ── Legal Pages ─────────────────────────────────────────────── */

.legal-page {
  padding-block: 3rem 4rem;
  padding-inline: 1.5rem;
  max-width: 720px;
  width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.legal-page h1 {
  margin-bottom: 0.5rem;
}

.legal-meta {
  margin-bottom: 2.5rem;
  font-size: 0.875rem;
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  padding-top: 0.5rem;
}

.legal-section h3 {
  font-size: 1.0625rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-section p {
  color: var(--color-text-muted);
  line-height: 1.8;
}

.legal-list {
  padding-inline-start: 1.5rem;
  margin: 0.75rem 0;
  list-style: disc;
}

.legal-list li {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: 0.25rem;
}

.legal-table-wrapper {
  margin: 1rem 0;
  overflow-x: auto;
}

/* ── Cookie Consent Banner ───────────────────────────────────── */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9500;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 20px rgba(0,0,0,.12);
  animation: cookie-slide-up 0.4s ease;
}

.cookie-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
}

.cookie-banner-text strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
}

.cookie-banner-text p {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.6;
}

.cookie-banner-text a {
  color: var(--color-primary);
  font-weight: 600;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@keyframes cookie-slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

/* ── Cookie Preferences Modal (extras) ───────────────────────── */

.cookie-prefs-modal {
  max-width: 520px;
}

.cookie-category {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.cookie-category-desc {
  font-size: 0.8125rem;
  margin: 0;
  line-height: 1.5;
}

/* Toggle Switch */
.toggle {
  position: relative;
  display: inline-block;
  width: 2.75rem;
  height: 1.5rem;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 1.125rem;
  height: 1.125rem;
  left: 0.1875rem;
  bottom: 0.1875rem;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

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

.toggle input:checked + .toggle-slider::before {
  transform: translateX(1.25rem);
}

@media (max-width: 768px) {
  .cookie-banner-inner {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    justify-content: stretch;
  }
  .cookie-banner-actions .btn {
    flex: 1;
  }
}

/* ── OTP Input ───────────────────────────────────────────────── */

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.otp-input {
  width: 3rem;
  height: 3.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition);
}

.otp-input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.resend-timer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 1rem;
}

.char-count {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  text-align: end;
  margin-top: 0.25rem;
}

/* ── Section: Public Invoice ─────────────────────────────────── */

.invoice-public-wrap {
  max-width: 720px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.invoice-public-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.invoice-public-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--color-border);
}

.invoice-public-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.invoice-public-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.invoice-public-company {
  font-size: 1.25rem;
  font-weight: 700;
}

.invoice-public-meta {
  text-align: right;
}

.invoice-public-number {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-primary);
}

.invoice-public-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

.invoice-public-client {
  margin-bottom: 1.5rem;
}

.invoice-public-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.invoice-public-client-name {
  font-size: 1.125rem;
  font-weight: 600;
}

.invoice-public-client-email {
  color: var(--color-text-muted);
}

.invoice-public-table {
  margin-bottom: 1.5rem;
}

.invoice-public-totals {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-width: 300px;
  margin-left: auto;
  margin-bottom: 1.5rem;
}

.invoice-public-totals .invoice-total-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
}

.invoice-public-totals .invoice-total-row.discount {
  color: var(--color-danger);
}

.invoice-public-totals .invoice-total-row.grand {
  border-top: 2px solid var(--color-border);
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.invoice-public-notes {
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  margin-bottom: 1.5rem;
}

.invoice-public-notes p {
  color: var(--color-text-muted);
  white-space: pre-wrap;
}

.invoice-public-pay {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.invoice-public-description {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--color-surface);
  border-left: 3px solid var(--color-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.6;
}

.invoice-print-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin: 1rem 0 0;
}

/* ── Invoice Thank-You Page ───────────────────────────── */
.invoice-thankyou-card {
  max-width: 540px;
  margin: 3rem auto;
  background: var(--color-card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.invoice-thankyou-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  line-height: 1;
}
.invoice-thankyou-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-success);
  margin: 0 0 0.75rem;
}
.invoice-thankyou-sub {
  color: var(--color-text-muted);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  line-height: 1.6;
}
.invoice-thankyou-amount {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.5px;
}

.badge--lg {
  font-size: 0.9375rem;
  padding: 0.375rem 0.875rem;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
  font-size: 0.9375rem;
}

.alert--success {
  background: var(--color-success-light);
  color: #065f46;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert--info {
  background: var(--color-info-light);
  color: #1d4ed8;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.alert--danger {
  background: var(--color-danger-light);
  color: var(--color-danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn--lg {
  padding: 0.875rem 2rem;
  font-size: 1.0625rem;
}

@media (max-width: 600px) {
  .invoice-public-header {
    flex-direction: column;
    gap: 1rem;
  }
  .invoice-public-meta {
    text-align: left;
  }
  .invoice-public-card {
    padding: 1.25rem;
  }
}

/* ── Print Styles ─────────────────────────────────────── */
@media print {
  .public-header,
  .public-footer,
  #cookie-consent-banner,
  #cookie-prefs-modal,
  .invoice-print-actions,
  .invoice-public-pay {
    display: none !important;
  }
  body {
    background: white !important;
    color: black !important;
  }
  .invoice-public-wrap {
    padding: 0 !important;
  }
  .invoice-public-card {
    box-shadow: none !important;
    border: 1px solid #ddd;
    max-width: 100% !important;
  }
  .alert {
    display: none !important;
  }
}

/* ── Section: Maintenance Page ───────────────────────────────── */

.maintenance-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
  padding: 3rem 1.5rem;
}

.maintenance-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.maintenance-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.maintenance-message {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 480px;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.maintenance-admin-link {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  opacity: 0.5;
  text-decoration: none;
  transition: opacity 0.2s;
}

.maintenance-admin-link:hover {
  opacity: 1;
  text-decoration: underline;
}
