:root{
  --bg:#050808;
  --panel:rgba(11,18,17,.84);
  --panel-2:rgba(15,22,20,.95);
  --line:rgba(255,255,255,.08);
  --line-strong:rgba(138,247,186,.2);
  --text:#f2f7f4;
  --muted:#a4b4ad;
  --green:#8af7ba;
  --green2:#43d48b;
  --gold:#d8c089;
  --danger:#ff8f8f;
  --warn:#ffd27a;
  --shadow:0 20px 70px rgba(0,0,0,.45);
  --radius:24px;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  min-height:100vh;
  color:var(--text);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Tahoma,Arial,sans-serif;
  background:
    linear-gradient(180deg, rgba(0,0,0,.75), rgba(0,0,0,.94)),
    url("/dubai-bg.png") center/cover fixed no-repeat;
  overflow-x:hidden;
}

.bg-grid{
  position:fixed;
  inset:0;
  opacity:.18;
  pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
  background-size:34px 34px;
}
.bg-orb{
  position:fixed;
  border-radius:999px;
  filter:blur(90px);
  opacity:.18;
  pointer-events:none;
}
.orb-1{width:360px;height:360px;top:-60px;right:-80px;background:#20da8d}
.orb-2{width:300px;height:300px;bottom:-60px;left:-80px;background:#0f6b58}

#app{
  display:grid;
  grid-template-columns:320px 1fr;
  min-height:100vh;
  position:relative;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:22px 18px;
  background:linear-gradient(180deg, rgba(5,10,9,.93), rgba(7,12,11,.86));
  border-left:1px solid var(--line);
  backdrop-filter:blur(16px);
}

.brand-card,.sidebar-section,.panel,.kpi-card,.hero{
  background:linear-gradient(180deg, rgba(16,27,24,.78), rgba(8,12,11,.92));
  border:1px solid var(--line);
  box-shadow:var(--shadow);
}

.brand-card{
  border-radius:28px;
  padding:18px;
}
.brand-top{
  display:flex;
  align-items:center;
  gap:14px;
}
.brand-mark{
  width:56px;height:56px;
  border-radius:18px;
  display:grid;
  place-items:center;
  font-size:25px;
  font-weight:900;
  color:#04110a;
  background:linear-gradient(135deg,var(--green),#e4ffee);
}
.brand-title{font-size:26px;font-weight:900;letter-spacing:1.4px}
.brand-sub{margin-top:5px;color:var(--muted);font-size:12px;letter-spacing:2px}
.brand-live{margin-top:16px;display:flex;align-items:center;gap:10px;color:var(--green);font-weight:800}
.dot-live{
  width:10px;height:10px;border-radius:50%;
  background:var(--green);
  box-shadow:0 0 18px var(--green);
}

.sidebar-section{
  margin-top:18px;
  padding:16px;
  border-radius:22px;
}
.sidebar-label{
  color:var(--gold);
  font-size:13px;
  font-weight:800;
  margin-bottom:12px;
}
.sidebar-hint{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  line-height:1.7;
}

.segmented{display:flex;flex-direction:column;gap:10px}
.seg-btn{
  width:100%;
  background:rgba(255,255,255,.03);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  cursor:pointer;
  text-align:right;
  transition:.18s ease;
}
.seg-btn:hover{transform:translateY(-1px);border-color:var(--line-strong)}
.seg-btn.active{
  background:linear-gradient(135deg, rgba(138,247,186,.16), rgba(255,255,255,.03));
  border-color:rgba(138,247,186,.26);
}

.control{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.04);
  color:var(--text);
}
.btn-stack{display:flex;flex-direction:column;gap:10px}
.btn{
  width:100%;
  border:none;
  border-radius:16px;
  padding:13px 14px;
  font-weight:800;
  cursor:pointer;
}
.btn-primary{
  background:linear-gradient(135deg,var(--green),#ddffe8);
  color:#04110a;
}
.btn-secondary{
  background:rgba(255,255,255,.05);
  color:var(--text);
  border:1px solid var(--line);
}

.mini-status-list{display:flex;flex-direction:column;gap:10px}
.mini-status{
  display:flex;justify-content:space-between;align-items:center;
  padding:11px 12px;border-radius:14px;
  background:rgba(255,255,255,.03);border:1px solid var(--line);
}
.mini-status span{color:var(--muted)}

.main{padding:28px}
.hero{
  border-radius:30px;
  padding:24px 26px;
  margin-bottom:24px;
  display:flex;
  justify-content:space-between;
  gap:20px;
}
.eyebrow{
  color:var(--gold);
  font-size:12px;
  letter-spacing:1.5px;
  margin-bottom:10px;
}
.hero h1{
  margin:0;
  font-size:42px;
  line-height:1.05;
}
.hero-text{
  max-width:760px;
  color:var(--muted);
  line-height:1.9;
  font-size:15px;
  margin-top:12px;
}
.hero-right{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
}
.hero-badge{
  min-width:180px;
  border-radius:22px;
  padding:16px 18px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
}
.hero-badge-label{font-size:12px;color:var(--muted);margin-bottom:8px}
.hero-badge-value{font-size:20px;font-weight:900}

.top-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:16px;
  margin-bottom:18px;
}
.kpi-card{
  border-radius:24px;
  padding:18px;
}
.kpi-card.glow{
  border-color:rgba(138,247,186,.22);
  box-shadow:var(--shadow),0 0 35px rgba(138,247,186,.08);
}
.kpi-label{font-size:12px;color:var(--muted);margin-bottom:12px}
.kpi-value{font-size:30px;font-weight:900}
.kpi-sub{margin-top:10px;color:var(--muted);font-size:13px}

.content-grid{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:16px;
}
.content-grid.single{grid-template-columns:1fr}

.panel{
  border-radius:28px;
  padding:18px;
}
.panel-large{min-height:420px}
.panel-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:16px;
}
.panel-head h3{margin:0;font-size:20px}
.panel-badge{
  padding:7px 12px;
  border-radius:999px;
  color:var(--green);
  background:rgba(138,247,186,.12);
  border:1px solid rgba(138,247,186,.2);
  font-size:12px;
  font-weight:800;
}

