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

  color: #1e293b;
  background: #f4f6f8;

  --border: #e2e8f0;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --sidebar: #17212b;
  --sidebar-text: #cbd5e1;
  --success: #15803d;
  --warning: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #f4f6f8;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* Login */

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

.login__card {
  width: min(420px, 100%);
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
  box-shadow: 0 12px 35px rgb(15 23 42 / 7%);
}

.brand,
.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand__mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.brand strong,
.brand span,
.sidebar__brand strong,
.sidebar__brand span {
  display: block;
}

.brand span,
.sidebar__brand span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.login h1 {
  margin: 38px 0 8px;
  font-size: 24px;
}

.muted {
  color: var(--muted);
}

.login form {
  margin-top: 28px;
}

label {
  display: block;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

input[type="text"],
input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 11px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(37 99 235 / 10%);
}

button[type="submit"],
.button {
  border: 0;
  border-radius: 6px;
  padding: 11px 16px;
  background: var(--primary);
  color: white;
  font-weight: 600;
}

button[type="submit"] {
  width: 100%;
  margin-top: 4px;
}

button:hover {
  background: var(--primary-dark);
}

.form-error {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  color: #991b1b;
  background: #fef2f2;
  font-size: 13px;
}

.login__footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: #94a3b8;
  font-size: 11px;
}

/* Application */

.application {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 250px;
  flex: 0 0 250px;
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 22px 14px;
}

.sidebar__brand {
  padding: 0 10px 28px;
}

.sidebar__brand strong {
  color: white;
  font-size: 14px;
}

.sidebar__brand span {
  color: #94a3b8;
}

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

.nav-link {
  padding: 10px 12px;
  border-radius: 6px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 14px;
}

.nav-link span {
  display: inline-block;
  width: 25px;
  color: #94a3b8;
}

.nav-link:hover,
.nav-link.active {
  background: #253444;
  color: white;
}

.sidebar__bottom {
  margin-top: auto;
}

.connection {
  padding: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #94a3b8;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #22c55e;
}

.button--secondary {
  width: 100%;
  background: #263646;
  color: #cbd5e1;
}

.button--secondary:hover {
  background: #334155;
}

.content {
  min-width: 0;
  flex: 1;
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  color: #94a3b8;
  font-size: 13px;
}

.breadcrumb strong {
  color: #475569;
}

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

.account__avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
}

.account strong,
.account span {
  display: block;
}

.account strong {
  font-size: 13px;
}

.account span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.page {
  padding: 32px 34px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-header h1 {
  margin: 0 0 6px;
  font-size: 25px;
}

.page-header p {
  margin: 0;
  font-size: 14px;
}

.timestamp {
  color: #94a3b8;
  font-size: 12px;
}

/* Cards */

.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.card,
.panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.card {
  padding: 20px;
}

.card__label,
.card__hint {
  display: block;
}

.card__label {
  color: var(--muted);
  font-size: 12px;
}

.card__value {
  display: block;
  margin: 9px 0 7px;
  font-size: 25px;
}

.card__hint {
  font-size: 11px;
  color: var(--muted);
}

.positive {
  color: var(--success);
}

.grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 20px;
}

.panel {
  overflow: hidden;
}

.panel__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 20px;
  border-bottom: 1px solid var(--border);
}

.panel__header h2 {
  margin: 0;
  font-size: 14px;
}

.text-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--primary);
  font-size: 12px;
}

.event-list,
.service-list {
  padding: 6px 20px;
}

.event,
.service {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.event:last-child,
.service:last-child {
  border-bottom: 0;
}

.event__icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eff6ff;
  color: var(--primary);
  font-size: 12px;
}

.event__icon.success {
  background: #f0fdf4;
  color: var(--success);
}

.event__icon.warning {
  background: #fffbeb;
  color: var(--warning);
}

.event strong,
.event span,
.service strong,
.service span {
  display: block;
}

.event strong,
.service strong {
  font-size: 12px;
}

.event div span,
.service div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.service {
  justify-content: space-between;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
}

.badge--success {
  background: #f0fdf4;
  color: #15803d;
}

.badge--warning {
  background: #fffbeb;
  color: #b45309;
}

.badge--muted {
  background: #f1f5f9;
  color: #64748b;
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

th,
td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
}

td small {
  color: var(--muted);
}

/* Settings */

.settings {
  padding: 0 20px;
}

.setting {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  margin: 0;
  border-bottom: 1px solid #f1f5f9;
}

.setting:last-child {
  border-bottom: 0;
}

.setting strong,
.setting small {
  display: block;
}

.setting small {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 400;
}

.setting input {
  width: 18px;
  height: 18px;
}

/* Responsive */

@media (max-width: 900px) {
  .sidebar {
    width: 210px;
    flex-basis: 210px;
  }

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

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

@media (max-width: 650px) {
  .sidebar {
    display: none;
  }

  .topbar {
    padding: 0 18px;
  }

  .page {
    padding: 24px 18px;
  }

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

  .page-header {
    flex-direction: column;
  }

  .account div:not(.account__avatar) {
    display: none;
  }

  table {
    min-width: 650px;
  }

  .panel {
    overflow-x: auto;
  }
}

.demo-banner {
  margin-bottom: 24px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
}
.demo-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  letter-spacing: 0.06em;
}
.demo-banner span {
  display: block;
  color: #3b82f6;
}
.sidebar__demo {
  margin: 0 4px 22px;
  padding: 8px 10px;
  border: 1px solid #334155;
  border-radius: 5px;
  color: #94a3b8;
  font-size: 10px;
}
.sidebar__demo span {
  display: inline-block;
  margin-right: 5px;
  padding: 2px 5px;
  border-radius: 3px;
  background: #334155;
  color: #e2e8f0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.demo-indicator {
  padding: 4px 7px;
  border-radius: 4px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.demo-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 11px;
}
.demo-notice strong {
  font-size: 10px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.demo-notice span {
  color: #3b82f6;
}
