/* ─────────────────────────────────────────────────────────────
   ANC Mission Control - Main Stylesheet
   Color scheme: Black / Deep Red / Slight Purple
   No inline styles. All styling lives here.
───────────────────────────────────────────────────────────── */

/* ─── Custom Properties ─────────────────────────────────────── */
:root {
  --anc-black:        #080808;
  --anc-surface:      #111318;
  --anc-surface-2:    #181c23;
  --anc-surface-3:    #1e2330;
  --anc-border:       #252a35;
  --anc-border-light: #2e3545;

  --anc-red:          #dc2626;
  --anc-red-dark:     #991b1b;
  --anc-red-muted:    rgba(220, 38, 38, 0.15);

  --anc-purple:       #6d28d9;
  --anc-purple-muted: rgba(109, 40, 217, 0.2);
  --anc-purple-light: #7c3aed;

  --anc-text:         #f1f5f9;
  --anc-text-muted:   #b0bac8;
  --anc-text-faint:   #6b7a90;

  --anc-success:      #16a34a;
  --anc-success-muted:rgba(22, 163, 74, 0.15);
  --anc-warning:      #d97706;
  --anc-warning-muted:rgba(217, 119, 6, 0.15);

  --anc-sidebar-width: 260px;
  --anc-topbar-height: 60px;
  --anc-radius:        6px;
  --anc-radius-lg:     10px;

  --anc-shadow:        0 1px 3px rgba(0,0,0,0.5), 0 1px 2px rgba(0,0,0,0.3);
  --anc-shadow-lg:     0 4px 16px rgba(0,0,0,0.6);

  --anc-transition:    all 0.18s ease;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--anc-text);
  background: var(--anc-black);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--anc-red); text-decoration: none; }
a:hover { color: var(--anc-red-dark); text-decoration: underline; }

ul { list-style: none; }

/* ─── Main Layout ───────────────────────────────────────────── */
.anc-layout {
  display: flex;
  min-height: 100vh;
}

.anc-main {
  flex: 1;
  margin-left: var(--anc-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.22s ease;
}

/* ─── Sidebar ───────────────────────────────────────────────── */
.anc-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--anc-sidebar-width);
  background: var(--anc-black);
  border-right: 1px solid var(--anc-border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
  overflow-x: hidden;
}

.anc-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 16px;
  border-bottom: 1px solid var(--anc-border);
  flex-shrink: 0;
  gap: 10px;
}

