:root {
  color: #18212f;
  background: #eef2f6;
  font-family: Arial, Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

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

[hidden] {
  display: none !important;
}

.login-screen {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(16, 24, 32, 0.92), rgba(27, 127, 121, 0.72)),
    #101820;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  max-width: 460px;
  padding: 28px;
  width: 100%;
}

.login-brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.login-brand strong,
.login-brand small {
  display: block;
}

.login-brand small {
  color: #66758a;
  margin-top: 4px;
}

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

.login-form h1 {
  font-size: 26px;
  margin-bottom: 8px;
}

.login-form p {
  color: #66758a;
  line-height: 1.7;
  margin-bottom: 0;
}

.login-error {
  background: #fff0f0;
  border: 1px solid #ffd0d0;
  border-radius: 8px;
  color: #b42318 !important;
  font-size: 14px;
  padding: 10px 12px;
}

.full {
  width: 100%;
}

.shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #101820;
  color: #ffffff;
  padding: 24px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.brand-mark {
  align-items: center;
  background: #19a7a1;
  border-radius: 8px;
  display: inline-flex;
  font-size: 22px;
  font-weight: 800;
  height: 44px;
  justify-content: center;
  width: 44px;
}

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

.brand small {
  color: #a9b7c4;
  margin-top: 4px;
}

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

.nav a {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #dce6ef;
  display: flex;
  justify-content: space-between;
  padding: 13px 14px;
  text-decoration: none;
}

.nav a.active,
.nav a:hover {
  background: #1f2d3a;
  border-color: #314253;
  color: #ffffff;
}

.nav small {
  color: #8fa2b4;
}

.content {
  min-width: 0;
  padding: 28px;
}

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

.kicker {
  color: #1b7f79;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 8px;
}

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

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

h2 {
  font-size: 19px;
  margin-bottom: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  background: #ffffff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  color: #18212f;
  cursor: pointer;
  min-height: 40px;
  padding: 0 14px;
}

button.primary {
  background: #1b7f79;
  border-color: #1b7f79;
  color: #ffffff;
}

.actions {
  display: flex;
  gap: 10px;
}

.section {
  margin-bottom: 24px;
}

.section-title {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title p {
  color: #66758a;
  margin-bottom: 0;
}

.metrics {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metrics article,
.panel {
  background: #ffffff;
  border: 1px solid #dbe3eb;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(16, 24, 32, 0.06);
}

.metrics article {
  padding: 18px;
}

.metrics span,
.metrics small {
  color: #66758a;
  display: block;
}

.metrics strong {
  display: block;
  font-size: 28px;
  margin: 10px 0 6px;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 2fr 1fr;
}

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

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

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

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

th,
td {
  border-bottom: 1px solid #edf1f5;
  padding: 13px 10px;
  text-align: right;
  white-space: nowrap;
}

th {
  color: #66758a;
  font-size: 13px;
}

.badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  padding: 5px 10px;
}

.badge.success {
  background: #e7f7ef;
  color: #13744b;
}

.badge.muted {
  background: #f0f3f7;
  color: #66758a;
}

.permissions {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.permissions li {
  align-items: center;
  background: #f7f9fb;
  border: 1px solid #e4ebf2;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.permissions strong {
  color: #1b7f79;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #526174;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  background: #ffffff;
  border: 1px solid #cbd5df;
  border-radius: 8px;
  color: #18212f;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.toggle-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.toggle-row input {
  height: 20px;
  min-height: 20px;
  width: 20px;
}

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

  .sidebar {
    padding: 18px;
  }

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

  .metrics,
  .grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 18px;
  }

  .topbar,
  .section-title {
    align-items: stretch;
    flex-direction: column;
  }

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

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