﻿:root {
  --bg: #091d2a;
  --bg-2: #11374f;
  --card: rgba(9, 36, 52, 0.82);
  --line: rgba(169, 218, 244, 0.35);
  --text: #e8f8ff;
  --muted: #b8d7e8;
  --accent: #28c4ff;
  --warn: #ff9f43;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 15%, #1f5b7a, transparent 40%),
    radial-gradient(circle at 80% 10%, #314d9b, transparent 35%),
    linear-gradient(130deg, var(--bg), var(--bg-2));
}

.layout {
  max-width: 1260px;
  margin: 0 auto;
  padding: 24px 14px 40px;
  display: grid;
  gap: 14px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

h1,
h2 {
  margin: 0;
  font-family: "Russo One", sans-serif;
  letter-spacing: 0.03em;
}

h1 {
  font-size: clamp(22px, 3.5vw, 34px);
}

h2 {
  font-size: clamp(16px, 2.6vw, 22px);
}

.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
}

.form-grid {
  display: grid;
  gap: 8px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--muted);
}

input,
select,
button {
  font-family: inherit;
}

input,
select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(186, 223, 242, 0.55);
  background: rgba(2, 17, 27, 0.58);
  color: #f4fcff;
  padding: 10px 11px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(40, 196, 255, 0.18);
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #042235;
  background: linear-gradient(120deg, #95e5ff, var(--accent));
  cursor: pointer;
}

button:hover {
  filter: brightness(1.06);
}

button.ghost {
  color: #e5f8ff;
  background: rgba(7, 31, 47, 0.8);
  border: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.stack-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.stat-card {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(5, 26, 39, 0.75);
  padding: 12px;
}

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

.stat-card .value {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 800;
}

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

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

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

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

th,
td {
  text-align: left;
  padding: 8px;
  border-bottom: 1px solid rgba(180, 220, 240, 0.2);
  font-size: 13px;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 11px;
}

.mono {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  margin: 0;
}

.forms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.badge {
  border-radius: 999px;
  padding: 8px 12px;
  border: 1px solid rgba(161, 226, 255, 0.45);
  background: rgba(5, 38, 56, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.list-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.list-item {
  border: 1px solid rgba(178, 223, 246, 0.2);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(6, 28, 41, 0.7);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.empty-row {
  border: 1px dashed rgba(178, 223, 246, 0.3);
  border-radius: 10px;
  padding: 10px;
  color: var(--muted);
  font-size: 13px;
}

.details-code {
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d6efff;
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 16px;
  max-width: min(420px, calc(100vw - 28px));
  border-radius: 10px;
  border: 1px solid rgba(191, 228, 246, 0.5);
  background: rgba(2, 18, 29, 0.92);
  padding: 10px 12px;
  font-weight: 700;
}

.muted {
  color: var(--muted);
  margin: 8px 0 0;
}

.hidden {
  display: none !important;
}

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

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

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