:root{
  --bg0:#0b0d12;
  --bg1:#0f1420;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --line:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.90);
  --muted:rgba(255,255,255,.65);
  --muted2:rgba(255,255,255,.45);
  --shadow: 0 18px 60px rgba(0,0,0,.45);
  --accent:#7c9cff;
  --accent2:#67ffd1;
  --danger:#ff6b8a;
  --radius:18px;
  --radius2:22px;
  --gap:16px;
}

html[data-theme="light"]{
  --bg0:#f6f7fb;
  --bg1:#eef1f8;
  --card:rgba(0,0,0,.04);
  --card2:rgba(0,0,0,.06);
  --line:rgba(0,0,0,.10);
  --text:rgba(0,0,0,.88);
  --muted:rgba(0,0,0,.58);
  --muted2:rgba(0,0,0,.42);
  --shadow: 0 18px 60px rgba(0,0,0,.15);
  --accent:#3b6bff;
  --accent2:#00a884;
  --danger:#e94b6a;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background: linear-gradient(180deg,var(--bg0),var(--bg1));
  overflow-x:hidden;
}

.bg{ position:fixed; inset:0; pointer-events:none; z-index:0; }
.fx-noise{
  opacity:.18;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.fx-grid{
  opacity:.22;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, black 0%, transparent 64%);
}
.fx-orbs::before,
.fx-orbs::after{
  content:"";
  position:absolute;
  width:520px;
  height:520px;
  border-radius:999px;
  filter: blur(50px);
  opacity:.34;
  transform: translate3d(0,0,0);
  animation: float 10s ease-in-out infinite;
}
.fx-orbs::before{
  left:-140px;
  top:80px;
  background: radial-gradient(circle at 30% 30%, var(--accent), transparent 60%);
}
.fx-orbs::after{
  right:-140px;
  top:240px;
  animation-delay:-3s;
  background: radial-gradient(circle at 60% 40%, var(--accent2), transparent 60%);
}
@keyframes float{
  0%,100%{ transform: translateY(0) translateX(0); }
  50%{ transform: translateY(-22px) translateX(12px); }
}

.topbar{
  position:sticky;
  top:0;
  z-index:3;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 22px;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(0,0,0,.18), rgba(0,0,0,0));
  border-bottom:1px solid rgba(255,255,255,.06);
}
html[data-theme="light"] .topbar{
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(255,255,255,0));
  border-bottom:1px solid rgba(0,0,0,.06);
}

.brand{ display:flex; align-items:center; gap:12px; }
.logo{
  width:40px; height:40px;
  border-radius:14px;
  display:grid; place-items:center;
  background: linear-gradient(135deg, rgba(124,156,255,.20), rgba(103,255,209,.16));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
}
.logo svg{ width:22px; height:22px; color:var(--text); opacity:.95; }
.brand-name{ font-weight:700; letter-spacing:.2px; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:2px; }

.top-actions{ display:flex; gap:10px; align-items:center; }
.chip{
  display:flex; align-items:center; gap:8px;
  padding:10px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  user-select:none;
}
html[data-theme="light"] .chip{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
}
.chip:active{ transform: translateY(1px); }
.chip-ico{ width:18px; height:18px; display:inline-grid; place-items:center; opacity:.9; }
.chip-ico svg{ width:18px; height:18px; }

.layout{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns: 290px 1fr;
  gap:18px;
  max-width: 1160px;
  margin: 20px auto 34px;
  padding: 0 16px;
}

