/* ==================== ADMIN TABS ==================== */
.admin-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  overflow-x: auto;
  padding-bottom: 0;
}
.admin-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-family: "Urbanist", sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 10px 20px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.admin-tab:hover { color: var(--ink-0); }
.admin-tab.active {
  color: var(--brand-gold);
  border-bottom-color: var(--brand-gold);
}

/* ==================== ADMIN PANELS ==================== */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* ==================== TOOLBAR ==================== */
.panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

/* ==================== TABLE WRAP ==================== */
.table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
}

/* ==================== ADMIN FORM CARD ==================== */
.admin-form-card {
  background: var(--card-bg);
  border: 1px solid rgba(245, 184, 103, 0.25);
  border-radius: 18px;
  padding: 28px 32px;
  backdrop-filter: blur(12px);
  margin-bottom: 28px;
}
.admin-form-card h3 {
  font-family: "Cinzel", serif;
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 20px;
  color: var(--ink-0);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-transform: uppercase;
}
.admin-input {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink-0);
  font-family: "Urbanist", sans-serif;
  font-size: 14px;
  padding: 10px 14px;
  width: 100%;
  transition: border-color 0.2s, outline 0.2s;
}
.admin-input:focus {
  outline: 2px solid rgba(245, 184, 103, 0.4);
  border-color: rgba(245, 184, 103, 0.7);
}
select.admin-input option {
  background: var(--base-1);
  color: var(--ink-0);
}
.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.form-status {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-gold);
  min-height: 1.2rem;
}
.form-status.is-error { color: var(--brand-coral); }

/* ==================== BUTTON SIZE VARIANTS ==================== */
.btn-sm {
  font-size: 12px !important;
  padding: 9px 18px !important;
}

/* ==================== NO DATA STATE ==================== */
.no-data {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  color: var(--ink-2);
  font-size: 14px;
  backdrop-filter: blur(10px);
  margin-top: 8px;
}

/* ==================== ISSUE CERT BUTTON ==================== */
.btn-issue-cert {
  background: transparent;
  border: 1px solid rgba(110, 223, 160, 0.35);
  color: var(--brand-green);
  font-family: "Urbanist", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-issue-cert:hover { background: rgba(110, 223, 160, 0.1); }
.btn-issue-cert:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==================== ACTION BUTTONS (EDIT / DELETE) ==================== */
.action-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}
.btn-action {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink-1);
  font-family: "Urbanist", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.btn-action-edit { border-color: rgba(245, 184, 103, 0.35); color: var(--brand-gold); }
.btn-action-edit:hover { background: rgba(245, 184, 103, 0.1); }
.btn-action-delete { border-color: rgba(255, 107, 107, 0.35); color: var(--brand-red); }
.btn-action-delete:hover { background: rgba(255, 107, 107, 0.1); }
.btn-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== EVENT CHART ==================== */
.event-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}
.event-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 18px;
  backdrop-filter: blur(8px);
}
.event-verb {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-1);
  min-width: 220px;
}
.event-bar-wrap {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 100px;
  overflow: hidden;
}
.event-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--brand-gold), var(--brand-coral));
  border-radius: 100px;
  transition: width 0.5s ease;
}
.event-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-gold);
  min-width: 36px;
  text-align: right;
}

/* ==================== CERT LINK ==================== */
.cert-view-link {
  color: var(--brand-gold);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.cert-view-link:hover { text-decoration: underline; }

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(12, 26, 42, 0.97);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink-0);
  font-family: "Urbanist", sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s, transform 0.25s;
  max-width: 340px;
}
.toast.toast-visible { opacity: 1; transform: translateY(0); }
.toast-success { border-left: 3px solid var(--brand-green); }
.toast-error { border-left: 3px solid var(--brand-red); }

/* ==================== ROLE PILLS ==================== */
.role-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 6px;
}
.role-owner { background: rgba(245, 184, 103, 0.18); color: var(--brand-gold); border: 1px solid rgba(245, 184, 103, 0.35); }
.role-admin { background: rgba(110, 223, 160, 0.13); color: var(--brand-green); border: 1px solid rgba(110, 223, 160, 0.3); }
.role-manager { background: rgba(255, 143, 120, 0.13); color: var(--brand-coral); border: 1px solid rgba(255, 143, 120, 0.3); }
.role-staff { background: rgba(156, 168, 191, 0.12); color: var(--ink-2); border: 1px solid rgba(156, 168, 191, 0.2); }

/* ==================== INLINE DATE EDIT ==================== */
.inline-date-edit {
  display: flex;
  align-items: center;
  gap: 5px;
}
.admin-input-inline {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(245,184,103,0.4);
  border-radius: 8px;
  color: var(--ink-0);
  font-family: "Urbanist", sans-serif;
  font-size: 12px;
  padding: 4px 8px;
  width: 130px;
  transition: border-color 0.2s;
}
.admin-input-inline:focus {
  outline: 2px solid rgba(245,184,103,0.35);
  border-color: var(--brand-gold);
}

/* ==================== REMIND BUTTON ==================== */
.btn-action-remind { border-color: rgba(110,223,160,0.3); color: var(--brand-green); }
.btn-action-remind:hover { background: rgba(110,223,160,0.08); }

/* ==================== SETTINGS: COURSE ACTIVE TOGGLE ==================== */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.toggle-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-green);
  cursor: pointer;
}
.toggle-text { font-size: 12px; font-weight: 600; }
.text-green { color: var(--brand-green); }
.text-muted { color: var(--ink-2); }

/* ==================== TEMPLATE REVIEW MODAL ==================== */
.template-review-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 10, 18, 0.72);
  z-index: 700;
  display: grid;
  place-items: center;
  padding: 20px;
}
.template-review-modal {
  width: min(860px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: rgba(10, 22, 36, 0.97);
  border: 1px solid rgba(245, 184, 103, 0.3);
  border-radius: 16px;
  padding: 18px 18px 16px;
}
.template-review-summary {
  color: var(--ink-1);
  font-size: 13px;
  margin: 0 0 12px;
}
.template-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.template-review-grid h4 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-gold);
}
.template-review-list {
  margin: 0;
  padding-left: 18px;
  max-height: 280px;
  overflow: auto;
}
.template-review-list li {
  color: var(--ink-1);
  font-size: 13px;
  margin: 4px 0;
}

.mono-input {
  font-family: Consolas, "Courier New", monospace;
  line-height: 1.4;
  min-height: 180px;
}

.smoke-checklist {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--ink-1);
  font-size: 13px;
}

.smoke-checklist li {
  margin: 6px 0;
}

@media (max-width: 820px) {
  .template-review-grid {
    grid-template-columns: 1fr;
  }
}
