:root{
  --bg: #070b12;
  --surface: rgba(255,255,255,0.06);
  --surface2: rgba(255,255,255,0.10);
  --border: rgba(255,255,255,0.12);
  --text: #e8edf7;
  --muted: rgba(232,237,247,0.70);

  --primary: #4cc9f0;
  --secondary: #8b5cf6;
  --danger: #ef4444;

  --ok: #22c55e;
  --warn: #f59e0b;
  --bad: #ef4444;

  --shadow: 0 12px 40px rgba(0,0,0,.45);
  --radius: 16px;
}

html[data-theme="light"]{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface2: #f2f4fa;
  --border: #e5e7eb;
  --text: #0f172a;
  --muted: rgba(15,23,42,0.65);
  --shadow: 0 10px 30px rgba(15,23,42,.10);
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(900px 500px at 20% 10%, rgba(76,201,240,.15), transparent 60%),
              radial-gradient(900px 500px at 80% 0%, rgba(139,92,246,.18), transparent 55%),
              var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.topbar{
  position: sticky;
  top:0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.25);
  border-bottom: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 18px;
}

html[data-theme="light"] .topbar{
  background: rgba(255,255,255,0.65);
}

.brand{ display:flex; gap:12px; align-items:center; }
.logo-dot{
  width: 12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 18px rgba(76,201,240,.35);
}
.title{ font-weight: 800; letter-spacing: .2px; }
.subtitle{ font-size: 12px; color: var(--muted); margin-top:2px; }

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

.container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

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

@media (max-width: 980px){
  .grid{ grid-template-columns: 1fr; }
  .topbar{ flex-wrap:wrap; gap:10px; }
}

.card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}

.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom: 10px;
}

h2{
  margin:0;
  font-size: 16px;
  letter-spacing: .2px;
}

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

.meta{ margin-top: 12px; }
.meta-row{
  display:flex; align-items:center; justify-content:space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.meta-label{ color: var(--muted); font-size: 12px; }
.meta-value{ font-weight: 700; font-size: 12px; }

.card-actions{ margin-top: 14px; display:flex; gap:10px; }

.btn{
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 700;
  font-size: 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: transform .05s ease, background .15s ease, border-color .15s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }
.btn[disabled]{ opacity:.55; cursor:not-allowed; }

.btn-primary{
  background: linear-gradient(135deg, rgba(76,201,240,.95), rgba(139,92,246,.85));
  border-color: rgba(255,255,255,0.18);
}
.btn-secondary{
  background: linear-gradient(135deg, rgba(139,92,246,.95), rgba(76,201,240,.65));
  border-color: rgba(255,255,255,0.18);
}
.btn-danger{
  background: rgba(239,68,68,.20);
  border-color: rgba(239,68,68,.35);
}
.btn-ghost{
  background: transparent;
}

.badge{
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  white-space:nowrap;
}
.badge[data-state="ok"]{ border-color: rgba(34,197,94,.45); background: rgba(34,197,94,.16); }
.badge[data-state="warn"]{ border-color: rgba(245,158,11,.50); background: rgba(245,158,11,.18); }
.badge[data-state="bad"]{ border-color: rgba(239,68,68,.50); background: rgba(239,68,68,.18); }
.badge[data-state="unknown"]{ border-color: var(--border); background: rgba(255,255,255,0.06); }

.notice{
  border-radius: var(--radius);
  border: 1px solid rgba(245,158,11,.45);
  background: rgba(245,158,11,.12);
  padding: 14px 16px;
  margin-bottom: 16px;
}
.notice-warn{ border-color: rgba(245,158,11,.45); background: rgba(245,158,11,.12); }
.notice-title{ font-weight: 900; margin-bottom:6px; }
.notice-text{ margin:0; color: var(--muted); }

.sep{
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.consent-title{ font-weight: 900; }
.consent-text{ margin: 8px 0 0; color: var(--muted); }
.consent-actions{ margin-top: 12px; display:flex; flex-wrap:wrap; gap:10px; }

.panel-head{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  margin-bottom: 10px;
}

.input{
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--text);
  outline: none;
}


.kv{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.kv-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.kv-k{ color: var(--muted); font-size: 12px; }
.kv-v{ font-weight: 900; font-size: 12px; word-break: break-word; text-align:right; }

.panel-actions{
  margin-top: 14px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.video-wrap{
  position: relative;
  overflow:hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.25);
  min-height: 220px;
}
video{
  width: 100%;
  height: auto;
  display:block;
  background: #000;
}
.video-hint{
  position:absolute;
  left: 12px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,0.12);
}

.list{
  margin: 10px 0 0 18px;
  color: var(--muted);
}
.list li{ margin: 6px 0; }

.footer{
  margin-top: 18px;
  text-align:center;
  color: var(--muted);
}
