:root {
  --bg: #070709;
  --bg-soft: #0e1014;
  --panel: rgba(18, 20, 27, 0.78);
  --panel-strong: rgba(12, 14, 20, 0.92);
  --panel-border: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.08);
  --text: #f5f1e8;
  --muted: #a8a39a;
  --gold: #d4af37;
  --gold-soft: rgba(212, 175, 55, 0.16);
  --gold-strong: #f2ca49;
  --green: #3dd598;
  --green-soft: rgba(61, 213, 152, 0.16);
  --red: #ff6a5f;
  --red-soft: rgba(255, 106, 95, 0.18);
  --yellow: #ffb649;
  --yellow-soft: rgba(255, 182, 73, 0.18);
  --muted-soft: rgba(255, 255, 255, 0.06);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  --font: "Segoe UI Variable Display", "Bahnschrift", "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(212, 175, 55, 0.14), transparent 30%),
    radial-gradient(circle at bottom left, rgba(97, 63, 255, 0.12), transparent 26%),
    linear-gradient(180deg, #08080a 0%, #050507 100%);
  color: var(--text);
  font-family: var(--font);
}

body {
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 92%);
  pointer-events: none;
}

.site-grid,
.site-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.site-glow {
  background:
    radial-gradient(circle at 20% 15%, rgba(46, 31, 142, 0.24), transparent 34%),
    radial-gradient(circle at 88% 15%, rgba(212, 175, 55, 0.12), transparent 28%),
    radial-gradient(circle at 52% 100%, rgba(212, 175, 55, 0.08), transparent 22%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px 28px;
  backdrop-filter: blur(24px);
  background: rgba(5, 5, 7, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(10, 10, 12, 0.2));
  color: var(--gold-strong);
  font-weight: 800;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-copy small {
  color: var(--muted);
}

.shell-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.shell-nav a,
.ghost-link,
.ghost-button,
.secondary-button,
.primary-button {
  transition: 180ms ease;
}

.shell-nav a,
.ghost-link {
  padding: 11px 16px;
  border-radius: 999px;
  color: var(--muted);
}

.shell-nav a:hover,
.shell-nav a.active,
.ghost-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

.shell-profile {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid var(--panel-border);
  background: rgba(15, 17, 23, 0.8);
}

.profile-copy {
  display: grid;
  gap: 2px;
}

.profile-copy span {
  color: var(--muted);
  font-size: 0.85rem;
}

.shell-main {
  position: relative;
  z-index: 1;
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

.shell-main-auth {
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.flash-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.flash {
  padding: 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--panel-border);
  background: rgba(14, 16, 22, 0.9);
  box-shadow: var(--shadow);
}

.flash-success {
  border-color: rgba(61, 213, 152, 0.25);
  background: rgba(10, 34, 28, 0.85);
}

.flash-error {
  border-color: rgba(255, 106, 95, 0.28);
  background: rgba(45, 17, 16, 0.84);
}

.eyebrow,
.card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, 0.26);
  color: var(--gold-strong);
  background: rgba(212, 175, 55, 0.08);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-intro,
.auth-layout,
.admin-layout,
.detail-grid,
.board-grid,
.projects-list,
.employee-grid,
.metric-grid,
.insight-grid,
.notes-list,
.timeline,
.leader-grid {
  display: grid;
  gap: 22px;
}

.page-intro,
.narrow {
  max-width: 760px;
}

.page-intro h1,
.auth-hero h1,
.hero-copy h1,
.screen-hero h1,
.project-hero h1,
.employee-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(2.4rem, 5vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.page-intro p,
.auth-hero p,
.hero-copy p,
.muted {
  color: var(--muted);
  line-height: 1.7;
}

.auth-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 420px);
  align-items: stretch;
}

.auth-hero,
.auth-card,
.form-panel,
.data-panel,
.admin-card,
.hero-panel,
.board-column,
.project-card,
.employee-card,
.detail-panel,
.note-form,
.summary-panel,
.trend-panel,
.table-card,
.empty-panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(20, 22, 30, 0.92) 0%, rgba(9, 10, 14, 0.92) 100%);
  box-shadow: var(--shadow);
}

.auth-hero,
.auth-card,
.form-panel,
.data-panel,
.admin-card,
.hero-panel,
.board-column,
.project-card,
.employee-card,
.detail-panel,
.summary-panel,
.trend-panel,
.empty-panel {
  padding: 28px;
}

