:root{
  --bg:#f4f6f9;          /* 60% */
  --dark:#0f172a;        /* 30% */
  --accent:#22c55e;      /* 10% */
  --card:#ffffff;
  --text:#1f2937;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:'Montserrat',sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* SIDEBAR */
.sidebar{
  position:fixed;
  left:0; top:0;
  width:260px;
  height:100vh;
  background:var(--dark);
  color:#fff;
  padding:24px 20px;
}
.brand{
  display:flex;
  gap:12px;
  align-items:center;
  margin-bottom:32px;
}
.logo{font-size:34px}
.brand-text span{font-size:13px;opacity:.7}

.sidebar nav a{
  display:flex;
  gap:10px;
  align-items:center;
  padding:12px 14px;
  margin-bottom:8px;
  border-radius:10px;
  color:#cbd5f5;
  text-decoration:none;
  cursor:pointer;
}
.sidebar nav a.active,
.sidebar nav a:hover{
  background:rgba(34,197,94,.15);
  color:#fff;
}

/* CONTENT */
.content{
  margin-left:260px;
  padding:24px;
}
.section{display:none}
iframe{
  width:100%;
  height:88vh;
  border:0;
  border-radius:16px;
}

/* HEADER */
.dashboard-header{
  display:flex;
  justify-content:space-between;
  gap:16px;
  margin-bottom:24px;
}
.time-card,.update-card{
  background:var(--card);
  border-radius:18px;
  padding:16px 20px;
  box-shadow:0 10px 30px rgba(0,0,0,.05);
}
.time-icon{font-size:28px}
.time-text{font-weight:600}
.update-card .label{font-size:12px;opacity:.6}
.update-card .value{font-weight:700}

/* GRID */
.dashboard-grid{
  display:grid;
  grid-template-columns:1.2fr 1fr;
  gap:20px;
}

/* CARD */
.card-box{
  background:var(--card);
  border-radius:20px;
  padding:20px;
  box-shadow:0 10px 30px rgba(0,0,0,.06);
}
.card-title{
  font-weight:700;
  margin-bottom:12px;
}

/* CAMERA */
.camera-wrapper{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  background:#e5e7eb;
  min-height:220px;
}
#liveImage{
  width:100%;
  display:none;
}
#camera-placeholder{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#666;
}
.btn-soft{
  margin-top:10px;
  border:0;
  padding:8px 14px;
  border-radius:10px;
  background:rgba(34,197,94,.15);
  color:var(--accent);
  font-weight:600;
}

/* SENSOR */
.sensor-grid{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:16px;
}
.sensor-card{
  background:var(--card);
  border-radius:18px;
  padding:16px;
  text-align:center;
  box-shadow:0 8px 25px rgba(0,0,0,.05);
}
.sensor-card .icon{font-size:26px}
.sensor-card .label{font-size:13px;opacity:.7}
.sensor-card .value{
  font-size:22px;
  font-weight:700;
  color:var(--accent);
}

/* PUMP */
.pump-status{
  font-size:22px;
  font-weight:700;
}
.pump-reason{
  font-size:13px;
  opacity:.7;
}

/* RESPONSIVE */
@media(max-width:992px){
  .dashboard-grid{grid-template-columns:1fr}
}
