:root {
  --bg: #0d0d0d;
  --panel: rgba(255, 255, 255, 0.04);
  --border: rgba(0, 255, 255, 0.25);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.6);
  --cyan: #00f0ff;
}

* { box-sizing: border-box; }
body.page {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(900px 500px at 10% 0%, rgba(0, 240, 255, 0.10), transparent 60%), var(--bg);
  background-attachment: fixed;
  color: var(--text);
  padding: 12px;
  min-height: 100vh;
}

.container { padding: 16px; max-width: 1000px; margin: 0 auto; }

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.sidebar {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 14px;
  height: fit-content;
  position: sticky;
  top: 72px;
}

.sidebar__section { margin-bottom: 14px; }
.sidebar__label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.sidebar__nav { display: grid; gap: 6px; }
.sidebar__link {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(0, 240, 255, 0.0);
  background: rgba(0, 0, 0, 0.25);
}
.sidebar__link--active {
  border-color: rgba(0, 240, 255, 0.45);
  box-shadow: 0 0 0 2px rgba(0, 240, 255, 0.12);
}
.sidebar__link:hover { border-color: rgba(0, 240, 255, 0.25); }

.content { min-width: 0; }

.burger {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.3);
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  cursor: pointer;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
body.sidebar-open .burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.sidebar-open .burger span:nth-child(2) { opacity: 0; }
body.sidebar-open .burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    z-index: 12;
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
    max-height: 70vh;
    overflow: auto;
  }
  body.sidebar-open .sidebar {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .burger { display: flex; }
  .topbar { position: sticky; top: 0; z-index: 15; }
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(0, 240, 255, 0.15);
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.12);
  margin: 0 auto 12px;
  max-width: 1400px;
}
.logo {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 18px;
}
.neon {
  color: #00f0ff;
  text-shadow: 0 0 6px rgba(0, 240, 255, 0.6), 0 0 18px rgba(0, 240, 255, 0.35);
}

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

/* ── Project Selector ── */
.project-selector {
  position: relative;
  margin-left: 16px;
}

.project-selector__button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.35);
  background: rgba(0, 240, 255, 0.12);
  color: var(--cyan);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
  text-shadow: 0 0 8px rgba(0, 240, 255, 0.4);
}

.project-selector__button:hover {
  border-color: rgba(0, 240, 255, 0.55);
  background: rgba(0, 240, 255, 0.18);
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.6);
}

.project-selector__button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5));
}

.project-selector__arrow {
  transition: transform 0.2s ease;
  filter: drop-shadow(0 0 4px rgba(0, 240, 255, 0.5));
}

.project-selector--open .project-selector__arrow {
  transform: rotate(180deg);
}

.project-selector__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(0, 240, 255, 0.4);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 24px rgba(0, 240, 255, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 100;
}

.project-selector--open .project-selector__dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.project-selector__item {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.project-selector__item:hover {
  background: rgba(0, 240, 255, 0.12);
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.15);
}

.project-selector__item--active {
  background: rgba(0, 240, 255, 0.18);
  border-color: rgba(0, 240, 255, 0.45);
  color: var(--cyan);
  font-weight: 600;
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.2);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.08);
}

.muted { color: var(--muted); }
.link { color: var(--cyan); text-decoration: none; }

/* ── Enhanced Auth Page ── */
.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  gap: 32px;
}

.auth__logo {
  font-size: 48px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
  filter: drop-shadow(0 0 20px rgba(0, 240, 255, 0.3));
}

.auth__card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 32px rgba(0, 240, 255, 0.15);
}

.auth__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.auth__subtitle {
  margin: 0 0 24px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.auth__form {
  display: grid;
  gap: 16px;
}

.field { display: grid; gap: 6px; }
.field__label { font-size: 12px; color: var(--muted); }
.field__input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  outline: none;
}
.field select,
.field input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  outline: none;
}
.field select:focus,
.field input:focus {
  border-color: rgba(0, 240, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12);
}

.field__error { margin-top: 6px; color: rgba(255, 120, 180, 0.9); font-size: 12px; }

