/* === SAM · App layout & screens === */

/* Top nav */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
  box-shadow: 0 1px 0 rgba(15,40,71,0.03);
}
.topnav-brand { display: flex; align-items: center; gap: 12px; }
.topnav-brand-text {
  display: flex; flex-direction: column;
  font-family: var(--font-display);
  line-height: 1.1;
}
.topnav-brand-text .brand-title { font-weight: 700; color: var(--ink); font-size: 15px; letter-spacing: -0.02em; }
.topnav-brand-text .brand-sub { font-size: 10.5px; color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; }
.topnav-brand-text .brand-sub .by { color: var(--azur); font-weight: 600; }

.topnav-center { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 14px;
  font-size: 13px; font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-md);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
  cursor: pointer;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { color: var(--azur); background: var(--azur-pale); }
.nav-link .icon { width: 15px; height: 15px; }
.nav-link .nav-count {
  background: var(--ink); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 999px;
  min-width: 18px; text-align: center;
}
.nav-link.active .nav-count { background: var(--azur); }

.topnav-actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  position: relative;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn .dot-notif {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid var(--surface);
  box-sizing: content-box;
}

/* Page container */
.page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 32px 80px;
}
.page-wide { max-width: 1600px; }

/* Hero recommendation */
.hero {
  position: relative;
  border-radius: var(--r-xl);
  padding: 32px 36px;
  color: #fff;
  background: linear-gradient(135deg, var(--azur-deep) 0%, var(--azur) 60%, var(--azur-dark) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 28px;
  box-shadow: var(--sh-md);
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% -20%, rgba(212,165,116,0.25) 0%, transparent 45%),
    radial-gradient(circle at 0% 120%, rgba(74,155,209,0.25) 0%, transparent 50%);
  pointer-events: none;
}
.hero::after {
  /* subtle grid pattern */
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 75%);
  pointer-events: none;
}
.hero.hero-warning { background: linear-gradient(135deg, #7A4E16 0%, #A87E4A 60%, #8A5A15 100%); }
.hero.hero-success { background: linear-gradient(135deg, #155A3D 0%, #27AE60 60%, #1E7E3E 100%); }
.hero-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex: none;
  position: relative;
}
.hero-icon .icon { width: 28px; height: 28px; stroke-width: 1.5; }
.hero-body { flex: 1; position: relative; min-width: 0; }
.hero-eyebrow {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before { content: ''; width: 24px; height: 1px; background: var(--gold-light); }
.hero-title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.hero-hint {
  font-size: 13.5px;
  color: rgba(255,255,255,0.78);
  line-height: 1.55;
  max-width: 640px;
}
.hero-action { position: relative; flex: none; }

/* Page header */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 24px; }
.page-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.page-sub { color: var(--text-3); font-size: 13.5px; }
.page-section-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.015em;
}

/* Stat pills bar */
.stats-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 20px 0 28px; }

/* Project card */
.project-card {
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.project-card .milestone-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-2);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}
.project-card .milestone-row .icon { color: var(--gold-dark); }
.project-card .milestone-row strong { color: var(--ink); font-weight: 500; }
.project-card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.project-card .chips-row { display: flex; gap: 6px; flex-wrap: wrap; }
.project-card .progress-section { display: flex; flex-direction: column; gap: 6px; }
.project-card .progress-label {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--text-3);
  font-weight: 500;
}
.project-card .progress-label span:last-child { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.project-card .footer-row {
  display: flex; align-items: center; gap: 16px;
  font-size: 12px; color: var(--text-3);
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  margin-top: auto;
}
.project-card .footer-row .meta { display: flex; align-items: center; gap: 6px; }

/* FAB */
.fab-sam {
  position: fixed;
  bottom: 24px; right: 24px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 8px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--sh-lg);
  cursor: pointer;
  z-index: 900;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  font-size: 13px;
  font-weight: 500;
}
.fab-sam:hover { transform: translateY(-2px); box-shadow: var(--sh-xl); }
.fab-sam .avatar { width: 36px; height: 36px; font-size: 11px; }

