:root {
  --bg: #fff8ef;
  --bg-soft: #fff1dd;
  --panel: #ffffff;
  --text: #1f1a17;
  --muted: #6e6257;
  --line: #e7d7c6;
  --orange: #f28c28;
  --orange-deep: #d86f0f;
  --orange-soft: #ffd2a3;
  --shadow: 0 18px 44px rgba(83, 48, 17, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "Barlow", sans-serif;
  background:
    linear-gradient(135deg, rgba(242, 140, 40, 0.12), transparent 45%),
    linear-gradient(180deg, #fffaf4 0%, var(--bg) 100%);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
}

.hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(242, 140, 40, 0.12), rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #ffffff 0%, #fff5e9 100%);
  border-bottom: 1px solid var(--line);
}

.hero__stripe {
  height: 18px;
  background: repeating-linear-gradient(
    -45deg,
    var(--orange) 0 18px,
    #ffffff 18px 36px
  );
}

.hero__content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 20px 34px;
}

.eyebrow,
.panel__kicker {
  margin: 0 0 10px;
  color: var(--orange-deep);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.95;
  text-transform: uppercase;
  max-width: 900px;
}

.hero__subtitle {
  margin-top: 12px;
  max-width: 720px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.button {
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--solid {
  background: var(--orange);
  color: white;
  box-shadow: 0 10px 22px rgba(242, 140, 40, 0.28);
}

.button--ghost {
  background: white;
  color: var(--text);
  border: 1px solid var(--line);
}

.button--small {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.button--danger {
  background: #3b3127;
  color: white;
}

.content {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.status-panel,
.layout-grid {
  display: grid;
  gap: 18px;
}

.status-panel {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.layout-grid {
  margin-top: 18px;
  grid-template-columns: 1.2fr 0.8fr;
}

.status-card,
.panel,
.camera-card {
  background: var(--panel);
  border: 1px solid rgba(231, 215, 198, 0.9);
  box-shadow: var(--shadow);
}

.status-card {
  border-radius: 18px;
  padding: 18px;
}

.status-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 6px;
}

.panel {
  border-radius: 24px;
  padding: 22px;
}

.panel__header {
  margin-bottom: 18px;
}

.map-placeholder {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 22px;
  border-radius: 18px;
  background:
    linear-gradient(0deg, rgba(242, 140, 40, 0.06), rgba(242, 140, 40, 0.06)),
    linear-gradient(135deg, #fff 0%, var(--bg-soft) 100%);
  border: 1px dashed var(--orange-soft);
}

.map-placeholder a {
  color: var(--orange-deep);
  font-weight: 700;
}

.checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 10px;
}

.panel__note {
  margin-top: 16px;
  color: var(--muted);
}

.camera-list {
  display: grid;
  gap: 20px;
}

.camera-card {
  border-radius: 26px;
  overflow: hidden;
}

.camera-card__head {
  padding: 18px 18px 14px;
  background:
    linear-gradient(90deg, rgba(242, 140, 40, 0.95), rgba(242, 140, 40, 0.78)),
    #f28c28;
  color: white;
}

.camera-card__meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 0.92rem;
}

.camera-card__meta span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.camera-card__body {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 0;
}

.viewer {
  min-height: 320px;
  position: relative;
  background: #100b08;
}

.viewer video,
.viewer img,
.viewer .viewer__placeholder,
.viewer .player-mount {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.viewer__placeholder {
  min-height: 320px;
  display: grid;
  place-items: center;
  color: #ffddbc;
  padding: 20px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(242, 140, 40, 0.22), rgba(16, 11, 8, 0.9)),
    #100b08;
}

.player-mount {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.camera-side {
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 16px;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fff8f0);
}

.camera-status {
  display: grid;
  gap: 6px;
}

.camera-status strong {
  font-size: 1rem;
}

.camera-status span {
  color: var(--muted);
  font-size: 0.94rem;
}

.camera-actions {
  display: grid;
  gap: 10px;
}

.camera-log {
  border-radius: 14px;
  padding: 12px;
  background: #fff6ea;
  color: var(--muted);
  font-size: 0.9rem;
  min-height: 90px;
}

.badge-online {
  color: #0e6c34;
}

.badge-offline {
  color: #8b3b0d;
}

.empty-state {
  padding: 28px;
  border-radius: 22px;
  border: 1px dashed var(--orange-soft);
  background: rgba(255, 255, 255, 0.85);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (max-width: 900px) {
  .status-panel,
  .layout-grid,
  .camera-card__body {
    grid-template-columns: 1fr;
  }

  .camera-side {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .hero__content,
  .content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .panel,
  .status-card {
    border-radius: 18px;
  }

  .viewer,
  .viewer__placeholder {
    min-height: 240px;
  }
}