.row { display: flex; }
.row--between { justify-content: space-between; }
.row--center { align-items: center; }
.row--gap { gap: 10px; }

.btn--ghost { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.12); }
.btn--link { text-decoration: none; display: inline-block; text-align: center; }

.table { margin-top: 12px; display: grid; gap: 6px; }
.table__head,
.table__row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 90px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
}
.table__head {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.table__row {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
 }
.team-table .table__head,
.team-table .table__row {
  grid-template-columns: 1fr 1.2fr 1fr 0.9fr 120px;
  align-items: center;
}
.team-row {
  position: relative;
  overflow: hidden;
}
.team-row::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0,240,255,0.05), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.team-row:hover::after { opacity: 1; }
.team-row__name { font-weight: 600; }
.table__avatar-col { text-align: right; }
.team-row__avatar { display: flex; justify-content: flex-end; }
.avatar-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(0, 240, 255, 0.25);
  background: radial-gradient(circle at 30% 30%, rgba(0,240,255,0.18), rgba(255,255,255,0.03));
  display: grid;
  place-items: center;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.table__row--white { border-color: rgba(255, 255, 255, 0.14); }
.table__row--red { border-color: rgba(255, 0, 64, 0.22); }
.table__row--orange { border-color: rgba(255, 140, 0, 0.22); }
.table__row--purple { border-color: rgba(170, 80, 255, 0.22); }
.table__row--yellow { border-color: rgba(255, 220, 0, 0.22); }
.table__row--blue { border-color: rgba(0, 140, 255, 0.22); }
.table__row--green { border-color: rgba(80, 255, 140, 0.22); }
.team-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}
.team-divider--left {
  justify-content: flex-start;
}
.team-divider--left::before { display: none; }
.team-divider--left::after { flex: 1; }
.team-divider::before,
.team-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}
.team-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.team-badge--white { border-color: rgba(255,255,255,0.35); color: #fff; }
.team-badge--red { border-color: rgba(255, 80, 80, 0.6); color: #ffcccc; }
.team-badge--orange { border-color: rgba(255, 180, 80, 0.6); color: #ffd9b3; }
.team-badge--purple { border-color: rgba(170, 120, 255, 0.6); color: #e0c6ff; }
.team-badge--yellow { border-color: rgba(255, 220, 80, 0.6); color: #fff1a3; }
.team-badge--blue { border-color: rgba(80, 160, 255, 0.6); color: #c9e1ff; }
.team-badge--green { border-color: rgba(80, 255, 140, 0.6); color: #c8ffd9; }

.team-cards {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.team-card {
  display: grid;
  grid-template-columns: 1fr 72px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.team-card__name { font-size: 16px; font-weight: 600; }
.team-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.25);
  background: radial-gradient(circle at 30% 30%, rgba(0, 240, 255, 0.18), rgba(255, 255, 255, 0.02));
}
.team-card--white { border-color: rgba(255, 255, 255, 0.20); }
.team-card--red { border-color: rgba(255, 0, 64, 0.28); }
.team-card--orange { border-color: rgba(255, 140, 0, 0.28); }
.team-card--purple { border-color: rgba(170, 80, 255, 0.28); }
.team-card--yellow { border-color: rgba(255, 220, 0, 0.28); }
.team-card--blue { border-color: rgba(0, 140, 255, 0.28); }
.team-card--green { border-color: rgba(80, 255, 140, 0.28); }
.field__input:focus { border-color: rgba(0, 240, 255, 0.55); box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.12); }

.btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.10);
  color: var(--text);
  cursor: pointer;
}

.btn--link { text-decoration: none; display: inline-block; }
.btn-primary { border-color: rgba(0, 240, 255, 0.6); background: rgba(0, 240, 255, 0.18); }
.btn-secondary { border-color: rgba(120, 130, 255, 0.45); background: rgba(120, 130, 255, 0.12); }
.btn-success { border-color: rgba(0, 200, 140, 0.55); background: rgba(0, 200, 140, 0.14); }
.btn-danger { border-color: rgba(255, 80, 120, 0.6); background: rgba(255, 80, 120, 0.16); }
.btn-warning { border-color: rgba(255, 200, 80, 0.6); background: rgba(255, 200, 80, 0.14); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
.badge-success { border-color: rgba(0, 200, 140, 0.55); color: #9af7d4; }
.badge-danger { border-color: rgba(255, 80, 120, 0.6); color: #ff9fb8; }
.badge-warning { border-color: rgba(255, 200, 80, 0.6); color: #ffd48c; }
.badge--outline {
  background: transparent;
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--cyan);
  font-weight: 500;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.page-header h1 { margin: 0; }
.pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.06);
  color: var(--text);
  font-size: 14px;
}
.pill-secondary {
  border-color: rgba(120, 130, 255, 0.3);
  background: rgba(120, 130, 255, 0.08);
}
.pill-primary {
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.15);
  color: var(--text);
}
.pill--glow {
  border-color: rgba(0, 240, 255, 0.5);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 16px rgba(0, 240, 255, 0.25), 0 0 4px rgba(0, 240, 255, 0.4);
  font-weight: 500;
}
.pill--white {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.pill--red {
  border-color: rgba(255, 80, 80, 0.5);
  background: rgba(255, 80, 80, 0.12);
  color: #ffcccc;
}
.pill--orange {
  border-color: rgba(255, 180, 80, 0.5);
  background: rgba(255, 180, 80, 0.12);
  color: #ffd9b3;
}
.pill--purple {
  border-color: rgba(170, 120, 255, 0.5);
  background: rgba(170, 120, 255, 0.12);
  color: #e0c6ff;
}
.pill--yellow {
  border-color: rgba(255, 220, 80, 0.5);
  background: rgba(255, 220, 80, 0.12);
  color: #fff1a3;
}
.pill--blue {
  border-color: rgba(80, 160, 255, 0.5);
  background: rgba(80, 160, 255, 0.12);
  color: #c9e1ff;
}
.pill--green {
  border-color: rgba(80, 255, 140, 0.5);
  background: rgba(80, 255, 140, 0.12);
  color: #c8ffd9;
}

.grid { display: grid; gap: 12px; }
.metrics-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-bottom: 16px; }
.charts-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.chart-canvas-wrap { position: relative; height: 240px; }
.chart-card { display: grid; gap: 12px; }
.chart-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.chart-title { font-weight: 600; }

/* ── Enhanced Metric Cards ── */
.metrics-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 24px;
}

.metric-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.15);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.metric-card:hover {
  border-color: rgba(0, 240, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.15);
  transform: translateY(-2px);
}

.metric-card:hover::before {
  opacity: 1;
}

.metric-card__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.25);
  color: var(--cyan);
  position: relative;
  z-index: 1;
}

.metric-card__icon svg {
  width: 24px;
  height: 24px;
}

.metric-card__content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.metric-card__title {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.metric-card__value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff 0%, rgba(0, 240, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-card__hint {
  color: var(--muted);
  font-size: 12px;
  opacity: 0.8;
}

/* ── Enhanced Chart Cards ── */
.charts-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.chart-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 240, 255, 0.12);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.chart-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 8px 24px rgba(0, 240, 255, 0.1);
}

.chart-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.chart-card__body {
  position: relative;
}

.chart-placeholder {
  min-height: 120px;
  border: 1px dashed rgba(0, 240, 255, 0.25);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

/* Legacy support */
.metric-title { color: var(--muted); font-size: 13px; }
.metric-value { font-size: 24px; font-weight: 700; }
.metric-hint { color: var(--muted); font-size: 12px; }
.chart-header { display: flex; justify-content: space-between; align-items: center; }
.chart-title { font-weight: 600; }

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.table-simple { display: grid; gap: 8px; }
.table-simple__head,
.table-simple__row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  align-items: center;
}
.table-simple__head {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.table-simple__row {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.table-simple__row form { margin: 0; }
.table-simple__row button { width: 100%; }
.actions { display: flex; gap: 8px; justify-content: flex-end; }

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.form-actions { display: flex; gap: 10px; margin-top: 8px; }

.settings-form { display: grid; gap: 16px; max-width: 1100px; }
.settings-section {
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}
.settings-section__title {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.settings-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 320px));
}
.settings-grid--wide {
  grid-template-columns: repeat(auto-fit, minmax(200px, 300px));
}
.settings-grid .field,
.settings-grid--wide .field {
  max-width: 320px;
}
.settings-divider {
  position: relative;
  margin: 4px 0 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.settings-divider::before,
.settings-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
}
.settings-divider::before { left: 0; }
.settings-divider::after { right: 0; }
.settings-divider span {
  padding: 0 10px;
  background: linear-gradient(90deg, rgba(255,255,255,0.02), rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border-radius: 999px;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 0, 128, 0.35);
  background: rgba(255, 0, 128, 0.10);
  font-size: 14px;
}

.alert svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.alert--error {
  border-color: rgba(255, 80, 120, 0.5);
  background: rgba(255, 80, 120, 0.12);
  color: #ffb3c8;
}

.btn--large {
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
}

/* ── Filter Tabs ── */
.filter-tabs {
  margin-bottom: 20px;
  padding: 12px;
}

.filter-tabs__list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.filter-tab:hover {
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.06);
}