.auth-hero::after,
.auth-card::after,
.hero-panel::after,
.project-card::after,
.board-column::after,
.employee-card::after,
.detail-panel::after,
.summary-panel::after,
.trend-panel::after {
  content: "";
  position: absolute;
  inset: auto -5% -35% auto;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.13), transparent 72%);
  pointer-events: none;
}

.auth-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.auth-points span,
.status-chip,
.flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.92rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.status-chip,
.flag {
  padding: 7px 12px;
  font-size: 0.8rem;
}

.tone-danger {
  color: #ffd3cf;
  border-color: rgba(255, 106, 95, 0.26);
  background: var(--red-soft);
}

.tone-warn {
  color: #ffe5bb;
  border-color: rgba(255, 182, 73, 0.22);
  background: var(--yellow-soft);
}

.tone-good {
  color: #d3ffe8;
  border-color: rgba(61, 213, 152, 0.22);
  background: var(--green-soft);
}

.tone-muted {
  color: var(--muted);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid.two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 0.93rem;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(212, 175, 55, 0.45);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.08);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
}

.primary-button {
  color: #1a1202;
  background: linear-gradient(135deg, var(--gold-strong), var(--gold));
  box-shadow: 0 18px 40px rgba(212, 175, 55, 0.22);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(212, 175, 55, 0.28);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}

.secondary-button:hover,
.ghost-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.ghost-button {
  color: var(--muted);
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}

.section-head,
.project-head,
.employee-head,
.detail-head,
.metric-head,
.summary-head,
.admin-card-head,
.board-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.section-head h2,
.board-head h2,
.project-head h2,
.employee-head h2,
.detail-head h2,
.metric-head h2,
.summary-head h2 {
  margin: 0;
  font-size: 1.25rem;
}

.section-head span,
.board-head span,
.project-head span,
.employee-head span,
.detail-head span,
.metric-head span,
.summary-head span,
.admin-card-head span {
  color: var(--muted);
}

.admin-layout,
.detail-grid {
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  align-items: start;
}

.admin-stack {
  display: grid;
  gap: 18px;
}

.inline-actions,
.inline-form,
.chip-row,
.leader-list,
.metric-strip,
.project-owner,
.project-footer,
.message-filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-form {
  flex: 1 1 340px;
}

.inline-form input {
  flex: 1 1 auto;
}

.spaced {
  justify-content: space-between;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

thead th {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.table-wrap {
  overflow-x: auto;
}

.app-screen {
  min-height: 60vh;
}

#analytics-app {
  display: grid;
  gap: 24px;
  animation: rise 320ms ease;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 420px);
  gap: 26px;
  padding: 34px;
}

.hero-panel.is-dashboard {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 400px);
  padding: 28px;
}

.hero-copy p,
.project-overview p,
.employee-hero p {
  max-width: 62ch;
}

.kpi-strip,
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-card,
.metric-card,
.leader-card,
.board-item,
.timeline-item,
.note-item {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.kpi-card,
.metric-card {
  padding: 18px;
}

.kpi-card strong,
.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.5rem, 2vw, 2.4rem);
  line-height: 1;
}

.kpi-card span,
.metric-card span {
  color: var(--muted);
}

.board-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attention-list,
.project-rows {
  display: grid;
  gap: 16px;
}

.board-column {
  padding: 22px;
}

.board-list,
.projects-list,
.employee-grid,
.notes-list,
.timeline {
  display: grid;
  gap: 16px;
}

.board-item {
  padding: 16px;
}

.board-item strong,
.project-card h2,
.employee-card h2,
.note-item strong,
.timeline-item strong {
  margin: 0 0 6px;
}

.board-item p,
.project-summary,
.timeline-item p,
.note-item p,
.employee-card p,
.promise-card p {
  color: var(--muted);
  line-height: 1.65;
}

.projects-toolbar,
.leader-grid {
  display: grid;
  gap: 18px;
}

.leader-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.project-card.is-danger {
  border-color: rgba(255, 106, 95, 0.18);
}

.project-card.is-warn {
  border-color: rgba(255, 182, 73, 0.18);
}

.project-card.is-good {
  border-color: rgba(61, 213, 152, 0.16);
}

.project-head h2,
.employee-head h2 {
  font-size: 1.42rem;
}

