:root {
  --bs-primary: #4f46e5;
  --bs-primary-rgb: 79, 70, 229;
  --athenas-bg: #f6f7fb;
  --athenas-border: #e8e9f3;
  --athenas-ink: #1f2333;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--athenas-bg);
  color: var(--athenas-ink);
}

a { color: var(--bs-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: #4338ca;
  --bs-btn-hover-border-color: #4338ca;
  --bs-btn-active-bg: #3730a3;
}
.text-primary { color: var(--bs-primary) !important; }

/* ---------- Layout shell ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-content { flex: 1; }

.app-navbar {
  background: #fff;
  border-bottom: 1px solid var(--athenas-border);
  min-height: 62px;
}
.brand-mark {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--bs-primary); color: #fff; font-weight: 700;
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  width: 240px; flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--athenas-border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; padding: 4px 8px 18px;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  color: #4b5063; font-weight: 500;
}
.sidebar-link:hover { background: #f1f2f9; text-decoration: none; }
.sidebar-link.active { background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary); }
.sidebar-footer { margin-top: auto; padding: 12px 8px 0; }

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

/* ---------- Cards ---------- */
.card-soft {
  border: 1px solid var(--athenas-border);
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.card-soft .card-body { padding: 1.25rem 1.35rem; }

.step-badge, .stat-icon {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary);
  font-weight: 700; font-size: 1.1rem;
}

/* ---------- Auth ---------- */
.auth-wrapper { max-width: 440px; margin: 3vh auto; }
.auth-card { border-radius: 16px; }

/* ---------- Hero ---------- */
.hero .badge { font-weight: 500; }

/* ---------- Stat cards ---------- */
.stat-card .stat-label { color: #6b7280; font-size: .85rem; margin-top: 10px; }
.stat-card .stat-value { font-weight: 600; font-size: 1.05rem; }

/* ---------- Strategy view ---------- */
.strategy-section { margin-top: 2rem; }
.strategy-heading { font-size: 1.15rem; font-weight: 700; margin-bottom: .9rem; }
.strategy-section ul { padding-left: 1.1rem; }
.strategy-section li { margin-bottom: .3rem; }
.campaign-dl dt { color: #6b7280; font-weight: 600; margin-top: .5rem; }
.campaign-dl dd { margin-bottom: 0; }

/* ---------- Loading ---------- */
.loading-wrapper { max-width: 480px; margin: 6vh auto; }
.loading-steps { list-style: none; padding: 0; text-align: left; max-width: 320px; margin: 0 auto; }
.loading-steps li {
  padding: 8px 0 8px 28px; position: relative; color: #9aa0b4;
  transition: color .3s;
}
.loading-steps li::before {
  content: "○"; position: absolute; left: 0; top: 8px;
}
.loading-steps li.is-active { color: var(--athenas-ink); font-weight: 500; }
.loading-steps li.is-done { color: #16a34a; }
.loading-steps li.is-done::before { content: "✓"; }

.spinner-orbit {
  width: 56px; height: 56px; margin: 0 auto; position: relative;
}
.spinner-orbit div {
  position: absolute; inset: 0; border: 3px solid transparent;
  border-top-color: var(--bs-primary); border-radius: 50%;
  animation: orbit 1.2s linear infinite;
}
.spinner-orbit div:nth-child(2) { inset: 8px; animation-duration: 1.6s; opacity: .6; }
.spinner-orbit div:nth-child(3) { inset: 16px; animation-duration: 2s; opacity: .4; }
@keyframes orbit { to { transform: rotate(360deg); } }

.flash-stack { margin-bottom: 1rem; }