.anc-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--anc-text);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.anc-brand-logo {
  width: 140px;
  height: 72px;
  border-radius: var(--anc-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.anc-brand-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.anc-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.anc-brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--anc-text);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.anc-brand-sub {
  font-size: 10px;
  color: var(--anc-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.anc-nav {
  padding: 12px 0;
  flex: 1;
}

.anc-nav-section-label {
  padding: 16px 16px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--anc-text-muted);
}

.anc-nav-item { }

.anc-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  color: var(--anc-text);
  font-size: 13px;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  transition: var(--anc-transition);
  border-left: 3px solid transparent;
  text-decoration: none;
}

.anc-nav-link:hover {
  color: var(--anc-text);
  background: var(--anc-surface);
  text-decoration: none;
}

.anc-nav-link.active {
  color: var(--anc-text);
  background: var(--anc-red-muted);
  border-left-color: var(--anc-red);
}

.anc-nav-disabled .anc-nav-link {
  cursor: default;
  opacity: 0.75;
}
.anc-nav-disabled .anc-nav-link:hover {
  background: transparent;
  color: var(--anc-text-muted);
}

.anc-nav-icon {
  width: 18px;
  height: 18px;
  background-color: currentColor;
  flex-shrink: 0;
  display: inline-block;
}

/* Icon masks - simple SVG shapes via mask-image */
.anc-icon-dashboard { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-events { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' fill='none' stroke='currentColor' stroke-width='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18' stroke='currentColor' stroke-width='2'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-franchise { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.87'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M3 21v-2a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v2'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75M21 21v-2a4 4 0 0 0-3-3.87'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-nominations { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M16 13H8M16 17H8M10 9H8'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-payments { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-dinner { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 6v6l4 2'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-reports { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-6'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 20V10M12 20V4M6 20v-6'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }
.anc-icon-settings { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E"); mask-repeat: no-repeat; mask-size: contain; }

.anc-nav-label { flex: 1; }

.anc-nav-badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
}

.anc-badge-soon {
  background: var(--anc-purple-muted);
  color: var(--anc-purple-light);
  border: 1px solid rgba(109, 40, 217, 0.3);
}

.anc-sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--anc-border);
  flex-shrink: 0;
}

.anc-sidebar-version {
  font-size: 10px;
  color: var(--anc-text-faint);
  letter-spacing: 0.04em;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.anc-topbar {
  height: var(--anc-topbar-height);
  background: var(--anc-surface);
  border-bottom: 1px solid var(--anc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
  gap: 16px;
}

.anc-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.anc-sidebar-toggle {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius);
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.anc-sidebar-toggle::before,
.anc-sidebar-toggle::after {
  content: '';
  display: block;
  width: 14px;
  height: 2px;
  background: var(--anc-text-muted);
  border-radius: 1px;
}

.anc-page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--anc-text);
  letter-spacing: 0.01em;
}

.anc-user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.anc-user-role {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
}

.anc-role-super_admin { background: var(--anc-red-muted); color: var(--anc-red); border: 1px solid rgba(220,38,38,0.3); }
.anc-role-admin       { background: var(--anc-purple-muted); color: var(--anc-purple-light); border: 1px solid rgba(109,40,217,0.3); }

.anc-user-name {
  font-size: 13px;
  color: var(--anc-text-muted);
}

/* ─── Content Area ──────────────────────────────────────────── */
.anc-content {
  flex: 1;
  padding: 28px;
  overflow-y: auto;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.anc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--anc-radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: var(--anc-transition);
  letter-spacing: 0.01em;
}

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

.anc-btn-primary {
  background: var(--anc-red);
  color: #fff;
  border-color: var(--anc-red);
}
.anc-btn-primary:hover { background: var(--anc-red-dark); border-color: var(--anc-red-dark); color: #fff; }

.anc-btn-ghost {
  background: transparent;
  color: var(--anc-text-muted);
  border-color: var(--anc-border);
}
.anc-btn-ghost:hover { background: var(--anc-surface-2); color: var(--anc-text); border-color: var(--anc-border-light); }

.anc-btn-sm { padding: 5px 12px; font-size: 12px; }
.anc-btn-full { width: 100%; }

/* ─── Cards ─────────────────────────────────────────────────── */
.anc-card {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-lg);
  overflow: hidden;
}

.anc-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--anc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.anc-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--anc-text);
  letter-spacing: 0.01em;
}

.anc-card-body {
  padding: 20px;
}

/* ─── Alerts / Flash Messages ───────────────────────────────── */
.anc-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--anc-radius);
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-size: 13px;
}

.anc-alert-success { background: var(--anc-success-muted); border-color: rgba(22,163,74,0.3); color: #86efac; }
.anc-alert-error   { background: var(--anc-red-muted); border-color: rgba(220,38,38,0.3); color: #fca5a5; }
.anc-alert-info    { background: var(--anc-purple-muted); border-color: rgba(109,40,217,0.3); color: #c4b5fd; }
.anc-alert-inline  { margin-bottom: 20px; }

.anc-alert-icon { font-weight: 700; flex-shrink: 0; }

.anc-alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.6;
  font-size: 16px;
  padding: 0 2px;
  flex-shrink: 0;
}
.anc-alert-close:hover { opacity: 1; }

/* ─── Forms ─────────────────────────────────────────────────── */
.anc-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anc-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--anc-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.anc-input {
  width: 100%;
  padding: 9px 12px;
  background: var(--anc-surface-3);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius);
  color: var(--anc-text);
  font-size: 13px;
  transition: border-color 0.15s;
  outline: none;
}

.anc-input:focus { border-color: var(--anc-red); box-shadow: 0 0 0 2px var(--anc-red-muted); }
.anc-input::placeholder { color: var(--anc-text-faint); }

.anc-input-otp {
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.25em;
  font-variant-numeric: tabular-nums;
}

/* ─── Login Page ────────────────────────────────────────────── */
.anc-login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--anc-black);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(109, 40, 217, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(220, 38, 38, 0.06) 0%, transparent 50%);
}