/* Chat panel */
.chat-panel {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 380px; height: 520px;
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 900;
  animation: chatIn 260ms var(--ease);
}
@keyframes chatIn { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.chat-header {
  background: linear-gradient(135deg, var(--azur-deep), var(--azur));
  color: #fff;
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.chat-header .title { font-family: var(--font-display); font-weight: 700; font-size: 15px; }
.chat-header .sub { font-size: 11px; color: rgba(255,255,255,0.8); display: flex; align-items: center; gap: 6px; }
.chat-header .sub .online { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 2px rgba(74,222,128,0.25); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); }
.msg { max-width: 82%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.msg-sam { background: #fff; border-left: 3px solid var(--azur); color: var(--text); align-self: flex-start; border-top-left-radius: 4px; box-shadow: var(--sh-sm); }
.msg-user { background: var(--azur); color: #fff; align-self: flex-end; border-top-right-radius: 4px; }
.chat-input { padding: 12px; border-top: 1px solid var(--border-soft); display: flex; gap: 8px; background: #fff; }
.chat-input input { flex: 1; border: 1px solid var(--border-strong); border-radius: var(--r-pill); padding: 0 14px; height: 36px; font-size: 13px; outline: none; }
.chat-input input:focus { border-color: var(--azur); }

/* Project layout */
.project-layout { display: grid; grid-template-columns: 260px 1fr; gap: 0; }
.project-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 20px 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}
.project-sidebar .sb-section { padding: 16px 0 8px; }
.project-sidebar .sb-section-title {
  padding: 0 20px 8px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 8px 17px;
  font-size: 13px;
  color: var(--text-2);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
  position: relative;
}
.sb-item:hover { background: var(--surface-2); color: var(--text); }
.sb-item.active { background: var(--azur-pale); color: var(--azur-dark); border-left-color: var(--azur); font-weight: 500; }
.sb-item .icon { width: 15px; height: 15px; color: var(--text-3); }
.sb-item.active .icon { color: var(--azur); }
.sb-item .sb-num { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); font-weight: 500; margin-right: 2px; }
.project-sidebar .sb-section-title .sb-num {
  font-family: var(--font-mono);
  color: var(--gold-dark);
  font-weight: 500;
  margin-right: 6px;
  letter-spacing: 0;
}
.sb-item .sb-count { margin-left: auto; font-size: 10.5px; color: var(--text-3); font-weight: 500; }
.sb-item.has-alert::after {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  margin-left: auto;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(192,57,43,0.4); } 50% { box-shadow: 0 0 0 6px rgba(192,57,43,0); } }
.sb-children { padding-left: 0; }
.sb-children .sb-item { padding-left: 40px; font-size: 12.5px; }

.project-content { padding: 28px 32px 80px; max-width: 1200px; overflow: hidden; }

/* Project header */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-3); cursor: pointer; }
.breadcrumb a:hover { color: var(--azur); }
.breadcrumb .sep { color: var(--border-strong); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

.proj-header { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px; }
.proj-header-main { flex: 1; min-width: 0; }
.proj-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}
.proj-header .meta-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--text-3); font-size: 12.5px; }