.sidebar{ display:block; }
.panel{
  border-radius: var(--radius2);
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
}
html[data-theme="light"] .panel{
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.08);
}
.panel-title{
  padding:16px 16px 10px;
  font-weight:650;
  color:var(--text);
}
.nav{ padding: 0 10px 10px; display:grid; gap:6px; }
.nav-item{
  display:flex; align-items:center; gap:10px;
  padding:10px 10px;
  border-radius: 14px;
  color:var(--muted);
  background: transparent;
}
.nav-item .dot{
  width:10px; height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.22);
  opacity:.8;
}
html[data-theme="light"] .nav-item .dot{ border-color: rgba(0,0,0,.22); }
.nav-item.active{
  color:var(--text);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
}
html[data-theme="light"] .nav-item.active{
  background: rgba(0,0,0,.03);
  border:1px solid rgba(0,0,0,.07);
}
.panel-foot{
  padding: 12px 16px 16px;
  border-top:1px solid rgba(255,255,255,.08);
}
html[data-theme="light"] .panel-foot{ border-top:1px solid rgba(0,0,0,.07); }
.hint{ font-size:12px; color:var(--muted); }
.bar{
  margin:10px 0 8px;
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
}
html[data-theme="light"] .bar{
  background: rgba(0,0,0,.03);
  border:1px solid rgba(0,0,0,.07);
}
.bar-fill{
  height:100%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.content{ position:relative; }
.shell{
  border-radius: var(--radius2);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  overflow:hidden;
}
html[data-theme="light"] .shell{
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(0,0,0,.08);
}
.shell-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
html[data-theme="light"] .shell-head{ border-bottom: 1px solid rgba(0,0,0,.07); }

.search{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
  min-width: 280px;
}
html[data-theme="light"] .search{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.03);
}
.search-ico{ width:18px; height:18px; opacity:.8; }
.search-ico svg{ width:18px; height:18px; }
.search-placeholder{ color:var(--muted); font-size:13px; }

.head-actions{ display:flex; gap:10px; }
.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  color:var(--text);
  padding:10px 12px;
  border-radius: 14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
html[data-theme="light"] .btn{
  border:1px solid rgba(0,0,0,.10);
  background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.01));
}
.btn.ghost{
  background: rgba(255,255,255,.04);
}
html[data-theme="light"] .btn.ghost{ background: rgba(0,0,0,.02); }
.btn:disabled{
  opacity:.55;
  cursor:not-allowed;
}
.btn:active:not(:disabled){ transform: translateY(1px); }
.btn-ico{ width:18px; height:18px; display:inline-grid; place-items:center; opacity:.9; }
.btn-ico svg{ width:18px; height:18px; }

.table{
  padding: 10px 12px 16px;
}
.row{
  display:grid;
  grid-template-columns: 1fr 120px 140px 120px;
  gap:12px;
  padding: 12px 10px;
  align-items:center;
  border-radius: 14px;
}
.row.head{
  padding-top: 10px;
  padding-bottom: 8px;
  color:var(--muted);
  font-size:12px;
}
.row.sk{
  border: 1px solid rgba(255,255,255,.06);
  background: rgba(255,255,255,.03);
  margin-top:10px;
}
html[data-theme="light"] .row.sk{
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(0,0,0,.02);
}
.sk-line{
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.16), rgba(255,255,255,.08));
  background-size: 240px 100%;
  animation: shimmer 1.35s linear infinite;
}
html[data-theme="light"] .sk-line{
  background: linear-gradient(90deg, rgba(0,0,0,.05), rgba(0,0,0,.10), rgba(0,0,0,.05));
}
@keyframes shimmer{
  0%{ background-position: -240px 0; }
  100%{ background-position: 240px 0; }
}
.w60{ width:60%; }
.w58{ width:58%; }
.w55{ width:55%; }
.w50{ width:50%; }
.w45{ width:45%; }
.w35{ width:35%; }
.w32{ width:32%; }
.w30{ width:30%; }
.w28{ width:28%; }
.w26{ width:26%; }
.w25{ width:25%; }
.w24{ width:24%; }
.w22{ width:22%; }
.w20{ width:20%; }
.w18{ width:18%; }