.summary-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:12px;
}
.summary-card{
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
}
.summary-key{
  color:var(--muted);
  font-size:12px;
  margin-bottom:8px;
}
.summary-value{
  color:var(--text);
  font-size:18px;
  font-weight:900;
  word-break:break-word;
}
.summary-sub{
  color:var(--muted);
  font-size:12px;
  margin-top:8px;
}

.zone-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
  gap:14px;
}
.zone-card{
  border-radius:20px;
  padding:16px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
}
.zone-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:12px;
}
.zone-name{font-size:18px;font-weight:900}
.zone-badge{
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  border:1px solid var(--line);
}
.zone-metrics{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.metric{
  padding:10px;
  border-radius:14px;
  background:rgba(255,255,255,.03);
  border:1px solid var(--line);
}
.metric-label{font-size:11px;color:var(--muted);margin-bottom:6px}
.metric-value{font-size:17px;font-weight:900}

.table-wrap{
  overflow:auto;
  border-radius:20px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.02);
}
.data-table{
  width:100%;
  border-collapse:collapse;
  min-width:760px;
}
.data-table th,.data-table td{
  padding:14px 12px;
  border-bottom:1px solid var(--line);
  text-align:right;
}
.data-table th{
  color:var(--gold);
  background:rgba(255,255,255,.02);
  font-size:12px;
  letter-spacing:.5px;
}
.data-table td{
  color:var(--text);
  font-size:14px;
}
.badge-up{
  color:#04110a;
  background:linear-gradient(135deg,var(--green),#deffe9);
  padding:5px 10px;
  border-radius:999px;
  font-weight:800;
  display:inline-block;
}
.badge-warn{
  color:#221500;
  background:linear-gradient(135deg,var(--warn),#ffe9ac);
  padding:5px 10px;
  border-radius:999px;
  font-weight:800;
  display:inline-block;
}

.code-block{
  margin:0;
  padding:18px;
  border-radius:22px;
  background:rgba(0,0,0,.28);
  border:1px solid var(--line);
  color:#dff8eb;
  white-space:pre-wrap;
  word-break:break-word;
  font-size:12px;
  line-height:1.7;
  overflow:auto;
}

.view{display:none}
.view.active{display:block}

@media (max-width: 1350px){
  .top-grid{grid-template-columns:repeat(2,1fr)}
  .content-grid{grid-template-columns:1fr}
}
@media (max-width: 980px){
  #app{grid-template-columns:1fr}
  .sidebar{position:relative;height:auto;border-left:none;border-bottom:1px solid var(--line)}
  .hero{flex-direction:column}
}
@media (max-width: 640px){
  .top-grid{grid-template-columns:1fr}
  .main{padding:18px}
  .hero h1{font-size:32px}
}
