:root {
  --bg: #0b1220;
  --panel: #0f172a;
  --ink: #e5e7eb;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --border: rgba(255, 255, 255, 0.12);

  --shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.wrap {
  max-width: 1200px;
  margin: 18px auto;
  padding: 0 14px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

h1 {
  margin: 0;
  font-size: 18px;
}

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

.grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: start;
  margin-top: 12px;
}

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

.card {
  margin-top: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
}

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

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.between {
  justify-content: space-between;
}

.btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #091225;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 750;
  transition: border-color 0.15s ease, transform 0.05s ease, background 0.15s ease;
}

.btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #001018;
}

.btn.danger {
  background: transparent;
  border-color: rgba(239, 68, 68, 0.35);
}

.btn.danger:hover {
  border-color: rgba(239, 68, 68, 0.6);
}

input,
select {
  background: #08101f;
  color: var(--ink);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  min-width: 220px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

select {
  min-width: 160px;
}

input:focus,
select:focus {
  border-color: rgba(56, 189, 248, 0.55);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

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

.big {
  font-size: 22px;
  margin-top: 8px;
}

.sep {
  height: 1px;
  background: var(--border);
  margin: 10px 0;
}

.tableWrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.08);
}

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

th,
td {
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.85));
  backdrop-filter: blur(6px);
  z-index: 1;
}

tr:hover td {
  background: rgba(56, 189, 248, 0.03);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.chip {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 12px;
  white-space: nowrap;
}

.chip.ok {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.22);
}

.chip.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
}

.chip.info {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.22);
}

.chip.good {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.22);
}

.chip.off {
  opacity: 0.7;
}

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

.actions .btn {
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.toggle {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 16px;
  background: #091225;
  border: 1px solid var(--border);
  padding: 10px 12px;
  border-radius: 999px;
  opacity: 0;
  transition: 0.18s;
}

.who {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 240px;
}

.avatar,
.avatarPh {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #071022;
  flex: 0 0 auto;
}

.avatar {
  object-fit: cover;
  display: block;
}

.avatarPh {
  display: none;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 12px;
  line-height: 1;
  color: var(--muted);
  background: #08101f;
}

.big .avatar,
.big .avatarPh {
  width: 32px;
  height: 32px;
}

.big .avatarPh {
  font-size: 12px;
  line-height: 1;
}

@media (max-width: 520px) {
  input {
    min-width: 160px;
  }

  table {
    min-width: 760px;
  }

  .who {
    min-width: 0;
  }
}
