@import url("https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&display=swap");

:root {
  --color-navy: #2d3a7a;
  --color-light-blue: #b8d4e8;
  --color-cream: #f7f9fc;
  --color-white: #ffffff;
  --color-muted: #4a5578;
  --color-border: #c8d8e8;
  --color-success: #2d6a4f;
  --color-success-bg: #e8f5ee;
  --color-error: #9b2335;
  --color-error-bg: #fce8ec;
  --color-running: #2d3a7a;
  --font-serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1100px;

  /* Admin dashboard tokens */
  --color-accent: var(--color-navy);
  --color-accent-100: #eaeff9;
  --color-accent-700: #34428c;
  --color-accent-900: var(--color-navy);
  --color-accent-2: var(--color-error);
  --color-accent-2-700: #7a1c2a;
  --color-neutral-100: var(--color-cream);
  --color-neutral-200: var(--color-border);
  --color-neutral-300: #b0c4dc;
  --color-neutral-500: #7c8bab;
  --color-neutral-700: var(--color-muted);
  --font-heading: var(--font-serif);
  --font-body: var(--font-sans);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --radius-md: 8px;
  --shadow-sm: 0 1px 3px rgba(45, 58, 122, 0.1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-navy);
  background: var(--color-cream);
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-navy);
  text-decoration: none;
}

a:hover {
  color: #1e2858;
  text-decoration: underline;
}

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1rem;
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-light-blue);
}

h3 {
  font-size: 1.25rem;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-light-blue);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.brand {
  display: flex;
  align-items: center;
  color: var(--color-navy);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
  color: var(--color-navy);
}

.brand img {
  display: block;
  width: 120px;
  height: auto;
}

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

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--color-navy);
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-nav a:hover {
  color: #1e2858;
  text-decoration: none;
}

.nav-cta {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* Sections */

.section {
  padding: 4rem 0;
}

.section:nth-child(even) {
  background: var(--color-white);
}

.section-lead {
  font-size: 1.125rem;
  color: var(--color-muted);
  max-width: 42rem;
}

/* Hero */

.hero {
  padding: 4rem 0 3.5rem;
  background: var(--color-light-blue);
  border-bottom: 1px solid var(--color-border);
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.hero h1 {
  margin: 0;
}

.tm {
  font-size: 0.45em;
  letter-spacing: 0.04em;
  vertical-align: super;
  line-height: 0;
}

/* Body copy lists */

.content-list {
  max-width: 42rem;
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.content-list li {
  margin-bottom: 0.5rem;
}

/* Coverage grid */

.coverage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
}

.coverage-item {
  padding: 0.5rem 0.75rem;
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
}

/* Forms */

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

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-navy);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
}


.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 2px rgba(45, 58, 122, 0.15);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-error {
  color: var(--color-error);
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.form-hint {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* Marks a field the operator can safely leave blank, so an optional scope
   isn't mistaken for a required one. */
.form-optional {
  font-weight: 400;
  color: var(--color-muted);
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.btn-primary {
  background: var(--color-navy);
  color: var(--color-white);
}

.btn-primary:hover:not(:disabled) {
  background: #1e2858;
}

.btn-secondary {
  background: transparent;
  color: var(--color-navy);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--color-navy);
  color: var(--color-navy);
}

a.btn {
  text-decoration: none;
}

a.btn:hover {
  text-decoration: none;
}

/* Alerts */

.alert {
  padding: 0.85rem 1rem;
  border-radius: 4px;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.alert-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.alert-error {
  background: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

.alert-info {
  background: #eef4f8;
  color: var(--color-running);
  border: 1px solid var(--color-running);
}

/* Footer */

.site-footer {
  padding: 2.5rem 0;
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--color-light-blue);
}

.site-footer a:hover {
  color: var(--color-white);
}

.footer-admin {
  margin: 1rem 0 0;
}

.footer-admin-link {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
}

.footer-admin-link:hover {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: underline;
}

/* Admin */

.admin-page {
  min-height: 100vh;
}

.admin-auth-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 100vh;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.admin-auth-loading[hidden] {
  display: none !important;
}

.admin-notice {
  margin-bottom: 1.5rem;
}

/* Shell: sidebar + main */

.admin-shell {
  display: flex;
  align-items: stretch;
  min-height: 100vh;
  background: var(--color-neutral-100);
}

.admin-sidebar {
  width: 248px;
  flex: 0 0 248px;
  background: var(--color-white);
  border-right: 1px solid var(--color-neutral-200);
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.admin-brand-name {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  color: var(--color-accent-900);
  line-height: 1.15;
}

.admin-brand-sub {
  font-size: 0.8rem;
  color: var(--color-neutral-700);
  margin-top: 2px;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-nav-item {
  appearance: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text, var(--color-navy));
}

.admin-nav-item:hover {
  background: var(--color-accent-100);
  color: var(--color-accent-900);
}

.admin-nav-item.is-active {
  font-weight: 700;
  color: var(--color-accent-900);
  background: var(--color-accent-100);
}

.admin-sidebar-footer {
  margin-top: auto;
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-neutral-200);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.admin-sidebar-footer-label {
  font-size: 0.8rem;
  color: var(--color-neutral-700);
}

.admin-user {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-navy);
  word-break: break-word;
  margin: 0;
}

.admin-sidebar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: var(--space-1);
}

.admin-sidebar-actions .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.admin-main {
  flex: 1;
  min-width: 0;
  padding: var(--space-6);
  max-width: 1180px;
}

.admin-view {
  display: none;
}

.admin-view.is-active {
  display: block;
}

.admin-view-header {
  margin-bottom: var(--space-4);
}

.admin-view-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  border: none;
  padding: 0;
  margin: 0 0 var(--space-1);
}

.admin-view-header p {
  font-size: 1rem;
  color: var(--color-neutral-700);
  margin: 0;
  max-width: 42rem;
}

.admin-view-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Overview */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.stat-card {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  transition: box-shadow 0.15s;
}

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

.stat-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-neutral-700);
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--color-accent-900);
  margin-top: var(--space-1);
}

