* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(
        80rem 45rem at -15% -20%,
        rgba(124, 58, 237, 0.26),
        transparent 50%
      ),
    radial-gradient(
        70rem 40rem at 120% 0%,
        rgba(14, 165, 233, 0.2),
        transparent 55%
      ),
    #060913;
  color: #e5e7eb;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 16px 48px;
}

.card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.72));
  border-radius: 18px;
  padding: 18px;
  margin-top: 14px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow:
    0 14px 32px rgba(2, 6, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  padding: 18px 16px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 18px;
}

.brand h1 {
  margin: 0;
  font-size: 22px;
  color: #f8fafc;
}

.brand p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.nav-btn {
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(100, 116, 139, 0.5);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-weight: 700;
  cursor: pointer;
}

.nav-btn:hover {
  border-color: rgba(56, 189, 248, 0.6);
  transform: translateY(-1px);
}

.page {
  display: none;
}
.page.active {
  display: block;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.kpi-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.94), rgba(30, 41, 59, 0.74));
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.kpi-card p {
  margin: 0;
  font-size: 12px;
  color: #93c5fd;
  letter-spacing: 0.03em;
}
.kpi-card strong {
  display: block;
  margin-top: 7px;
  font-size: 22px;
  color: #f8fafc;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
  color: #f1f5f9;
}
.section-title p {
  margin: 6px 0 0;
  color: #94a3b8;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #cbd5e1;
  font-weight: 700;
}

input,
select,
button,
textarea {
  border: 1px solid rgba(100, 116, 139, 0.5);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

button.primary-btn {
  margin-top: 12px;
  border: none;
  cursor: pointer;
  font-weight: 800;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 60%, #8b5cf6 100%);
  color: #fff;
}

button.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  border-bottom: 1px solid rgba(71, 85, 105, 0.4);
  text-align: left;
  padding: 12px 10px;
  white-space: nowrap;
}

th {
  background: rgba(30, 41, 59, 0.8);
  color: #93c5fd;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message {
  min-height: 20px;
  margin-top: 12px;
  color: #7dd3fc;
  font-size: 13px;
  font-weight: 700;
}

.row-actions button {
  padding: 8px 10px;
  margin-left: 8px;
}

.hint {
  margin-top: 10px;
  color: #94a3b8;
  font-size: 12.5px;
  line-height: 1.4;
}

@media (max-width: 900px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav {
    justify-content: flex-start;
  }
}

