:root {
  --paper: #eeece5;
  --paper-deep: #e5e1d8;
  --ink: #1d1d1b;
  --muted: #6e6d67;
  --line: #cbc8be;
  --line-light: rgba(203, 200, 190, 0.45);
  --dark: #22221f;
  --dark-surface: #2b2b27;
  --accent: #e8874d;
  --accent-glow: rgba(232, 135, 77, 0.25);
  --green: #4f8a74;
  --green-bg: rgba(79, 138, 116, 0.15);
  --red: #c04e38;
  --red-bg: rgba(192, 78, 56, 0.15);
  --gold: #c8a642;
  --gold-bg: rgba(200, 166, 66, 0.15);
  --radius: 16px;
  --radius-sm: 8px;
  --radius-pill: 999px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "DM Mono", monospace;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(203, 200, 190, 0.65);
  --shadow-sm: 0 2px 8px rgba(29, 29, 27, 0.04);
  --shadow-md: 0 8px 24px rgba(29, 29, 27, 0.08);
  --shadow-lg: 0 20px 48px rgba(29, 29, 27, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }

/* 3D WebGL & Motion Graphics Background */
.webgl-container {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.78;
}

.webgl-container canvas {
  width: 100% !important;
  height: 100% !important;
}

.motion-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
}

/* Animations */
@keyframes slideUpFade {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Layout */
.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 30px 24px 24px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  background: rgba(232, 229, 220, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  letter-spacing: -.05em;
  font-weight: 800;
  width: fit-content;
  transition: transform 0.2s ease;
}
.brand:hover { transform: scale(1.02); }
.brand-dot { color: var(--accent); }

.mango-mark {
  width: 26px;
  height: 26px;
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  padding-bottom: 2px;
}
.mango-mark i {
  width: 7px;
  border-radius: 10px 10px 2px 2px;
  display: block;
  background: var(--ink);
  transform: rotate(25deg);
  transition: transform 0.3s ease, background 0.3s ease;
}
.mango-mark i:nth-child(1) { height: 12px; }
.mango-mark i:nth-child(2) { height: 21px; background: var(--accent); }
.mango-mark i:nth-child(3) { height: 16px; }

.brand:hover .mango-mark i { transform: rotate(30deg) scaleY(1.1); }

.project-stamp {
  display: grid;
  gap: 7px;
  margin-top: 55px;
}
.eyebrow {
  font-family: var(--mono);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.project-stamp strong {
  font: 500 32px/1 var(--serif);
  letter-spacing: -.06em;
}
.project-caption {
  max-width: 150px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.main-nav {
  display: grid;
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 6px;
  border-bottom: 1px solid var(--line);
  color: #5c5a54;
  font-size: 12.5px;
  font-weight: 500;
  transition: all .2s ease;
}
.nav-link span {
  color: #9e9a92;
  font: 10px var(--mono);
}
.nav-link:hover, .nav-link.active {
  color: var(--ink);
  padding-left: 10px;
}
.nav-link.active {
  font-weight: 700;
  border-left: 2px solid var(--accent);
}
.nav-link.active span {
  color: var(--accent);
}
.pulse-dot {
  position: relative;
}
.pulse-dot::after {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-left: 3px;
  animation: pulseGlow 2s infinite;
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 9px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.signed-in-user {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  font-size: 11.5px;
  line-height: 1.4;
}
.signed-in-user small {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
  font-family: var(--mono);
}
.quiet-button {
  border: 0;
  padding: 8px 0;
  text-align: left;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.quiet-button:hover { color: var(--ink); }
.quiet-button span { color: var(--accent); }

/* Main Content Area */
.main {
  min-width: 0;
  padding: 28px clamp(24px, 5vw, 76px) 80px;
  position: relative;
  animation: slideUpFade 0.35s ease-out;
}

.topbar {
  min-height: 58px;
  padding-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}
.crumb b {
  color: var(--ink);
  font-weight: 700;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.date-line {
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* Page Hero */
.page-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 56px 0 40px;
  animation: slideUpFade 0.4s ease-out;
}
h1 {
  margin: 0;
  max-width: 740px;
  font-size: clamp(38px, 5vw, 76px);
  font-weight: 500;
  font-family: var(--serif);
  letter-spacing: -.07em;
  line-height: .95;
}
h1 em {
  font-weight: 500;
  color: var(--muted);
  font-style: italic;
}
.hero-copy {
  max-width: 340px;
  margin: 0 0 4px;
  color: var(--muted);
  line-height: 1.65;
  font-size: 12px;
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: white;
  padding: 10px 18px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.button:hover {
  transform: translateY(-2px);
  background: #383834;
  box-shadow: var(--shadow-sm);
}
.button:active { transform: translateY(0); }
.button.secondary {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink);
  border-color: var(--line);
  backdrop-filter: blur(8px);
}
.button.secondary:hover {
  background: white;
  border-color: var(--ink);
}
.button.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}
.button.accent:hover {
  background: #d9783f;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.button.danger {
  background: var(--red);
  border-color: var(--red);
  color: white;
}
.button.danger:hover { background: #aa3d28; }
.button.small {
  padding: 7px 13px;
  font-size: 10.5px;
}

/* Section Head */
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-end;
  margin: 50px 0 18px;
}
.section-head h2 {
  margin: 0;
  font: 500 28px/1 var(--serif);
  letter-spacing: -.055em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.section-link {
  font: 10px var(--mono);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  transition: color 0.2s ease;
}
.section-link:hover { color: var(--accent); }

/* Metrics */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.metric {
  min-height: 150px;
  padding: 22px;
  background: rgba(238, 236, 229, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, transform 0.2s ease;
}
.metric:hover {
  background: rgba(255, 255, 255, 0.85);
}
.metric label {
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
}
.metric strong {
  margin-top: auto;
  font: 500 46px/1 var(--serif);
  letter-spacing: -.07em;
}
.metric small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr);
  gap: 32px;
  margin-top: 24px;
}
.panel {
  border-top: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(8px);
  padding: 12px 14px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 0;
}
.panel-title h3 {
  font-size: 12.5px;
  margin: 0;
  font-weight: 700;
}
.panel-title span {
  color: var(--muted);
  font: 10px var(--mono);
}

/* Team Rows */
.team-rows {
  border-top: 1px solid var(--line);
}
.team-row {
  display: grid;
  grid-template-columns: 42px minmax(120px, 1fr) minmax(160px, 1.4fr) 90px 24px;
  gap: 16px;
  align-items: center;
  min-height: 75px;
  border-bottom: 1px solid var(--line);
  padding: 12px 6px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease, transform 0.2s ease;
  border-radius: var(--radius-sm);
  margin-bottom: 2px;
}
.team-row:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: translateX(4px);
}
.team-number {
  font: 11px var(--mono);
  color: var(--muted);
}
.team-name {
  display: grid;
  gap: 3px;
  font-size: 12.5px;
  font-weight: 700;
}
.team-name small {
  font: 10px var(--mono);
  font-weight: 400;
  color: var(--muted);
}
.team-target {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}
.team-progress {
  display: grid;
  gap: 7px;
}
.team-progress span {
  font: 10px var(--mono);
}
.progress {
  overflow: hidden;
  height: 5px;
  border-radius: 10px;
  background: #d5d1c8;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.arrow-link {
  border: 0;
  padding: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  transition: color 0.2s ease, transform 0.2s ease;
}
.arrow-link:hover {
  color: var(--accent);
  transform: translateX(2px) translateY(-2px);
}

/* Activity Mini List */
.mini-list {
  border-top: 1px solid var(--line);
}
.mini-item {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
  transition: transform 0.15s ease;
}
.mini-item:hover {
  transform: translateX(2px);
}
.mini-item > i {
  width: 8px;
  height: 8px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.mini-item b {
  display: block;
  font-size: 11.5px;
}
.mini-item p {
  margin: 3px 0 0;
  font-size: 10px;
  color: var(--muted);
  line-height: 1.45;
}
.mini-item time {
  color: var(--muted);
  font: 9.5px var(--mono);
  white-space: nowrap;
}

/* Focus / Integration Card */
.integrate-card {
  padding: 26px;
  color: #f4f2eb;
  background: var(--dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.integrate-card::after {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.integrate-card .eyebrow {
  color: #b7b3a8;
}
.integrate-card h3 {
  margin: 16px 0 10px;
  font: 500 29px/1.05 var(--serif);
  letter-spacing: -.05em;
}
.integrate-card p {
  margin: 0;
  color: #c5c1b5;
  line-height: 1.6;
  font-size: 11.5px;
}
.check-list {
  display: grid;
  gap: 9px;
  margin: 22px 0;
}
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #d4d0c6;
  font-size: 11px;
}
.check i {
  width: 8px;
  height: 8px;
  border: 1px solid #74726b;
  border-radius: 99px;
}
.check.done i {
  border-color: #8ebcab;
  background: #8ebcab;
}
.check.warning i {
  border-color: #e8874d;
  background: #e8874d;
}

/* Task Board Columns */
.task-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.task-column {
  min-height: 200px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-light);
}
.task-column > header {
  display: flex;
  justify-content: space-between;
  padding: 0 4px 10px;
  border-bottom: 1px solid var(--ink);
  font-size: 11.5px;
  font-weight: 700;
}
.task-column > header span:last-child {
  color: var(--muted);
  font: 10px var(--mono);
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 99px;
}
.task-card {
  position: relative;
  margin-top: 10px;
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.task-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink);
}
.task-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 2px;
  background: var(--card-color, var(--accent));
}
.task-card b {
  display: block;
  margin-left: 6px;
  font-size: 12px;
  line-height: 1.4;
}
.task-card .task-desc {
  margin: 6px 0 0 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.task-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 0 6px;
  color: var(--muted);
  font: 9.5px var(--mono);
}
.priority-pill {
  padding: 2px 6px;
  border-radius: 4px;
  font: 8.5px var(--mono);
  text-transform: uppercase;
  font-weight: 700;
}
.priority-pill.high {
  background: var(--red-bg);
  color: var(--red);
}
.priority-pill.medium {
  background: var(--gold-bg);
  color: #927520;
}
.priority-pill.low {
  background: rgba(0, 0, 0, 0.05);
  color: var(--muted);
}
.task-card button {
  position: absolute;
  right: 8px;
  top: 8px;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  transition: all 0.2s ease;
}
.task-card button:hover {
  background: rgba(0, 0, 0, 0.06);
  color: var(--ink);
}

/* Team Header & Week Strip */
.team-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: flex-end;
  gap: 25px;
  padding: 55px 0 28px;
  border-bottom: 1px solid var(--ink);
}
.team-header h1 {
  font-size: clamp(36px, 5vw, 64px);
}
.team-header p {
  color: var(--muted);
  max-width: 420px;
  font-size: 12.5px;
  line-height: 1.6;
}
.avatar-stack {
  display: flex;
  align-items: center;
}
.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-right: -8px;
  color: white;
  border: 2px solid var(--paper);
  border-radius: 50%;
  font: 10px var(--mono);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, z-index 0.2s ease;
}
.avatar:hover {
  transform: scale(1.15);
  z-index: 2;
}
.avatar.large {
  width: 72px;
  height: 72px;
  margin: 0;
  font-size: 16px;
}
.assigned {
  display: flex;
  align-items: center;
  gap: 10px;
}
.assigned span {
  color: var(--muted);
  font-size: 11px;
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin: 28px 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.week-tile {
  min-height: 94px;
  padding: 16px;
  background: rgba(238, 236, 229, 0.7);
  backdrop-filter: blur(8px);
  transition: background 0.2s ease;
}
.week-tile b {
  display: block;
  font: 10px var(--mono);
  color: var(--muted);
}
.week-tile strong {
  display: block;
  margin-top: 16px;
  font-size: 11.5px;
}
.week-tile.active {
  background: var(--dark);
  color: white;
}
.week-tile.active b {
  color: #beb9ad;
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-field {
  display: grid;
  gap: 7px;
}
.form-field.full {
  grid-column: 1 / -1;
}
.form-field label {
  color: var(--muted);
  font: 10px var(--mono);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  color: var(--ink);
  padding: 11px 12px;
  font-size: 12.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(29, 29, 27, 0.08);
}
.form-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.5;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  grid-column: 1 / -1;
  margin-top: 8px;
}
.form-note {
  color: var(--muted);
  font-size: 10.5px;
}
.upload-drop {
  border: 2px dashed #bbb7ac;
  border-radius: var(--radius-sm);
  padding: 18px;
  background: rgba(255, 255, 255, 0.35);
  text-align: center;
  transition: border-color 0.2s ease;
}
.upload-drop:hover {
  border-color: var(--accent);
}
.upload-drop input {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.file-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  font-size: 10.5px;
  transition: all 0.2s ease;
}
.file-chip a:hover { color: var(--accent); }

/* Submissions & Deliverables Cards */
.submission-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.submission-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.submission-header h3 {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
}
.submission-meta {
  color: var(--muted);
  font: 10px var(--mono);
}
.submission-body {
  margin: 12px 0;
  font-size: 12px;
  color: #383733;
  line-height: 1.55;
}
.submission-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-weight: 700;
  font-size: 11.5px;
  margin: 6px 0;
  padding: 4px 10px;
  background: var(--accent-glow);
  border-radius: var(--radius-pill);
  transition: background 0.2s ease;
}
.submission-link:hover {
  background: rgba(232, 135, 77, 0.35);
}
.feedback-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(232, 135, 77, 0.08);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.feedback-box b {
  display: block;
  font-size: 11px;
  color: var(--ink);
}
.feedback-box p {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: #4a4843;
}

/* Status Badges */
.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font: 8.5px var(--mono);
  text-transform: uppercase;
  font-weight: 700;
}
.status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9b9890;
}
.status.in-progress::before, .status.submitted::before {
  background: var(--accent);
}
.status.complete::before, .status.approved::before {
  background: var(--green);
}
.status.testing::before {
  background: var(--gold);
}
.status.changes-requested::before {
  background: var(--red);
}