.stat-meta {
  font-size: 0.85rem;
  color: var(--color-neutral-700);
  margin-top: var(--space-1);
}

.admin-subsection h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  border-bottom: 1px solid var(--color-neutral-200);
  padding-bottom: var(--space-1);
  margin-bottom: var(--space-3);
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.activity-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-neutral-200);
  cursor: pointer;
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-item:hover {
  background: var(--color-accent-100);
}

.activity-time {
  font-size: 0.85rem;
  color: var(--color-neutral-700);
  width: 150px;
  flex: 0 0 150px;
}

.activity-action {
  font-weight: 600;
  flex: 1;
}

/* Automation Runs action cards */

.action-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.action-card {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.action-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.action-card h3 {
  margin: 0;
}

.action-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-neutral-700);
  flex: 1;
}

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 999px;
  white-space: nowrap;
}

.status-idle {
  background: var(--color-neutral-200);
  color: var(--color-neutral-700);
}

.status-running {
  background: transparent;
  color: var(--color-accent-700);
  border: 1px solid var(--color-accent-700);
}

.status-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.status-error {
  background: var(--color-error-bg);
  color: var(--color-error);
}

.action-result {
  font-size: 0.9rem;
}

.action-result details {
  margin-top: 0.5rem;
}

.action-result summary {
  cursor: pointer;
  color: var(--color-muted);
  font-size: 0.85rem;
}

