:root {
  color-scheme: light;
  --ink: #15202b;
  --muted: #5b6570;
  --line: #d9e0e6;
  --paper: #f7f9fb;
  --white: #ffffff;
  --green: #0f8b6f;
  --blue: #2358b8;
  --red: #c93434;
  --yellow: #f6c453;
  --shadow: 0 16px 48px rgba(18, 32, 47, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea,
select {
  font: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.top-band {
  min-height: 220px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 28px;
  padding: 36px;
  color: #fff;
  background:
    linear-gradient(120deg, rgba(21, 32, 43, 0.92), rgba(18, 75, 98, 0.82)),
    url("https://images.unsplash.com/photo-1511578314322-379afb476865?auto=format&fit=crop&w=1600&q=80") center/cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.admin-band {
  background:
    linear-gradient(120deg, rgba(21, 32, 43, 0.94), rgba(35, 88, 184, 0.78)),
    url("https://images.unsplash.com/photo-1505373877841-8d25f7d46678?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #cfe7ff;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  max-width: 760px;
  font-size: clamp(2.15rem, 5vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  font-size: 1.18rem;
}

.lede {
  max-width: 650px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.08rem;
}

.status-box,
.secondary-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
}

.status-dot.connected {
  background: #33df9c;
}

.toolbar {
  display: flex;
  gap: 8px;
  margin: 24px 0 18px;
}

.filter,
.secondary-button,
.primary-button,
.action-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.filter {
  min-height: 38px;
  padding: 0 16px;
  background: #e8edf2;
  color: var(--ink);
}

.filter.active {
  background: var(--ink);
  color: #fff;
}

.updates-list {
  display: grid;
  gap: 14px;
}

.empty-state {
  padding: 42px 28px;
  border: 1px dashed #b7c1ca;
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  text-align: center;
}

.update-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--green);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 28px rgba(18, 32, 47, 0.06);
}

.update-card.urgent {
  border-left-color: var(--red);
}

.update-card.resolved {
  opacity: 0.66;
}

.update-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.update-title {
  margin: 0;
  font-size: 1.24rem;
  line-height: 1.22;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef4f7;
  color: #294253;
  font-size: 0.82rem;
  font-weight: 650;
}

.badge.urgent {
  background: #ffe8e5;
  color: #9b2323;
}

.update-details {
  margin: 0;
  color: #26323d;
  line-height: 1.56;
  white-space: pre-wrap;
}

.update-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-layout {
  display: grid;
  gap: 24px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 24px;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(18, 32, 47, 0.06);
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
  color: #31404d;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #bec9d2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

textarea {
  padding: 12px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.primary-button,
.secondary-button,
.action-button {
  min-height: 44px;
  padding: 0 16px;
  font-weight: 750;
}

.primary-button {
  width: 100%;
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  width: 100%;
  border: 1px solid var(--line);
  background: #f2f5f8;
  color: var(--ink);
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-button {
  min-height: 36px;
  background: #eef3f7;
  color: var(--ink);
}

.action-button.delete {
  background: #fff0ee;
  color: #9b2323;
}

.form-message {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
}

.form-message.error {
  color: var(--red);
}

.qr-panel {
  align-self: start;
}

.qr-wrap {
  display: grid;
  place-items: center;
  min-height: 260px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.qr-wrap img {
  width: min(220px, 80%);
  height: auto;
}

.url-text {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.compact .update-card {
  box-shadow: none;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .top-band {
    min-height: 320px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
  }

  .admin-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .update-top,
  .section-head {
    flex-direction: column;
  }
}
