﻿:root {
  --bg: #020617;
  --bg2: #0b1226;
  --card: #111b36;
  --line: #1f2a4f;
  --text: #e2e8f0;
  --muted: #9ca8c9;
  --warning: #f59e0b;
  --critical: #ef4444;
  --ok: #22c55e;
  --accent: #38bdf8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", "SF Pro Text", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #14254f, var(--bg) 45%),
    radial-gradient(circle at 90% 90%, #143259, transparent 35%),
    var(--bg);
}

.hidden {
  display: none;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 12px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.auth-card {
  max-width: 520px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(6px);
}

.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.stats {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.main-shell {
  display: grid;
  gap: 12px;
  padding: 12px;
}

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

.menu-tile {
  display: grid;
  gap: 6px;
  align-items: start;
  text-align: left;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, #162a57, #0f1e40);
}

.menu-tile strong {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-tile span {
  color: var(--muted);
  font-size: 0.82rem;
}

.menu-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35) inset;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 41, 80, 0.35), rgba(15, 23, 42, 0.6));
  padding: 12px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-size: 1rem;
}

.material-symbols-rounded.icon {
  font-size: 20px;
  line-height: 1;
  color: var(--accent);
}

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

.row {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: var(--bg2);
}

.row h3 {
  margin: 0;
  font-size: 0.95rem;
}

.row p {
  margin: 6px 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.muted {
  color: var(--muted);
  font-size: 0.85rem;
}

#playerInfo {
  margin: 4px 0 0;
}

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

button,
select,
input {
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.95rem;
}

button {
  padding: 8px 12px;
  color: var(--text);
  background: #132448;
}

button:hover {
  border-color: var(--accent);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

select,
input {
  width: 100%;
  padding: 0 10px;
  color: var(--text);
  background: #0b1530;
}

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

.inline-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.inline-form button {
  align-self: end;
}

.route-form label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.eye-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  min-height: 34px;
  width: 34px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.eye-btn .material-symbols-rounded {
  font-size: 20px;
  color: var(--muted);
}

.eye-btn:hover .material-symbols-rounded {
  color: var(--accent);
}

.alert {
  border-radius: 10px;
  border: 1px solid var(--line);
  padding: 8px;
  margin-bottom: 8px;
}

.alert.warning {
  border-color: var(--warning);
}

.alert.critical {
  border-color: var(--critical);
}

.progress {
  width: 100%;
  height: 8px;
  border-radius: 99px;
  background: #1e293b;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: var(--ok);
}

@media (max-width: 768px) {
  .menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 20px;
  }
}
