/* ============================================================
   ACE Execution Vault — Portal Styles
   Premium dark theme: Linear / Stripe / Palantir aesthetic
   ============================================================ */

/* --- Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=DM+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@300;400;500&display=swap');

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-primary: #08080A;
  --bg-secondary: #06060A;
  --bg-tertiary: #141418;
  --bg-card: #0F0F13;
  --bg-hover: #1C1C22;
  --bg-active: #22222A;
  --border: #1E1E26;
  --border-light: #2A2A34;
  --gold: #C8A55C;
  --gold-dim: rgba(200,165,92,0.15);
  --gold-hover: #D4B36A;
  --gold-glow: rgba(200,165,92,0.25);
  --gold-gradient: linear-gradient(135deg, #C8A55C 0%, #E8D5A3 50%, #C8A55C 100%);
  --gold-gradient-subtle: linear-gradient(135deg, #C8A55C 0%, #D4B36A 100%);
  --text-primary: #F0F0F2;
  --text-secondary: #9898A6;
  --text-tertiary: #6A6A78;
  --text-muted: #4A4A58;
  --success: #34D399;
  --warning: #FBBF24;
  --error: #F87171;
  --info: #60A5FA;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --sidebar-width: 260px;
  --topbar-height: 56px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition: 160ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-body); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; min-height: 100vh; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul, ol { list-style: none; }
img { display: block; max-width: 100%; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes staggerFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes checkPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.25); }
  60% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

@keyframes checkGlow {
  0% { box-shadow: 0 0 0 0 rgba(200,165,92,0.5); }
  50% { box-shadow: 0 0 12px 4px rgba(200,165,92,0.3); }
  100% { box-shadow: 0 0 0 0 rgba(200,165,92,0); }
}

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

@keyframes progressFill {
  from { width: 0; }
}

@keyframes ringFill {
  from { stroke-dashoffset: 283; }
}

@keyframes tabContentIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spotlightPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--bg-primary);
  position: relative;
}

.login-page::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 30%, rgba(200,165,92,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 30% 70%, rgba(200,165,92,0.02) 0%, transparent 70%);
  pointer-events: none;
}

.login-container {
  width: 100%;
  max-width: 400px;
  position: relative;
  z-index: 1;
}

.login-brand {
  text-align: center;
  margin-bottom: 40px;
}

.login-brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.login-brand-logo svg { flex-shrink: 0; }

.login-brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.login-brand-sub {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-tertiary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-card {
  background: rgba(14,14,17,0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  padding: 32px;
}

.login-card h2 {
  font-family: var(--font-body);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.login-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-tertiary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim), 0 0 20px rgba(200,165,92,0.08);
}

.form-group input::placeholder {
  color: var(--text-muted);
}

.login-error {
  display: none;
  padding: 10px 14px;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.2);
  border-radius: var(--radius-md);
  color: var(--error);
  font-size: 0.82rem;
  margin-bottom: 16px;
}

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

.btn-primary {
  width: 100%;
  padding: 11px 20px;
  background: var(--gold);
  color: #08080A;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-md);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  letter-spacing: 0.01em;
}

.btn-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(200,165,92,0.25);
}
.btn-primary:active { transform: scale(0.985); }

.login-footer {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

.login-footer a {
  font-size: 0.82rem;
  color: var(--text-tertiary);
  transition: color var(--transition);
}

.login-footer a:hover { color: var(--gold); }

.login-bottom {
  text-align: center;
  margin-top: 24px;
}

.login-bottom a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.login-bottom a:hover { color: var(--text-secondary); }

/* ============================================================
   APP LAYOUT — Sidebar + Content
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* --- Topbar --- */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: var(--topbar-height);
  background: rgba(8,8,10,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-logo-text {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

.topbar-breadcrumb span { color: var(--text-muted); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-member {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.topbar-member strong {
  color: var(--text-primary);
  font-weight: 500;
}

.btn-logout {
  padding: 6px 14px;
  font-size: 0.78rem;
  font-family: var(--font-mono);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.btn-logout:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}

.hamburger:hover { background: var(--bg-hover); }
.hamburger svg { color: var(--text-secondary); }

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  overflow: hidden;
}

.sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-header-logo {
  width: 28px;
  height: 28px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-header-text h1 {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
}

.sidebar-header-text span {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.sidebar-section {
  padding: 0 10px;
  margin-bottom: 4px;
}

.sidebar-section-label {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 12px 10px 6px;
}

/* Sidebar link — gold left-border slide-in on hover */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  user-select: none;
  position: relative;
  border-left: 0px solid transparent;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 60%;
  border-radius: 0 2px 2px 0;
  background: var(--gold-gradient-subtle);
  transition: width 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sidebar-link:hover::before {
  width: 3px;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  padding-left: 14px;
}

.sidebar-link.active {
  background: var(--bg-active);
  color: var(--text-primary);
  padding-left: 14px;
}

.sidebar-link.active::before {
  width: 3px;
  background: var(--gold-gradient);
}

.sidebar-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
  transition: opacity var(--transition);
}

.sidebar-link.active svg { opacity: 1; color: var(--gold); }
.sidebar-link:hover svg { opacity: 0.9; }

.sidebar-link .link-text { flex: 1; }

.sidebar-link .badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 9999px;
  background: var(--gold-dim);
  color: var(--gold);
}

/* Tier groups — smooth expand/collapse */
.tier-group { margin-bottom: 2px; }

.tier-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition);
  position: relative;
}

.tier-header:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.tier-header svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.6;
}

