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

:root {
  --bg: #080d19;
  --panel: #101a2b;
  --panel2: #142239;
  --border: #22334d;
  --text: #edf4ff;
  --muted: #8fa3bf;
  --blue: #3285ff;
  --green: #23d18b;
  --red: #ff6577;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
  font-size: 14px;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.sidebar {
  width: 245px;
  flex-shrink: 0;
  padding: 24px 16px;
  background: #0c1424;
  border-right: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 28px;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: white;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), #1551bd);
}

.brand-name {
  font-weight: 800;
  letter-spacing: .5px;
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
}

.nav-label {
  margin: 20px 10px 10px;
  color: #617693;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--muted);
  border-radius: 10px;
  transition: .2s;
}

.nav a:hover,
.nav a.active {
  color: white;
  background: #172b48;
}

.nav a.active {
  border: 1px solid #234b7f;
}

.nav-icon {
  width: 22px;
  text-align: center;
}

.sidebar-bottom {
  margin-top: 35px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  background: var(--green);
  border-radius: 50%;
}

.main {
  min-width: 0;
  flex: 1;
  padding: 28px;
}

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

.page-title {
  margin: 0;
  font-size: 25px;
  font-weight: 800;
}

.page-desc {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.6;
}

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

.admin-pill {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  white-space: nowrap;
}

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

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

.card {
  min-width: 0;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-title {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
}

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

.stat-value {
  margin-top: 14px;
  font-size: 27px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stat-note {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
}

.blue { color: var(--blue); }
.green { color: var(--green); }
.red { color: var(--red); }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.input,
select,
input {
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  color: var(--text);
  background: #0b1423;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
}

.input:focus,
select:focus,
input:focus {
  border-color: var(--blue);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 15px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

.btn:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  color: var(--text);
  background: #1a2a42;
  border: 1px solid var(--border);
}

.btn-green {
  color: #042319;
  background: var(--green);
}

.btn-danger {
  color: white;
  background: #9f2f42;
}

.btn-small {
  padding: 7px 10px;
  font-size: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}

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

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

td {
  font-size: 12px;
}

tbody tr:hover {
  background: #142239;
}

.badge {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 7px;
  background: #1b2e48;
  color: #b9d5ff;
  font-size: 11px;
}

.badge-green {
  color: #8df2c5;
  background: #12372c;
}

.badge-red {
  color: #ffb5bd;
  background: #401c27;
}

.notice {
  padding: 14px;
  color: var(--muted);
  background: #0c1626;
  border: 1px solid var(--border);
  border-radius: 12px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
  background: #0b1423;
  color: var(--muted);
}

.result.success {
  color: #8df2c5;
  border: 1px solid #205b47;
}

.result.error {
  color: #ffb5bd;
  border: 1px solid #63303a;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.toolbar > * {
  flex: 1;
  min-width: 140px;
}

.mobile-menu {
  display: none;
}

@media (max-width: 1050px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .layout {
    display: block;
  }

  .sidebar {
    display: none;
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .sidebar.open {
    display: block;
  }

  .main {
    padding: 18px 13px;
  }

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

  .page-title {
    font-size: 21px;
  }

  .mobile-menu {
    display: inline-flex;
    margin-bottom: 16px;
  }

  .admin-pill {
    display: none;
  }

  .grid,
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .card {
    padding: 16px;
  }

  .stat-value {
    font-size: 24px;
  }
}
