* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0e17;
  --panel: #0f1521;
  --panel2: #151d2c;
  --border: #1e2a3d;
  --accent: #3b82f6;
  --accent2: #60a5fa;
  --text: #e6ecf5;
  --dim: #7e8ea6;
  --success: #22c55e;
  --danger: #ef4444;
  --paper: #f2ecdc;
  --ink: #1a2540;
}

html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 20% 0%, rgba(59,130,246,0.08), transparent 40%),
    radial-gradient(circle at 80% 100%, rgba(59,130,246,0.06), transparent 50%);
  background-attachment: fixed;
}

a { color: var(--accent2); text-decoration: none; }
a:hover { color: #93c5fd; }

.nav {
  display: flex; align-items: center; gap: 24px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,14,23,0.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.nav-logo {
  font-weight: 700; font-size: 18px;
  display: flex; align-items: center; gap: 10px;
}
.nav-logo .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 12px rgba(59,130,246,0.5);
}
.nav-links { display: flex; gap: 20px; margin-left: auto; align-items: center; }
.nav-links a { color: var(--dim); font-size: 14px; font-weight: 500; }
.nav-links a:hover, .nav-links a.active { color: var(--accent2); }

.container { max-width: 1200px; margin: 0 auto; padding: 32px; }

h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
h2 { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.subtitle { color: var(--dim); font-size: 14px; margin-bottom: 32px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
}

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  background: var(--accent);
  color: white; border: none; border-radius: 8px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all 0.15s;
  box-shadow: 0 4px 20px rgba(59,130,246,0.25);
}
.btn:hover:not(:disabled) { background: var(--accent2); transform: translateY(-1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.secondary {
  background: transparent; border: 1px solid var(--border);
  color: var(--text); box-shadow: none;
}
.btn.secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent2); }
.btn.danger { background: var(--danger); box-shadow: none; }
.btn.danger:hover:not(:disabled) { background: #f87171; }

input, select, textarea {
  font-family: inherit; font-size: 14px;
  background: var(--panel2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  outline: none; transition: border 0.15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }

.row { display: flex; gap: 12px; align-items: center; }
.row.gap { gap: 16px; }
.row.between { justify-content: space-between; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 12px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.08em; }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 6px;
  font-size: 12px; font-weight: 600;
  background: var(--panel2); color: var(--dim);
  border: 1px solid var(--border);
}
.tag.online { color: var(--success); border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.08); }
.tag.offline { color: var(--danger); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.08); }
.tag.blue { color: var(--accent2); border-color: rgba(96,165,250,0.3); background: rgba(96,165,250,0.08); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; font-size: 14px; }
th {
  color: var(--dim); font-weight: 500; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}
tr { border-bottom: 1px solid var(--border); }
tr:last-child { border-bottom: none; }
tr:hover td { background: rgba(59,130,246,0.04); }
.muted { color: var(--dim); }
.center { text-align: center; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---------- Hero (лендинг) ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: calc(100vh - 60px);
  text-align: center; padding: 40px;
}
.hero h1 {
  font-size: 56px; font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff, #60a5fa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 16px;
}
.hero p { color: var(--dim); font-size: 18px; max-width: 560px; margin-bottom: 40px; }
.hero .login-btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  background: linear-gradient(135deg, #1b2838, #2a475e);
  color: white; border-radius: 12px;
  font-size: 16px; font-weight: 600;
  border: 1px solid #3d6a8a;
  transition: all 0.2s;
}
.hero .login-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(59,130,246,0.3); }

/* ---------- Бумага "рукописное расписание" ---------- */
.paper {
  background: #f2ecdc;
  color: var(--ink);
  border-radius: 8px;
  padding: 28px 32px;
  font-family: 'Caveat', cursive;
  font-size: 22px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.6), inset 0 0 100px rgba(120,90,40,0.10);
  position: relative;
  overflow: hidden;
}
.paper::before {
  content: '';
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(to bottom,
      transparent 0, transparent 33px,
      rgba(120,90,40,0.14) 34px),
    radial-gradient(circle at 70% 20%, rgba(59,130,246,0.07), transparent 60%);
  pointer-events: none;
}
.paper table { position: relative; color: var(--ink); }
.paper th {
  color: #6b5d3f;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.12em;
  text-transform: none;
  border-bottom: 2px solid rgba(80,60,30,0.5);
  padding: 8px 12px;
}
.paper td {
  padding: 5px 12px;
  font-size: 24px;
  border-bottom: 1px dashed rgba(120,90,40,0.25);
  font-weight: 600;
}
.paper input.cell {
  background: transparent;
  border: none;
  outline: none;
  color: var(--ink);
  font-family: 'Caveat', cursive;
  font-size: 24px;
  font-weight: 700;
  width: 100%;
  padding: 0;
  text-align: center;
  letter-spacing: 0.05em;
}
.paper input.cell:focus {
  background: rgba(59,130,246,0.15);
  border-radius: 4px;
  border-bottom: 2px solid var(--accent);
}
.paper .station-name {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 340px;
}
.paper .header-title { text-align: left; font-weight: 700; padding-left: 4px; }