.tier-header .tier-label {
  flex: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.tier-header .tier-count {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-muted);
}

.tier-header .chevron {
  width: 14px;
  height: 14px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
  color: var(--text-muted);
}

.tier-group.expanded .tier-header .chevron {
  transform: rotate(90deg);
}

.tier-children {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  padding-left: 18px;
  transition: max-height 350ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 250ms ease,
              padding 250ms ease;
}

.tier-group.expanded .tier-children {
  max-height: 500px;
  opacity: 1;
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Framework items in sidebar — hover states */
.tier-child-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--text-tertiary);
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  letter-spacing: 0.01em;
}

.tier-child-link:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-secondary);
  padding-left: 14px;
}

.tier-child-link:hover::before {
  background: var(--gold) !important;
}

.tier-child-link.active {
  background: var(--bg-active);
  color: var(--text-primary);
}

.tier-child-link::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: background var(--transition);
}

.tier-child-link.active::before { background: var(--gold); }

.sidebar-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-footer-member {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
}

.member-info {
  flex: 1;
  min-width: 0;
}

.member-info-name {
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-info-role {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-tertiary);
  letter-spacing: 0.06em;
}

/* --- Main Content --- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding-top: var(--topbar-height);
  min-height: 100vh;
  position: relative;
}

.content-area {
  padding: 32px 36px;
  max-width: 960px;
}

/* --- Dashboard --- */
.welcome-section { margin-bottom: 32px; }

.welcome-section h2 {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  text-shadow: 0 0 40px rgba(200,165,92,0.08);
  letter-spacing: -0.01em;
}

.welcome-section p {
  color: var(--text-secondary);
  font-size: 0.88rem;
}

/* Eyebrow section labels */
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

/* --- Stats Row with spotlight glow --- */
.stats-section {
  position: relative;
  margin-bottom: 28px;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse at center, rgba(200,165,92,0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: spotlightPulse 6s ease-in-out infinite;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
}

/* Glassmorphism stat cards */
.stat-card {
  background: rgba(15,15,19,0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 300ms ease;
}

.stat-card:hover {
  border-color: rgba(255,255,255,0.1);
  transform: scale(1.01);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.04);
}

.stat-card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* Gold gradient stat numbers */
.stat-card-value {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-value.gold {
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card-value a {
  font-size: 0.85rem;
  color: var(--gold);
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--transition);
  -webkit-text-fill-color: var(--gold);
}

.stat-card-value a:hover { opacity: 0.8; }

/* --- Progress Ring --- */
.progress-ring-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 8px;
  position: relative;
  z-index: 1;
}

.progress-ring-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.04);
  stroke-width: 6;
}

.progress-ring-fill {
  fill: none;
  stroke: url(#goldGradientRing);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(200,165,92,0.3));
}

.progress-ring-text {
  position: absolute;
  text-align: center;
}

.progress-ring-pct {
  font-size: 1.6rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
}

.progress-ring-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: block;
  margin-top: 4px;
}

/* Section Cards — elevated layer */
.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  transition: border-color var(--transition),
              transform 300ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.section-card:hover {
  border-color: var(--border-light);
  transform: scale(1.005);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.section-card-action {
  font-size: 0.78rem;
  color: var(--gold);
  transition: opacity var(--transition);
}

.section-card-action:hover { opacity: 0.8; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 24px 0;
}

.empty-state svg {
  margin: 0 auto 12px;
  color: var(--text-muted);
}

.empty-state p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

/* Buttons — lift on hover */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200,165,92,0.12);
}

/* Recently Added */
.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.recent-item:last-child { border-bottom: none; }

.recent-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.recent-item-icon svg { color: var(--gold); width: 18px; height: 18px; }

.recent-item-info { flex: 1; }

.recent-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.recent-item-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.recent-item-action {
  font-size: 0.78rem;
  color: var(--gold);
  opacity: 0;
  transition: opacity var(--transition);
}

