* {
  box-sizing: border-box;
}

:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  background: #f5f7fb;
  color: #152238;
}

body {
  margin: 0;
  background: #f5f7fb;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;

  background:
    radial-gradient(
      circle at top right,
      #dfeaff,
      transparent 40%
    ),
    #f5f7fb;
}

.login-card {
  width: min(420px, 100%);
  background: white;
  padding: 36px;
  border-radius: 24px;

  box-shadow:
    0 20px 60px
    rgba(24, 54, 100, .12);
}

.brand-mark {
  width: 54px;
  height: 54px;

  display: grid;
  place-items: center;

  border-radius: 16px;

  background:
    linear-gradient(
      135deg,
      #2563eb,
      #123d91
    );

  color: white;
  font-size: 25px;
  font-weight: 800;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 18px;
}

.login-card h1 {
  margin: 22px 0 5px;
  font-size: 28px;
}

.login-card > p {
  margin: 0 0 28px;
  color: #6b7890;
}

.login-card label {
  display: block;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  margin-top: 7px;
  padding: 13px 14px;

  border: 1px solid #dbe1eb;
  border-radius: 11px;

  outline: none;
}

.login-card input:focus {
  border-color: #2563eb;
}

.login-card button {
  width: 100%;
  border: 0;
  padding: 14px;

  border-radius: 11px;

  background: #2563eb;
  color: white;

  font-weight: 700;
  cursor: pointer;
}

.error {
  margin-top: 15px;
  color: #c62828;
  font-size: 13px;
}

.app {
  display: grid;
  grid-template-columns: 245px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;

  height: 100vh;

  display: flex;
  flex-direction: column;

  background: #10284f;
  color: white;

  padding: 20px 14px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 7px 10px 24px;
}

.sidebar-brand strong,
.sidebar-brand span {
  display: block;
}

.sidebar-brand span {
  opacity: .65;
  font-size: 12px;
  margin-top: 2px;
}

.sidebar nav {
  display: grid;
  gap: 5px;
}

.sidebar nav button,
.logout {
  border: 0;

  padding: 12px 14px;

  border-radius: 10px;

  text-align: left;

  background: transparent;
  color: #cbd6e8;

  cursor: pointer;
}

.sidebar nav button:hover,
.sidebar nav button.active {
  background: rgba(255,255,255,.11);
  color: white;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 12px 8px 2px;

  font-size: 12px;
  color: #aebdd5;
}

.logout {
  width: 100%;
  margin-top: 10px;
  color: white;
  background: rgba(255,255,255,.08);
}

.main {
  min-width: 0;
}

.topbar {
  min-height: 86px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 28px;

  background: white;
  border-bottom: 1px solid #e8edf4;
}

.topbar h2 {
  margin: 0;
  font-size: 23px;
}

.topbar p {
  margin: 4px 0 0;
  color: #7d899e;
  font-size: 13px;
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 7px;

  background: #eaf8ef;
  color: #168347;

  padding: 7px 10px;

  border-radius: 999px;

  font-size: 11px;
  font-weight: 800;
}

.live-pill span {
  width: 7px;
  height: 7px;

  border-radius: 50%;
  background: #25a85a;
}

.content {
  padding: 25px 28px 50px;
}

.cards {
  display: grid;
  grid-template-columns:
    repeat(6, minmax(135px, 1fr));
  gap: 14px;
}

.card {
  background: white;
  border: 1px solid #e8edf4;
  border-radius: 16px;
  padding: 18px;

  box-shadow:
    0 3px 14px
    rgba(24, 54, 100, .04);
}

.metric-label {
  color: #738096;
  font-size: 12px;
  font-weight: 700;
}

.metric {
  font-size: 28px;
  font-weight: 800;
  margin-top: 7px;
}

.panel {
  margin-top: 18px;

  background: white;
  border: 1px solid #e8edf4;

  border-radius: 16px;
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 16px 18px;

  border-bottom: 1px solid #edf1f6;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

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

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

  font-size: 13px;
}

th,
td {
  padding: 12px 15px;

  border-bottom:
    1px solid #edf1f6;

  text-align: left;
  vertical-align: top;
}

th {
  background: #fafbfc;
  color: #65738a;
  font-size: 11px;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  padding: 5px 8px;

  border-radius: 999px;

  background: #edf2fa;
  color: #42536b;

  font-size: 11px;
  font-weight: 700;
}

.badge.danger {
  background: #ffeded;
  color: #bd3131;
}

.badge.success {
  background: #e9f8ef;
  color: #168347;
}

.search-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-row input,
.search-row select {
  min-height: 42px;

  padding: 9px 12px;

  border: 1px solid #dce3ed;
  border-radius: 10px;

  background: white;
}

.search-row input {
  min-width: min(360px, 100%);
}

.muted {
  color: #7b8799;
}

.empty {
  padding: 35px;
  text-align: center;
  color: #8290a4;
}

.loading {
  padding: 50px;
  text-align: center;
  color: #718097;
}

@media (max-width: 1200px) {
  .cards {
    grid-template-columns:
      repeat(3, 1fr);
  }
}

@media (max-width: 800px) {

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

  .sidebar {
    position: relative;
    height: auto;

    padding: 10px;
  }

  .sidebar-brand {
    padding-bottom: 10px;
  }

  .sidebar nav {
    display: flex;
    overflow-x: auto;
  }

  .sidebar nav button {
    white-space: nowrap;
  }

  .sidebar-bottom {
    display: none;
  }

  .topbar {
    padding: 15px 17px;
  }

  .content {
    padding: 17px;
  }

  .cards {
    grid-template-columns:
      repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .cards {
    grid-template-columns: 1fr;
  }
}