.filter-tab--active {
  border-color: rgba(0, 240, 255, 0.45);
  background: rgba(0, 240, 255, 0.12);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.15);
}

/* ── Reports Table ── */
.reports-section {
  margin-bottom: 24px;
}

.reports-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.reports-table__head,
.reports-table__row {
  display: grid;
  grid-template-columns: 90px 1fr 80px 100px 140px 110px minmax(200px, 1fr);
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  align-items: center;
  font-size: 13px;
  min-height: 48px;
}

.reports-table--buyer .reports-table__head,
.reports-table--buyer .reports-table__row {
  grid-template-columns: 90px 1fr 1fr 100px 120px 110px minmax(200px, 1fr);
}

.reports-table__head {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
}

.reports-table__row {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.reports-table__row:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 240, 255, 0.2);
}

.report-user {
  font-weight: 600;
}

.report-amounts,
.report-total {
  font-weight: 600;
  color: var(--cyan);
  white-space: nowrap;
}

.report-comment {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
}

.report-action-group {
  display: flex;
  gap: 6px;
  flex-direction: column;
}

.report-action-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.field__input--compact {
  padding: 6px 8px;
  font-size: 12px;
  min-width: 100px;
}

.btn--compact {
  padding: 6px 10px;
  font-size: 14px;
  min-width: 32px;
}

