:root {
  --bg: #f6f2ed;
  --surface: #ffffff;
  --surface-soft: #fbfaf8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e7ded6;
  --primary: #87002e;
  --primary-dark: #650022;
  --gold: #c6a15b;
  --shadow: 0 24px 70px rgba(31, 41, 55, 0.12);
  --radius: 22px;
  --sidebar-width: 286px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(135, 0, 46, 0.10), transparent 34%),
    linear-gradient(135deg, #f8f4ef 0%, #efe7df 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  min-height: 100vh;
  padding: 24px;
  background: rgba(255, 255, 255, 0.78);
  border-right: 1px solid rgba(231, 222, 214, 0.9);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 10px 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  font-weight: 900;
  font-size: 20px;
  box-shadow: 0 18px 32px rgba(135, 0, 46, 0.25);
}

.brand-name {
  font-weight: 900;
  font-size: 15px;
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-link {
  padding: 13px 14px;
  border-radius: 14px;
  color: #3f4652;
  font-weight: 800;
  font-size: 14px;
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(135, 0, 46, 0.18);
}

.app-main {
  flex: 1;
  min-width: 0;
}

.topbar {
  padding: 28px 34px 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.page-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.55;
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-content {
  padding: 10px 34px 34px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  margin-bottom: 20px;
}

.hero-card,
.status-card,
.stat-card,
.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(231, 222, 214, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 34px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-eyebrow {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(135, 0, 46, 0.08);
  color: var(--primary);
  font-weight: 900;
  font-size: 12px;
  margin-bottom: 14px;
}

.hero-card h2 {
  margin: 0;
  font-size: 38px;
  line-height: 1.06;
  letter-spacing: -0.05em;
}

.hero-card p {
  margin: 14px 0 0;
  color: var(--muted);
  max-width: 720px;
  line-height: 1.65;
}

.status-card {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-label,
.stat-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-value {
  margin-top: 10px;
  font-size: 34px;
  font-weight: 950;
  color: var(--primary);
}

.status-note {
  color: var(--muted);
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 22px;
}

.stat-value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.card {
  padding: 26px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.card h3 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-light {
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  border-color: var(--border);
}

.btn-light:hover {
  border-color: rgba(135, 0, 46, 0.28);
}

.error-page {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
}

.error-code {
  font-size: 76px;
  font-weight: 950;
  color: var(--primary);
  letter-spacing: -0.06em;
}

.error-page h2 {
  margin: 0 0 8px;
  font-size: 30px;
}

.error-page p {
  color: var(--muted);
  margin: 0 0 20px;
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
    position: relative;
  }

  .nav-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 24px 20px 14px;
  }

  .page-content {
    padding: 10px 20px 24px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .nav-menu,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    padding: 24px;
  }

  .hero-card h2 {
    font-size: 30px;
  }
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 20% 10%, rgba(135, 0, 46, 0.18), transparent 34%),
    radial-gradient(circle at 90% 20%, rgba(198, 161, 91, 0.18), transparent 32%),
    linear-gradient(135deg, #f8f4ef 0%, #efe7df 100%);
}

.auth-panel {
  width: min(520px, 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  justify-content: center;
  margin-bottom: 22px;
}

.auth-brand-name {
  font-weight: 950;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-brand-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
  font-weight: 800;
}

.auth-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(231, 222, 214, 0.95);
  border-radius: 26px;
  box-shadow: var(--shadow);
  padding: 34px;
}

.auth-heading {
  margin-bottom: 22px;
}

.auth-eyebrow {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(135, 0, 46, 0.08);
  color: var(--primary);
  font-weight: 950;
  font-size: 12px;
  margin-bottom: 14px;
}

.auth-heading h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 950;
}

.auth-heading p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 900;
  color: #313844;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  transition: 0.2s ease;
}

.form-group textarea {
  padding-top: 12px;
  min-height: 120px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: rgba(135, 0, 46, 0.45);
  box-shadow: 0 0 0 4px rgba(135, 0, 46, 0.10);
}

.field-note {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.btn-full {
  width: 100%;
}

.alert {
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 16px;
}

.alert-error {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}

.alert-success {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}

.user-pill {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 900;
}

@media (max-width: 560px) {
  .auth-card {
    padding: 24px;
  }

  .auth-heading h1 {
    font-size: 27px;
  }
}
.page-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 18px;
  margin-bottom: 20px;
}

.section-eyebrow {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(135, 0, 46, 0.08);
  color: var(--primary);
  font-weight: 950;
  font-size: 12px;
  margin-bottom: 10px;
}

.section-title {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.04em;
  font-weight: 950;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 760px;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.card-tight {
  padding: 18px;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 220px auto;
  gap: 14px;
  align-items: end;
}

.filter-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 900;
  color: #313844;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font-size: 14px;
  font-family: inherit;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: rgba(135, 0, 46, 0.45);
  box-shadow: 0 0 0 4px rgba(135, 0, 46, 0.10);
}

.filter-actions {
  display: flex;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.table th {
  text-align: left;
  padding: 0 14px 13px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 17px 14px;
  border-bottom: 1px solid rgba(231, 222, 214, 0.8);
  vertical-align: middle;
  font-size: 14px;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table-muted {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.table-link {
  color: var(--primary);
  font-weight: 850;
  text-decoration: none;
}

.table-link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.table-actions-col {
  width: 160px;
}

.table-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-mini {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
}

.badge-active {
  background: #dcfce7;
  color: #166534;
}

.badge-inactive {
  background: #f3f4f6;
  color: #4b5563;
}

.badge-suspended {
  background: #fee2e2;
  color: #991b1b;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.empty-state {
  text-align: center;
  padding: 46px 20px;
}

.empty-state.compact {
  padding: 26px 16px;
}

.empty-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  font-weight: 950;
  box-shadow: 0 18px 32px rgba(135, 0, 46, 0.18);
}

.empty-state h3 {
  margin: 0;
  font-size: 20px;
}

.empty-state p {
  max-width: 520px;
  margin: 10px auto 20px;
  color: var(--muted);
  line-height: 1.6;
}

.form-card {
  max-width: 980px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-span {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.details-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  margin-bottom: 20px;
}

.details-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.details-list div {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
}

.details-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 5px;
}

.details-list strong {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}

.note-box {
  padding: 18px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  color: #374151;
  line-height: 1.7;
}

.danger-card {
  border-color: rgba(153, 27, 27, 0.18);
}

.btn-danger {
  background: #991b1b;
  color: #ffffff;
}

.btn-danger:hover {
  background: #7f1d1d;
}

@media (max-width: 1100px) {
  .details-grid,
  .filter-bar {
    grid-template-columns: 1fr;
  }

  .filter-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .page-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
  }
}
.nav-section {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}

.nav-section-label {
  padding: 8px 14px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.module-ready-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(231, 222, 214, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

.module-ready-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 20px 40px rgba(135, 0, 46, 0.22);
}

.module-ready-kicker {
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(198, 161, 91, 0.14);
  color: #8a641e;
  font-weight: 950;
  font-size: 12px;
  margin-bottom: 10px;
}

.module-ready-card h3 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.module-ready-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.feature-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(135, 0, 46, 0.10);
}

.feature-item strong {
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 1100px) {
  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .module-ready-card {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}