:root {
  --blue: #03a9f4;
  --yellow: #ffc107;
  --ink: #15202b;
  --muted: #65717c;
  --line: #dfe6ea;
  --paper: #f4f7f9;
  --white: #ffffff;
  --danger: #c0392b;
  --success: #078b61;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}

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

button,
input {
  font: inherit;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  padding: 24px;
  color: #ffffff;
  background: #101c27;
}

.admin-brand {
  display: grid;
  gap: 4px;
  margin-bottom: 34px;
}

.admin-brand span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: #111827;
  font-weight: 800;
  background: var(--yellow);
  border-radius: 10px;
}

.admin-brand strong {
  color: var(--blue);
  font-size: 22px;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.68);
}

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

.sidebar nav a {
  padding: 12px 14px;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
}

.sidebar nav a.active,
.sidebar nav a:hover {
  color: #ffffff;
  background: rgba(3, 169, 244, 0.2);
}

.admin-main {
  margin-left: 260px;
  padding: 28px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 34px;
}

.logout,
.panel button,
.login-card button {
  border: 0;
  color: #101c27;
  font-weight: 800;
  background: var(--yellow);
  border-radius: 8px;
  cursor: pointer;
}

.logout {
  padding: 11px 14px;
}

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

.status {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.status.ok {
  border-color: rgba(7, 139, 97, 0.25);
}

.status.ok strong {
  color: var(--success);
}

.status.bad strong {
  color: var(--danger);
}

.status span,
.panel p,
.metric-card small {
  color: var(--muted);
}

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

.metric-card {
  padding: 20px;
}

.metric-card span,
.metric-card small {
  display: block;
}

.metric-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 34px;
}

.panel {
  padding: 22px;
}

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

.panel button {
  min-height: 42px;
  padding: 0 16px;
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.empty-state {
  padding: 22px;
  color: var(--muted);
  background: #f8fafb;
  border: 1px dashed #cfd9df;
  border-radius: 8px;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.login-body {
  background:
    linear-gradient(135deg, rgba(12, 25, 40, .78), rgba(12, 34, 31, .6)),
    url("../img/login-bg.png") center / cover fixed no-repeat,
    #102236;
  min-height: 100vh;
}

.login-screen {
  align-items: stretch;
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 430px;
  margin: 0 auto;
  min-height: 100vh;
  max-width: 1180px;
  padding: 34px 24px;
}

.login-brand {
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 42px 54px 42px 0;
}

.app-mark {
  align-items: center;
  background: transparent;
  border-radius: 8px;
  display: inline-flex;
  height: 76px;
  justify-content: center;
  margin-bottom: 28px;
  padding: 0;
  width: 230px;
}

.app-mark img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.login-brand .eyebrow {
  color: #cbd8e7;
}

.login-brand h1 {
  max-width: 620px;
}

.login-brand p {
  color: #d7e1ec;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
}

.login-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.login-stats span {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .24);
  border-radius: 6px;
  color: #ffffff;
  font-weight: 800;
  padding: 10px 14px;
}

.login-card {
  align-self: center;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
  padding: 28px;
}

.login-card-head {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
}

.login-card-head h2 {
  font-size: 1.55rem;
  font-weight: 850;
  margin: 0;
}

.lock-icon {
  align-items: center;
  background: #e8f1ee;
  border-radius: 8px;
  color: var(--blue);
  display: inline-flex;
  font-weight: 900;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.login-logo-mark {
  background: #ffffff;
  border: 1px solid #dde4ec;
  padding: 6px;
  width: 48px;
}

.login-logo-mark img {
  display: block;
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.alert {
  background: #fff1f0;
  border: 1px solid #ffd0cc;
  border-radius: 6px;
  color: #9a2b20;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px;
}

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

.login-form label {
  color: #223047;
  font-weight: 800;
  margin-top: 6px;
}

.login-form input {
  background: #f7f9fb;
  border: 1px solid #ccd6e2;
  border-radius: 6px;
  color: #18212f;
  font: inherit;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.login-form input:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(3, 169, 244, .18);
}

.password-field {
  display: flex;
}

.password-field input {
  border-right: 0;
}

.password-toggle {
  align-items: center;
  background: #eef3f8;
  border: 1px solid #b8c4d2;
  border-radius: 0 6px 6px 0;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 44px;
  font: inherit;
  justify-content: center;
  min-height: 46px;
  padding: 0;
}

.password-field input:first-child {
  border-radius: 6px 0 0 6px;
}

.password-toggle img {
  display: block;
  height: 21px;
  width: 21px;
}

.password-toggle:hover,
.password-toggle:focus {
  background: #c9dff5;
  border-color: #4c89c3;
  outline: none;
}

.login-form > button.login-submit {
  align-items: center;
  background: var(--yellow);
  border: 1px solid #b59400;
  border-radius: 6px;
  color: #111111;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: .88rem;
  font-weight: 850;
  justify-content: center;
  margin-top: 12px;
  min-height: 48px;
  padding: 0 12px;
  white-space: nowrap;
}

.login-form > button.login-submit:hover,
.login-form > button.login-submit:focus {
  background: #c9dff5;
  border-color: #4c89c3;
  outline: none;
}

.login-note {
  color: #687589;
  font-size: .9rem;
  line-height: 1.5;
  margin: 18px 0 0;
}

@media (max-width: 860px) {
  .login-screen {
    grid-template-columns: 1fr;
    max-width: 620px;
    padding: 24px;
  }

  .login-brand {
    padding: 12px 0 26px;
  }

  .login-brand h1 {
    font-size: 2rem;
  }

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

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

  .admin-main {
    margin-left: 0;
    padding: 20px;
  }

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

@media (max-width: 560px) {
  .login-screen {
    padding: 18px;
  }

  .login-brand {
    text-align: left;
  }

  .login-card {
    padding: 22px;
  }

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

  .metric-grid,
  .sidebar nav {
    grid-template-columns: 1fr;
  }
}