/* Phases timeline */
.phases {
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 24px 0 8px;
  position: relative;
  overflow-x: auto;
}
.phase {
  flex: 1;
  min-width: 110px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  text-align: center;
}
.phase::before {
  content: '';
  position: absolute;
  top: 19px; left: 50%;
  width: 100%;
  height: 2px;
  background: var(--border-strong);
  z-index: 0;
}
.phase:last-child::before { display: none; }
.phase.done::before, .phase.current::before { background: var(--azur); }
.phase-circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  color: var(--text-3);
  position: relative;
  z-index: 1;
  transition: all var(--dur) var(--ease);
}
.phase.done .phase-circle {
  background: var(--success); border-color: var(--success); color: #fff;
}
.phase.current .phase-circle {
  background: var(--azur); border-color: var(--azur); color: #fff;
  box-shadow: 0 0 0 4px rgba(31,120,180,0.18);
}
.phase-label { margin-top: 10px; font-size: 12px; font-weight: 500; color: var(--text); line-height: 1.3; }
.phase-frac { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.phase.done .phase-frac { color: var(--success); }
.phase.current .phase-frac { color: var(--azur); font-weight: 600; }

/* Config tiles */
.config-accordion {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: 20px;
}
.config-head {
  padding: 16px 20px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer;
}
.config-head:hover { background: var(--surface-2); }
.config-head .icon-chev,
.config-head .icon { transition: transform var(--dur) var(--ease); color: var(--text-3); }
.config-accordion.open .config-head .icon-chev,
details.config-accordion[open] > .config-head .icon-chev,
details.config-accordion[open] > .config-head > .icon { transform: rotate(90deg); }
details.config-accordion > summary { list-style: none; }
details.config-accordion > summary::-webkit-details-marker { display: none; }
.config-head-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.config-body {
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.config-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.config-tile-icon {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.config-tile-body { min-width: 0; }
.config-tile-label { font-size: 11px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
.config-tile-value { font-size: 13px; color: var(--text); font-weight: 500; margin-top: 1px; }

/* Phase block */
.phase-block {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  margin-bottom: 16px;
  overflow: hidden;
}
.phase-block-head {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-soft);
}
.phase-block-num {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--azur-pale); color: var(--azur-dark);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  flex: none;
}
.phase-block.done .phase-block-num { background: var(--success-soft); color: #1E7E3E; }
.phase-block-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; color: var(--ink); }
.phase-block-desc { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
.phase-block-pct {
  margin-left: auto;
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
}
.phase-block-pct .pct { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.phase-block-pct .frac { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

.analysis-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--border-soft);
  transition: background var(--dur-fast) var(--ease);
}
.analysis-row:last-child { border-bottom: none; }
.analysis-row:hover { background: var(--surface-2); }
.analysis-icon {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.analysis-icon.done { background: var(--success-soft); color: var(--success); }
.analysis-icon.todo { background: var(--azur-pale); color: var(--azur); }
.analysis-icon.blocked { background: var(--warning-soft); color: var(--warning); }
.analysis-label { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.analysis-label .name { font-size: 13.5px; color: var(--text); font-weight: 500; }
.analysis-label .inline-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.analysis-actions { display: flex; gap: 8px; align-items: center; }

/* Dropdown menu */
.menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  padding: 6px;
  min-width: 280px;
  z-index: 500;
  animation: menuIn 180ms var(--ease);
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.menu-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; }
.menu-item:hover { background: var(--surface-2); }
.menu-title { font-size: 13px; color: var(--text); font-weight: 500; }
.menu-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.menu-head { padding: 10px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-3); font-weight: 600; display: flex; justify-content: space-between; align-items: center; }

/* Login */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  padding: 40px 20px;
  background: linear-gradient(135deg, var(--azur-deep) 0%, var(--ink) 60%, #091A31 100%);
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(212,165,116,0.12) 0%, transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(74,155,209,0.18) 0%, transparent 45%);
  pointer-events: none;
}
.login-page::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.login-card {
  width: 440px; max-width: 100%;
  background: #fff;
  border-radius: var(--r-xl);
  padding: 40px;
  box-shadow: 0 40px 100px -20px rgba(0,0,0,0.6);
  position: relative;
  z-index: 1;
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; margin: 20px 0 6px; }
.login-header p { font-size: 13px; color: var(--text-3); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.login-footer-inline { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin: 8px 0 20px; }
.login-footer-inline a { color: var(--azur); font-weight: 500; cursor: pointer; }
.login-checkbox { display: flex; align-items: center; gap: 8px; color: var(--text-2); }

/* Profile */
.profile-layout { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: flex-start; }
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--sh-sm);
  position: sticky;
  top: 88px;
}
.profile-card .avatar { margin: 0 auto 16px; border: 3px solid var(--gold); }
.profile-card h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.profile-card .org { color: var(--text-3); font-size: 13px; margin-bottom: 16px; }
.profile-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  margin-top: 20px;
  overflow: hidden;
}
.profile-stat { background: #fff; padding: 14px 8px; }
.profile-stat .num { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); }
.profile-stat .lbl { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; margin-top: 2px; }

.tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--azur); border-color: var(--azur); }

/* Tweaks panel */
.tweaks-panel {
  position: fixed;
  bottom: 24px; left: 24px;
  width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-xl);
  z-index: 950;
  overflow: hidden;
  font-size: 13px;
}
.tweaks-head {
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
}
.tweaks-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 14px; }
.tweak-group { display: flex; flex-direction: column; gap: 6px; }
.tweak-group label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.tweak-seg { display: flex; background: var(--surface-2); border-radius: var(--r-md); padding: 2px; }
.tweak-seg button { flex: 1; padding: 6px 8px; font-size: 11.5px; font-weight: 500; color: var(--text-2); border-radius: calc(var(--r-md) - 2px); transition: all var(--dur-fast); }
.tweak-seg button.active { background: #fff; color: var(--azur); box-shadow: var(--sh-sm); }

/* Variants of page bg via tweak */
body.density-compact { font-size: 13px; }
body.density-compact .page { padding: 24px 28px 80px; }
body.density-compact .kpi-value { font-size: 30px; }
body.density-aery .page { padding: 48px 40px 80px; }
body.density-aery .kpi { padding: 28px; }

body.bg-ivoire { background: var(--ivory); }
body.bg-ivoire { --page: var(--ivory); }
body.bg-white { background: #fff; --page: #fff; }
body.bg-warm { background: #F5F2EC; --page: #F5F2EC; }

/* Fade animation for page changes */
.page-fade {
  animation: fadeUp 280ms var(--ease);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