.status.submitted {
  background: var(--accent-glow);
  border-color: rgba(232, 135, 77, 0.4);
  color: #ad5420;
}
.status.approved {
  background: var(--green-bg);
  border-color: rgba(79, 138, 116, 0.4);
  color: var(--green);
}
.status.changes-requested {
  background: var(--red-bg);
  border-color: rgba(192, 78, 56, 0.4);
  color: var(--red);
}

/* Bricks */
.brick-list {
  border-top: 1px solid var(--ink);
}
.brick {
  display: grid;
  grid-template-columns: 58px minmax(160px, 1fr) 170px 150px 35px;
  gap: 20px;
  align-items: center;
  min-height: 100px;
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  transition: background 0.2s ease;
}
.brick:hover {
  background: rgba(255, 255, 255, 0.25);
}
.brick-number {
  font: 26px var(--serif);
  letter-spacing: -.08em;
  color: var(--muted);
}
.brick h3 {
  margin: 0 0 6px;
  font-size: 13px;
}
.brick p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: #ddd9cf;
  color: #5c5a53;
  font: 8.5px var(--mono);
  text-transform: uppercase;
}

/* People */
.people-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.person-card {
  min-height: 220px;
  padding: 24px;
  background: rgba(238, 236, 229, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease;
}
.person-card:hover {
  background: rgba(255, 255, 255, 0.9);
}
.person-card h3 {
  margin: 14px 0 4px;
  font: 500 26px var(--serif);
  letter-spacing: -.06em;
}
.person-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
}
.person-card footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 25px;
}
.text-button {
  border: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font: 10px var(--mono);
  text-transform: uppercase;
  transition: color 0.2s ease;
}
.text-button:hover { color: var(--accent); }

