/*
 * forge-ui.css v2.0.0
 * The Forge Design System — based on Hermes reference design
 * https://technocraftonline.com/assets/ui/forge-ui.css
 *
 * Every Pantheon face must look identical. This is the single source of truth.
 */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@300;400;500;600&family=Inter:wght@300;400;500;600&display=swap');

/* ============================================================
   RESET & VARIABLES
   ============================================================ */

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

:root {
  --bg: #0a0a0a;
  --fg: #c4b99a;
  --dim: #5a5548;
  --accent: #f5a623;
  --cool: #6aaa8a;
  --ember: #e8653a;
  --font: 'JetBrains Mono', monospace;
  --sans: 'Inter', sans-serif;
  --title-color: #e8d5b7;
  --surface: rgba(255, 255, 255, 0.03);
  --border: rgba(90, 85, 72, 0.3);
  --border-light: rgba(90, 85, 72, 0.15);
  --border-heavy: rgba(90, 85, 72, 0.4);
  --accent-glow: rgba(245, 166, 35, 0.3);
  --accent-bg: rgba(245, 166, 35, 0.1);
  --accent-bg-hover: rgba(245, 166, 35, 0.2);
  --accent-border: rgba(245, 166, 35, 0.4);
  --cool-bg: rgba(106, 170, 138, 0.1);
  --cool-border: rgba(106, 170, 138, 0.4);
  --cool-glow: rgba(106, 170, 138, 0.5);
  --ember-bg: rgba(232, 101, 58, 0.1);
  --ember-border: rgba(232, 101, 58, 0.3);
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(245, 166, 35, 0.04) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(106, 170, 138, 0.03) 0%, transparent 50%);
  pointer-events: none;
}

/* ============================================================
   LOGIN PAGE — Pixel-identical to Hermes
   ============================================================ */

.container {
  position: relative;
  z-index: 1;
  max-width: 460px;
  width: 100%;
  padding: 2.5rem 2rem;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
}

.icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  filter: drop-shadow(0 0 20px var(--accent-glow));
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon svg {
  width: 48px;
  height: 48px;
  display: block;
}

.title {
  font-family: var(--font);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 0.2rem;
}

.subtitle {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--cool);
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--cool);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--cool-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Form --- */

.form-group {
  margin-bottom: 1.1rem;
}

.form-label {
  display: block;
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.form-input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-input:focus {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.03);
}

.form-input::placeholder {
  color: var(--dim);
  opacity: 0.5;
}

/* --- Remember me --- */

.remember-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.remember-row input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-heavy);
  border-radius: 3px;
  background: var(--surface);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.remember-row input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.remember-row input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 2px;
  font-size: 12px;
  color: var(--bg);
  font-weight: bold;
}

.remember-row label {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  cursor: pointer;
}

/* --- Login button --- */

.btn-login {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
  border-radius: 4px;
  color: var(--accent);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-login:hover {
  background: var(--accent-bg-hover);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.btn-login:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-login.loading {
  position: relative;
  color: transparent;
}

.btn-login.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* --- Error message --- */

.error-msg {
  background: var(--ember-bg);
  border: 1px solid var(--ember-border);
  border-radius: 4px;
  padding: 0.55rem 0.8rem;
  margin-bottom: 1.1rem;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--ember);
  display: none;
}

.error-msg.visible { display: block; }

/* --- Divider --- */

.divider {
  width: 40px;
  height: 1px;
  background: var(--border-heavy);
  margin: 1.75rem auto;
}

/* --- Info section --- */

.info {
  margin-bottom: 1.5rem;
}

.info-title {
  font-family: var(--font);
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  text-align: center;
}

.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.8rem;
  text-align: left;
  font-size: 0.75rem;
}

.info-label {
  font-family: var(--font);
  color: var(--dim);
  font-size: 0.65rem;
}

.info-value {
  font-family: var(--font);
  color: var(--fg);
  font-size: 0.7rem;
}

/* --- Footer --- */

.footer {
  text-align: center;
  font-family: var(--font);
  font-size: 0.65rem;
  color: var(--dim);
}

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

.footer a:hover { text-decoration: underline; }

