:root {
  --bg: #eef3f8;
  --card: #ffffff;
  --text: #102033;
  --muted: #5f7187;
  --border: #d7e0ea;
  --primary: #1f4e79;
  --primary-dark: #143653;
  --accent: #f2b705;
  --danger: #b42318;
  --success: #1f7a4d;
  --shadow: 0 18px 45px rgba(16, 32, 51, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 78, 121, 0.18), transparent 34%),
    radial-gradient(circle at top right, rgba(242, 183, 5, 0.16), transparent 30%),
    var(--bg);
}

.site-body {
  min-height: 100vh;
  padding: 28px;
}

.site-header {
  max-width: 1180px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-header h1,
.site-header p { margin: 0; }
.site-header h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
.site-header p { color: var(--muted); margin-top: 6px; }

.brand-mark,
.display-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--shadow);
}

.home-grid,
.admin-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: rgba(255,255,255,0.92);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.card h2 { margin-top: 0; }
.full-width { grid-column: 1 / -1; }
.hero-card { min-height: 240px; }
.warning-card { border-left: 8px solid var(--accent); }

.button-row,
.section-heading-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.section-heading-row { justify-content: space-between; }

.button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-block;
}

.button:hover { background: var(--primary-dark); }
.button.secondary { background: #e6edf5; color: var(--primary-dark); }
.button.danger { background: var(--danger); }

.link-list { line-height: 1.9; }
a { color: var(--primary); }

.stacked-form,
.form-row {
  display: grid;
  gap: 14px;
}

.form-row {
  grid-template-columns: 1fr 2fr auto;
  align-items: end;
}

label { font-weight: 700; }

input,
textarea,
select {
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--border);
  font: inherit;
  background: white;
}

textarea { resize: vertical; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex; gap: 10px; align-items: center; }
.check-row input { width: auto; margin: 0; }
.small-muted { color: var(--muted); font-size: 0.92rem; }
.hidden { display: none !important; }

.screen-picker {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  background: #f8fbfe;
  display: grid;
  gap: 8px;
}

.data-list {
  display: grid;
  gap: 12px;
}

.data-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  background: #fbfdff;
  display: grid;
  gap: 8px;
}

.data-item-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e6edf5;
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.badge.emergency { background: #fee4e2; color: var(--danger); }
.badge.published { background: #dcfae6; color: var(--success); }
.badge.draft { background: #f2f4f7; color: #344054; }

/* Display page */
.display-body {
  min-height: 100vh;
  overflow: hidden;
  background: #07192a;
}

.display-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  background:
    linear-gradient(135deg, rgba(31,78,121,.92), rgba(7,25,42,.97)),
    #07192a;
  color: white;
}

.display-header {
  padding: 28px 42px;
  display: flex;
  align-items: center;
  gap: 22px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
}

.display-header h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
}

.display-header p {
  margin: 6px 0 0;
  color: rgba(255,255,255,0.78);
  font-size: clamp(1rem, 2vw, 1.4rem);
}

.display-logo {
  background: var(--accent);
  color: #07192a;
  width: 88px;
  height: 88px;
  font-size: 1.4rem;
}

.display-clock {
  margin-left: auto;
  text-align: right;
  font-weight: 800;
}

#timeText { font-size: clamp(2rem, 5vw, 4.2rem); }
#dateText { color: rgba(255,255,255,0.78); font-size: clamp(1rem, 2vw, 1.35rem); }

.emergency-banner {
  padding: 18px 42px;
  font-size: clamp(1.4rem, 3vw, 2.3rem);
  font-weight: 900;
  background: #f04438;
  color: white;
  text-align: center;
}

.notice-stage {
  display: grid;
  place-items: center;
  padding: 42px;
}

.notice-card {
  width: min(1300px, 100%);
  min-height: 54vh;
  background: rgba(255,255,255,0.96);
  color: #07192a;
  border-radius: 42px;
  padding: clamp(36px, 6vw, 80px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 24px 80px rgba(0,0,0,0.28);
}

.notice-card .eyebrow {
  color: var(--primary);
  font-size: clamp(1rem, 2vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 900;
  margin: 0 0 20px;
}

.notice-card h2 {
  font-size: clamp(3rem, 7vw, 7.5rem);
  line-height: 1.02;
  margin: 0 0 28px;
}

.notice-card p:last-child {
  font-size: clamp(1.8rem, 3.5vw, 4rem);
  line-height: 1.2;
  margin: 0;
}

.display-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 20px 42px;
  background: rgba(0,0,0,0.22);
  color: rgba(255,255,255,0.86);
  font-size: clamp(1rem, 1.8vw, 1.4rem);
}

@media (max-width: 760px) {
  .site-body { padding: 18px; }
  .home-grid,
  .admin-layout,
  .two-col,
  .form-row { grid-template-columns: 1fr; }
  .display-header { padding: 18px; align-items: flex-start; }
  .display-logo { width: 62px; height: 62px; }
  .display-clock { display: none; }
  .notice-stage { padding: 18px; }
  .notice-card { border-radius: 24px; min-height: 50vh; }
  .display-footer { padding: 14px 18px; flex-direction: column; align-items: flex-start; }
}