.project-owner {
  color: var(--muted);
  font-size: 0.95rem;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-tile {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.metric-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.metric-tile strong {
  display: block;
  margin-top: 8px;
  font-size: 1.22rem;
}

.project-footer {
  align-items: center;
  justify-content: space-between;
}

.attention-card,
.project-row {
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  padding: 20px 22px;
}

.attention-card.is-danger,
.project-row.is-danger {
  border-color: rgba(255, 106, 95, 0.2);
}

.attention-card.is-warn,
.project-row.is-warn {
  border-color: rgba(255, 182, 73, 0.2);
}

.attention-card.is-good,
.project-row.is-good {
  border-color: rgba(61, 213, 152, 0.18);
}

.attention-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.attention-issue,
.project-row-issue {
  margin: 10px 0 0;
  color: var(--text);
  line-height: 1.6;
}

.compact-metrics {
  margin-top: 16px;
}

.project-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(420px, 0.95fr) auto;
  gap: 18px;
  align-items: center;
}

.project-row-main,
.project-row-side {
  display: grid;
  gap: 10px;
}

.project-row-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.mini-meta {
  display: grid;
  gap: 4px;
}

.mini-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.mini-meta strong {
  font-size: 1rem;
}

.sparkline-wrap {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.sparkline-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.84rem;
}

.sparkline {
  width: 100%;
  height: 58px;
  display: block;
}

.sparkline polyline {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline.is-gold polyline {
  stroke: var(--gold-strong);
}

.sparkline.is-red polyline {
  stroke: var(--red);
}

.detail-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
}

.project-hero,
.employee-hero {
  display: grid;
  gap: 18px;
}

.summary-panel {
  display: grid;
  gap: 18px;
}

.summary-copy {
  font-size: 1.02rem;
  line-height: 1.8;
}

.promise-list {
  display: grid;
  gap: 12px;
}

.promise-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.message-filters a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.message-filters a.active,
.message-filters a:hover {
  color: var(--text);
  border-color: rgba(212, 175, 55, 0.28);
  background: rgba(212, 175, 55, 0.1);
}

.timeline-item,
.note-item {
  padding: 18px;
}

.timeline-meta,
.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.timeline-item.is-client {
  border-left: 3px solid rgba(212, 175, 55, 0.5);
}

.timeline-item.is-team {
  border-left: 3px solid rgba(61, 213, 152, 0.5);
}

.employee-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-card {
  padding: 24px;
  display: grid;
  gap: 18px;
}

.focus-list {
  display: grid;
  gap: 10px;
}

.focus-list a {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.focus-list span {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

.empty-panel {
  padding: 40px 28px;
  text-align: center;
}

.empty-panel h2 {
  margin: 0 0 10px;
}

.screen-section {
  display: grid;
  gap: 18px;
}

.screen-section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.screen-section-header h2 {
  margin: 0;
  font-size: 1.6rem;
}

.screen-section-header p {
  margin: 8px 0 0;
  color: var(--muted);
}

.screen-caption {
  color: var(--muted);
}

.data-list {
  display: grid;
  gap: 12px;
}

.data-list-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.data-list-row span {
  color: var(--muted);
}

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

@media (max-width: 1220px) {
  .shell-header,
  .hero-panel,
  .board-grid,
  .detail-grid,
  .admin-layout,
  .auth-layout,
  .employee-grid,
  .leader-grid {
    grid-template-columns: 1fr;
  }

  .kpi-strip,
  .metric-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .project-row-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 840px) {
  .shell-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .shell-nav {
    justify-content: flex-start;
  }

  .shell-profile {
    width: 100%;
    justify-content: space-between;
    border-radius: 20px;
  }

  .shell-main {
    padding: 22px 16px 42px;
  }

  .form-grid.two-col,
  .kpi-strip,
  .metric-row,
  .metric-grid,
  .metric-grid.compact,
  .employee-grid,
  .project-row-metrics {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .project-card,
  .employee-card,
  .auth-hero,
  .auth-card,
  .form-panel,
  .data-panel,
  .admin-card,
  .board-column,
  .summary-panel,
  .trend-panel {
    padding: 22px;
  }

  .page-intro h1,
  .auth-hero h1,
  .hero-copy h1,
  .screen-hero h1,
  .project-hero h1,
  .employee-hero h1 {
    font-size: 2.4rem;
  }
}
