.no-js .nav-links {
  display: flex;
}

.no-js .nav-toggle {
  display: none;
}

.page-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-3) var(--space-6);
}

@media (max-width: 768px) {
  .page-shell {
    padding: var(--space-3) var(--space-2) var(--space-5);
  }
}

.site-header {
  padding: var(--space-2) 0;
}

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.nav-brand {
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.3px;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
}

.nav-link {
  color: var(--text);
  font-weight: 500;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: background 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text);
  background: rgba(232, 106, 47, 0.08);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  box-shadow: 0 6px 0 var(--text), 0 -6px 0 var(--text);
}

@media (max-width: 992px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    margin-top: var(--space-2);
    margin-left: 0;
  }

  .nav-links.is-open {
    display: flex;
  }
}

.hero {
  background: linear-gradient(135deg, rgba(232, 106, 47, 0.12), rgba(66, 184, 168, 0.12));
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-md);
}

.hero-panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.page-action {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
}

.page-header .page-title {
  margin: 0;
}

.page-header .page-subtitle {
  color: var(--muted);
  margin: 4px 0 0;
}

.card-elevated,
.ui-card {
  background: var(--surface);
  border: 1px solid rgba(27, 36, 48, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-hover {
  transition: transform 200ms ease, box-shadow 200ms ease;
}

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

.ui-card-header {
  padding: var(--space-3) var(--space-4) var(--space-2);
  border-bottom: 1px solid var(--border);
}

.ui-card-body {
  padding: var(--space-3) var(--space-4);
}

.ui-card-footer {
  padding: var(--space-2) var(--space-4) var(--space-3);
  border-top: 1px solid var(--border);
}

.ui-btn,
.btn {
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-weight: 600;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.ui-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.ui-btn:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.ui-btn-primary,
.btn-accent {
  background: var(--primary);
  color: var(--primary-contrast);
  border: 1px solid transparent;
  box-shadow: 0 6px 14px rgba(232, 106, 47, 0.25);
}

.ui-btn-primary:hover,
.btn-accent:hover {
  background: #c85721;
  color: var(--primary-contrast);
  transform: translateY(-1px);
}

.ui-btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.ui-btn-outline,
.btn-outline-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.ui-btn-outline:hover,
.btn-outline-secondary:hover {
  background: rgba(232, 106, 47, 0.08);
  border-color: rgba(232, 106, 47, 0.35);
  color: var(--text);
}

.ui-btn-ghost {
  background: transparent;
  color: var(--text);
}

.ui-btn-ghost:hover {
  background: rgba(27, 36, 48, 0.06);
}

.ui-btn-destructive,
.btn-outline-danger {
  background: rgba(214, 69, 69, 0.1);
  color: var(--danger);
  border: 1px solid rgba(214, 69, 69, 0.3);
}

.ui-btn-sm {
  padding: 6px 12px;
  font-size: 0.85rem;
}

.ui-btn-md {
  font-size: 0.95rem;
}

.ui-btn-lg {
  padding: 12px 18px;
  font-size: 1rem;
}

.ui-btn.is-disabled,
.ui-btn:disabled,
.btn:disabled {
  opacity: 0.6;
  pointer-events: none;
  box-shadow: none;
}

.ui-btn .ui-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  margin-right: 8px;
  animation: spin 0.7s linear infinite;
}

.ui-btn.is-loading .ui-spinner {
  display: inline-block;
}

.ui-btn.is-loading .ui-btn-label {
  opacity: 0.7;
}

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

.ui-badge,
.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.82rem;
  background: rgba(66, 184, 168, 0.15);
  color: var(--text);
  text-decoration: none;
}

.ui-badge-primary {
  background: rgba(232, 106, 47, 0.12);
  color: var(--text);
}

.ui-alert,
.alert {
  border-radius: var(--radius-md);
  padding: 12px 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ui-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  background: var(--surface);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ui-alert.is-dismissed {
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.ui-alert-success {
  border-color: rgba(47, 158, 114, 0.3);
  background: rgba(47, 158, 114, 0.08);
}

.ui-alert-warning,
.alert-warning {
  border-color: rgba(228, 162, 58, 0.3);
  background: rgba(228, 162, 58, 0.12);
}

.ui-alert-danger,
.alert-danger {
  border-color: rgba(214, 69, 69, 0.3);
  background: rgba(214, 69, 69, 0.12);
}

.ui-alert-info,
.alert-secondary {
  border-color: rgba(27, 36, 48, 0.18);
  background: rgba(27, 36, 48, 0.06);
}

.ui-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ui-field .field-label {
  font-weight: 600;
}

.ui-field .field-helper {
  color: var(--muted);
  font-size: 0.85rem;
}

.ui-field.has-error input,
.ui-field.has-error select,
.ui-field.has-error textarea {
  border-color: rgba(214, 69, 69, 0.6);
  box-shadow: 0 0 0 2px rgba(214, 69, 69, 0.12);
}

.ui-field .field-error {
  color: var(--danger);
  font-size: 0.85rem;
}

.ui-empty {
  text-align: center;
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted);
}

.ui-skeleton {
  background: linear-gradient(90deg, rgba(27, 36, 48, 0.08), rgba(27, 36, 48, 0.02), rgba(27, 36, 48, 0.08));
  border-radius: var(--radius-sm);
  animation: shimmer 1.6s infinite;
  background-size: 200px 100%;
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

.ui-modal {
  position: fixed;
  inset: 0;
  background: rgba(27, 36, 48, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-3);
  z-index: 1040;
}

.ui-modal.is-open {
  display: flex;
}

.ui-modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 520px;
  width: 100%;
  padding: var(--space-4);
}

.form-section {
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: var(--space-3);
}

.form-section-title {
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.form-label {
  font-weight: 600;
  color: var(--text);
}

.form-control,
.form-select {
  border-radius: var(--radius-md);
  border-color: var(--border);
  background-color: var(--surface);
  box-shadow: none;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.input-group .form-control {
  border-right: 0;
}

.input-group .ui-btn {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.list-group-item {
  background: transparent;
  border-color: var(--border);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-2);
}

.stat-card {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
}

.chart-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--primary), #42b8a8);
  border-radius: 999px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: var(--space-4) 0;
  margin-top: var(--space-6);
}

.footer a {
  color: var(--text);
}

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

.cookie-banner {
  position: fixed;
  bottom: 16px;
  right: 16px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 16px;
  max-width: 320px;
  z-index: 999;
}

.small-muted {
  font-size: 0.9rem;
  color: var(--muted);
}

.admin-card {
  border-left: 4px solid var(--primary);
}

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

.table td,
.table th {
  vertical-align: middle;
}

.accordion-button {
  background: var(--surface);
  border-radius: var(--radius-md) !important;
  padding: 14px 16px;
}

.accordion-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--space-2);
}

.content img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.content h2,
.content h3,
.content h4 {
  margin-top: var(--space-3);
}

.content p {
  margin-bottom: var(--space-2);
}

.content ul,
.content ol {
  padding-left: 1.2rem;
}

.fade-in {
  animation: fadeInUp 0.7s ease both;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: var(--space-4);
  }
}
