@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700&family=Sora:wght@400;600;700&display=swap');

:root {
  --primary: #06d4e6;
  --primary-strong: #12f3ff;
  --bg: #050b16;
  --bg-2: #0a1224;
  --bg-3: #0f1b35;
  --panel: #0b1428;
  --panel-2: #111c36;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f7ff;
  --muted: #8fa2c6;
  --success: #20dca0;
  --warning: #ffb74d;
  --danger: #ff5b6e;
  --shadow: 0 20px 60px rgba(5, 10, 25, 0.45);
}

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

html, body {
  height: 100%;
}

body {
  font-family: 'Manrope', sans-serif;
  background: radial-gradient(circle at 10% 10%, rgba(6, 212, 230, 0.12), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(7, 64, 142, 0.35), transparent 45%),
    radial-gradient(circle at 80% 90%, rgba(6, 212, 230, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #071125 0%, #050b16 60%);
  border-right: 1px solid var(--border);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 48px;
  height: 48px;
}

.brand h1 {
  font-family: 'Sora', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.6px;
}

.brand span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  text-align: left;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.nav button:hover {
  color: var(--text);
  border-color: rgba(6, 212, 230, 0.25);
  background: rgba(6, 212, 230, 0.08);
}

.nav button.active {
  color: var(--text);
  border-color: rgba(6, 212, 230, 0.6);
  background: rgba(6, 212, 230, 0.15);
  box-shadow: inset 0 0 0 1px rgba(6, 212, 230, 0.2);
}

.nav .tag {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.7rem;
  color: var(--muted);
}

.sidebar-footer {
  margin-top: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 12px rgba(32, 220, 160, 0.6);
}

.main {
  padding: 24px 32px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
}

.topbar .subtitle {
  color: var(--muted);
  font-size: 0.95rem;
}

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

.clock {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.9rem;
  color: var(--muted);
}

.btn {
  border: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #002228;
  box-shadow: 0 10px 30px rgba(6, 212, 230, 0.25);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.view {
  display: none;
  animation: fadeUp 0.5s ease forwards;
}

.view.active {
  display: block;
}

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

.grid.cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid.cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 212, 230, 0.05), transparent 50%);
  opacity: 0.8;
  pointer-events: none;
}

.card h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  margin-bottom: 10px;
}

.metric {
  font-size: 2rem;
  font-weight: 700;
}

.metric span {
  font-size: 0.9rem;
  color: var(--muted);
  margin-left: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #061219;
}

.badge.success { background: rgba(32, 220, 160, 0.9); }
.badge.warning { background: rgba(255, 183, 77, 0.9); }
.badge.danger { background: rgba(255, 91, 110, 0.9); }

.list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.list-item strong {
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.08em;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(6, 212, 230, 0.12);
  color: var(--primary-strong);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}

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

.zone {
  padding: 10px;
  border-radius: 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  border: 1px solid transparent;
}

.zone.ok {
  background: rgba(32, 220, 160, 0.15);
  color: var(--success);
  border-color: rgba(32, 220, 160, 0.3);
}

.zone.open {
  background: rgba(255, 183, 77, 0.15);
  color: var(--warning);
  border-color: rgba(255, 183, 77, 0.3);
}

.zone.bypass {
  background: rgba(255, 91, 110, 0.15);
  color: var(--danger);
  border-color: rgba(255, 91, 110, 0.3);
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.highlight {
  border-left: 3px solid var(--primary);
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
  }
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav button {
    font-size: 0.85rem;
  }
}