/* ── Report Detail Pages ── */
.detail-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.detail-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  align-items: start;
}

.detail-row--full {
  grid-template-columns: 200px 1fr;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  padding-top: 2px;
}

.detail-value {
  font-size: 14px;
  line-height: 1.5;
}

.detail-value--highlight {
  color: var(--cyan);
  font-weight: 600;
  font-size: 16px;
}

/* Info Grid for Detail Pages */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-item__label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item__value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

/* RD Levels Grid */
.rd-levels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.rd-level-card {
  padding: 16px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.2);
  transition: all 0.2s ease;
}

.rd-level-card:hover {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

.rd-level-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rd-level-data {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rd-level-sales {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.rd-level-amount {
  font-size: 13px;
  color: var(--muted);
}

/* Comments Grid */
.comments-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.comment-block {
  padding: 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.comment-block__label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.comment-block__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}

.comment-block__author {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
}

/* Detail Actions */
.detail-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 24px;
}

.detail-action-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 768px) {
  .detail-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .detail-actions {
    grid-template-columns: 1fr;
  }
  
  .info-grid {
    grid-template-columns: 1fr;
  }
  
  .rd-levels-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}

/* ── Team Page Styles ── */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,240,255,0.45);
  background: rgba(0,240,255,0.10);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
}
.btn-add:hover {
  background: rgba(0,240,255,0.18);
  border-color: rgba(0,240,255,0.65);
  box-shadow: 0 0 16px rgba(0,240,255,0.15);
}
.btn-add svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 2.2; fill: none; }