/* --- Lore / description block --- */

.lore {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--fg);
  line-height: 1.6;
  margin-bottom: 1rem;
  text-align: center;
}

.lore em { color: var(--accent); font-style: italic; }

.lore-quote {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  text-align: center;
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* --- Fade in animation --- */

.container > * {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 0.4s ease forwards;
}

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.container > *:nth-child(1) { animation-delay: 0.05s; }
.container > *:nth-child(2) { animation-delay: 0.1s; }
.container > *:nth-child(3) { animation-delay: 0.12s; }
.container > *:nth-child(4) { animation-delay: 0.15s; }
.container > *:nth-child(5) { animation-delay: 0.18s; }
.container > *:nth-child(6) { animation-delay: 0.22s; }
.container > *:nth-child(7) { animation-delay: 0.26s; }
.container > *:nth-child(8) { animation-delay: 0.3s; }
.container > *:nth-child(9) { animation-delay: 0.34s; }
.container > *:nth-child(10) { animation-delay: 0.38s; }

/* ============================================================
   DASHBOARD — Post-login application shell
   ============================================================ */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* --- Sidebar --- */

.sidebar {
  width: 220px;
  background: var(--surface);
  border-right: 1px solid rgba(90, 85, 72, 0.2);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sidebar-logo svg { width: 20px; height: 20px; color: var(--accent); }
.sidebar-title { font-family: var(--font); font-size: 0.85rem; color: var(--title-color); font-weight: 600; }

.sidebar-nav { flex: 1; padding: 0.25rem 0; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1.25rem;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.sidebar-link:hover { color: var(--fg); background: var(--surface); }
.sidebar-link.active { color: var(--accent); background: rgba(245, 166, 35, 0.06); }

.sidebar-footer {
  padding: 1rem 1.25rem 0;
  border-top: 1px solid var(--border-light);
  margin-top: auto;
}

.sidebar-user { font-family: var(--font); font-size: 0.7rem; color: var(--dim); margin-bottom: 0.5rem; }
.sidebar-user strong { color: var(--fg); }

/* --- Dashboard body --- */

.dashboard-body {
  flex: 1;
  padding: 2rem 2.5rem;
  overflow-y: auto;
}

.dashboard-body h2 {
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 0.25rem;
}

.text-dim {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  margin-bottom: 1.5rem;
}

/* --- Buttons --- */

.btn-ghost {
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--dim);
  font-family: var(--font);
  font-size: 0.7rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.btn-ghost:hover { color: var(--fg); border-color: rgba(90, 85, 72, 0.5); }

.btn-action {
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-family: var(--font);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid;
}

.btn-danger { background: var(--ember-bg); border-color: var(--ember-border); color: var(--ember); }
.btn-danger:hover { background: rgba(232, 101, 58, 0.2); }
.btn-primary { background: var(--accent-bg); border-color: var(--accent-border); color: var(--accent); }
.btn-primary:hover { background: var(--accent-bg-hover); }
.btn-success { background: var(--cool-bg); border-color: var(--cool-border); color: var(--cool); }
.btn-success:hover { background: rgba(106, 170, 138, 0.2); }

/* --- Stat cards --- */

.stat-row { display: flex; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

.stat-card {
  background: var(--surface);
  border: 1px solid rgba(90, 85, 72, 0.2);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  min-width: 120px;
  flex: 1;
}

.stat-value { font-family: var(--font); font-size: 1.5rem; font-weight: 600; color: var(--fg); }
.stat-label { font-family: var(--font); font-size: 0.65rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; margin-top: 0.2rem; }

/* --- Data table --- */

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font);
  font-size: 0.8rem;
}

.data-table th {
  text-align: left;
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid rgba(90, 85, 72, 0.2);
}

.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid rgba(90, 85, 72, 0.1);
  color: var(--fg);
}

.data-table tr { cursor: pointer; transition: background 0.15s; }
.data-table tr:hover { background: rgba(245, 166, 35, 0.04); }

/* --- Badges --- */

.badge {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.6rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-pending { background: rgba(90, 85, 72, 0.2); color: var(--dim); }
.badge-running { background: var(--accent-bg); color: var(--accent); }
.badge-completed { background: rgba(106, 170, 138, 0.15); color: var(--cool); }
.badge-failed { background: rgba(232, 101, 58, 0.15); color: var(--ember); }
.badge-critical { background: rgba(232, 101, 58, 0.2); color: var(--ember); }
.badge-high { background: var(--accent-bg); color: var(--accent); }
.badge-medium { background: rgba(196, 185, 154, 0.15); color: var(--fg); }
.badge-low { background: rgba(106, 170, 138, 0.1); color: var(--cool); }
.badge-info { background: rgba(90, 85, 72, 0.15); color: var(--dim); }

/* --- Empty state --- */

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--dim);
  font-family: var(--font);
  font-size: 0.8rem;
}