.anc-login-wrap {
  width: 100%;
  max-width: 400px;
  padding: 24px;
}

.anc-login-card {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-lg);
  padding: 36px 32px;
  box-shadow: var(--anc-shadow-lg);
}

.anc-login-brand {
  text-align: center;
  margin-bottom: 28px;
}

.anc-login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--anc-red), var(--anc-purple));
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.anc-login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--anc-text);
  margin-bottom: 4px;
}

.anc-login-subtitle {
  font-size: 12px;
  color: var(--anc-text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.anc-login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.anc-login-note {
  text-align: center;
  font-size: 11px;
  color: var(--anc-text-faint);
  margin-top: 16px;
}

.anc-login-back {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 12px;
  color: var(--anc-text-muted);
}
.anc-login-back:hover { color: var(--anc-text); }

.anc-logout-form { display: inline; }

/* ─── Dashboard ─────────────────────────────────────────────── */
.anc-dashboard { display: flex; flex-direction: column; gap: 24px; }

.anc-phase-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: linear-gradient(135deg, rgba(220,38,38,0.1), rgba(109,40,217,0.1));
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--anc-radius-lg);
  padding: 16px 20px;
}

.anc-phase-banner-content { display: flex; flex-direction: column; gap: 4px; }
.anc-phase-label { font-size: 13px; font-weight: 700; color: var(--anc-red); }
.anc-phase-desc  { font-size: 12px; color: var(--anc-text-muted); }

.anc-phase-steps {
  display: flex;
  align-items: center;
  gap: 4px;
}

.anc-phase-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--anc-surface-3);
  color: var(--anc-text-faint);
  border: 1px solid var(--anc-border);
}

.anc-phase-step.anc-step-done {
  background: var(--anc-red);
  color: #fff;
  border-color: var(--anc-red);
}

.anc-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.anc-stat-card {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.anc-stat-value {
  font-size: 32px;
  font-weight: 800;
  color: var(--anc-red);
  line-height: 1;
}

.anc-stat-empty { color: var(--anc-text-faint); }
.anc-stat-label { font-size: 13px; font-weight: 600; color: var(--anc-text); }
.anc-stat-note  { font-size: 11px; color: var(--anc-text-muted); }

.anc-section-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.anc-card-half { }

.anc-status-list { display: flex; flex-direction: column; gap: 0; }

.anc-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--anc-border);
  font-size: 13px;
}
.anc-status-row:last-child { border-bottom: none; }
.anc-status-label { color: var(--anc-text-muted); }

