/* =============================================================
   LORA AI — App-specific styles (built on tokens.css)
   ============================================================= */

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

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-0);
  color: var(--fg-2);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  position: relative;
}

/* Background aurora layer */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 18% 12%, rgba(123, 91, 255, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 35% at 88% 18%, rgba(197, 108, 255, 0.14) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 95%, rgba(255, 138, 107, 0.10) 0%, transparent 60%);
}

/* Disable transitions globally during theme switch to avoid cross-theme color flicker */
html.theme-switching, html.theme-switching * {
  transition: none !important;
  animation-duration: 0s !important;
}

/* Starfield (toggleable) */
[data-starfield="off"] body::after { display: none; }
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, #FFFFFF44, transparent),
    radial-gradient(1px 1px at 78% 8%, #FFFFFF33, transparent),
    radial-gradient(1px 1px at 42% 88%, #FFFFFF22, transparent),
    radial-gradient(1px 1px at 92% 60%, #FFFFFF22, transparent),
    radial-gradient(1px 1px at 28% 70%, #FFFFFF33, transparent),
    radial-gradient(1px 1px at 60% 30%, #FFFFFF22, transparent),
    radial-gradient(1px 1px at 8% 55%, #FFFFFF22, transparent),
    radial-gradient(1px 1px at 82% 85%, #FFFFFF33, transparent);
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }

input, textarea, select {
  font-family: inherit;
  font-size: var(--fs-body-sm);
  color: var(--fg-1);
  background: rgba(10, 8, 20, 0.65);
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  outline: none;
  transition: border-color var(--dur-base) var(--ease-calm), box-shadow var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), opacity var(--dur-base) var(--ease-calm);
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: rgba(155, 130, 255, 0.85);
  box-shadow: var(--glow-sm);
}
input::placeholder, textarea::placeholder { color: var(--fg-5); }
textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239B8FC9' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(155, 130, 255, 0.18);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(155, 130, 255, 0.35); }

/* =============================================================
   APP LAYOUT
   ============================================================= */
.app { position: fixed; inset: 0; display: flex; overflow: hidden; z-index: 1; }

/* SIDEBAR */
.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: rgba(10, 8, 20, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 1px dashed var(--stroke-dashed);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 50;
}
.sidebar::-webkit-scrollbar { width: 0; display: none; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 22px 18px;
  cursor: pointer;
}
.sidebar-logo-mark {
  width: 36px; height: 36px;
  border-radius: 12px;
  background: var(--grad-aurora);
  box-shadow: var(--glow-sm);
  display: grid;
  place-items: center;
  color: #1A0F2E;
  flex-shrink: 0;
  position: relative;
}
.sidebar-logo-mark svg { width: 20px; height: 20px; }
.sidebar-logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-1);
  line-height: 1;
}
.sidebar-logo-text small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.32em;
  color: var(--fg-4);
  margin-top: 4px;
  text-transform: none;
}

.sidebar-nav { flex: 1; padding: 4px 12px 16px; }

.sidebar-label {
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-5);
  padding: 18px 14px 8px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  color: var(--fg-3);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 2px;
  position: relative;
  border: 1px dashed transparent;
  transition: border-color var(--dur-fast) var(--ease-calm), box-shadow var(--dur-fast) var(--ease-calm), color var(--dur-fast) var(--ease-calm), transform var(--dur-fast) var(--ease-calm), opacity var(--dur-fast) var(--ease-calm);
}
.sidebar-item:hover {
  color: var(--fg-1);
  background: rgba(123, 91, 255, 0.08);
  border-color: rgba(155, 130, 255, 0.25);
}
.sidebar-item.active {
  color: var(--fg-1);
  background: rgba(123, 91, 255, 0.14);
  border-color: rgba(155, 130, 255, 0.45);
  box-shadow: var(--glow-sm);
}
.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 18px;
  background: var(--grad-aurora);
  border-radius: 0 3px 3px 0;
  box-shadow: var(--glow-sm);
}
.sidebar-item svg { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.75; }
.sidebar-item.active svg { opacity: 1; }
.sidebar-item-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-pill);
  background: var(--grad-aurora);
  color: #1A0F2E;
  letter-spacing: 0.04em;
}

