:root {
  --primary: #f04a24;
  --primary-dark: #c93618;
  --secondary: #ffd84d;
  --bg: #fff5dc;
  --card: #ffffff;
  --text: #1f1f1f;
  --muted: #777;
  --border: #f3d9b1;
  --success: #49b765;
  --warning: #f6a623;
  --danger: #e53935;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Poppins, Nunito Sans, Arial, sans-serif;
  background: radial-gradient(circle at top right, rgba(255,216,77,.55), transparent 28%), var(--bg);
  color: var(--text);
}
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  padding: 28px 22px;
  background: rgba(255,255,255,.64);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { display: flex; gap: 12px; align-items: center; font-size: 32px; font-weight: 900; }
.brand span span { color: var(--primary); }
.logo {
  height: 54px; width: 54px; border-radius: 18px; background: var(--primary);
  display: grid; place-items: center; color: white; box-shadow: 0 14px 28px rgba(240,74,36,.22);
}
.tagline { color: var(--muted); margin: 8px 0 30px; font-weight: 600; }
nav { display: grid; gap: 10px; }
nav a {
  text-decoration: none; color: var(--text); font-weight: 800;
  padding: 13px 14px; border-radius: 18px;
}
nav a.active, nav a:hover { background: var(--primary); color: white; }
button {
  border: 0; background: var(--primary); color: white; padding: 12px 18px; border-radius: 999px;
  font-weight: 900; cursor: pointer; box-shadow: 0 10px 20px rgba(240,74,36,.18);
}
button:hover { background: var(--primary-dark); }
.ghost { background: #fff; color: var(--primary); border: 1px solid var(--border); margin-top: 24px; box-shadow: none; }
.main { padding: 34px; }
.hidden { display: none !important; }
.login-card {
  max-width: 520px; margin: 70px auto; background: var(--card); border: 1px solid var(--border);
  border-radius: 38px; padding: 34px; box-shadow: 0 24px 80px rgba(140,85,20,.14); position: relative; overflow: hidden;
}
.blob { position: absolute; width: 180px; height: 180px; border-radius: 50%; background: var(--secondary); right: -50px; top: -65px; opacity: .8; }
.login-card h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.1; position: relative; }
.login-card p { color: var(--muted); font-weight: 600; position: relative; }
label { display: block; font-size: 13px; font-weight: 900; margin: 18px 0 8px; }
input {
  width: 100%; padding: 15px 16px; border-radius: 18px; border: 1px solid var(--border); font-weight: 700; outline: none;
}
.login-card button { width: 100%; margin-top: 22px; }
.small { font-size: 12px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.eyebrow { color: var(--primary); font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 8px; }
h1 { font-size: 42px; margin: 0; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric { background: var(--card); border: 1px solid var(--border); border-radius: 28px; padding: 22px; box-shadow: 0 14px 40px rgba(140,85,20,.08); position: relative; overflow: hidden; }
.metric::after { content: '🐾'; position: absolute; right: 16px; top: 14px; opacity: .15; font-size: 38px; }
.metric strong { font-size: 36px; display: block; }
.metric span { color: var(--muted); font-weight: 800; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 30px; padding: 22px; box-shadow: 0 14px 40px rgba(140,85,20,.08); }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
h2 { margin: 0; font-size: 24px; }
.card-head button { padding: 10px 14px; font-size: 12px; }
.list { display: grid; gap: 12px; }
.item { border: 1px solid var(--border); border-radius: 22px; padding: 16px; background: #fffaf0; }
.item h3 { margin: 0 0 7px; }
.item p { margin: 3px 0; color: var(--muted); font-weight: 650; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.badge.available, .badge.online, .badge.paid, .badge.delivered { background: rgba(73,183,101,.14); color: var(--success); }
.badge.occupied, .badge.active, .badge.accepted_by_hotel, .badge.preparing { background: rgba(246,166,35,.16); color: var(--warning); }
.badge.offline, .badge.cancelled { background: rgba(229,57,53,.14); color: var(--danger); }
.actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.actions button { padding: 8px 12px; font-size: 12px; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .metrics, .grid2 { grid-template-columns: 1fr; }
}
select {
  width: 100%; padding: 15px 16px; border-radius: 18px; border: 1px solid var(--border); font-weight: 700; outline: none; background: white;
}
.camera-form { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; margin-bottom: 10px; }
.camera-form .wide { grid-column: span 2; }
#cameras { margin-bottom: 18px; }
.stream-note { padding: 10px 12px; border-radius: 16px; background: rgba(255,216,77,.24); color: var(--text); font-weight: 750; margin-top: 10px; }
@media (max-width: 980px) {
  .camera-form { grid-template-columns: 1fr; }
  .camera-form .wide { grid-column: auto; }
}