.action-result pre {
  margin: 0.5rem 0 0;
  padding: 0.75rem;
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.8rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Run log */

.run-log {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.run-log h2 {
  margin-bottom: 1rem;
}

.run-log-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.run-log-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.run-log-item:last-child {
  border-bottom: none;
}

.run-log-item time {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.run-log-empty {
  color: var(--color-muted);
  font-style: italic;
}

/* Usage report */

.usage-report-controls {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.usage-report-controls select {
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-sm, 4px);
  color: var(--color-navy);
  background: var(--color-white);
}

.usage-report-table-scroll {
  overflow-x: auto;
  background: var(--color-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
}

.usage-report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.usage-report-table th,
.usage-report-table td {
  padding: 0.6rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

.usage-report-table th {
  background: var(--color-cream);
  color: var(--color-navy);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

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

.usage-report-table tbody tr.is-inactive {
  color: var(--color-muted);
}

.usage-report-meta {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* Subscriber directory section */

.subscriber-section {
  background: var(--color-white);
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.subscriber-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
  border-bottom: 1px solid var(--color-neutral-200);
  margin-bottom: var(--space-3);
}

.subscriber-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.subscriber-tab {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.65rem 0.9rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-muted);
  cursor: pointer;
}

.subscriber-tab:hover {
  color: var(--color-navy);
}

.subscriber-tab.is-active {
  color: var(--color-navy);
  border-bottom-color: var(--color-navy);
}

.subscriber-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.subscriber-fields-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.subscriber-countries-wrap {
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  background: var(--color-cream);
}

.subscriber-countries-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.subscriber-countries-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.btn-link {
  appearance: none;
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--color-navy);
  text-decoration: underline;
  cursor: pointer;
}

.btn-link:hover {
  color: var(--color-muted);
}

.btn-link-sep {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.subscriber-country-count {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-left: 0.25rem;
}

.country-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.35rem 1rem;
  max-height: 22rem;
  overflow-y: auto;
  padding: 0.25rem 0.15rem;
}

.country-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
}

.country-checkbox input {
  width: auto;
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--color-navy);
}

.subscriber-section-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
}

/* Custom firm select */

.firm-select {
  position: relative;
}

.firm-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.65rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  color: var(--color-navy);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  cursor: pointer;
  text-align: left;
}

.firm-select-trigger:focus {
  outline: none;
  border-color: var(--color-navy);
  box-shadow: 0 0 0 2px rgba(45, 58, 122, 0.15);
}

.firm-select-trigger[aria-expanded="true"] {
  border-color: var(--color-navy);
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.firm-select-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.firm-select-label.is-placeholder {
  color: var(--color-muted);
}

.firm-select-chevron {
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.15s;
}

.firm-select-trigger[aria-expanded="true"] .firm-select-chevron {
  transform: rotate(180deg);
}

.firm-select-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--color-white);
  border: 1px solid var(--color-navy);
  border-top: none;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  box-shadow: 0 4px 12px rgba(45, 58, 122, 0.1);
  max-height: 320px;
  display: flex;
  flex-direction: column;
}

.firm-select-panel[hidden] {
  display: none;
}

.firm-select-search-wrap {
  padding: 0.5rem;
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.firm-select-search {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--color-navy);
  background: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: 3px;
  outline: none;
  box-sizing: border-box;
}

.firm-select-search:focus {
  border-color: var(--color-navy);
}

.firm-select-list {
  overflow-y: auto;
  flex: 1;
}

.firm-select-option {
  padding: 0.55rem 0.75rem;
  font-size: 0.95rem;
  color: var(--color-navy);
  cursor: pointer;
  user-select: none;
}

.firm-select-option:hover,
.firm-select-option.is-focused {
  background: var(--color-cream);
}

.firm-select-option.is-selected {
  font-weight: 500;
  background: rgba(45, 58, 122, 0.06);
}

.firm-select-option.is-hidden {
  display: none;
}

.firm-select-group-label {
  padding: 0.5rem 0.75rem 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
}

.firm-select-divider {
  height: 1px;
  background: var(--color-border);
  margin: 0.25rem 0;
}

.firm-select-empty {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-muted);
  text-align: center;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 58, 122, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1.5rem;
}

.modal-overlay[hidden] {
  display: none;
}

.modal {
  background: var(--color-white);
  border-radius: 6px;
  padding: 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.modal h2 {
  margin-bottom: 0.5rem;
  border: none;
  padding: 0;
}

.modal p {
  color: var(--color-muted);
  font-size: 0.95rem;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.modal-actions .btn-primary {
  min-width: 100px;
}

.auth-gate .modal {
  max-width: 380px;
}

.hidden {
  display: none !important;
}

/* Legal pages */

.legal-page {
  padding: 3rem 0 4rem;
}

.legal-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

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

.legal-subtitle {
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.35rem;
}

.legal-date {
  font-size: 0.95rem;
  color: var(--color-muted);
  margin: 0;
}

/* Responsive */

@media (max-width: 1000px) {
  .admin-shell {
    flex-direction: column;
  }

  .admin-sidebar {
    width: auto;
    flex: none;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    gap: var(--space-3);
  }

  .admin-nav {
    flex-direction: row;
  }

  .admin-sidebar-footer {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    border-left: 1px solid var(--color-neutral-200);
    padding-left: var(--space-3);
    flex-shrink: 0;
  }

  .admin-main {
    padding: var(--space-4);
  }

  .action-cards,
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .site-header .container {
    flex-wrap: wrap;
    height: auto;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .header-nav {
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .nav-cta {
    width: 100%;
    justify-content: center;
  }

  h1 {
    font-size: 1.75rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .section {
    padding: 3rem 0;
  }

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

  .action-cards,
  .stat-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .brand img {
    width: 96px;
  }

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