@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --navy-950: #081630;
  --navy-900: #0B1B3B;
  --navy-800: #14305E;
  --navy-700: #244B86;
  --teal-700: #0C8D98;
  --teal-600: #0FA3B1;
  --teal-500: #40C6D0;
  --teal-300: #9EE3E8;
  --ink: #111827;
  --slate: #374151;
  --muted: #9CA3AF;
  --surface: #E5E7EB;
  --white: #FFFFFF;
  --line: rgba(17, 24, 39, 0.08);
  --shadow: 0 14px 34px rgba(8, 22, 48, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Manrope', sans-serif;
  color: var(--ink);
}

h1,
h2 {
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

.dashboard-body {
  background: var(--surface);
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900));
}

.dashboard-shell,
.login-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.dashboard-shell {
  padding: 24px 0 40px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--navy-700);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background: var(--navy-900);
  color: var(--white);
  box-shadow: var(--shadow);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.topbar__logo {
  width: 68px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.topbar__subtitle {
  margin: 6px 0 0;
  color: rgba(229, 231, 235, 0.78);
  font-size: 14px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar__tag {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(229, 231, 235, 0.92);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.toolbar {
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.toolbar__form {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar__form label {
  display: block;
  min-width: 110px;
  color: var(--slate);
  font-size: 13px;
  font-weight: 700;
}

.toolbar__form select,
.login-form input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(156, 163, 175, 0.35);
  border-radius: 14px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font: inherit;
}

.toolbar__form select {
  min-width: 260px;
}

.toolbar__form select:focus,
.login-form input:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 4px rgba(15, 163, 177, 0.12);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}

.button--primary {
  background: var(--teal-600);
  color: var(--navy-950);
}

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

.button--outline-dark {
  background: var(--white);
  color: var(--navy-900);
  border-color: rgba(11, 27, 59, 0.12);
}

.button--block {
  width: 100%;
}

.stats-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.metric-card strong {
  display: block;
  margin: 12px 0 6px;
  font-size: 34px;
  line-height: 1;
  color: var(--navy-900);
}

.metric-card__label {
  display: block;
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card__meta {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metric-card--dark {
  background: var(--navy-900);
  border-color: transparent;
}

.metric-card--dark strong,
.metric-card--dark .metric-card__label,
.metric-card--dark .metric-card__meta {
  color: var(--white);
}

.metric-card--accent {
  background: linear-gradient(180deg, var(--teal-600), var(--teal-500));
  border-color: transparent;
}

.metric-card--accent strong,
.metric-card--accent .metric-card__label,
.metric-card--accent .metric-card__meta {
  color: var(--navy-950);
}

.content-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.95fr);
}

.panel {
  margin-top: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.content-grid .panel {
  margin-top: 0;
}

.panel--full {
  margin-top: 16px;
}

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

.panel__header h2 {
  color: var(--navy-900);
}

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

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

th,
td {
  padding: 13px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--slate);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  font-size: 14px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(15, 163, 177, 0.12);
  color: var(--teal-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill--muted {
  background: rgba(36, 75, 134, 0.12);
  color: var(--navy-700);
}

.pill--segment {
  background: rgba(11, 27, 59, 0.08);
  color: var(--navy-800);
}

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

.event-row {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fafbfd;
}

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

.event-row__top strong {
  color: var(--navy-900);
  font-size: 14px;
}

.event-row__meta {
  margin-top: 6px;
  color: var(--slate);
  font-size: 13px;
}

.login-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 48px);
}

.login-card {
  width: min(420px, 100%);
  padding: 32px;
  border-radius: 24px;
  background: var(--white);
  box-shadow: 0 22px 48px rgba(8, 22, 48, 0.22);
}

.login-logo {
  width: 84px;
  margin-bottom: 18px;
  padding: 10px;
  border-radius: 18px;
  background: var(--surface);
}

.login-card h1 {
  color: var(--navy-900);
  font-size: 32px;
}

.login-copy {
  margin: 10px 0 18px;
  color: var(--slate);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  color: var(--slate);
  font-size: 13px;
  font-weight: 800;
}

.alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(36, 75, 134, 0.18);
  border-radius: 14px;
  background: rgba(36, 75, 134, 0.08);
  color: var(--navy-800);
  font-size: 14px;
}

@media (max-width: 980px) {
  .stats-grid,
  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .dashboard-shell,
  .login-shell {
    width: min(100%, calc(100% - 20px));
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar__brand {
    align-items: flex-start;
  }

  .topbar__actions,
  .toolbar__form {
    width: 100%;
  }

  .toolbar__form {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar__form select {
    min-width: 0;
  }

  .login-card {
    padding: 24px;
  }
}