.anc-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.03em;
}
.anc-status-ok      { background: var(--anc-success-muted); color: #86efac; }
.anc-status-pending { background: var(--anc-warning-muted); color: #fcd34d; }
.anc-status-error   { background: var(--anc-red-muted); color: #fca5a5; }

.anc-audit-list { display: flex; flex-direction: column; gap: 0; }

.anc-audit-item {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--anc-border);
  font-size: 12px;
}
.anc-audit-item:last-child { border-bottom: none; }
.anc-audit-action { color: var(--anc-text); font-weight: 600; }
.anc-audit-user   { color: var(--anc-text-muted); }
.anc-audit-time   { color: var(--anc-text-muted); white-space: nowrap; }

.anc-empty-state { color: var(--anc-text-muted); font-size: 13px; text-align: center; padding: 20px 0; }

/* ─── Settings Page ─────────────────────────────────────────── */
.anc-settings-page { display: flex; flex-direction: column; gap: 20px; }
.anc-settings-form { display: flex; flex-direction: column; gap: 20px; }

.anc-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.anc-settings-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

/* ─── Error Page ────────────────────────────────────────────── */
.anc-error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

.anc-error-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; }

.anc-error-code {
  font-size: 80px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--anc-red), var(--anc-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.anc-error-title   { font-size: 24px; font-weight: 700; color: var(--anc-text); }
.anc-error-message { font-size: 14px; color: var(--anc-text-muted); }

/* ─── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .anc-stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .anc-sidebar { transform: translateX(-100%); transition: transform 0.22s ease; }
  .anc-sidebar.open { transform: translateX(0); }
  .anc-main { margin-left: 0; }
  .anc-sidebar-toggle { display: flex; }
  .anc-section-row { grid-template-columns: 1fr; }
  .anc-stat-grid { grid-template-columns: 1fr 1fr; }
  .anc-settings-grid { grid-template-columns: 1fr; }
  .anc-phase-banner { flex-direction: column; align-items: flex-start; }
  .anc-topbar { padding: 0 16px; }
  .anc-content { padding: 16px; }
  .anc-login-card { padding: 28px 20px; }
}

@media (max-width: 480px) {
  .anc-stat-grid { grid-template-columns: 1fr; }
  .anc-user-name { display: none; }
  .anc-phase-steps { display: none; }
}

/* ── Content header (action bar above content) ─────────────── */
.anc-content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* ── Events grid ────────────────────────────────────────────── */
.anc-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.anc-event-card {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-lg);
  overflow: hidden;
  transition: border-color 0.15s;
}
.anc-event-card:hover { border-color: var(--anc-red); }
.anc-event-banner {
  height: 140px;
  background-size: cover;
  background-position: center;
}
.anc-event-banner-placeholder {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.anc-event-card-body { padding: 16px; }
.anc-event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.anc-event-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--anc-text);
  margin: 0 0 6px;
}
.anc-event-meta {
  font-size: 12px;
  color: var(--anc-text-muted);
  margin-bottom: 2px;
}
.anc-event-teams-count { font-size: 11px; color: var(--anc-text-muted); }
.anc-event-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--anc-border);
}
.anc-event-stat { font-size: 12px; color: var(--anc-text-muted); }