/* Member Detail */
.member-detail {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 28px;
  align-items: start;
  padding: 55px 0 35px;
  border-bottom: 1px solid var(--ink);
}
.member-detail h1 { font-size: 58px; }
.member-detail p {
  max-width: 480px;
  margin: 15px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 12.5px;
}
.member-detail .meta {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  color: var(--muted);
  font: 10px var(--mono);
}

/* Update List */
.update-list {
  border-top: 1px solid var(--ink);
}
.update-row {
  display: grid;
  grid-template-columns: 76px minmax(120px, 1fr) minmax(160px, 1.5fr) auto;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: flex-start;
}
.update-row .week {
  font: 10px var(--mono);
  color: var(--muted);
}
.update-row h3 {
  margin: 0 0 5px;
  font-size: 12px;
}
.update-row p {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.5;
}
.update-actions {
  display: flex;
  gap: 6px;
}

/* Admin Grid */
.admin-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
}
.editable-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.editable-row .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.editable-row b { font-size: 11.5px; }
.editable-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}
.editable-row select {
  border: 1px solid var(--line);
  background: transparent;
  border-radius: var(--radius-sm);
  padding: 7px;
  font-size: 10.5px;
}

/* Modal Layer */
.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(29, 29, 27, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.modal-layer.open { display: grid; }
.modal {
  width: min(680px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  padding: 30px;
  border-radius: var(--radius);
  background: var(--paper);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  animation: slideUpFade 0.25s ease-out;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}
.modal-head h2 {
  margin: 0;
  font: 500 30px var(--serif);
  letter-spacing: -.06em;
}
.close-modal {
  border: 0;
  background: transparent;
  font-size: 24px;
  color: var(--muted);
  padding: 4px;
  line-height: 1;
  transition: color 0.2s ease;
}
.close-modal:hover { color: var(--ink); }

/* Toasts */
.toast-region {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
}
.toast {
  padding: 13px 18px;
  color: white;
  background: var(--dark);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  font-weight: 500;
  animation: slideUpFade .25s ease;
}

/* Login Screen */
.login-mode {
  display: block;
  min-height: 100vh;
}
.login-mode .sidebar { display: none; }
.login-mode .main { min-height: 100vh; padding: 0; }
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(32px, 6vw, 90px);
  color: #f4f2eb;
  background: var(--dark);
  overflow: hidden;
}
.login-intro::after {
  content: '';
  position: absolute;
  width: 60vw;
  height: 60vw;
  right: -25vw;
  bottom: -35vw;
  border: 1px solid rgba(244, 242, 235, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(244, 242, 235, 0.03), 0 0 0 120px rgba(244, 242, 235, 0.02);
  pointer-events: none;
}
.login-intro .brand { color: white; position: relative; z-index: 1; }
.login-intro-copy {
  position: relative;
  z-index: 1;
  max-width: 590px;
  margin: auto 0;
}
.login-intro .eyebrow { color: #b8b3a8; }
.login-intro h1 {
  margin: 16px 0 24px;
  color: #f4f2eb;
  font-size: clamp(52px, 7vw, 100px);
}
.login-intro p {
  max-width: 380px;
  color: #beb9af;
  font-size: 12.5px;
  line-height: 1.65;
}
.login-intro footer {
  position: relative;
  z-index: 1;
  color: #aba69b;
  font: 10px var(--mono);
}

.login-panel {
  display: grid;
  align-content: center;
  padding: clamp(32px, 8vw, 120px);
  background: var(--paper);
}
.login-panel h2 {
  margin: 10px 0 9px;
  font: 500 42px/1 var(--serif);
  letter-spacing: -.06em;
}
.login-panel > p {
  margin: 0 0 34px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}
.login-panel .form-grid { max-width: 390px; }
.login-hint {
  max-width: 420px;
  margin-top: 40px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}
.login-account-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.login-account-grid span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.4);
}
.login-account-grid span.admin-highlight {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.login-account-grid strong {
  color: var(--ink);
  font-size: 10px;
}
.login-account-grid code {
  color: var(--muted);
  font: 9px var(--mono);
}
.login-error {
  min-height: 15px;
  margin-top: 10px;
  color: var(--red);
  font-size: 11px;
}

.empty {
  padding: 28px 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.hide { display: none !important; }

/* Responsive adjustments */
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    padding: 18px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .project-stamp, .sidebar-bottom { display: none; }
  .main-nav {
    display: flex;
    overflow-x: auto;
    margin: 18px 0 0;
    border: 0;
  }
  .nav-link { flex: 0 0 auto; padding: 8px 12px; border: 0; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
  .brick { grid-template-columns: 45px 1fr 130px; gap: 12px; }
  .brick .tag-row, .brick > p { display: none; }
  .team-row { grid-template-columns: 38px 1fr 85px 20px; }
  .team-target { display: none; }
}

@media (max-width: 680px) {
  .topbar { display: none; }
  .page-hero { padding: 40px 0 28px; display: block; }
  .hero-copy { margin-top: 18px; }
  .metric-grid, .people-grid, .task-columns, .form-grid, .admin-grid { grid-template-columns: 1fr; }
  .week-strip { grid-template-columns: 1fr 1fr; }
  .team-header { display: block; }
  .team-header p { margin-top: 18px; }
  .team-row { grid-template-columns: 38px 1fr 20px; }
  .team-progress { display: none; }
  .brick { grid-template-columns: 37px 1fr; }
  .brick .status { display: none; }
  .member-detail { grid-template-columns: 1fr; }
  .update-row { grid-template-columns: 60px 1fr; }
  .update-row p, .update-actions { grid-column: 2; }
  .login-screen { grid-template-columns: 1fr; }
  .login-intro { min-height: 38vh; padding: 28px; }
  .login-intro h1 { font-size: 48px; }
  .login-panel { padding: 36px 24px 50px; }
  .login-account-grid { grid-template-columns: 1fr; }
}

/* --- 3D Animations & Assignment Badges --- */
.card-3d-wrap {
  perspective: 1000px;
}

.card-tilt {
  transform-style: preserve-3d;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.28s ease, border-color 0.25s ease;
  will-change: transform;
}

.card-tilt:hover {
  transform: perspective(1000px) translateY(-5px) scale(1.012);
  box-shadow: 0 16px 36px rgba(29, 29, 27, 0.12), 0 0 20px rgba(232, 135, 77, 0.1);
  border-color: rgba(232, 135, 77, 0.45);
}

.badge-assignee {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.badge-assignee.individual {
  background: rgba(232, 135, 77, 0.15);
  color: #c45f22;
  border: 1px solid rgba(232, 135, 77, 0.35);
}

.badge-assignee.team {
  background: rgba(94, 139, 126, 0.15);
  color: #3b6b5d;
  border: 1px solid rgba(94, 139, 126, 0.35);
}

.badge-assignee .assignee-avatar {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
}

.assign-mode-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.assign-mode-btn {
  flex: 1;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.assign-mode-btn.active {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
  box-shadow: var(--shadow-sm);
}

.private-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(192, 78, 56, 0.12);
  color: #b33924;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Password Privacy & Mentor Highlight */
.blurred-code {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.blur-pill {
  filter: blur(5px);
  user-select: none;
  -webkit-user-select: none;
  background: rgba(232, 135, 77, 0.25);
  padding: 1px 7px;
  border-radius: 4px;
  letter-spacing: 2px;
  color: var(--accent);
  transition: filter 0.3s ease;
}

.private-badge {
  font-size: 9px;
  text-transform: uppercase;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(192, 78, 56, 0.15);
  color: #b33924;
  letter-spacing: 0.04em;
}

.mentor-highlight {
  border: 1px solid rgba(212, 175, 55, 0.45) !important;
  background: rgba(212, 175, 55, 0.08) !important;
}

.mentor-highlight strong {
  color: #9c7b14;
}