.gate{
  position:absolute;
  inset: 0;
  display:grid;
  place-items:center;
  padding: 22px;
}
.shell{
  filter: blur(2.2px);
  opacity:.72;
}
.gate-card{
  width:min(560px, 100%);
  border-radius: var(--radius2);
  background: rgba(20,25,38,.66);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  padding: 18px 18px 14px;
  position:relative;
}
html[data-theme="light"] .gate-card{
  background: rgba(255,255,255,.84);
  border: 1px solid rgba(0,0,0,.10);
}
.gate-top{
  display:flex;
  align-items:center;
  gap:10px;
  padding: 4px 2px 6px;
}
.pulse{
  width:10px; height:10px;
  border-radius:999px;
  background: var(--danger);
  box-shadow: 0 0 0 0 rgba(255,107,138,.55);
  animation: pulse 1.2s ease-out infinite;
}
@keyframes pulse{
  0%{ box-shadow: 0 0 0 0 rgba(255,107,138,.48); }
  100%{ box-shadow: 0 0 0 12px rgba(255,107,138,0); }
}
.gate-title{
  font-size: 18px;
  font-weight: 720;
  letter-spacing:.2px;
}
.gate-msg{
  color: var(--muted);
  margin: 6px 2px 12px;
  line-height: 1.35;
}
.gate-row{
  display:flex;
  align-items:center;
  gap:12px;
  padding: 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.05);
}
html[data-theme="light"] .gate-row{
  border: 1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}
.spinner{
  width:24px;
  height:24px;
  border-radius:999px;
  border: 3px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.68);
  animation: spin .9s linear infinite;
}
html[data-theme="light"] .spinner{
  border-color: rgba(0,0,0,.10);
  border-top-color: rgba(0,0,0,.55);
}
@keyframes spin{ to{ transform: rotate(360deg); } }

.gate-meta{ flex:1; }
.meta-line{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:10px;
}
.meta-k{ color:var(--muted); font-size:13px; }
.meta-v{
  font-variant-numeric: tabular-nums;
  font-weight: 720;
  letter-spacing:.3px;
}
.meta-sub{ color:var(--muted2); font-size:12px; margin-top:2px; }

.progress{
  height: 10px;
  border-radius: 999px;
  overflow:hidden;
  margin: 12px 2px 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
html[data-theme="light"] .progress{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}
.progress-bar{
  height:100%;
  width:0%;
  border-radius:999px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  transition: width .35s ease;
}

.gate-actions{
  display:flex;
  gap:10px;
  margin-top: 6px;
}
.gate-actions .btn{ flex:1; justify-content:center; }
.gate-foot{ margin-top: 10px; }
.tiny{
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.35;
  padding: 0 2px;
}

.lang-menu{
  position:absolute;
  top: 70px;
  right: 22px;
  width: 220px;
  border-radius: 16px;
  padding: 8px;
  background: rgba(20,25,38,.86);
  border: 1px solid rgba(255,255,255,.14);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
html[data-theme="light"] .lang-menu{
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(0,0,0,.10);
}
.lang-item{
  width:100%;
  display:flex;
  align-items:center;
  gap:10px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  cursor:pointer;
}
.lang-item:hover{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.10);
}
html[data-theme="light"] .lang-item:hover{
  background: rgba(0,0,0,.03);
  border-color: rgba(0,0,0,.08);
}
.pill{
  width:38px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  height:24px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .2px;
}
html[data-theme="light"] .pill{
  border:1px solid rgba(0,0,0,.10);
  background: rgba(0,0,0,.02);
}

.footer{
  position:relative;
  z-index:1;
  max-width: 1160px;
  margin: 0 auto 22px;
  padding: 0 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color: var(--muted2);
  font-size: 12px;
}
.footer-left{ display:flex; align-items:center; gap:10px; }
.badge{
  width:10px;
  height:10px;
  border-radius:999px;
  background: rgba(124,156,255,.55);
  box-shadow: 0 0 0 6px rgba(124,156,255,.10);
}

@media (max-width: 980px){
  .layout{ grid-template-columns: 1fr; }
  .sidebar{ display:none; }
  .row{ grid-template-columns: 1fr 90px 110px; }
  .row > :nth-child(4){ display:none; }
}
@media (max-width: 520px){
  .head-actions{ display:none; }
  .search{ min-width: 0; width: 100%; }
  .gate-actions{ flex-direction:column; }
}
