:root {
  --brand: #0f766e;
  --ink: #1c1917;
}

.animate-in {
  animation: rise 0.55s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand, #0f766e), var(--brand-dark, #0d9488));
  color: #fff;
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  transition: transform .15s ease, box-shadow .15s ease;
  box-shadow: 0 8px 24px -10px rgba(15,118,110,.55);
}
.btn-primary:hover { transform: translateY(-1px); }

.input-field {
  width: 100%;
  border: 1px solid #d6d3d1;
  border-radius: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  outline: none;
  font-size: 16px; /* avoid iOS zoom on focus */
  transition: border-color .15s, box-shadow .15s;
}
.input-field:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15,118,110,.15);
}

.card-panel {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  box-shadow: 0 10px 40px -18px rgba(28,25,23,.18);
}

/* Admin sidebar — fixed drawer (works on mobile + desktop) */
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28, 25, 23, 0.45);
  z-index: 40;
}

.admin-sidebar {
  position: fixed !important;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 50;
  height: 100vh;
  height: 100dvh;
  width: 16rem;
  max-width: 85vw;
  transform: translateX(-105%);
  transition: transform 0.25s ease;
  box-shadow: 8px 0 30px rgba(0, 0, 0, 0.25);
  will-change: transform;
}

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

.admin-main {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  transition: margin-left 0.25s ease;
  margin-left: 0;
}

/* When sidebar is open: only ✕ (inside sidebar). Hide top ☰ */
body.admin-sidebar-open #admin-sidebar-toggle {
  display: none !important;
}

/* When sidebar is closed: only top ☰ (✕ goes away with sidebar) */

/* Mobile: dim overlay when open */
@media (max-width: 1023px) {
  body.admin-sidebar-open {
    overflow: hidden;
  }

  body.admin-sidebar-open .admin-sidebar-overlay {
    display: block;
  }
}

/* Desktop: push content when sidebar open */
@media (min-width: 1024px) {
  body.admin-sidebar-open .admin-main {
    margin-left: 16rem;
  }

  .admin-sidebar-overlay {
    display: none !important;
  }

  body.admin-sidebar-open {
    overflow: auto;
  }
}

/* Registration package panel — mobile show/hide */
@media (max-width: 1023px) {
  .pkg-panel {
    display: none;
  }

  body.pkg-panel-open .pkg-panel {
    display: block;
  }
}

.safe-bottom {
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
}

/* Admin flash / toast messages */
.admin-flash {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px -16px rgba(28, 25, 23, 0.35);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.admin-flash-hiding {
  opacity: 0;
  transform: translateY(-6px);
}
.admin-flash-success {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}
.admin-flash-error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #9f1239;
}
.admin-flash-icon {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}
.admin-flash-success .admin-flash-icon {
  background: #059669;
  color: #fff;
}
.admin-flash-error .admin-flash-icon {
  background: #e11d48;
  color: #fff;
}
.admin-flash-body {
  flex: 1;
  min-width: 0;
}
.admin-flash-title {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0.85;
}
.admin-flash-text {
  font-size: 0.925rem;
  margin-top: 0.15rem;
  line-height: 1.4;
}
.admin-flash-close {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
}
.admin-flash-close:hover {
  opacity: 1;
  background: rgba(28, 25, 23, 0.06);
}

/* Public legal pages (Privacy / Terms / Refund) */
.legal-content h2,
.legal-content h3 {
  font-family: Fraunces, serif;
  color: #1c1917;
  margin: 1.25rem 0 0.5rem;
  font-weight: 600;
}
.legal-content h2 { font-size: 1.25rem; }
.legal-content h3 { font-size: 1.1rem; }
.legal-content p { margin: 0.65rem 0; }
.legal-content ul,
.legal-content ol {
  margin: 0.65rem 0 0.65rem 1.25rem;
  padding: 0;
}
.legal-content li { margin: 0.35rem 0; }
.legal-content a { color: var(--brand, #0f766e); text-decoration: underline; }
.legal-content blockquote {
  border-left: 3px solid #d6d3d1;
  margin: 0.75rem 0;
  padding: 0.25rem 0 0.25rem 0.85rem;
  color: #57534e;
}
.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95em;
}
.legal-content th,
.legal-content td {
  border: 1px solid #e7e5e4;
  padding: 0.55rem 0.75rem;
  text-align: left;
  vertical-align: top;
}
.legal-content th {
  background: #fafaf9;
  font-weight: 600;
}
.ck-editor__editable_inline,
.ck-editor__editable {
  min-height: 280px;
}