.sidebar-user {
  margin: 8px 16px 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-md);
  cursor: pointer;
  background: var(--bg-elev);
  backdrop-filter: blur(10px);
  transition: border-color var(--dur-fast) var(--ease-calm), box-shadow var(--dur-fast) var(--ease-calm), color var(--dur-fast) var(--ease-calm), transform var(--dur-fast) var(--ease-calm), opacity var(--dur-fast) var(--ease-calm);
}
.sidebar-user:hover { box-shadow: var(--glow-sm); border-color: rgba(155, 130, 255, 0.7); }
.sidebar-user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-aurora);
  color: #1A0F2E;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: var(--glow-sm);
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600;
  color: var(--fg-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-balance {
  font-size: 11px;
  color: var(--accent-magenta);
  font-weight: 600;
  margin-top: 2px;
  display: flex; align-items: center; gap: 4px;
}

/* TOPBAR */
.main-wrap { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px dashed var(--stroke-dashed);
  background: rgba(10, 8, 20, 0.55);
  backdrop-filter: blur(14px);
  flex-shrink: 0;
  gap: 16px;
}
.topbar-search {
  flex: 1; max-width: 480px;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(26, 20, 50, 0.45);
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-pill);
  color: var(--fg-4);
  font-size: 13px;
}
.topbar-search input {
  background: transparent; border: none; padding: 0;
  flex: 1;
}
.topbar-search input:focus { box-shadow: none; border: none; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  background: var(--bg-elev);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-calm), box-shadow var(--dur-fast) var(--ease-calm), color var(--dur-fast) var(--ease-calm), transform var(--dur-fast) var(--ease-calm), opacity var(--dur-fast) var(--ease-calm);
}
.topbar-pill:hover { color: var(--fg-1); border-color: rgba(155, 130, 255, 0.7); box-shadow: var(--glow-sm); }
.topbar-pill .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-peach);
  box-shadow: 0 0 8px var(--accent-peach);
}

/* MAIN */
.main {
  flex: 1;
  overflow-y: auto;
  padding: 32px 40px 64px;
  position: relative;
}