.recent-item:hover .recent-item-action { opacity: 1; }

/* Quick Links — gold glow on hover */
.quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: all 300ms cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}

.quick-link:hover {
  border-color: var(--gold);
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 24px rgba(200,165,92,0.08), 0 8px 24px rgba(0,0,0,0.2);
}

.quick-link svg { color: var(--gold); }

.quick-link-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.quick-link-desc {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}

/* ============================================================
   FRAMEWORK PAGE
   ============================================================ */
.framework-header {
  margin-bottom: 28px;
}

.framework-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--gold-dim);
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.framework-header h1 {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.framework-header .tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Tabs — content fade-in from below */
.tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-tertiary);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  margin-bottom: -1px;
}

.tab-btn:hover { color: var(--text-secondary); }

.tab-btn.active {
  color: var(--text-primary);
  border-bottom-color: var(--gold);
}

.tab-content { display: none; }
.tab-content.active {
  display: block;
  animation: tabContentIn 350ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Overview */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

.overview-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.install-list {
  margin-bottom: 24px;
}

.install-list h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.install-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.install-list li svg {
  width: 16px;
  height: 16px;
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}

.overview-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: fit-content;
}

.overview-sidebar-card h4 {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.meta-row:last-child { border-bottom: none; }
.meta-row .meta-label { color: var(--text-tertiary); }
.meta-row .meta-value { font-weight: 500; }

/* AI Callout */
.ai-callout {
  background: rgba(251,191,36,0.05);
  border: 1px solid rgba(251,191,36,0.15);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-top: 24px;
}

.ai-callout-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.ai-callout-header svg { color: var(--warning); }

.ai-callout-header span {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--warning);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ai-callout p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* PDF Tab */
.pdf-section {
  text-align: center;
  padding: 40px 0;
}

.pdf-section svg { margin: 0 auto 16px; color: var(--text-muted); }

.pdf-section p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--gold);
  color: #08080A;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: var(--radius-md);
  transition: all 250ms cubic-bezier(0.22, 1, 0.36, 1);
}

.btn-gold:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(200,165,92,0.25);
}

/* Checklist */
.checklist { margin-top: 4px; }

.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  transition: background var(--transition);
  cursor: pointer;
}

.checklist-item:hover { background: var(--bg-hover); }

/* Checkbox — gold checkmark pop animation */
.checklist-item input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 1px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
}

.checklist-item input[type="checkbox"]:checked {
  background: var(--gold);
  border-color: var(--gold);
  animation: checkPop 350ms cubic-bezier(0.22, 1, 0.36, 1), checkGlow 600ms ease-out;
}

.checklist-item input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 8px;
  border: 2px solid #08080A;
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.checklist-item span {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.checklist-item.completed span {
  text-decoration: line-through;
  color: var(--text-muted);
}

/* Progress bars — gold gradient with smooth fill */
.checklist-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.checklist-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}

.checklist-progress-fill {
  height: 100%;
  background: var(--gold-gradient-subtle);
  border-radius: 2px;
  transition: width 600ms cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 0 8px rgba(200,165,92,0.3);
}

.checklist-progress-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Templates Tab */
.template-list { margin-top: 4px; }

.template-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  transition: all var(--transition);
}

.template-item:hover {
  border-color: var(--border-light);
  background: var(--bg-hover);
}

.template-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--gold-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.template-item-icon svg { color: var(--gold); width: 18px; height: 18px; }

.template-item-info { flex: 1; }

.template-item-name {
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.template-item-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-muted);
}

.template-item-dl {
  font-size: 0.78rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   STAGGER-LOAD ANIMATION CLASSES
   ============================================================ */
.stagger-section {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 500ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}

.stagger-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    transform: translateX(-100%);
    width: 280px;
    transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 500;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 400;
  }

  .sidebar-overlay.visible { display: block; }

  .topbar { left: 0; }

  .hamburger { display: flex; }

  .main-content { margin-left: 0; }

  .content-area { padding: 24px 18px; }

  .stats-row { grid-template-columns: 1fr; }

  .quick-links { grid-template-columns: 1fr; }

  .overview-grid { grid-template-columns: 1fr; }

  .topbar-logo { display: none; }

  .topbar-member { display: none; }

  .stat-card-value { font-size: 2rem; }

  .progress-ring-container { padding: 16px 0 4px; }
}

@media (max-width: 480px) {
  .tab-bar { overflow-x: auto; flex-wrap: nowrap; }
  .tab-btn { white-space: nowrap; padding: 10px 12px; font-size: 0.78rem; }
  .welcome-section h2 { font-size: 1.4rem; }
}

/* --- Utility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

.fade-in {
  animation: fadeIn 400ms ease forwards;
}