.empty-state .typcn { font-size: 2.5rem; color: var(--dim); margin-bottom: 0.75rem; display: block; }

/* --- Loading --- */

.loading-skeleton {
  height: 200px;
  background: linear-gradient(90deg, rgba(90, 85, 72, 0.05) 0%, rgba(90, 85, 72, 0.1) 50%, rgba(90, 85, 72, 0.05) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
}

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

/* --- Detail cards --- */

.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.detail-card {
  background: var(--surface);
  border: 1px solid rgba(90, 85, 72, 0.2);
  border-radius: 6px;
  padding: 1rem;
}

.detail-label { font-family: var(--font); font-size: 0.6rem; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.detail-value { font-family: var(--font); font-size: 0.85rem; color: var(--fg); margin-top: 0.2rem; }
.detail-value.em { color: var(--accent); }

/* --- Toast --- */

.forge-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  font-family: var(--font);
  font-size: 0.75rem;
  padding: 0.6rem 1rem;
  border-radius: 4px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid var(--border);
  color: var(--fg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.forge-toast.visible { transform: translateY(0); opacity: 1; }
.forge-toast.success { border-color: var(--cool-border); color: var(--cool); }
.forge-toast.error { border-color: var(--ember-border); color: var(--ember); }
.forge-toast.info { border-color: var(--accent-border); color: var(--accent); }

/* ============================================================
   FORM EXTENSIONS — textarea, select, form-row
   ============================================================ */

.form-textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  min-height: 200px;
  resize: vertical;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.form-textarea:focus {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.03);
}

.form-select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.form-select:focus { border-color: var(--accent); }

.form-row { margin-bottom: 1rem; }

/* ============================================================
   BADGE EXTENSIONS — domain-specific status variants
   ============================================================ */

.badge-confirmed { background: rgba(106, 170, 138, 0.15); color: var(--cool); }
.badge-unsubscribed { background: rgba(232, 101, 58, 0.15); color: var(--ember); }
.badge-draft { background: rgba(90, 85, 72, 0.15); color: var(--dim); }
.badge-sent { background: rgba(91, 141, 217, 0.15); color: #5b8dd9; }
.badge-active { background: var(--cool-bg); color: var(--cool); }

/* ============================================================
   STAT GRID — auto-fit responsive stat cards
   ============================================================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

/* ============================================================
   SECTION GROUP — grouped items with header and count
   ============================================================ */

.section-group { margin-bottom: 2rem; }

.section-group-header {
  font-family: var(--font);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
}

.section-group-count {
  display: inline-block;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 2px;
  margin-left: 0.4rem;
  vertical-align: middle;
}

/* ============================================================
   SECTION LABEL — lighter text above content blocks
   ============================================================ */

.section-label {
  font-family: var(--font);
  font-size: 0.85rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

/* ============================================================
   BUTTON ROW — horizontal button grouping
   ============================================================ */

.btn-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.btn-secondary {
  background: rgba(90, 85, 72, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-secondary:hover { background: rgba(90, 85, 72, 0.4); }

/* ============================================================
   PAGE TITLE — main section headings
   ============================================================ */

.page-title {
  font-family: var(--font);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* ============================================================
   APP LAYOUT — sidebar + main content grid
   ============================================================ */

.app-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
  width: 100%;
}

@media (max-width: 768px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-layout .sidebar { display: none; }
}

.app-main {
  padding: 2rem;
  overflow-y: auto;
}

/* ============================================================
   SIDEBAR EXTENSIONS — nav items, dividers
   ============================================================ */

.sidebar-nav-item {
  display: block;
  padding: 0.6rem 1.25rem;
  color: var(--fg);
  text-decoration: none;
  font-family: var(--font);
  font-size: 0.85rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav-item:hover { background: rgba(212, 168, 67, 0.08); }
.sidebar-nav-item.active { border-left-color: var(--accent); color: var(--accent); background: rgba(212, 168, 67, 0.05); }

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.75rem 0;
}

/* ============================================================
   MOBILE SIDEBAR TOGGLE
   ============================================================ */

.sidebar-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--fg);
  font-size: 1.2rem;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .sidebar-toggle { display: block; }
}

/* ============================================================
   FORGE CARD — general-purpose content card
   ============================================================ */

.forge-card {
  background: var(--surface);
  border: 1px solid rgba(90, 85, 72, 0.2);
  border-radius: 4px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.forge-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.forge-card-title {
  font-family: var(--font);
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
}

.forge-card-badge {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  background: rgba(212, 168, 67, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.forge-card-meta {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 0.75rem;
}

.forge-card-meta a {
  color: #5b8dd9;
  text-decoration: none;
}

.forge-card-meta a:hover { text-decoration: underline; }

.forge-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* ============================================================
   STATUS BAR — key-value status display within cards
   ============================================================ */

.status-bar {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 3px;
  font-family: var(--font);
  font-size: 0.8rem;
}

.status-bar-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.25rem;
}

.status-bar-line:last-child { margin-bottom: 0; }

.status-bar-label {
  color: var(--dim);
}

/* ============================================================
   LOG BOX — scrollable pre-formatted output area
   ============================================================ */

.log-box {
  margin-top: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  background: #111;
  padding: 0.75rem;
  border-radius: 3px;
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--dim);
  white-space: pre-wrap;
  word-break: break-all;
}

/* ============================================================
   BTN — shared button base and variants
   ============================================================ */

.btn {
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 0.5rem 1rem;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 3px;
  cursor: pointer;
  transition: filter 0.15s;
}

.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.75rem; }

/* ============================================================
   DASHBOARD HEADER — top bar with title and user info
   ============================================================ */

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.dashboard-header h1 {
  font-family: var(--font);
  color: var(--accent);
  font-size: 1.3rem;
}

.dashboard-header-user {
  font-family: var(--font);
  color: var(--dim);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.15s;
}

.dashboard-header-user:hover { color: var(--ember); }

/* ============================================================
   REFRESH BAR — subtle status line
   ============================================================ */

.refresh-bar {
  text-align: right;
  margin-bottom: 1rem;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
}

/* ============================================================
   BADGE EXTENSIONS — build status variants
   ============================================================ */

.badge-building { background: rgba(212, 168, 67, 0.15); color: var(--accent); }
.badge-success { background: rgba(106, 170, 138, 0.15); color: var(--cool); }
.badge-queued { background: rgba(102, 102, 102, 0.15); color: var(--dim); }
.badge-idle { background: rgba(90, 85, 72, 0.15); color: var(--dim); }

/* ============================================================
   DETAILS TOGGLE — collapsible sections in forge style
   ============================================================ */

.forge-details {
  cursor: pointer;
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--dim);
  margin-top: 0.5rem;
}

.forge-details:hover { color: var(--fg); }

/* ============================================================
   SPARK CANVAS — full-screen ambient particle layer
   ============================================================ */

.spark-canvas {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   APP WRAPPER — centered content container for simple dashboards
   ============================================================ */

.app-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* ============================================================
   LOGIN SCREEN — Pre-auth view for dashboard SPAs
   Used by Hephaestus, Keryx, Hermes, Ares etc.
   Centers login form identically to .container (460px max)
   ============================================================ */

.login-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.login-box {
  max-width: 460px;
  width: 100%;
}

.login-header {
  text-align: center;
  margin-bottom: 2rem;
}

.login-header .icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
  filter: drop-shadow(0 0 20px var(--accent-glow));
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-header h1 {
  font-family: var(--font);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--title-color);
  margin-bottom: 0.2rem;
}

.login-header .subtitle {
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--dim);
  margin-bottom: 1rem;
}

.login-header .status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font);
  font-size: 0.7rem;
  color: var(--cool);
}

