﻿:root {
  --night: #05080d;
  --panel: #0b1018;
  --card: #0f1620;
  --edge: #1a2535;
  --edge2: #243348;
  --red: #e8193c;
  --red2: #ff4060;
  --blue: #1e8fff;
  --cyan: #00d4ff;
  --gold: #f5a623;
  --green: #00e676;
  --orange: #ff9500;
  --purple: #bf5af2;
  --text: #dce8f5;
  --dim: #5c7a99;
  --muted: #2a3d52;
  --ff-display: 'Bebas Neue', sans-serif;
  --ff-body: 'DM Sans', sans-serif;
  --ff-mono: 'Share Tech Mono', monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 15% 10%, rgba(0, 212, 255, 0.08), transparent 40%),
              radial-gradient(circle at 85% 20%, rgba(232, 25, 60, 0.06), transparent 35%),
              var(--night);
  color: var(--text);
  font-family: var(--ff-body);
  min-height: 100%;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: radial-gradient(#fff 0.7px, transparent 0.7px);
  background-size: 4px 4px;
  z-index: -1;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  color: var(--blue);
}

h1,
h2,
h3,
h4 {
  margin: 0 0 10px;
  font-family: var(--ff-display);
  letter-spacing: 0.04em;
  font-weight: 400;
}

p {
  margin: 0 0 12px;
  color: var(--dim);
}

.main-wrap {
  width: min(1320px, 100% - 24px);
  margin: 20px auto;
}

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 100%), var(--panel);
  border: 1px solid var(--edge);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 12px;
  padding: 12px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

label {
  display: block;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

input,
select,
textarea,
button {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--edge2);
  background: #09131f;
  color: var(--text);
  padding: 10px 12px;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.btn {
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 10px 14px;
}

.btn:hover {
  background: var(--red2);
}

.btn.secondary {
  background: var(--edge2);
}

.btn.secondary:hover {
  background: #314964;
}

.btn.success {
  background: var(--green);
  color: #032611;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--edge2);
  color: var(--dim);
  font-size: 12px;
}

.mono {
  font-family: var(--ff-mono);
}

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

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--edge);
  text-align: left;
  padding: 8px;
  font-size: 14px;
}

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

.kpi {
  background: #09131f;
  border: 1px solid var(--edge);
  border-radius: 10px;
  padding: 10px;
}

.kpi .value {
  font-family: var(--ff-mono);
  font-size: 20px;
  color: var(--text);
}

.kpi .label {
  font-size: 12px;
  color: var(--dim);
}

.toast-wrap {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 4000;
  display: grid;
  gap: 8px;
}

.toast {
  background: #111d2d;
  border: 1px solid var(--edge2);
  border-left: 4px solid var(--cyan);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 240px;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.35);
}

.priority-p1 { color: #ff6f7f; }
.priority-p2 { color: #ffab5c; }
.priority-p3 { color: #8fd3ff; }
.priority-p4 { color: #a9b9c9; }

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  margin-right: 6px;
}

.status-dot.alarm { background: var(--red); }
.status-dot.maintenance { background: var(--orange); }
.status-dot.busy { background: var(--blue); }

.hero {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--edge);
  background: linear-gradient(130deg, rgba(0, 212, 255, 0.11), rgba(232, 25, 60, 0.08) 60%, rgba(245, 166, 35, 0.09));
  overflow: hidden;
}

.hero canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 22px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.footer {
  text-align: center;
  color: var(--dim);
  font-size: 12px;
  margin: 20px 0 30px;
}

.hidden {
  display: none !important;
}

.center {
  display: grid;
  place-items: center;
}

@media (max-width: 1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-wrap {
    width: calc(100% - 16px);
    margin: 12px auto;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .panel,
  .card {
    padding: 10px;
    border-radius: 10px;
  }

  h1 {
    font-size: 32px;
  }

  h2 {
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
