/* Asolytics Citadel — Asolytics DS tokens
   bg #0B1230 · card #0F1A45 · brand #5D66FE · brand-dark #2D54DF · brand-soft #CED1FF
   text #A3B0C5 · muted #838E9E · subtle #606E82 · success #6DD690 · danger #EC5C3E */

:root {
  --bg: #0B1230;
  --card: #0F1A45;
  --brand: #5D66FE;
  --brand-dark: #2D54DF;
  --brand-soft: #CED1FF;
  --text: #A3B0C5;
  --muted: #838E9E;
  --subtle: #606E82;
  --success: #6DD690;
  --danger: #EC5C3E;
  --white: #FFFFFF;
  --hairline: rgba(206, 209, 255, 0.08);
  --line: rgba(206, 209, 255, 0.10);
  --line-strong: rgba(206, 209, 255, 0.35);
  --mono: ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: 'Open Sans', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.root { min-height: 100vh; }

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

a { text-decoration: none; }

/* ===== LOGIN ===== */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  position: relative;
  overflow: hidden;
}

.login-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(206, 209, 255, 0.12) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.login-blob {
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 999px;
  background: var(--brand);
  opacity: 0.10;
  top: -300px;
  right: -200px;
  pointer-events: none;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.brand-login {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--brand);
  display: grid;
  place-items: center;
  flex: none;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  display: block;
}

.login-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h-hero {
  margin: 0;
  font-size: 44px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.login-lede {
  margin: 0;
  font-size: 16px;
  color: var(--text);
  line-height: 1.5;
}

.login-action {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--white);
  color: #242830;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

.btn-google:hover {
  background: #F4F8FE;
  transform: translateY(-1px);
}

.login-denied {
  margin: 0;
  font-size: 13px;
  color: var(--danger);
}

.login-note {
  margin: 0;
  font-size: 12px;
  color: var(--subtle);
}

/* ===== APP HEADER ===== */

.app-header {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(11, 18, 48, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 28px;
  min-width: 0;
}

.brand-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: var(--white);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex: none;
}

.brand-mark-sm {
  width: 26px;
  height: 26px;
  border-radius: 8px;
}

.brand-dot-sm {
  width: 8px;
  height: 8px;
}

.crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--subtle);
  min-width: 0;
}

.crumb-link {
  color: var(--muted);
  transition: color 120ms ease;
}

.crumb-link:hover { color: var(--brand-soft); }

.crumb-current {
  color: var(--white);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-email {
  font-size: 13px;
  color: var(--muted);
  max-width: 40vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avatar-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  border: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  flex: none;
  transition: background 120ms ease;
}

.avatar-btn:hover { background: var(--brand-dark); }

/* ===== DASHBOARD ===== */

.dash {
  max-width: 1240px;
  margin: 0 auto;
  padding: 56px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.dash-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
}

.dash-title-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--brand);
}

.dash-count {
  font-size: 14px;
  color: var(--muted);
}

.count-running { color: var(--success); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 440px));
  gap: 24px;
  justify-content: center;
}

.card {
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  border: 1px solid var(--line);
  transition: transform 160ms ease, border-color 160ms ease;
  display: flex;
  flex-direction: column;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  outline: none;
}

.card-ill {
  width: 100%;
  display: block;
}

.card-meta {
  padding: 22px 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.tag {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(206, 209, 255, 0.14);
  color: var(--brand-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pill-running {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--success);
  font-weight: 600;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--success);
  display: inline-block;
  flex: none;
}

.card-body {
  padding: 12px 28px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.card-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.card-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
  text-wrap: pretty;
}

.dash-empty {
  margin: 0;
  text-align: center;
  font-size: 15px;
  color: var(--muted);
}

/* ===== PROJECT PAGE ===== */

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hairline);
}

.hero-ill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.9;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 18, 48, 0.80);
}

.hero-inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 96px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-title {
  margin: 0;
  font-size: 56px;
  font-weight: 700;
  color: var(--white);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-desc {
  margin: 0;
  max-width: 640px;
  font-size: 18px;
  color: var(--brand-soft);
  line-height: 1.5;
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  gap: 12px;
  padding-top: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: var(--white);
}

.btn-ghost {
  height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(206, 209, 255, 0.25);
  border-radius: 12px;
  background: transparent;
  color: var(--white);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease;
}

.btn-ghost:hover { background: rgba(206, 209, 255, 0.10); }

.detail {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 40px 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.meta-cell {
  background: var(--bg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.meta-label {
  font-size: 11px;
  color: var(--subtle);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.meta-value {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--white);
}

.meta-value.break { word-break: break-all; }

.caps-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.caps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.cap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid rgba(206, 209, 255, 0.12);
  border-radius: 12px;
  font-size: 15px;
  color: var(--white);
  transition: border-color 120ms ease;
}

.cap:hover { border-color: var(--line-strong); }

.cap-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  flex: none;
  display: inline-block;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 900px) {
  .card-grid { grid-template-columns: minmax(0, 1fr); }
  .app-header { padding: 0 20px; }
  .header-left { gap: 16px; }
  .hero-title { font-size: 40px; }
  .hero-inner { padding: 72px 24px 48px; }
  .dash { padding: 40px 24px 64px; }
  .detail { padding: 40px 24px 64px; }
}

/* ===== Citadel v2: logo image + photo covers ===== */
.brand-login { gap: 18px; }
.brand-logo { width: 72px; height: 76px; object-fit: contain; display: block; }
.brand-logo-sm { width: 36px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 6px; }
.brand-name { font-size: 34px; font-weight: 800; letter-spacing: -0.01em; color: #FFFFFF; }
.brand-sub { font-size: 13px; font-weight: 600; letter-spacing: 0.22em; color: #FCB852; }
.brand-name-sm { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; color: #FFFFFF; }

.card-photo { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #0F1A45; }
.card-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo-tint, .card-photo-scan { position: absolute; inset: 0; }
.card-photo-scan { background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.12) 0 1px, transparent 1px 3px); }
.card-photo-band { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: rgba(15,26,69,0.55); }
.card-logo-box { width: 100%; aspect-ratio: 16 / 9; background: #0F1A45; display: flex; align-items: center; justify-content: center; padding: 24px; box-sizing: border-box; }
.card-logo { max-width: 100%; max-height: 100%; display: block; }

.hero-logo { position: absolute; right: 40px; top: 50%; transform: translateY(-50%); width: min(46%, 620px); pointer-events: none; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 12%; display: block; }
.hero-scan { position: absolute; inset: 0; background-image: repeating-linear-gradient(0deg, rgba(0,0,0,0.14) 0 1px, transparent 1px 3px); }
@media (max-width: 900px) { .brand-name { font-size: 26px; } .hero-logo { right: 20px; width: 50%; } }