.error-msg {
  color: var(--ember);
  font-family: var(--font);
  font-size: 0.75rem;
  margin-top: 0.75rem;
  text-align: center;
  min-height: 1.1em;
  display: none;
}

.error-msg.visible {
  display: block;
}

/* Login fade-up animation */
.login-box > * {
  opacity: 0;
  transform: translateY(8px);
  animation: loginFadeUp 0.4s ease forwards;
}

@keyframes loginFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.login-box > *:nth-child(1) { animation-delay: 0.05s; }
.login-box > *:nth-child(2) { animation-delay: 0.1s; }
.login-box > *:nth-child(3) { animation-delay: 0.15s; }
.login-box > *:nth-child(4) { animation-delay: 0.2s; }
.login-box > *:nth-child(5) { animation-delay: 0.25s; }
.login-box > *:nth-child(6) { animation-delay: 0.3s; }

/* ================================================
   Post-login landing page components
   Shared by: Argus, Janus, Cerberus, Hades, Hestia,
   Dionysus, Charon, Cadmus, Athena
   Added: 2026-03-21
   ================================================ */

/* Solid gold login button (alternative to .btn-login outlined variant) */
.login-btn {
  width: 100%; padding: 0.75rem; background: var(--accent); color: var(--bg);
  border: none; border-radius: 4px; font-family: var(--font); font-size: 0.85rem;
  font-weight: 600; cursor: pointer; margin-top: 0.5rem; transition: filter 0.2s;
}
.login-btn:hover { filter: brightness(1.1); }
.login-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Login error message */
.login-error {
  color: var(--ember); font-family: var(--font); font-size: 0.75rem;
  margin-top: 0.75rem; text-align: center; min-height: 1.1em;
}

