:root{
  --bg:#f7f8fa;
  --card:#ffffff;
  --text:#1d1d1f;
  --muted:#86868b;
  --line:rgba(0,0,0,.06);
  --shadow:0 10px 25px rgba(0,0,0,.06);
  --r:20px;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px 22px;
  background:rgba(255,255,255,.85);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.brand-logo{
  width:64px;
  height:64px;
  padding:10px;
  border-radius:20px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 6px 18px rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
}
.brand-logo-svg{
  width:100%;
  height:100%;
  display:block;
}

.brand-text{ min-width:0; }
.brand-title{ font-weight:650; font-size:18px; line-height:1.1; }
.brand-sub{ font-size:12px; color:var(--muted); margin-top:4px; }

.top-status{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:999px;
  box-shadow:0 4px 14px rgba(0,0,0,.04);
  font-size:13px;
  color:var(--muted);
}

.dot{ width:8px; height:8px; border-radius:50%; }
.dot.online{ background:#34c759; }

.mono{
  font-variant-numeric:tabular-nums;
  color:var(--text);
}

.wrap{
  max-width:1100px;
  margin:0 auto;
  padding:22px;
}

.panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.panel-head{
  padding:16px 18px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  flex-wrap:wrap;
  border-bottom:1px solid var(--line);
}

.panel-title{ font-weight:650; }
.panel-sub{ margin-top:4px; font-size:12px; color:var(--muted); }

.legend{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.tag{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#fff;
  color:var(--muted);
}
.tag.t1{ border-color:rgba(255,159,10,.25); }
.tag.t2{ border-color:rgba(90,200,250,.35); }
.tag.t3{ border-color:rgba(255,69,58,.25); }
.tag.t4{ border-color:rgba(10,132,255,.25); }

.chart-box{ padding:16px; }
.chart-box canvas{
  width:100% !important;
  height:360px !important;
}

.bottom{
  margin-top:18px;
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap:18px;
}

.photo-card, .actions{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--r);
  box-shadow:var(--shadow);
  padding:16px;
}

.card-title{ font-weight:650; margin-bottom:10px; }
.card-sub{ font-size:12px; color:var(--muted); margin-top:10px; }

.photo{
  border-radius:16px;
  border:1px solid var(--line);
  background:linear-gradient(180deg,#ffffff,#f3f4f6);
  height:260px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  position:relative;
}

.photo img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:none;
}

.photo-empty{
  display:none;
  position:absolute;
  color:var(--muted);
  font-size:14px;
}
.photo.empty .photo-empty{ display:block; }

.actions{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.btn{
  appearance:none;
  border:1px solid var(--line);
  background:#111;
  color:#fff;
  padding:12px 14px;
  border-radius:14px;
  font-size:14px;
  cursor:pointer;
}
.btn.secondary{
  background:#fff;
  color:var(--text);
}
.btn:active{ transform:translateY(1px); }

.hint{
  font-size:12px;
  color:var(--muted);
  margin-top:6px;
}

@media (max-width: 900px){
  .bottom{ grid-template-columns:1fr; }
  .chart-box canvas{ height:320px !important; }
  .brand-logo{ width:56px; height:56px; border-radius:18px; padding:8px; }
}
