:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --ink: #121826;
  --muted: #697386;
  --line: #e6eaf2;
  --blue: #2f6df6;
  --blue-soft: #eaf1ff;
  --mint: #16b68f;
  --mint-soft: #e8f9f4;
  --rose: #e6537a;
  --rose-soft: #fff0f4;
  --amber: #f59e0b;
  --shadow: 0 18px 50px rgba(31, 45, 61, 0.09);
  --shadow-soft: 0 10px 28px rgba(31, 45, 61, 0.07);
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  background:
    radial-gradient(circle at top left, rgba(47, 109, 246, 0.08), transparent 34rem),
    linear-gradient(180deg, #f7f9fd 0%, #eef2f8 100%);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

#app {
  min-height: 100vh;
}

.icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 11px;
}

.brand-mark .icon {
  width: 19px;
  height: 19px;
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.btn {
  position: relative;
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  width: 100%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 14px 24px rgba(47, 109, 246, 0.24);
}

.btn.secondary {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.btn.compact {
  min-height: 36px;
  padding: 0 14px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 11px;
  font-size: 0.86rem;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.76;
}

.spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 750ms linear infinite;
}

.btn.loading .btn-label {
  opacity: 0;
}

.btn.loading .spinner {
  position: absolute;
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.landing-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.landing-hero {
  width: min(1060px, 100%);
  padding: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(230, 234, 242, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 46px;
}

.hero-copy {
  max-width: 650px;
  margin: 0 auto 34px;
  text-align: center;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 6.8rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 560px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.role-card {
  display: flex;
  min-height: 205px;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 8px 22px rgba(31, 45, 61, 0.05);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.role-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow);
}

.role-card.blue:hover {
  border-color: rgba(47, 109, 246, 0.34);
}

.role-card.mint:hover {
  border-color: rgba(22, 182, 143, 0.36);
}

.role-card.rose:hover {
  border-color: rgba(230, 83, 122, 0.34);
}

.role-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
}

.role-card.blue .role-icon {
  color: var(--blue);
  background: var(--blue-soft);
}

.role-card.mint .role-icon {
  color: var(--mint);
  background: var(--mint-soft);
}

.role-card.rose .role-icon {
  color: var(--rose);
  background: var(--rose-soft);
}

.role-card strong {
  display: block;
  margin-top: auto;
  font-size: 1.3rem;
}

.role-card span:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
}

.auth-panel {
  display: grid;
  width: min(970px, 100%);
  min-height: 620px;
  grid-template-columns: 0.95fr 1.05fr;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.auth-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: 38px;
  background:
    linear-gradient(145deg, rgba(47, 109, 246, 0.11), rgba(22, 182, 143, 0.08)),
    #f7f9fd;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 390px;
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-note {
  display: grid;
  gap: 8px;
  padding: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
}

.auth-note strong {
  color: var(--ink);
}

.auth-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 42px;
}

.form-heading {
  margin-bottom: 4px;
}

.form-heading h2 {
  margin: 0;
  font-size: 1.7rem;
}

.form-heading p {
  margin: 8px 0 0;
  color: var(--muted);
}

.form-alert {
  padding: 12px 14px;
  color: #9f1239;
  background: var(--rose-soft);
  border: 1px solid rgba(230, 83, 122, 0.24);
  border-radius: 13px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.9rem;
  font-weight: 800;
}

.field input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.field input:focus {
  background: #fff;
  border-color: rgba(47, 109, 246, 0.65);
  box-shadow: 0 0 0 4px rgba(47, 109, 246, 0.11);
}

.field.invalid input {
  border-color: rgba(230, 83, 122, 0.72);
}

.field-error {
  min-height: 16px;
  color: #be123c;
  font-size: 0.8rem;
}

.form-row {
  display: flex;
  justify-content: flex-end;
  min-height: 24px;
}

.link-button,
.switch-link a {
  padding: 0;
  color: var(--blue);
  background: none;
  border: 0;
  font-size: 0.9rem;
  font-weight: 800;
}

.switch-link {
  margin: 4px 0 0;
  color: var(--muted);
  text-align: center;
}

.app-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 18px;
  gap: 18px;
}