.page { display: none; max-width: 1240px; margin: 0 auto; }
.page.active { display: block; animation: pageIn 0.4s var(--ease-calm); }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Page header */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.page-kicker {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.32em;
  color: var(--fg-4);
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.page-kicker::before {
  content: '✦';
  color: var(--accent-magenta);
  font-size: 14px;
}
.page-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-transform: uppercase;
  text-wrap: balance;
}
.page-title em {
  font-style: normal;
  background: var(--grad-aurora);
  -webkit-background-clip: text;
          background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-subtitle {
  font-size: 14px;
  color: var(--fg-3);
  margin-top: 12px;
  max-width: 580px;
  line-height: 1.55;
}

/* =============================================================
   ATOMIC COMPONENTS
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 13px;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  transition: border-color var(--dur-base) var(--ease-calm), box-shadow var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), opacity var(--dur-base) var(--ease-calm);
}
.btn-primary {
  background: var(--grad-aurora);
  color: #1A0F2E;
  box-shadow: var(--glow-sm);
}
.btn-primary:hover { box-shadow: var(--glow-md); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }
.btn-ghost {
  background: var(--bg-elev);
  color: var(--fg-1);
  border: 1px dashed var(--stroke-dashed);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { border-color: rgba(155, 130, 255, 0.7); box-shadow: var(--glow-sm); }
.btn-secondary {
  background: rgba(123, 91, 255, 0.15);
  color: var(--fg-1);
  border: 1px solid rgba(155, 130, 255, 0.35);
}
.btn-secondary:hover { background: rgba(123, 91, 255, 0.25); box-shadow: var(--glow-sm); }
.btn-lg { padding: 14px 28px; font-size: 14px; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; border-radius: 50%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Card */
.card {
  background: var(--bg-elev);
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-xl);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 24px;
  transition: border-color var(--dur-base) var(--ease-calm), box-shadow var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), opacity var(--dur-base) var(--ease-calm);
  position: relative;
}
.card:hover { border-color: rgba(155, 130, 255, 0.7); box-shadow: var(--glow-sm); }

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-aurora { background: var(--grad-aurora); color: #1A0F2E; }
.badge-violet { background: rgba(123, 91, 255, 0.2); color: #C7B6FF; border: 1px solid rgba(123, 91, 255, 0.4); }
.badge-peach  { background: rgba(255, 138, 107, 0.18); color: var(--accent-peach); border: 1px solid rgba(255, 138, 107, 0.45); }
.badge-magenta{ background: rgba(197, 108, 255, 0.18); color: #DDA9FF; border: 1px solid rgba(197, 108, 255, 0.45); }
.badge-success{ background: rgba(94, 230, 168, 0.15); color: var(--success); border: 1px solid rgba(94, 230, 168, 0.4); }
.badge-warning{ background: rgba(255, 200, 97, 0.15); color: var(--warning); border: 1px solid rgba(255, 200, 97, 0.4); }
.badge-danger { background: rgba(255, 107, 138, 0.15); color: var(--danger); border: 1px solid rgba(255, 107, 138, 0.4); }
.badge-ghost  { background: rgba(155, 130, 255, 0.08); color: var(--fg-3); border: 1px dashed var(--stroke-dashed); }

/* Chip (rectangular, smaller, for filters) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  background: var(--bg-elev);
  color: var(--fg-2);
  border: 1px dashed var(--stroke-dashed);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-calm), box-shadow var(--dur-fast) var(--ease-calm), color var(--dur-fast) var(--ease-calm), transform var(--dur-fast) var(--ease-calm), opacity var(--dur-fast) var(--ease-calm);
}
.chip:hover { color: var(--fg-1); border-color: rgba(155, 130, 255, 0.55); }
.chip.active {
  background: rgba(123, 91, 255, 0.2);
  border-color: rgba(155, 130, 255, 0.85);
  color: var(--fg-1);
  box-shadow: var(--glow-sm);
}

/* Icon tile (signature) */
.icon-tile {
  width: 56px; height: 56px;
  border-radius: var(--r-lg);
  border: 1px dashed var(--stroke-dashed);
  background: rgba(26, 20, 50, 0.55);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  color: var(--fg-2);
  flex-shrink: 0;
  position: relative;
}
.icon-tile.sm { width: 42px; height: 42px; border-radius: 14px; }
.icon-tile.lg { width: 72px; height: 72px; border-radius: 22px; }
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.sm svg { width: 20px; height: 20px; }
.icon-tile.lg svg { width: 32px; height: 32px; }
.icon-tile.glow { box-shadow: var(--glow-sm); }
.icon-tile.aurora-bg {
  background: var(--grad-aurora);
  border-style: solid;
  border-color: transparent;
  color: #1A0F2E;
  box-shadow: var(--glow-md);
}

/* Section header */
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 36px 0 18px;
  gap: 20px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-1);
  display: flex; align-items: center; gap: 10px;
}
.section-head h2 .accent { color: var(--accent-magenta); }
.section-head a { font-size: 12px; color: var(--fg-3); font-weight: 500; }
.section-head a:hover { color: var(--fg-1); }

/* Grid helpers */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid-5 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

/* Photo card */
.photo-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px dashed var(--stroke-dashed);
  background: var(--bg-2);
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-calm), box-shadow var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), opacity var(--dur-base) var(--ease-calm);
  aspect-ratio: 3/4;
}
.photo-card:hover { border-color: rgba(155, 130, 255, 0.7); box-shadow: var(--glow-md); transform: translateY(-2px); }
.photo-card .ph-img {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2a1f5a, #4a2a6e 50%, #6a3a8c);
  position: relative;
}
.photo-card .ph-img.warm { background: linear-gradient(135deg, #4a2a3e, #6e3a4a 50%, #c56c70); }
.photo-card .ph-img.cool { background: linear-gradient(135deg, #1a2050, #3a4080 50%, #6e7cd0); }
.photo-card .ph-img.violet { background: linear-gradient(135deg, #2a1448, #5e3a8a 50%, #b06ce0); }
.photo-card .ph-img.peach { background: linear-gradient(135deg, #3e1f3a, #c56c80 50%, #ffb48a); }
.photo-card .ph-img.dawn { background: linear-gradient(135deg, #1a1432, #7b5bff 40%, #ff8a6b); }
.photo-card .ph-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(255,255,255,0.18), transparent 60%),
              linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
}
.photo-card .ph-meta {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 14px;
  z-index: 2;
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 10px;
}
.photo-card .ph-name {
  font-size: 13px; font-weight: 600;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
.photo-card .ph-tags {
  position: absolute; top: 10px; left: 10px;
  display: flex; gap: 6px;
  z-index: 2;
}

/* Stat card */
.stat-card {
  border: 1px dashed var(--stroke-dashed);
  background: var(--bg-elev);
  backdrop-filter: blur(14px);
  border-radius: var(--r-xl);
  padding: 22px 24px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur-base) var(--ease-calm), box-shadow var(--dur-base) var(--ease-calm), color var(--dur-base) var(--ease-calm), transform var(--dur-base) var(--ease-calm), opacity var(--dur-base) var(--ease-calm);
}
.stat-card:hover { border-color: rgba(155, 130, 255, 0.7); box-shadow: var(--glow-sm); }
.stat-card .stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-4);
  margin-bottom: 10px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 800;
  color: var(--fg-1);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card .stat-value.aurora {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-card .stat-sub { font-size: 11px; color: var(--fg-4); margin-top: 8px; }

/* Hero / aurora panel */
.aurora-panel {
  position: relative;
  border-radius: var(--r-2xl);
  padding: 32px 36px;
  overflow: hidden;
  border: 1px dashed var(--stroke-dashed);
  background: var(--bg-elev);
  backdrop-filter: blur(20px);
}
.aurora-panel::before {
  content: '';
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(ellipse 60% 80% at 8% 100%, rgba(123, 91, 255, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 92% 0%, rgba(255, 138, 107, 0.28) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(197, 108, 255, 0.22) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}
.aurora-panel > * { position: relative; z-index: 1; }

/* Token bar */
.token-bar {
  height: 8px;
  background: rgba(0,0,0,0.35);
  border-radius: var(--r-pill);
  overflow: hidden;
  border: 1px dashed var(--stroke-dashed);
}
.token-bar-fill {
  height: 100%;
  background: var(--grad-aurora);
  border-radius: var(--r-pill);
  box-shadow: var(--glow-sm);
  transition: width 1s var(--ease-calm);
}

/* Progress dots step */
.steps-row {
  display: flex; align-items: center;
  gap: 0;
  padding: 16px 0;
}
.step-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: var(--r-pill);
  border: 1px dashed var(--stroke-dashed);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
  background: var(--bg-elev);
}
.step-pill .step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--grad-aurora);
  color: #1A0F2E;
  display: grid; place-items: center;
  font-weight: 800;
  font-size: 11px;
}
.step-pill.done .step-num { background: var(--success); color: #0A0814; }
.step-pill.upcoming { opacity: 0.5; }
.steps-row .step-arrow { color: var(--accent-magenta); padding: 0 8px; opacity: 0.6; font-size: 14px; }

/* Tabs */
.tabs {
  display: flex; align-items: center;
  gap: 4px;
  padding: 6px;
  background: var(--bg-elev);
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-pill);
  width: fit-content;
}
.tab {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-3);
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-calm), box-shadow var(--dur-fast) var(--ease-calm), color var(--dur-fast) var(--ease-calm), transform var(--dur-fast) var(--ease-calm), opacity var(--dur-fast) var(--ease-calm);
}
.tab:hover { color: var(--fg-1); }
.tab.active {
  background: var(--grad-aurora);
  color: #1A0F2E;
  box-shadow: var(--glow-sm);
}

/* Two-column split */
.split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
}
.split-3-2 { grid-template-columns: 3fr 2fr; }
.split-2-1 { grid-template-columns: 2fr 1fr; }
@media (max-width: 1024px) {
  .split, .split-3-2, .split-2-1 { grid-template-columns: 1fr; }
}

/* Empty state */
.empty {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-xl);
  background: var(--bg-elev);
}
.empty .icon-tile { margin: 0 auto 16px; }

/* Drift animation */
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.drift { animation: drift 4.5s var(--ease-calm) infinite; }
.drift-2 { animation: drift 5.5s var(--ease-calm) infinite; animation-delay: -1.5s; }
.drift-3 { animation: drift 6.5s var(--ease-calm) infinite; animation-delay: -3s; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 16px rgba(140, 100, 255, 0.4); }
  50%      { box-shadow: 0 0 32px rgba(140, 100, 255, 0.7); }
}
.pulse { animation: pulse-glow 3s var(--ease-calm) infinite; }

/* Toast */
#toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 22px;
  background: var(--bg-elev);
  border: 1px dashed var(--stroke-dashed);
  border-radius: var(--r-pill);
  backdrop-filter: blur(14px);
  color: var(--fg-1);
  font-size: 13px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.4s var(--ease-calm);
  pointer-events: none;
  box-shadow: var(--shadow-pop), var(--glow-sm);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Responsive */
@media (max-width: 880px) {
  .sidebar { display: none; }
  .main { padding: 24px 18px 80px; }
  .topbar { padding: 12px 18px; }
}

/* Helpers */
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.muted { color: var(--fg-4); }
.faint { color: var(--fg-5); }
.aurora-text {
  background: var(--grad-aurora);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
}
.kbd {
  display: inline-block;
  padding: 2px 7px;
  border: 1px solid var(--stroke-solid);
  border-radius: 6px;
  background: rgba(0,0,0,0.35);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
}

/* Field group */
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--fg-4);
}
.field-help { font-size: 11px; color: var(--fg-5); }

/* Token cost label */
.cost {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 138, 107, 0.15);
  border: 1px solid rgba(255, 138, 107, 0.4);
  color: var(--accent-peach);
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em;
}
.cost::before { content: '◇'; }
