/* ==========================================================================
   LEGACY OPERATIONS · admin.css
   Admin console. Shares brand tokens with the public site (values aligned
   with frontend/css/styles.css) but is a standalone stylesheet by design:
   the admin deploy must not depend on public-site files.
   ========================================================================== */

:root {
  --burgundy: #5C1A2B;
  --burgundy-dark: #2A0E17;
  --burgundy-deep: #1D0910;
  --gold: #C9A24B;
  --gold-bright: #DBB561;
  --gold-soft: rgba(201, 162, 75, 0.14);
  --ivory: #F7F1E6;
  --sand: #EDE2CC;
  --sand-line: #E3D8C4;
  --emerald: #2F5D50;
  --charcoal: #241F1F;
  --text: #40332C;
  --text-muted: #726A62;
  --text-on-dark: #D8C7AE;
  --surface: #FFFFFF;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 100px;
  --shadow-sm: 0 1px 3px rgba(36, 31, 31, 0.08), 0 1px 2px rgba(36, 31, 31, 0.04);
  --shadow-md: 0 6px 20px rgba(36, 31, 31, 0.10), 0 2px 6px rgba(36, 31, 31, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
.hidden { display: none !important; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--burgundy); }

button { font: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 70% 20%, rgba(201, 162, 75, 0.08), transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(92, 26, 43, 0.5), transparent 55%),
              var(--burgundy-dark);
  padding: 24px;
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand img { border-radius: 50%; }

.lb-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--burgundy);
  font-weight: 600;
}

.lb-sub {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold);
  font-weight: 700;
}

.login-card h1 { font-size: 1.6rem; margin-bottom: 6px; }