/* ── Status badges ──────────────────────────────────────────── */
.anc-status-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.anc-status-draft              { background: rgba(107,114,128,0.2); color: #9ca3af; }
.anc-status-eoi_open           { background: rgba(16,185,129,0.15); color: #34d399; }
.anc-status-eoi_closed         { background: rgba(245,158,11,0.15); color: #fbbf24; }
.anc-status-nominations_open   { background: rgba(109,40,217,0.2);  color: #a78bfa; }
.anc-status-nominations_closed { background: rgba(245,158,11,0.15); color: #fbbf24; }
.anc-status-archived           { background: rgba(107,114,128,0.15); color: #6b7280; }
.anc-status-pending            { background: rgba(245,158,11,0.15); color: #fbbf24; }
.anc-status-approved           { background: rgba(16,185,129,0.15); color: #34d399; }
.anc-status-declined           { background: rgba(220,38,38,0.15);  color: #f87171; }
.anc-status-ok                 { background: rgba(16,185,129,0.15); color: #34d399; }

/* ── Tables ─────────────────────────────────────────────────── */
.anc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.anc-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--anc-text-muted);
  border-bottom: 1px solid var(--anc-border);
}
.anc-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--anc-border);
  color: var(--anc-text);
  vertical-align: middle;
}
.anc-table tbody tr:last-child td { border-bottom: none; }
.anc-table-hover tbody tr:hover { background: rgba(255,255,255,0.03); }

/* ── Detail header ──────────────────────────────────────────── */
.anc-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}
.anc-detail-header-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.anc-detail-header-right { display: flex; align-items: center; gap: 8px; }
.anc-detail-meta { font-size: 13px; color: var(--anc-text-muted); }
.anc-detail-actions { display: flex; align-items: center; gap: 8px; }

/* ── Stats grid ─────────────────────────────────────────────── */
.anc-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.anc-stat-value-green  { color: #34d399; }
.anc-stat-value-amber  { color: #fbbf24; }
.anc-stat-value-red    { color: #f87171; }
.anc-stat-value-purple { color: #a78bfa; }

/* ── Detail grid layouts ────────────────────────────────────── */
.anc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.anc-detail-grid-thirds {
  grid-template-columns: 1fr 1fr 1fr;
}
.anc-detail-row {
  display: flex;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid var(--anc-border);
  gap: 12px;
}
.anc-detail-row:last-child { border-bottom: none; }
.anc-detail-label {
  font-size: 12px;
  color: var(--anc-text-muted);
  min-width: 130px;
  flex-shrink: 0;
}
.anc-detail-value { font-size: 13px; color: var(--anc-text); flex: 1; }

/* ── Form cards & layout ────────────────────────────────────── */
.anc-form-card { margin-bottom: 20px; }
.anc-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.anc-form-row:last-child { margin-bottom: 0; }
.anc-form-group { display: flex; flex-direction: column; gap: 6px; }
.anc-form-group-full { grid-column: 1 / -1; }
.anc-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.anc-form-actions-inline {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.anc-required { color: var(--anc-red); }
.anc-divider { border: none; border-top: 1px solid var(--anc-border); margin: 16px 0; }
.anc-conditional-block { margin-top: 8px; }

/* ── Toggle switches ────────────────────────────────────────── */
.anc-toggles-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  grid-column: 1 / -1;
}
.anc-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.anc-toggle-input { display: none; }
.anc-toggle-switch {
  width: 40px;
  height: 22px;
  background: var(--anc-border);
  border-radius: 11px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.anc-toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left 0.2s;
}
.anc-toggle-input:checked + .anc-toggle-switch { background: var(--anc-red); }
.anc-toggle-input:checked + .anc-toggle-switch::after { left: 21px; }
.anc-toggle-text { font-size: 13px; color: var(--anc-text); }

/* ── Textarea ───────────────────────────────────────────────── */
.anc-textarea { resize: vertical; min-height: 80px; }

/* ── Input file & number variants ──────────────────────────── */
.anc-input-file { padding: 8px; cursor: pointer; }
.anc-input-sm { padding: 6px 10px; font-size: 12px; }
.anc-input-number { max-width: 100px; }
.anc-current-file { font-size: 12px; color: var(--anc-text-muted); margin-bottom: 4px; }

/* ── Select ─────────────────────────────────────────────────── */
.anc-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7a90' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.anc-select-inline { width: auto; display: inline-block; }

/* ── Status form ────────────────────────────────────────────── */
.anc-status-form { display: flex; align-items: center; gap: 12px; }
.anc-announcement-form { display: flex; flex-direction: column; gap: 10px; }

/* ── Teams/pricing table wrappers ───────────────────────────── */
.anc-teams-table-wrap, .anc-pricing-table-wrap { overflow-x: auto; }

/* ── Code badge ─────────────────────────────────────────────── */
.anc-code-badge {
  display: inline-block;
  background: rgba(109,40,217,0.15);
  color: #a78bfa;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── Franchise list ─────────────────────────────────────────── */
.anc-franchise-name { display: flex; align-items: center; gap: 8px; }
.anc-franchise-name a { color: var(--anc-text); font-weight: 500; text-decoration: none; }
.anc-franchise-name a:hover { color: var(--anc-red); }
.anc-returning-badge {
  display: inline-block;
  background: rgba(245,158,11,0.15);
  color: #fbbf24;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}
.anc-state-badge {
  display: inline-block;
  background: rgba(255,255,255,0.07);
  color: var(--anc-text-muted);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.anc-team-tag {
  display: inline-block;
  background: rgba(109,40,217,0.15);
  color: #a78bfa;
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  margin-right: 3px;
}
.anc-contact-name { font-size: 13px; color: var(--anc-text); }
.anc-contact-email { font-size: 11px; color: var(--anc-text-muted); }
.anc-text-sm { font-size: 12px; }
.anc-text-muted { color: var(--anc-text-muted); }

/* ── Filter tabs ────────────────────────────────────────────── */
.anc-filter-tabs { display: flex; gap: 4px; }
.anc-filter-tab {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--anc-text-muted);
  text-decoration: none;
  background: rgba(255,255,255,0.05);
  transition: background 0.15s, color 0.15s;
}
.anc-filter-tab:hover { color: var(--anc-text); background: rgba(255,255,255,0.08); }
.anc-filter-tab.active { background: var(--anc-red); color: #fff; }

/* ── Action groups ──────────────────────────────────────────── */
.anc-action-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.anc-inline-form { display: inline; }

/* ── Buttons - extra sizes ──────────────────────────────────── */
.anc-btn-xs   { padding: 3px 10px; font-size: 11px; }
.anc-btn-sm   { padding: 5px 12px; font-size: 12px; }
.anc-btn-success { background: #065f46; color: #34d399; border-color: #065f46; }
.anc-btn-success:hover { background: #047857; }
.anc-btn-danger  { background: rgba(220,38,38,0.15); color: #f87171; border: 1px solid rgba(220,38,38,0.3); }
.anc-btn-danger:hover  { background: rgba(220,38,38,0.25); }
.anc-btn-purple  { background: rgba(109,40,217,0.2); color: #a78bfa; border: 1px solid rgba(109,40,217,0.3); }
.anc-btn-purple:hover  { background: rgba(109,40,217,0.3); }
.anc-link { color: var(--anc-red); text-decoration: none; }
.anc-link:hover { text-decoration: underline; }

/* ── Modal ──────────────────────────────────────────────────── */
.anc-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.anc-modal-overlay.active { display: flex; }
.anc-modal {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-lg);
  width: 100%;
  max-width: 480px;
  margin: 16px;
}
.anc-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--anc-border);
}
.anc-modal-title { font-size: 15px; font-weight: 600; margin: 0; }
.anc-modal-close {
  background: none;
  border: none;
  color: var(--anc-text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.anc-modal-close:hover { color: var(--anc-text); }
.anc-modal-body { padding: 20px; }
.anc-modal-text { font-size: 13px; color: var(--anc-text-muted); margin-bottom: 16px; }

/* ── Dashboard event summary cards ─────────────────────────── */
.anc-event-summary-card { margin-bottom: 20px; }
.anc-mini-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.anc-mini-stat { text-align: center; }
.anc-mini-stat-value { display: block; font-size: 24px; font-weight: 700; color: var(--anc-text); }
.anc-mini-stat-label { font-size: 11px; color: var(--anc-text-muted); }
.anc-event-summary-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── Declined card ──────────────────────────────────────────── */
.anc-card-declined { border-color: rgba(220,38,38,0.3); }

/* ── Responsive additions ───────────────────────────────────── */
@media (max-width: 900px) {
  .anc-stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .anc-detail-grid   { grid-template-columns: 1fr; }
  .anc-detail-grid-thirds { grid-template-columns: 1fr; }
  .anc-mini-stats    { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .anc-form-row      { grid-template-columns: 1fr; }
  .anc-events-grid   { grid-template-columns: 1fr; }
  .anc-filter-tabs   { flex-wrap: wrap; }
}

/* ── Stats grid wide variant ─────────────────────────────── */
.anc-stats-grid-wide {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

/* ── Quick links row ─────────────────────────────────────── */
.anc-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 16px;
}

/* ── Contact name/email in tables ────────────────────────── */
.anc-contact-name  { font-size: 13px; font-weight: 500; }
.anc-contact-email { font-size: 12px; color: var(--anc-text-muted); }

/* ── Text helpers ────────────────────────────────────────── */
.anc-text-bold { font-weight: 600; }
.anc-text-sm   { font-size: 12px; }
.anc-text-lg   { font-size: 16px; }
.anc-text-muted{ color: var(--anc-text-muted); }
.anc-link { color: var(--anc-red); text-decoration: none; }
.anc-link:hover { text-decoration: underline; }

/* ── Empty state ─────────────────────────────────────────── */
.anc-empty-state {
  padding: 20px 0;
  color: var(--anc-text-muted);
  font-size: 13px;
  text-align: center;
}

/* ── Status badge variants for invoice status ────────────── */
.anc-status-unpaid { background: rgba(245,158,11,0.15); color: #fbbf24; }
.anc-status-paid   { background: rgba(52,211,153,0.15);  color: #34d399; }
.anc-status-overdue{ background: rgba(220,38,38,0.15);   color: #f87171; }

/* ── Invoice/payment modal text ──────────────────────────── */
.anc-modal-text { font-size: 14px; color: var(--anc-text-muted); margin-bottom: 16px; }

/* ── Filter tabs ─────────────────────────────────────────── */
.anc-filter-tabs { display: flex; gap: 4px; }
.anc-filter-tab {
  background: none;
  border: 1px solid var(--anc-border);
  color: var(--anc-text-muted);
  border-radius: var(--anc-radius-sm);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.anc-filter-tab:hover { border-color: var(--anc-red); color: var(--anc-text); }
.anc-filter-tab.active { background: var(--anc-red); border-color: var(--anc-red); color: #fff; }

/* ── Inline select ───────────────────────────────────────── */
.anc-select-inline {
  background: var(--anc-surface2);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-sm);
  color: var(--anc-text);
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  max-width: 140px;
}
.anc-select-inline:focus { outline: none; border-color: var(--anc-red); }

/* ── Inline form / content header left ──────────────────── */
.anc-inline-form { display: inline-flex; align-items: center; }
.anc-content-header-left { display: flex; align-items: center; gap: 8px; }

/* ── Report grid and cards ───────────────────────────────── */
.anc-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.anc-report-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius);
  padding: 20px;
  text-decoration: none;
  color: var(--anc-text);
  transition: border-color 0.15s, transform 0.1s;
}
.anc-report-card:hover { border-color: var(--anc-red); transform: translateY(-1px); }
.anc-report-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(220,38,38,0.12);
  flex-shrink: 0;
}
.anc-report-body { flex: 1; }
.anc-report-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.anc-report-desc  { font-size: 12px; color: var(--anc-text-muted); line-height: 1.5; }
.anc-report-arrow { color: var(--anc-text-muted); font-size: 18px; }
.anc-report-count { font-size: 13px; color: var(--anc-text-muted); margin-bottom: 12px; }
.anc-report-search-bar { padding: 12px 16px; border-bottom: 1px solid var(--anc-border); }

/* ── State badge ─────────────────────────────────────────── */
.anc-state-badge {
  display: inline-block;
  background: rgba(255,255,255,0.06);
  padding: 1px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--anc-text-muted);
}

/* ── Text colours ────────────────────────────────────────── */
.anc-text-green { color: #34d399; }
.anc-text-red   { color: #f87171; }
.anc-text-right { text-align: right; }

/* ── Card alert variant ──────────────────────────────────── */
.anc-card-alert { border-color: rgba(251,191,36,0.3); }
.anc-card-wide  { grid-column: 1 / -1; }

/* ── Shirt size grid ─────────────────────────────────────── */
.anc-shirt-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.anc-shirt-cell {
  background: var(--anc-surface2);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-sm);
  padding: 12px 20px;
  text-align: center;
  min-width: 80px;
}
.anc-shirt-size { font-size: 16px; font-weight: 700; }
.anc-shirt-qty  { font-size: 28px; font-weight: 700; color: var(--anc-red); margin-top: 4px; }

/* ── Check-in scanner ────────────────────────────────────── */
.anc-checkin-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 900px;
}
.anc-checkin-scan-area {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius);
  padding: 28px;
}
.anc-checkin-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
}
.anc-checkin-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.anc-checkin-input {
  flex: 1;
  font-size: 18px;
  padding: 12px 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.anc-checkin-result {
  min-height: 80px;
  border-radius: var(--anc-radius-sm);
  padding: 16px;
  font-size: 14px;
  transition: all 0.2s;
}
.anc-checkin-result-loading { background: rgba(255,255,255,0.04); color: var(--anc-text-muted); }
.anc-checkin-result-ok      { background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3); }
.anc-checkin-result-warn    { background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); }
.anc-checkin-result-err     { background: rgba(220,38,38,0.12);  border: 1px solid rgba(220,38,38,0.3); }
.anc-checkin-name   { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.anc-checkin-detail { font-size: 13px; color: var(--anc-text-muted); }
.anc-checkin-dietary{ font-size: 12px; color: #fbbf24; margin-top: 6px; }
.anc-checkin-recent {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius);
  padding: 20px;
  overflow: hidden;
}
.anc-checkin-recent-title { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.anc-checkin-log { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }
.anc-checkin-log-item {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: rgba(52,211,153,0.08);
  border-radius: var(--anc-radius-sm);
  font-size: 12px;
}
.anc-checkin-log-warn { background: rgba(251,191,36,0.08); }
.anc-checkin-log-time { color: var(--anc-text-muted); min-width: 64px; }
.anc-checkin-log-name { flex: 1; font-weight: 500; }
.anc-checkin-log-code { color: var(--anc-text-muted); font-family: monospace; font-size: 11px; }

/* ── Border-top for card sections ────────────────────────── */
.anc-border-top { border-top: 1px solid var(--anc-border); }

@media (max-width: 768px) {
  .anc-checkin-container { grid-template-columns: 1fr; }
  .anc-report-grid { grid-template-columns: 1fr; }
}

/* ── Email template editor ───────────────────────────────── */
.anc-template-vars          { margin-bottom: 20px; }
.anc-template-vars-list     { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.anc-var-chip {
  background: rgba(220,38,38,0.1);
  border: 1px solid rgba(220,38,38,0.3);
  border-radius: 4px;
  padding: 3px 10px;
  font-size: 12px;
  font-family: monospace;
  cursor: pointer;
  transition: background 0.15s;
  color: var(--anc-text);
}
.anc-var-chip:hover { background: rgba(220,38,38,0.25); }
.anc-textarea {
  width: 100%;
  background: var(--anc-surface2);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-sm);
  color: var(--anc-text);
  padding: 10px 12px;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  resize: vertical;
  min-height: 300px;
}
.anc-textarea:focus { outline: none; border-color: var(--anc-red); }
.anc-template-preview-frame {
  width: 100%;
  min-height: 400px;
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-sm);
  background: #fff;
}
.anc-template-body { font-size: 12px; }

/* ── Alert block ─────────────────────────────────────────── */
.anc-alert { padding: 12px 16px; border-radius: var(--anc-radius-sm); margin-bottom: 16px; font-size: 14px; }
.anc-alert-error { background: rgba(220,38,38,0.12); border: 1px solid rgba(220,38,38,0.3); color: #fca5a5; }

/* ── Pagination ──────────────────────────────────────────── */
.anc-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 20px 0; }
.anc-page-btn {
  background: var(--anc-surface);
  border: 1px solid var(--anc-border);
  border-radius: var(--anc-radius-sm);
  color: var(--anc-text);
  padding: 6px 14px;
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s;
}
.anc-page-btn:hover { border-color: var(--anc-red); }
.anc-page-info { font-size: 13px; color: var(--anc-text-muted); }

/* ── Filter bar ──────────────────────────────────────────── */
.anc-filter-bar { display: flex; gap: 8px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.anc-input-sm { padding: 6px 10px; font-size: 13px; min-width: 180px; }

/* ── Status inline ───────────────────────────────────────── */
.anc-status-inline { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.anc-status-inline-ok  { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.3); }
.anc-status-inline-off { background: rgba(255,255,255,0.05); color: var(--anc-text-muted); border: 1px solid var(--anc-border); }

/* ── btn-xs ──────────────────────────────────────────────── */
.anc-btn-xs { padding: 3px 8px; font-size: 11px; }