/* ── Column labels ── */
.col-labels {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 130px 100px 80px;
  gap: 16px;
  padding: 0 14px 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Role section ── */
.role-section { margin-bottom: 28px; }

.role-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.role-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.07);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid;
  white-space: nowrap;
}
.role-pill svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; flex-shrink: 0; }

.role-pill--white  { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.05); }
.role-pill--red    { color: #ffb3b3; border-color: rgba(255,80,80,0.55); background: rgba(255,0,64,0.08); }
.role-pill--orange { color: #ffd4a0; border-color: rgba(255,160,60,0.55); background: rgba(255,130,0,0.08); }
.role-pill--purple { color: #d4bcff; border-color: rgba(160,100,255,0.55); background: rgba(140,70,255,0.10); }
.role-pill--yellow { color: #fff0a0; border-color: rgba(255,220,60,0.55); background: rgba(255,200,0,0.08); }
.role-pill--blue   { color: #a8d4ff; border-color: rgba(60,150,255,0.55); background: rgba(0,120,255,0.10); }
.role-pill--green  { color: #a8ffc8; border-color: rgba(60,220,120,0.55); background: rgba(0,200,100,0.08); }

/* ── Member rows ── */
.members-list { display: grid; gap: 6px; }

.member-row {
  display: grid;
  grid-template-columns: 52px 1fr 1fr 130px 100px 80px;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.025);
  transition: border-color 0.15s ease, background 0.15s ease;
  position: relative;
  overflow: hidden;
}
.member-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 3px 0 0 3px;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.member-row:hover { border-color: rgba(255,255,255,0.14); background: rgba(255,255,255,0.045); }
.member-row:hover::before { opacity: 1; }

.member-row--white::before  { background: rgba(255,255,255,0.5); }
.member-row--red::before    { background: #ff5050; }
.member-row--orange::before { background: #ff8c00; }
.member-row--purple::before { background: #a050ff; }
.member-row--yellow::before { background: #ffdc00; }
.member-row--blue::before   { background: #3096ff; }
.member-row--green::before  { background: #30dc78; }

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  border: 1px solid;
  flex-shrink: 0;
}
.av--white  { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.20); }
.av--red    { background: rgba(255,0,64,0.14); color: #ffb3b3; border-color: rgba(255,80,80,0.35); }
.av--orange { background: rgba(255,130,0,0.14); color: #ffd4a0; border-color: rgba(255,160,60,0.35); }
.av--purple { background: rgba(140,70,255,0.16); color: #d4bcff; border-color: rgba(160,100,255,0.35); }
.av--yellow { background: rgba(255,200,0,0.14); color: #fff0a0; border-color: rgba(255,220,60,0.35); }
.av--blue   { background: rgba(0,120,255,0.16); color: #a8d4ff; border-color: rgba(60,150,255,0.35); }
.av--green  { background: rgba(0,200,100,0.14); color: #a8ffc8; border-color: rgba(60,220,120,0.35); }

/* Member info */
.member-name { font-size: 14px; font-weight: 600; color: var(--text); }
.member-username {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.member-username svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2; fill: none; opacity: 0.6; flex-shrink: 0; }
.member-role-text { font-size: 13px; color: var(--muted); }

/* Status */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot--active { background: #30dc78; box-shadow: 0 0 6px rgba(48,220,120,0.6); }
.status-dot--inactive { background: rgba(255,255,255,0.2); }

/* Member actions */
.member-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.btn--compact {
  padding: 6px 10px;
  font-size: 13px;
  min-width: auto;
}

/* ── Empty state ── */
.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 680px) {
  .col-labels { display: none; }
  .member-row {
    grid-template-columns: 44px 1fr;
    grid-template-rows: auto auto auto;
    gap: 4px 12px;
  }
  .member-row > .avatar { grid-row: 1 / 4; align-self: center; }
  .member-name { grid-column: 2; }
  .member-username { grid-column: 2; }
  .member-role-text { display: none; }
  .status { grid-column: 2; }
}