.login-sub {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-error {
  display: none;
  background: #F6E2E2;
  border-left: 3px solid #B34A4A;
  color: #7C2D2D;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8125rem;
  margin-bottom: 14px;
}

.login-error.show { display: block; }

.login-foot {
  margin-top: 20px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.login-foot a { color: var(--burgundy); font-weight: 600; }

/* ---------- fields ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
  flex: 1;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--burgundy);
}

.field input,
.field select,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  width: 100%;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.field textarea { resize: vertical; }

.form-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.form-checks {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

.check input { accent-color: var(--burgundy); width: 16px; height: 16px; }

/* ---------- buttons ---------- */
.btn-primary,
.btn-primary-sm {
  background: var(--gold);
  color: var(--burgundy-dark);
  font-weight: 700;
  border-radius: var(--radius-pill);
  border: none;
  transition: background-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.btn-primary { padding: 12px 24px; font-size: 0.9375rem; }
.btn-primary-sm { padding: 8px 18px; font-size: 0.8125rem; }

.btn-primary:hover, .btn-primary-sm:hover { background: var(--gold-bright); transform: translateY(-1px); }
.btn-primary[disabled], .btn-primary-sm[disabled] { opacity: 0.6; cursor: wait; transform: none; }

.btn-ghost-sm {
  background: transparent;
  border: 1.5px solid var(--sand-line);
  color: var(--burgundy);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn-ghost-sm:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger-sm {
  background: transparent;
  border: 1.5px solid #E5C4C4;
  color: #A04040;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn-danger-sm:hover { background: #F6E2E2; }

.btn-block { width: 100%; }

/* ---------- app shell ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(42, 14, 23, 0.97);
  backdrop-filter: blur(6px);
  color: var(--ivory);
}

.topbar-inner {
  max-width: 1100px;
  margin-inline: auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
}

.topbar-brand img { border-radius: 50%; }

.topbar-nav {
  display: flex;
  gap: 6px;
  flex: 1;
}

.nav-btn {
  background: transparent;
  border: none;
  color: rgba(247, 241, 230, 0.75);
  font-weight: 600;
  font-size: 0.8438rem;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.nav-btn:hover { color: var(--ivory); }

.nav-btn.active {
  background: var(--gold);
  color: var(--burgundy-dark);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 0.75rem;
  color: var(--text-on-dark);
}

.topbar .btn-ghost-sm { border-color: rgba(247, 241, 230, 0.3); color: var(--ivory); }
.topbar .btn-ghost-sm:hover { border-color: var(--gold); color: var(--gold); }

.content {
  max-width: 1100px;
  margin-inline: auto;
  padding: 32px 24px 64px;
}

.view-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.view-head h2 { font-size: 1.5rem; }

.view-sub { color: var(--text-muted); font-size: 0.8125rem; margin-top: 2px; }

.view-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.select {
  font: inherit;
  font-size: 0.8125rem;
  padding: 7px 12px;
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}

/* ---------- inquiries ---------- */
.inq-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1.5px solid var(--sand-line);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}

.stat-card .sc-label {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-card .sc-value {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--burgundy);
}

.inq-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 18px 22px;
  margin-bottom: 14px;
}

.inq-card.unhandled { border-left: 4px solid var(--gold); }
.inq-card.handled { opacity: 0.72; border-left: 4px solid var(--emerald); }

.inq-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.inq-type {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  color: var(--burgundy);
}

.inq-card.handled .inq-type { background: #E3EFE9; color: var(--emerald); }

.inq-name { font-weight: 700; font-size: 0.9375rem; color: var(--charcoal); }

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

.inq-date {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.inq-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.inq-message {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 12px;
}

.inq-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.inq-mail { font-size: 0.8125rem; font-weight: 600; color: var(--burgundy); text-decoration: none; padding: 6px 0; }
.inq-mail:hover { color: var(--gold); }

.empty-state {
  background: var(--surface);
  border: 1.5px dashed var(--sand-line);
  border-radius: var(--radius-md);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-muted);
}

/* ---------- events admin ---------- */
.ev-admin-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 16px 22px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.ev-admin-cover {
  width: 72px;
  height: 54px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--sand);
}

.ev-admin-titles { flex: 1; min-width: 200px; }

.ev-admin-titles h3 { font-size: 1rem; font-family: var(--font-body); font-weight: 700; color: var(--charcoal); }

.ev-admin-meta { font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }

.ev-admin-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.ev-admin-badge.upcoming { background: var(--gold-soft); color: var(--burgundy); }
.ev-admin-badge.past { background: #E3EFE9; color: var(--emerald); }

.ev-admin-actions { display: flex; gap: 8px; }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(29, 9, 16, 0.6);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 760px;
  padding: 28px 30px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.modal-head h3 { font-size: 1.3rem; }

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--ivory);
  color: var(--burgundy);
  font-size: 1.25rem;
  line-height: 1;
}

.modal-close:hover { background: var(--gold-soft); }

.modal-error {
  display: none;
  background: #F6E2E2;
  border-left: 3px solid #B34A4A;
  color: #7C2D2D;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.8125rem;
  margin-bottom: 14px;
}

.modal-error.show { display: block; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 100;
  background: var(--charcoal);
  color: var(--ivory);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 14px 20px;
  font-size: 0.8438rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: none;
  max-width: 380px;
}

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

.toast.error { border-left-color: #B34A4A; }

/* ---------- skeleton ---------- */
@keyframes sk-shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.sk {
  background: linear-gradient(90deg, var(--sand) 25%, #F3EAD8 50%, var(--sand) 75%);
  background-size: 800px 100%;
  animation: sk-shimmer 1.4s linear infinite;
  border-radius: var(--radius-sm);
  height: 80px;
  margin-bottom: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .sk { animation: none; background: var(--sand); }
  .btn-primary:hover, .btn-primary-sm:hover, .share-btn:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; gap: 10px; }
  .topbar-nav { order: 3; width: 100%; }
  .content { padding: 20px 16px 48px; }
  .modal { padding: 16px 8px; }
  .modal-card { padding: 20px 16px; }
  .form-row .field { flex: 1 1 100%; }
}