.sidebar {
  position: sticky;
  top: 18px;
  display: flex;
  height: calc(100vh - 36px);
  flex-direction: column;
  gap: 28px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
}

.side-nav {
  display: grid;
  gap: 7px;
}

.side-nav a,
.sidebar-logout {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  text-align: left;
}

.side-nav a.active,
.side-nav a:hover,
.sidebar-logout:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.sidebar-logout {
  margin-top: auto;
}

.dashboard-main {
  min-width: 0;
  padding: 6px 0 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 8px 6px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(31, 45, 61, 0.05);
}

.avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--mint));
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: 0 12px 22px rgba(47, 109, 246, 0.22);
}

.welcome-band,
.panel,
.stat-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.welcome-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 24px;
  border-radius: 24px;
}

.welcome-band.business {
  background:
    linear-gradient(135deg, rgba(230, 83, 122, 0.08), rgba(47, 109, 246, 0.05)),
    #fff;
}

.welcome-band h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0;
}

.welcome-band p {
  max-width: 610px;
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  display: flex;
  min-height: 130px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-radius: 20px;
}

.stat-card span {
  color: var(--muted);
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(1.7rem, 4vw, 2.15rem);
  letter-spacing: 0;
}

.stat-card small {
  display: block;
  margin-top: 8px;
  color: var(--mint);
  font-weight: 800;
}

.stat-card .icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 13px;
}

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

.admin-grid,
.vendor-dashboard-grid {
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
}

.panel {
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-heading h2 {
  margin: 0;
  font-size: 1.08rem;
}

.panel-heading span,
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.table-card {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: #2f3747;
  font-size: 0.92rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.status.active {
  color: #047857;
  background: var(--mint-soft);
}

.status.pending {
  color: #a16207;
  background: #fff8db;
}

.status.vip {
  color: #b42363;
  background: var(--rose-soft);
}

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

.vendor-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.vendor-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 900;
}

.vendor-card strong,
.vendor-card span {
  display: block;
}

.vendor-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.vendor-meta {
  text-align: right;
}

.report-panel {
  display: flex;
  flex-direction: column;
}

.report-bars {
  display: flex;
  height: 220px;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0;
  padding: 12px 8px 0;
}

.report-bars span {
  width: 100%;
  min-width: 24px;
  background: linear-gradient(180deg, var(--blue), #7dd3fc);
  border-radius: 999px 999px 10px 10px;
}

.not-found {
  display: grid;
  min-height: 100vh;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
}

.not-found h1 {
  margin: 18px 0 0;
  font-size: clamp(2rem, 7vw, 4rem);
}

.not-found p {
  margin: 0 0 12px;
  color: var(--muted);
}

@media (max-width: 980px) {
  .role-grid,
  .auth-panel,
  .app-shell,
  .admin-grid,
  .vendor-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: 0;
  }

  .auth-copy {
    min-height: 340px;
  }

  .app-shell {
    padding: 12px;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .landing-page,
  .auth-page {
    padding: 12px;
  }

  .landing-hero,
  .auth-panel {
    border-radius: 22px;
  }

  .landing-hero,
  .auth-copy,
  .auth-form {
    padding: 22px;
  }

  .landing-nav {
    justify-content: flex-start;
    margin-bottom: 36px;
  }

  .role-card {
    min-height: 170px;
  }

  .auth-copy {
    min-height: auto;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .topbar,
  .welcome-band,
  .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    padding: 4px 2px;
  }

  .top-actions {
    align-self: stretch;
    justify-content: flex-end;
  }

  .welcome-band .btn {
    width: 100%;
  }

  .vendor-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .vendor-meta {
    grid-column: 1 / -1;
    text-align: left;
  }

  .vendor-card .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}