/* Myth / lore section */
.myth { text-align: center; margin-bottom: 2rem; }
.myth p { font-size: 0.9rem; line-height: 1.7; color: var(--fg); opacity: 0.8; margin-bottom: 1rem; }
.myth em { color: var(--accent); font-style: italic; }
.myth-quote {
  font-family: var(--font); font-size: 0.8rem; color: var(--dim);
  line-height: 1.7; max-width: 380px; margin: 0 auto; text-align: center;
}

/* Post-login app view */
.app-view { display: none; max-width: 600px; width: 100%; margin: 0 auto; padding: 2.5rem 2rem; }
.app-view.active { display: block; }

/* App header with user info / logout */
.app-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2rem; padding-bottom: 1rem;
  border-bottom: 1px solid rgba(90,85,72,0.3);
}
.app-header h1 { font-family: var(--font); font-size: 1.3rem; color: #e8d5b7; }
.app-header .user-info {
  font-family: var(--font); font-size: 0.75rem; color: var(--dim);
  cursor: pointer; transition: color 0.2s;
}
.app-header .user-info:hover { color: var(--ember); }

/* Status card (post-login overview) */
.status-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(90,85,72,0.3);
  border-radius: 6px; padding: 2rem; text-align: center;
}
.status-card .sc-icon { font-size: 2rem; color: var(--cool); margin-bottom: 1rem; }
.status-card h2 { font-family: var(--font); font-size: 1rem; color: #e8d5b7; margin-bottom: 0.5rem; }
.status-card p { font-size: 0.85rem; color: var(--dim); line-height: 1.6; }

/* Site directory grid (Dionysus post-login) */
.site-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem; margin-top: 1.5rem;
}
.site-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(90,85,72,0.3);
  border-radius: 6px; padding: 1rem; text-align: center; text-decoration: none;
  color: var(--accent); font-family: var(--font); font-size: 0.75rem;
  transition: border-color 0.2s, background 0.2s;
}
.site-card:hover { border-color: var(--accent); background: rgba(245,166,35,0.03); }
.site-card .site-desc { color: var(--dim); font-size: 0.65rem; }
