:root {
  --bg: #eef3f6;
  --ink: #12202f;
  --muted: #536678;
  --line: #c9d5df;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --brand: #005a8d;
  --brand-dark: #003d63;
  --teal: #007d76;
  --tv-night: #07111d;
  --tv-steel: #123047;
  --tv-ice: #e9f2f7;
  --event-low: #0b6aa2;
  --event-medium: #b97500;
  --event-high: #b42318;
  --warning: #b54708;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(18, 32, 47, 0.14);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
}

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

button,
.admin-nav a,
.admin-nav button,
.entry a {
  border: 0;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
  padding: 0.85rem 1rem;
  text-decoration: none;
}

button:hover,
.admin-nav a:hover,
.admin-nav button:hover,
.entry a:hover {
  background: var(--brand-dark);
  color: #fff;
}

button:focus-visible,
.admin-nav a:focus-visible,
.admin-nav button:focus-visible,
.entry a:focus-visible {
  outline: 3px solid #71c7ec;
  outline-offset: 3px;
}

.secondary-button,
.item-actions button {
  background: #d9e7ef;
  color: var(--brand-dark);
}

.secondary-button:hover,
.item-actions button:hover {
  background: #bcd4e2;
  color: #003d63;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.danger-button {
  background: #f8d7d4 !important;
  color: var(--danger) !important;
}

.danger-button:hover {
  background: #b42318 !important;
  color: #fff !important;
}

button:disabled:hover {
  background: #d9e7ef;
  color: var(--brand-dark);
}

.entry-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

.entry {
  text-align: center;
}

.entry nav {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.tv-body {
  background: #dfe8ee;
  overflow: hidden;
}

.tv-screen {
  display: grid;
  grid-template-columns: minmax(0, 65fr) minmax(0, 35fr);
  gap: clamp(20px, 2.2vw, 36px);
  height: 100vh;
  position: relative;
  width: 100vw;
  padding: clamp(18px, 2.1vw, 34px);
}

.tv-corner-logo {
  display: none;
}

.tv-header-logo {
  display: block;
  flex: 0 0 auto;
  height: clamp(78px, 7.2vw, 118px);
  object-fit: contain;
  padding: 0;
  width: clamp(78px, 7.2vw, 118px);
}

.tv-column {
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.news-column {
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.agenda-column {
  grid-template-rows: auto minmax(0, 1fr) auto;
  position: relative;
}

.section-header {
  align-items: center;
  background: var(--brand-dark);
  border-left: 12px solid var(--teal);
  color: #fff;
  display: flex;
  gap: clamp(16px, 1.5vw, 26px);
  justify-content: space-between;
  padding: clamp(14px, 1.35vw, 22px) clamp(22px, 1.9vw, 34px);
}

.news-column .section-header {
  justify-content: flex-start;
  padding-left: clamp(18px, 1.8vw, 30px);
}

.section-header > div {
  min-width: 0;
}

.section-logo {
  background: #061d31;
  border: 2px solid rgba(255, 255, 255, 0.42);
  display: block;
  flex: 0 0 auto;
  height: clamp(70px, 6.8vw, 112px);
  max-width: min(28%, 150px);
  object-fit: contain;
  padding: 5px;
  width: clamp(90px, 9vw, 150px);
}

.section-logo[hidden] {
  display: none;
}

.section-kicker {
  color: inherit;
  display: block;
  font-size: clamp(0.85rem, 0.85vw, 1.15rem);
  font-weight: 900;
  letter-spacing: 0;
  opacity: 0.78;
  text-transform: uppercase;
}

.section-header h1,
.admin-topbar h1,
.admin-panel h2 {
  margin: 0.2rem 0 0;
}

.section-header h1 {
  font-size: clamp(2.4rem, 3.5vw, 4.5rem);
  line-height: 0.95;
}

.news-column,
.agenda-column {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 0;
}

.news-rotator {
  min-height: 0;
  overflow: hidden;
  padding: clamp(20px, 2vw, 28px);
}

.news-rotator[hidden] {
  display: none;
}

.news-card {
  background: var(--panel-soft);
  border: 2px solid var(--line);
  border-left: 16px solid var(--brand);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  min-height: 0;
  padding: clamp(24px, 2.2vw, 42px);
}

.priority-alta {
  border-left-color: var(--warning);
}

.news-meta {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: clamp(1.15rem, 1.35vw, 1.8rem);
  font-weight: 900;
  gap: 1rem;
  justify-content: space-between;
  margin-bottom: clamp(16px, 1.6vw, 28px);
  text-transform: uppercase;
}

.main-news h2 {
  color: var(--brand-dark);
  font-size: clamp(2.1rem, 3.1vw, 4.2rem);
  line-height: 1.04;
  margin: 0 0 clamp(18px, 1.8vw, 30px);
  overflow-wrap: anywhere;
}

.main-news p {
  color: #1d3347;
  font-size: clamp(1.25rem, 1.65vw, 2.35rem);
  font-weight: 650;
  line-height: 1.24;
  margin: 0;
}

.main-news a {
  color: var(--brand-dark);
  display: inline-block;
  font-size: clamp(1.15rem, 1.2vw, 1.55rem);
  font-weight: 900;
  margin-top: clamp(22px, 2vw, 34px);
}

.compact-news-list {
  display: none;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0 clamp(20px, 2vw, 34px) clamp(12px, 1.2vw, 20px);
}

.mini-news {
  border: 2px solid var(--line);
  border-left: 10px solid #8aa4b5;
  min-height: 86px;
  padding: 14px 16px;
}

.mini-news.is-active {
  border-left-color: var(--teal);
  background: #e7f4f2;
}

.mini-news time {
  color: var(--muted);
  display: block;
  font-size: clamp(0.95rem, 0.9vw, 1.2rem);
  font-weight: 900;
}

.mini-news strong {
  display: block;
  font-size: clamp(1.15rem, 1.15vw, 1.5rem);
  line-height: 1.1;
  margin-top: 0.3rem;
}

.media-panel {
  background: #061d31;
  border: 1px solid #0d324e;
  color: #fff;
  display: grid;
  gap: 10px;
  grid-template-rows: minmax(0, 1fr);
  margin: 0 clamp(20px, 2vw, 28px) clamp(20px, 2vw, 28px);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  position: relative;
}

.media-panel[hidden] {
  display: none;
}

.media-panel strong {
  font-size: clamp(0.95rem, 1vw, 1.25rem);
}

.media-panel img,
.media-panel video,
.media-panel iframe {
  background: #000;
  border: 0;
  display: block;
  height: clamp(100px, 16vh, 170px);
  object-fit: cover;
  pointer-events: none;
  width: 100%;
}

.media-panel video {
  pointer-events: auto;
}

.media-message {
  align-content: center;
  background: #061420;
  color: #fff;
  display: grid;
  gap: 0.65rem;
  height: 100%;
  justify-items: center;
  padding: 2rem;
  text-align: center;
}

.media-message strong {
  font-size: clamp(1.3rem, 1.8vw, 2rem);
}

.media-message span {
  color: #d9e4ec;
  overflow-wrap: anywhere;
}

.media-fallback {
  align-items: center;
  background: #101820;
  color: #fff;
  display: none;
  gap: 0.75rem;
  height: 100%;
  justify-content: center;
  text-align: center;
}

.media-fallback a {
  color: #8bd7ff;
  font-weight: 900;
}

.media-panel.embed-failed iframe {
  display: none;
}

.media-panel.embed-failed .media-fallback {
  display: flex;
  flex-direction: column;
}

.media-panel.is-featured {
  align-self: stretch;
  grid-row: 2 / -1;
  margin-top: clamp(20px, 2vw, 28px);
  min-height: 0;
}

.media-panel.is-featured img,
.media-panel.is-featured video,
.media-panel.is-featured iframe {
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.agenda-list {
  display: grid;
  align-content: start;
  gap: clamp(10px, 0.9vw, 16px);
  grid-template-rows: repeat(3, minmax(0, 1fr));
  min-height: 0;
  overflow: hidden;
  padding: clamp(20px, 2vw, 28px);
  padding-bottom: clamp(145px, 13vw, 205px);
}

.agenda-item {
  align-items: stretch;
  background: var(--panel-soft);
  border: 2px solid var(--line);
  display: grid;
  grid-template-columns: minmax(138px, 10.5vw) minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.agenda-time {
  background: var(--brand);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px;
  text-align: center;
}

.agenda-time time {
  font-size: clamp(1.1rem, 1.15vw, 1.55rem);
  font-weight: 900;
  line-height: 1.05;
}

.agenda-time strong {
  font-size: clamp(1.45rem, 2.05vw, 2.85rem);
  line-height: 0.98;
  margin-top: 0.45rem;
}

.agenda-time time,
.agenda-time strong {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
}

.agenda-range-meta {
  font-size: 0.72em;
  letter-spacing: 0.04em;
  opacity: 0.82;
  text-transform: uppercase;
}

.agenda-priority-badge {
  align-self: flex-start;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
  padding: 0.32rem 0.62rem;
  text-transform: uppercase;
}

.agenda-priority-badge--baixa {
  background: rgba(11, 106, 162, 0.12);
  color: var(--event-low);
}

.agenda-priority-badge--media {
  background: rgba(185, 117, 0, 0.12);
  color: var(--event-medium);
}

.agenda-priority-badge--alta {
  background: rgba(180, 35, 24, 0.12);
  color: var(--event-high);
}

.agenda-item--priority-baixa {
  border-color: rgba(11, 106, 162, 0.22);
}

.agenda-item--priority-baixa .agenda-time {
  background: var(--event-low);
}

.agenda-item--priority-media {
  border-color: rgba(185, 117, 0, 0.22);
}

.agenda-item--priority-media .agenda-time {
  background: var(--event-medium);
}

.agenda-item--priority-alta {
  border-color: rgba(180, 35, 24, 0.22);
}

.agenda-item--priority-alta .agenda-time {
  background: var(--event-high);
}

.agenda-copy {
  padding: clamp(14px, 1.25vw, 22px);
}

.agenda-copy h2 {
  color: var(--brand-dark);
  font-size: clamp(1.35rem, 1.65vw, 2.25rem);
  line-height: 1.05;
  margin: 0 0 0.35rem;
  overflow-wrap: anywhere;
}

.agenda-copy p {
  color: #263f55;
  font-size: clamp(1.02rem, 1.18vw, 1.55rem);
  font-weight: 650;
  line-height: 1.18;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.clock-panel {
  background: #ffffff;
  border: 5px solid #00608f;
  bottom: clamp(8px, 0.9vw, 16px);
  box-shadow: 0 16px 34px rgba(6, 29, 49, 0.22);
  color: var(--brand-dark);
  margin: 0;
  min-width: min(100%, 430px);
  padding: clamp(14px, 1.25vw, 22px) clamp(22px, 1.8vw, 34px);
  position: absolute;
  left: 50%;
  right: auto;
  text-align: right;
  transform: translateX(-50%);
}

.clock-logo {
  display: none;
  height: clamp(72px, 7vw, 118px);
  object-fit: contain;
  width: 100%;
}

.clock-logo[hidden] {
  display: none;
}

.clock-panel.no-logo {
  grid-template-columns: 1fr;
}

.clock-copy {
  min-width: 0;
}

.clock-time {
  font-size: clamp(3.1rem, 4.7vw, 5.4rem);
  font-weight: 950;
  line-height: 0.88;
}

.clock-date {
  color: #007d76;
  font-size: clamp(1.45rem, 2.05vw, 2.65rem);
  font-weight: 900;
  margin-top: 0.6rem;
}

body[data-view="tv"] {
  margin: 0;
  width: 100dvw;
  height: 100dvh;
  max-width: 100dvw;
  max-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(26, 91, 133, 0.26), transparent 30%),
    radial-gradient(circle at right center, rgba(0, 125, 118, 0.18), transparent 34%),
    linear-gradient(135deg, #07111d 0%, #0b1724 55%, #13283b 100%);
}

body[data-view="tv"] .tv-layout {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
  padding: 8px;
}

body[data-view="tv"] .tv-layout-grid {
  display: flex;
  flex-direction: row;
  gap: 20px;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  align-items: stretch;
}

body[data-view="tv"] .tv-layout-table {
  border-collapse: collapse;
  border-spacing: 0;
  height: 100%;
  table-layout: fixed;
  width: 100%;
}

body[data-view="tv"] .tv-layout-cell {
  display: flex;
  height: 100%;
  padding: 0;
  min-width: 0;
  vertical-align: top;
}

body[data-view="tv"] .tv-layout-cell--media {
  flex: 6 1 0;
  max-width: none;
  min-width: 0;
}

body[data-view="tv"] .tv-layout-cell--agenda {
  flex: 4 1 0;
  max-width: none;
  min-width: 0;
}

body[data-view="tv"] .tv-media-section,
body[data-view="tv"] .tv-agenda-section {
  display: block;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  width: 100%;
}

body[data-view="tv"] .tv-media-section {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)),
    linear-gradient(160deg, #050b12 0%, #0d1823 58%, #112030 100%);
  border: 1px solid rgba(154, 190, 214, 0.18);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
  display: flex;
  flex-direction: column;
  max-width: none;
  overflow: hidden;
  padding: clamp(10px, 0.8vw, 14px);
  position: relative;
}

body[data-view="tv"] .tv-agenda-section {
  background:
    radial-gradient(circle at top right, rgba(0, 125, 118, 0.16), transparent 24%),
    linear-gradient(180deg, #f8fbfd 0%, #edf3f7 100%);
  border: 1px solid rgba(177, 198, 212, 0.7);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(10, 32, 51, 0.16);
  display: flex;
  flex-direction: column;
  max-width: none;
  min-width: 0;
  padding: clamp(10px, 0.8vw, 14px);
  box-sizing: border-box;
  overflow: hidden;
}

body[data-view="tv"] .tv-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.2vw, 20px);
}

body[data-view="tv"] .tv-media-header {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: clamp(8px, 0.65vw, 12px) clamp(12px, 0.9vw, 16px);
}

body[data-view="tv"] .tv-agenda-header {
  align-items: stretch;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  border-bottom: 0;
  min-height: auto;
  padding-bottom: 18px;
  margin-bottom: 8px;
}

body[data-view="tv"] .tv-agenda-header .section-kicker,
body[data-view="tv"] .tv-agenda-header h1 {
  color: var(--brand-dark);
}

body[data-view="tv"] .tv-header-logo {
  flex: 0 0 auto;
  width: clamp(74px, 4.8vw, 104px);
  height: clamp(60px, 4vw, 82px);
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.24));
  transform: scaleX(1.08);
  transform-origin: left center;
}

body[data-view="tv"] .tv-header-copy {
  min-width: 0;
}

body[data-view="tv"] .tv-header-kicker,
body[data-view="tv"] .tv-agenda-kicker,
body[data-view="tv"] .clock-label {
  display: block;
  font-size: clamp(0.7rem, 0.66vw, 0.86rem);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body[data-view="tv"] .tv-header-kicker {
  color: rgba(179, 215, 236, 0.78);
  margin-bottom: 0.45rem;
}

body[data-view="tv"] .tv-header-copy h1 {
  color: #f6fbff;
  font-size: clamp(1.5rem, 2vw, 2.35rem);
  letter-spacing: 0.12em;
  line-height: 0.92;
  margin: 0;
  font-weight: 950;
}

body[data-view="tv"] .tv-media-frame {
  flex: 1 1 auto;
  margin-top: 26px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

body[data-view="tv"] .tv-media-frame::before {
  background:
    linear-gradient(135deg, rgba(118, 180, 215, 0.18), transparent 35%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  border: 1px solid rgba(203, 226, 241, 0.1);
  border-radius: 20px;
  content: "";
  inset: 0;
  position: absolute;
  pointer-events: none;
}

body[data-view="tv"] .tv-agenda-headcopy {
  display: grid;
  gap: 0;
  margin-bottom: 0;
}

body[data-view="tv"] .tv-agenda-kicker {
  color: var(--teal);
}

body[data-view="tv"] .tv-agenda-headcopy h1 {
  color: #081522;
  font-size: clamp(1.18rem, 1.2vw, 1.5rem);
  line-height: 0.98;
  margin: 0;
  text-wrap: balance;
}

body[data-view="tv"] #newsRotator {
  display: none !important;
}

body[data-view="tv"] #mediaPanel {
  width: 100%;
  height: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 4px;
  border: 0;
  background: transparent;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
}

body[data-view="tv"] #mediaPanel.is-featured {
  align-self: auto;
  grid-row: auto;
  margin-top: 0;
}

body[data-view="tv"] #mediaPanel .media-message {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background:
    radial-gradient(circle at top, rgba(40, 101, 145, 0.28), transparent 38%),
    linear-gradient(180deg, rgba(8, 22, 34, 0.96) 0%, rgba(6, 20, 32, 0.98) 100%);
  border: 1px solid rgba(158, 197, 221, 0.18);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  padding: clamp(24px, 3vw, 48px);
}

body[data-view="tv"] #mediaPanel .media-message strong {
  font-size: clamp(1.8rem, 2.8vw, 3rem);
  letter-spacing: 0.01em;
}

body[data-view="tv"] #mediaPanel .media-message span {
  font-size: clamp(1rem, 1.35vw, 1.35rem);
  max-width: 28ch;
  display: none;
}

body[data-view="tv"] .youtube-player-shell {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(209, 228, 241, 0.08);
  border-radius: 18px;
  background: #000;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

body[data-view="tv"] #youtubePlayerHost {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  max-width: none;
  max-height: none;
  background: transparent;
  box-shadow: none;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  pointer-events: none;
}

body[data-view="tv"] #mediaPanel img,
body[data-view="tv"] #mediaPanel iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid rgba(209, 228, 241, 0.08);
  border-radius: 18px;
  object-fit: contain;
  background: #000;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

body[data-view="tv"] #mediaPanel video {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 1px solid rgba(209, 228, 241, 0.08);
  border-radius: 18px;
  object-fit: contain;
  object-position: top center;
  background: #000;
  box-shadow: 0 26px 54px rgba(0, 0, 0, 0.34);
}

body[data-view="tv"] #agendaList {
  --tv-agenda-item-height: auto;
  flex: 1 1 auto;
  align-self: stretch;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  margin-top: 4px;
  padding: 2px 0 0;
  position: relative;
  scrollbar-width: none;
}

body[data-view="tv"] #agendaList::-webkit-scrollbar {
  display: none;
}

body[data-view="tv"] .agenda-scroll-track {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 4px;
  height: 100%;
  min-height: 0;
  will-change: transform;
}

body[data-view="tv"] .agenda-item {
  align-items: stretch;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  flex: 0 0 var(--tv-agenda-item-height, auto);
  height: var(--tv-agenda-item-height, auto);
  min-height: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 247, 251, 0.98) 100%);
  border: 1px solid rgba(186, 205, 217, 0.9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 22px rgba(24, 48, 67, 0.1);
}

body[data-view="tv"] .agenda-time {
  background: var(--brand-dark);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 8px;
  text-align: center;
}

body[data-view="tv"] .agenda-item--priority-baixa {
  border-color: rgba(11, 106, 162, 0.28);
}

body[data-view="tv"] .agenda-item--priority-baixa .agenda-time {
  background: var(--event-low);
}

body[data-view="tv"] .agenda-item--priority-media {
  border-color: rgba(185, 117, 0, 0.28);
}

body[data-view="tv"] .agenda-item--priority-media .agenda-time {
  background: var(--event-medium);
}

body[data-view="tv"] .agenda-item--priority-alta {
  border-color: rgba(180, 35, 24, 0.28);
}

body[data-view="tv"] .agenda-item--priority-alta .agenda-time {
  background: var(--event-high);
}

body[data-view="tv"] .agenda-time time {
  font-size: clamp(0.92rem, 0.95vw, 1.08rem);
  font-weight: 900;
  line-height: 1.04;
}

body[data-view="tv"] .agenda-time strong {
  margin-top: 0.24rem;
  font-size: clamp(1.2rem, 1.35vw, 1.65rem);
  font-weight: 950;
}

body[data-view="tv"] .agenda-copy {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

body[data-view="tv"] .agenda-copy h2 {
  color: #03070b;
  margin: 0;
  font-size: clamp(1.02rem, 1.08vw, 1.3rem);
  line-height: 1.08;
  font-weight: 850;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-wrap: balance;
}

body[data-view="tv"] .agenda-copy p {
  color: #203446;
  margin: 0.3rem 0 0;
  font-size: clamp(0.86rem, 0.9vw, 1rem);
  line-height: 1.16;
  font-weight: 600;
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  text-wrap: pretty;
}

body[data-view="tv"] .agenda-priority-badge,
body[data-view="tv"] .clock-label,
body[data-view="tv"] .tv-agenda-kicker {
  display: none !important;
}

body[data-view="tv"] .agenda-range-meta {
  font-size: 0.68em;
  opacity: 0.84;
}

body[data-view="tv"] .agenda-priority-badge {
  font-size: 0.6rem;
  margin-bottom: 0.42rem;
  padding: 0.28rem 0.5rem;
}

body[data-view="tv"] .agenda-item--compact .agenda-time {
  padding: 10px;
}

body[data-view="tv"] .agenda-item--compact .agenda-time time {
  font-size: clamp(0.9rem, 0.94vw, 1.08rem);
}

body[data-view="tv"] .agenda-item--compact .agenda-time strong {
  font-size: clamp(1.2rem, 1.45vw, 1.7rem);
}

body[data-view="tv"] .agenda-item--compact .agenda-copy {
  padding: 12px;
}

body[data-view="tv"] .agenda-item--compact .agenda-copy h2 {
  font-size: clamp(1.14rem, 1.22vw, 1.5rem);
}

body[data-view="tv"] .agenda-item--compact .agenda-copy p {
  font-size: clamp(0.82rem, 0.84vw, 0.94rem);
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-view="tv"] .agenda-item--compact .agenda-priority-badge {
  font-size: 0.62rem;
  margin-bottom: 0.35rem;
}

body[data-view="tv"] .agenda-item--dense .agenda-time {
  padding: 8px;
}

body[data-view="tv"] .agenda-item--dense .agenda-time time {
  font-size: clamp(0.82rem, 0.86vw, 0.95rem);
}

body[data-view="tv"] .agenda-item--dense .agenda-time strong {
  font-size: clamp(1.05rem, 1.2vw, 1.4rem);
}

body[data-view="tv"] .agenda-item--dense .agenda-copy {
  padding: 10px;
}

body[data-view="tv"] .agenda-item--dense .agenda-copy h2 {
  font-size: clamp(1rem, 1.08vw, 1.28rem);
  margin-bottom: 0;
}

body[data-view="tv"] .agenda-item--dense .agenda-copy p {
  font-size: clamp(0.74rem, 0.76vw, 0.86rem);
  line-height: 1.08;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-view="tv"] .agenda-item--dense .agenda-priority-badge {
  font-size: 0.58rem;
  margin-bottom: 0.24rem;
  padding: 0.24rem 0.45rem;
}

body[data-view="tv"] .agenda-item.agenda-item--stacked {
  grid-template-columns: 112px minmax(0, 1fr);
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-time {
  padding: 10px 8px;
  justify-content: center;
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-time time {
  font-size: clamp(0.88rem, 0.9vw, 1rem);
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-time strong {
  margin-top: 0.2rem;
  font-size: clamp(1.12rem, 1.22vw, 1.42rem);
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-copy {
  padding: 10px 14px;
  justify-content: center;
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-copy h2 {
  margin-bottom: 0;
  font-size: clamp(0.98rem, 1vw, 1.2rem);
  line-height: 1.06;
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-copy p {
  font-size: clamp(0.78rem, 0.8vw, 0.9rem);
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

body[data-view="tv"] .agenda-item.agenda-item--stacked .agenda-priority-badge {
  font-size: 0.56rem;
  margin-bottom: 0.28rem;
  padding: 0.24rem 0.44rem;
}

body[data-view="tv"] .clock-panel {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  transform: none;
  min-width: 0;
  width: 100%;
  margin: 0;
  padding: 12px 14px;
  background:
    radial-gradient(circle at top right, rgba(0, 125, 118, 0.12), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f3f8fb 100%);
  border: 1px solid rgba(180, 199, 212, 0.85);
  border-radius: 12px;
  box-shadow: 0 10px 16px rgba(39, 74, 101, 0.08);
  text-align: left;
}

body[data-view="tv"] .clock-time {
  color: #03070b;
  font-size: clamp(2.25rem, 2.7vw, 3.1rem);
  font-weight: 950;
  line-height: 0.9;
  letter-spacing: 0.02em;
}

body[data-view="tv"] .clock-date {
  margin-top: 0.22rem;
  color: #143149;
  font-size: clamp(0.96rem, 1vw, 1.12rem);
  font-weight: 900;
  line-height: 1.05;
}

body[data-view="tv"] .clock-label {
  color: #5d7a8d;
  margin-bottom: 0.35rem;
}

@media (max-aspect-ratio: 16/9) {
  body[data-view="tv"] .tv-media-section {
    max-width: none;
  }

  body[data-view="tv"] .tv-agenda-section {
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 1280px) {
  body[data-view="tv"] .tv-header-logo {
    width: 88px;
    height: 70px;
  }

  body[data-view="tv"] .clock-time {
    font-size: 2.8rem;
  }

  body[data-view="tv"] .clock-date {
    font-size: 1.12rem;
  }

  body[data-view="tv"] .clock-panel {
    width: 100%;
  }
}

@media (max-width: 980px) {
  body[data-view="tv"] {
    height: 100dvh;
    min-height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }

  body[data-view="tv"] .tv-layout {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  body[data-view="tv"] .tv-layout-grid {
    gap: 16px;
    min-height: 0;
    max-height: 100%;
  }

  body[data-view="tv"] .tv-layout-table,
  body[data-view="tv"] .tv-layout-table tbody,
  body[data-view="tv"] .tv-layout-table tr,
  body[data-view="tv"] .tv-layout-cell {
    height: 100%;
  }

  body[data-view="tv"] .tv-media-section,
  body[data-view="tv"] .tv-agenda-section {
    height: 100%;
    max-width: 100%;
    width: 100%;
  }

  body[data-view="tv"] .tv-media-frame {
    min-height: 48vh;
  }
}

@media (max-width: 768px) {
  body[data-view="tv"] {
    height: auto;
    min-height: 100dvh;
    max-height: none;
    overflow: auto;
  }

  body[data-view="tv"] .tv-layout {
    position: static;
    height: auto;
    min-height: 100dvh;
    max-height: none;
  }

  body[data-view="tv"] .tv-layout-grid {
    flex-direction: column;
    height: auto;
  }

  body[data-view="tv"] .tv-layout-cell,
  body[data-view="tv"] .tv-layout-cell--media,
  body[data-view="tv"] .tv-layout-cell--agenda {
    flex: 0 0 100%;
    max-width: 100%;
    height: auto;
  }

  body[data-view="tv"] .tv-media-frame {
    min-height: 40vh;
    height: auto;
  }

  body[data-view="tv"] #agendaList,
  body[data-view="tv"] .agenda-scroll-track {
    height: auto;
  }
}

.empty-state {
  color: var(--muted);
  font-size: clamp(1.4rem, 1.5vw, 2.2rem);
  font-weight: 800;
  margin: 0;
}

.admin-body {
  background: #eef3f6;
  min-height: 100vh;
}

.admin-login-body {
  display: grid;
  place-items: center;
}

.admin-login-screen {
  display: grid;
  min-height: 100vh;
  padding: 24px;
  place-items: center;
  width: 100%;
}

.admin-login-form {
  display: grid;
  gap: 14px;
  max-width: 360px;
  width: min(100%, 360px);
}

.admin-login-form input {
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 1.1rem;
  min-height: 54px;
  padding: 0.9rem 1rem;
  text-align: center;
}

.admin-login-form input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(0, 125, 118, 0.18);
}

.admin-login-form button {
  min-height: 54px;
}

.login-error {
  color: var(--danger);
  font-weight: 850;
  margin: 0;
  text-align: center;
}

.admin-topbar {
  align-items: center;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 250, 253, 0.92) 100%);
  border-bottom: 1px solid rgba(194, 212, 223, 0.85);
  box-shadow: 0 12px 30px rgba(18, 32, 47, 0.08);
  display: flex;
  gap: 1.15rem;
  justify-content: space-between;
  min-height: 88px;
  padding: 10px clamp(18px, 4vw, 58px) 10px clamp(10px, 1.2vw, 18px);
  position: sticky;
  top: 0;
  transition: box-shadow 180ms ease, min-height 180ms ease;
  z-index: 2;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: clamp(14px, 1.8vw, 28px);
  min-width: 0;
  transition: none;
}

.brand-copy {
  min-width: 0;
}

.brand-copy h1 {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  transition: none;
}

.brand-logo {
  flex: 0 0 auto;
  display: block;
  height: clamp(66px, 6.2vw, 98px);
  object-fit: contain;
  padding: 0;
  transition: height 180ms ease, width 180ms ease;
  width: clamp(66px, 6.2vw, 98px);
}

.brand-logo[hidden] {
  display: none;
}

.admin-topbar .section-kicker,
.admin-panel .section-kicker {
  color: var(--teal);
}

.admin-topbar h1 {
  color: var(--brand-dark);
  font-size: clamp(1.35rem, 1.7vw, 2rem);
}

.brand-title-secondary {
  opacity: 0.9;
  transition: opacity 140ms ease;
}

.admin-nav {
  display: flex;
  gap: 0.75rem;
}

.admin-nav a {
  transition: none;
}

.admin-topbar.is-condensed {
  gap: 1rem;
  min-height: 78px;
  padding-bottom: 10px;
  padding-top: 10px;
}

.admin-topbar.is-condensed .brand-lockup {
  gap: 0.9rem;
}

.admin-topbar.is-condensed .brand-logo {
  height: 58px;
  width: 58px;
}

.admin-topbar.is-condensed .section-kicker {
  opacity: 0;
  visibility: hidden;
}

.admin-topbar.is-condensed .brand-copy h1 {
  font-size: 1.45rem;
}

.admin-topbar.is-condensed .brand-title-secondary {
  opacity: 0;
}

.admin-topbar.is-condensed .admin-nav a {
  padding: 0.7rem 0.9rem;
}

.admin-layout {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: clamp(18px, 4vw, 58px);
}

.admin-panel:nth-child(3) {
  grid-column: 1 / -1;
}

.admin-panel:nth-child(4) {
  grid-column: 1 / -1;
}

.archive-panel {
  grid-column: 1 / -1;
}

.archive-layout {
  grid-template-columns: 1fr;
}

.admin-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 12px 28px rgba(18, 32, 47, 0.08);
  padding: clamp(18px, 2vw, 30px);
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.admin-panel:hover {
  border-color: #bdd1dd;
  box-shadow: 0 18px 38px rgba(18, 32, 47, 0.12);
  transform: translateY(-2px);
}

.panel-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-heading > div {
  min-width: 0;
}

.admin-panel h2 {
  color: var(--brand-dark);
  font-size: clamp(1.45rem, 1.8vw, 2.25rem);
}

.panel-intro {
  color: #557084;
  margin: 0.45rem 0 0;
  max-width: 48ch;
}

.admin-form {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
}

.admin-form label {
  color: #21384d;
  display: grid;
  font-weight: 850;
  gap: 0.4rem;
}

.char-counter {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: right;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  background: #f9fbfc;
  border: 1px solid #b9c8d3;
  border-radius: 6px;
  color: var(--ink);
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease, transform 160ms ease;
  width: 100%;
}

.admin-form textarea {
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
  background: #ffffff;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 90, 141, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.media-dropzone {
  align-items: center;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef6fb 100%);
  border: 2px dashed #8ab6cd;
  border-radius: 10px;
  color: #214056;
  cursor: pointer;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  min-height: 138px;
  padding: 1.1rem;
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.media-dropzone strong {
  color: var(--brand-dark);
  font-size: 1.02rem;
}

.media-dropzone span {
  color: var(--muted);
  max-width: 42ch;
}

.media-dropzone:hover,
.media-dropzone:focus-visible,
.media-dropzone.is-dragover {
  background: linear-gradient(180deg, #eef8fe 0%, #dceef8 100%);
  border-color: var(--brand);
  outline: none;
  transform: translateY(-1px);
}

.media-dropzone.is-uploading {
  cursor: progress;
  opacity: 0.8;
}

.media-upload-actions {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.media-pending-files {
  color: var(--muted);
  margin: 0;
}


.archive-filters {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 220px) minmax(160px, 220px);
  margin-bottom: 1.25rem;
}

.archive-filters label {
  color: #21384d;
  display: grid;
  font-weight: 850;
  gap: 0.4rem;
}

.archive-filters input {
  background: #f9fbfc;
  border: 1px solid #b9c8d3;
  border-radius: 6px;
  color: var(--ink);
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}

.archive-pagination {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.archive-pagination span {
  color: var(--muted);
  font-weight: 850;
}

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

.form-grid--event-top {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.check-row {
  align-items: center;
  display: flex !important;
  gap: 0.7rem !important;
}

.check-row input {
  height: 20px;
  min-height: 20px;
  width: 20px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
}

.events-admin-panel {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.1), transparent 32%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
  border-color: #d4e1e9;
  overflow: hidden;
  position: relative;
}

.events-admin-panel::before {
  background: linear-gradient(90deg, var(--brand-dark), var(--teal), #7eb8cf);
  content: "";
  height: 5px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.event-form {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 248, 252, 0.96) 100%);
  border: 1px solid #d5e3eb;
  border-radius: 22px;
  box-shadow: 0 18px 36px rgba(18, 32, 47, 0.08);
  gap: 1.15rem;
  padding: clamp(18px, 2vw, 24px);
}

.event-form-shell {
  display: grid;
  gap: 1rem;
}

.event-form-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(242, 248, 252, 0.88) 100%);
  border: 1px solid #d6e3ea;
  border-radius: 22px;
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.event-form-section--content {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 253, 0.96) 100%);
}

.event-form-section-heading {
  align-items: start;
  display: grid;
  gap: 0.9rem;
  grid-template-columns: auto minmax(0, 1fr);
}

.event-form-section-heading--step-only {
  gap: 0;
  grid-template-columns: auto;
}

.event-form-section-heading h3 {
  color: var(--brand-dark);
  font-size: 1.08rem;
  margin: 0;
}

.event-form-section-heading p {
  color: #557084;
  line-height: 1.5;
  margin: 0.3rem 0 0;
}

.event-form-step {
  align-items: center;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--teal) 100%);
  border-radius: 16px;
  box-shadow: 0 12px 24px rgba(0, 61, 99, 0.16);
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 900;
  height: 2.4rem;
  justify-content: center;
  width: 2.4rem;
}

.event-form label {
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.field-hint {
  color: #6a8396;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.event-form-preview {
  background: linear-gradient(135deg, rgba(0, 90, 141, 0.08) 0%, rgba(0, 125, 118, 0.08) 100%);
  border: 1px solid rgba(0, 90, 141, 0.14);
  border-radius: 18px;
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 1rem;
}

.event-form-preview-label {
  color: #577082;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.event-form-preview p {
  color: var(--brand-dark);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.5;
  margin: 0;
}

.event-form input,
.event-form textarea,
.event-form select {
  background: #ffffff;
  border: 1px solid #c8d8e2;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  min-height: 50px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.event-form textarea {
  min-height: 120px;
}

.event-form input:focus,
.event-form textarea:focus,
.event-form select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(0, 90, 141, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.event-admin-list {
  gap: 1.15rem;
}

.admin-list {
  display: grid;
  gap: 1rem;
}

.admin-item {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 8px solid var(--teal);
  border-radius: 20px;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem;
  transition: box-shadow 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.admin-item:hover {
  box-shadow: 0 14px 26px rgba(18, 32, 47, 0.1);
  transform: translateY(-2px);
}

.admin-event-card {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 252, 0.96) 100%);
  border: 1px solid #d3e1ea;
  border-left-width: 10px;
  border-radius: 24px;
  box-shadow: 0 16px 30px rgba(18, 32, 47, 0.08);
  gap: 1.1rem;
  overflow: hidden;
  padding: 1.1rem 1.15rem 1.15rem;
}

.admin-event-main {
  display: grid;
  gap: 0.75rem;
  min-width: 0;
}

.admin-item-main {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.media-admin-item {
  grid-template-columns: 1fr;
}

.media-item-header {
  align-items: center;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.media-item-title {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.media-item-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.media-meta-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  min-height: 28px;
  padding: 0.2rem 0.7rem;
  text-transform: uppercase;
}

.media-meta-badge--ok {
  background: rgba(31, 143, 78, 0.12);
  color: #17653a;
}

.media-meta-badge--muted {
  background: rgba(109, 127, 141, 0.14);
  color: #4e6170;
}

.media-meta-badge--neutral {
  background: rgba(0, 90, 141, 0.1);
  color: var(--brand-dark);
}

.media-meta-badge--soft {
  background: rgba(185, 117, 0, 0.12);
  color: #8c5d00;
}

.media-meta-badge--live {
  background: linear-gradient(135deg, rgba(0, 125, 118, 0.18) 0%, rgba(0, 90, 141, 0.18) 100%);
  color: #0e5b66;
}

.media-item-filename {
  color: #5a7183;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  overflow-wrap: anywhere;
}

.media-expand-button {
  align-items: center;
  background: #e6f1f5;
  border: 1px solid #c2d6e0;
  border-radius: 999px;
  color: var(--brand-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 2.35rem;
  justify-content: center;
  padding: 0;
  width: 2.35rem;
}

.media-expand-button:hover {
  background: #d9eaf1;
}

.media-expand-icon {
  align-items: center;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  transition: transform 180ms ease;
}

.media-expand-icon .expand-icon-svg,
.event-expand-icon .expand-icon-svg {
  display: block;
  height: 0.95rem;
  overflow: visible;
  width: 0.95rem;
}

.media-expand-button[aria-expanded="false"] .media-expand-icon,
.event-expand-button[aria-expanded="false"] .event-expand-icon {
  transform: rotate(90deg);
}

.media-item-body {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.85rem;
  padding-top: 0.9rem;
}

.media-item-details {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.media-item-details > div {
  background: rgba(241, 246, 249, 0.9);
  border: 1px solid #d7e3ea;
  border-radius: 16px;
  display: grid;
  gap: 0.28rem;
  padding: 0.8rem 0.9rem;
}

.media-item-details dt {
  color: #6a8396;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0;
  text-transform: uppercase;
}

.media-item-details dd {
  color: var(--brand-dark);
  font-weight: 700;
  line-height: 1.45;
  margin: 0;
  overflow-wrap: anywhere;
}

.media-item-details code {
  color: #315066;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  white-space: pre-wrap;
}

.media-duration-editor {
  align-items: end;
  background: rgba(243, 248, 251, 0.92);
  border: 1px solid #d7e3ea;
  border-radius: 18px;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 220px) auto;
  padding: 0.9rem;
}

.media-duration-editor--readonly {
  grid-template-columns: 1fr;
}

.media-duration-field {
  display: grid;
  gap: 0.4rem;
}

.media-duration-label {
  color: #6a8396;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.media-duration-editor p {
  color: #4f697c;
  font-weight: 700;
  margin: 0;
}

.media-duration-editor input {
  min-height: 48px;
}

.media-item-body .item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-width: 0;
}

.admin-item.is-muted {
  border-left-color: #9aa8b5;
  opacity: 0.66;
}

.admin-item.is-archived {
  border-left-color: #6b7b88;
  background: #f2f5f7;
}

.admin-item h3 {
  color: var(--brand-dark);
  font-size: 1.12rem;
  margin: 0.25rem 0;
}

.item-meta-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: space-between;
}

.admin-event-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.15rem;
}

.admin-event-point {
  background: linear-gradient(180deg, #ffffff 0%, #edf5f9 100%);
  border: 1px solid #d9e5ec;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  display: grid;
  gap: 0.18rem;
  min-width: 152px;
  padding: 0.7rem 0.85rem;
}

.admin-event-point span {
  color: #6a8396;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-event-point strong {
  color: var(--brand-dark);
  font-size: 1.15rem;
  line-height: 1;
}

.admin-event-point small {
  color: #446177;
  font-size: 0.82rem;
  font-weight: 700;
}

.admin-event-point--end {
  background: linear-gradient(180deg, #fff9f0 0%, #f8efe1 100%);
}

.media-admin-item .media-item-title h3 {
  margin: 0;
}

.admin-item p {
  color: #345066;
  line-height: 1.4;
  margin: 0;
}

.admin-item a {
  color: var(--brand);
  display: inline-block;
  margin-top: 0.5rem;
  overflow-wrap: anywhere;
}

.item-date {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-item.agenda-item--priority-baixa {
  border-left-color: var(--event-low);
}

.admin-item.agenda-item--priority-media {
  border-left-color: var(--event-medium);
}

.admin-item.agenda-item--priority-alta {
  border-left-color: var(--event-high);
}

.item-actions {
  align-content: start;
  display: grid;
  gap: 0.55rem;
  min-width: 120px;
}

.admin-event-card .item-actions {
  align-self: stretch;
  min-width: 138px;
}

.admin-event-card .item-actions button {
  border-radius: 14px;
  font-weight: 900;
}

.admin-event-card .agenda-priority-badge {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.admin-nav a,
.secondary-button,
.item-actions button,
.form-actions button {
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(0, 61, 99, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, color 160ms ease;
}

.admin-nav a:hover,
.secondary-button:hover,
.item-actions button:hover,
.form-actions button:hover {
  box-shadow: 0 16px 26px rgba(0, 61, 99, 0.18);
  transform: translateY(-1px);
}

.panel-heading .secondary-button {
  min-width: 108px;
}

.media-remote {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.media-remote-bar {
  background: #f8fbfd;
  border: 1px solid var(--line);
  border-left: 8px solid var(--brand);
  margin-bottom: 1.25rem;
  padding: 1rem;
}

.media-remote-status {
  display: grid;
  gap: 0.35rem;
  margin-right: auto;
  min-width: min(420px, 100%);
}

.media-remote-status p {
  color: #345066;
  margin: 0;
  overflow-wrap: anywhere;
}

.media-volume {
  align-items: center;
  color: #345066;
  display: flex;
  font-weight: 850;
  gap: 0.65rem;
}

.media-volume input {
  accent-color: var(--brand);
  width: min(220px, 48vw);
}

.admin-status {
  background: #1f8f4e;
  border-radius: 6px;
  bottom: 22px;
  color: #fff;
  font-weight: 850;
  opacity: 0;
  padding: 0.9rem 1.1rem;
  pointer-events: none;
  position: fixed;
  right: 22px;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 3;
}

.admin-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.admin-status.is-error {
  background: var(--danger);
}

.app-modal-backdrop {
  align-items: center;
  background: rgba(6, 20, 32, 0.46);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 20;
}

.app-modal {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 70px rgba(6, 20, 32, 0.28);
  max-width: 440px;
  padding: 24px;
  width: min(100%, 440px);
}

.app-modal-wide {
  max-width: 640px;
  width: min(100%, 640px);
}

.app-modal h2 {
  color: var(--brand-dark);
  font-size: 1.45rem;
  margin: 0 0 0.65rem;
}

.app-modal p {
  color: #345066;
  line-height: 1.45;
  margin: 0;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.4rem;
}

.modal-form {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.modal-form label {
  color: #21384d;
  display: grid;
  font-weight: 850;
  gap: 0.4rem;
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  background: #f9fbfc;
  border: 1px solid #b9c8d3;
  border-radius: 6px;
  color: var(--ink);
  min-height: 46px;
  padding: 0.7rem 0.8rem;
  width: 100%;
}

.modal-form textarea {
  resize: vertical;
}

@media (max-width: 1100px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .admin-topbar,
  .panel-heading,
  .admin-item {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .admin-nav,
  .form-grid,
  .form-grid--event-top,
  .archive-filters,
  .archive-pagination,
  .compact-news-list,
  .media-upload-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .agenda-item {
    grid-template-columns: 1fr;
  }

  .brand-copy h1 {
    gap: 0.25rem;
  }

  .admin-topbar.is-condensed .brand-copy h1 {
    font-size: 1.15rem;
  }

  .admin-topbar.is-condensed .brand-logo {
    height: 46px;
    width: 46px;
  }

  .media-item-header {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .media-item-header > [data-media-toggle] {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .media-duration-editor {
    grid-template-columns: 1fr;
  }

  .media-item-body .item-actions {
    flex-direction: column;
  }

  .admin-event-timeline {
    flex-direction: column;
  }

  .admin-event-point {
    min-width: 0;
  }

  .clock-time {
    font-size: 4.4rem;
  }
}

/* Admin refresh */
.admin-body {
  background:
    radial-gradient(circle at top left, rgba(0, 90, 141, 0.16), transparent 32%),
    radial-gradient(circle at top right, rgba(0, 125, 118, 0.12), transparent 24%),
    linear-gradient(180deg, #f1f5f8 0%, #e7edf2 100%);
}

.admin-topbar,
.admin-hero,
.admin-layout {
  margin-left: auto;
  margin-right: auto;
  width: min(1400px, calc(100% - 32px));
}

.admin-login-screen {
  position: relative;
}

.admin-login-card {
  backdrop-filter: blur(20px);
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(247, 251, 253, 0.94) 100%);
  border: 1px solid rgba(194, 212, 223, 0.95);
  border-radius: 32px;
  box-shadow: 0 30px 70px rgba(14, 28, 43, 0.16);
  display: grid;
  gap: 1.5rem;
  max-width: 560px;
  padding: clamp(24px, 4vw, 40px);
  width: min(100%, 560px);
}

.admin-login-brand {
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}

.admin-login-logo {
  display: block;
  height: 82px;
  object-fit: contain;
  width: 82px;
}

.admin-login-logo[hidden] {
  display: none;
}

.admin-login-brand h1 {
  color: var(--brand-dark);
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 0.95;
  margin: 0;
}

.admin-login-brand p,
.admin-login-note {
  color: #4d6678;
  line-height: 1.6;
  margin: 0;
  max-width: 44ch;
}

.admin-login-form {
  gap: 1rem;
  max-width: none;
  width: 100%;
}

.admin-login-form label {
  color: #1f3d52;
  display: grid;
  font-weight: 850;
  gap: 0.45rem;
}

.admin-login-form input {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #c4d4de;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
  font-size: 1.05rem;
  min-height: 58px;
  padding: 0.95rem 1rem;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.admin-login-form input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 125, 118, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.admin-login-form button {
  background: linear-gradient(135deg, var(--brand) 0%, #0a7a95 100%);
  border-radius: 18px;
  box-shadow: 0 18px 32px rgba(0, 61, 99, 0.18);
  min-height: 58px;
}

.admin-login-form button:hover {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--teal) 100%);
}

.login-error {
  background: rgba(180, 35, 24, 0.08);
  border: 1px solid rgba(180, 35, 24, 0.18);
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
}

.admin-topbar {
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(246, 250, 252, 0.92) 100%);
  border: 1px solid rgba(196, 213, 223, 0.92);
  border-bottom: 1px solid rgba(196, 213, 223, 0.92);
  border-radius: 28px;
  box-shadow: 0 18px 40px rgba(18, 32, 47, 0.1);
  margin-top: 16px;
  min-height: 92px;
  padding: 14px clamp(18px, 4vw, 34px);
  top: 14px;
  z-index: 4;
}

.brand-copy h1 {
  line-height: 1;
  margin: 0.15rem 0 0;
}

.brand-logo {
  height: clamp(64px, 6vw, 92px);
  width: clamp(64px, 6vw, 92px);
}

.admin-topbar .section-kicker,
.admin-panel .section-kicker,
.admin-hero .section-kicker {
  color: var(--teal);
}

.admin-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-nav a {
  align-items: center;
  background: linear-gradient(135deg, #0d648f 0%, #12828b 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: inline-flex;
  min-height: 48px;
}

.admin-nav a:hover {
  background: linear-gradient(135deg, #084f77 0%, #0d6c70 100%);
}

.admin-topbar.is-condensed .brand-logo {
  height: 56px;
  width: 56px;
}

.admin-topbar.is-condensed .brand-copy h1 {
  font-size: 1.4rem;
}

.admin-hero {
  align-items: stretch;
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(280px, 1.05fr) auto;
  margin-top: 22px;
  overflow: visible;
  padding: 0;
  position: relative;
}

.admin-hero::before {
  display: none;
}

.admin-hero-summary {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 35%),
    linear-gradient(135deg, rgba(5, 43, 72, 0.96) 0%, rgba(10, 89, 118, 0.94) 100%);
  border: 1px solid rgba(24, 75, 106, 0.18);
  border-radius: 34px;
  box-shadow: 0 24px 55px rgba(7, 24, 38, 0.16);
  color: #fff;
  display: grid;
  gap: 0.65rem;
  min-width: 0;
  overflow: hidden;
  padding: 1.35rem 1.4rem;
  position: relative;
}

.admin-hero-summary::after {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 65%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.admin-hero-kicker {
  color: rgba(166, 230, 243, 0.86);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-hero-summary h2 {
  color: #fff;
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin: 0;
  max-width: 12ch;
}

.admin-hero-summary p {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
  margin: 0;
  max-width: 40ch;
}

.admin-hero-stats {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.1), transparent 32%),
    linear-gradient(135deg, rgba(5, 43, 72, 0.96) 0%, rgba(10, 89, 118, 0.94) 100%);
  border: 1px solid rgba(24, 75, 106, 0.18);
  border-radius: 34px;
  box-shadow: 0 24px 55px rgba(7, 24, 38, 0.16);
  color: #fff;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(210px, 240px));
  justify-content: stretch;
  max-width: 100%;
  padding: 0.95rem;
  position: relative;
  z-index: 1;
}

.hero-stat-card {
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 14px 28px rgba(5, 28, 43, 0.14);
  display: grid;
  gap: 0.45rem;
  min-height: 0;
  padding: 1rem 1.05rem 1.05rem;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.hero-stat-card:hover {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 34px rgba(5, 28, 43, 0.18);
  transform: translateY(-1px);
}

.hero-stat-label {
  color: rgba(217, 244, 255, 0.88);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-stat-card strong {
  font-size: clamp(2rem, 2.4vw, 2.35rem);
  line-height: 1;
}

.hero-stat-card p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}

.admin-layout {
  gap: 24px;
  margin-top: 22px;
  padding: 0 0 54px;
}

.admin-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 252, 0.96) 100%);
  border: 1px solid rgba(201, 213, 223, 0.9);
  border-radius: 32px;
  box-shadow: 0 18px 40px rgba(18, 32, 47, 0.1);
  overflow: hidden;
  padding: clamp(22px, 2vw, 32px);
  position: relative;
}

.admin-panel::before {
  background: linear-gradient(90deg, rgba(0, 90, 141, 0.95), rgba(0, 125, 118, 0.9), rgba(126, 184, 207, 0.9));
  content: "";
  height: 6px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.admin-panel:hover {
  border-color: #b8ceda;
  box-shadow: 0 24px 48px rgba(18, 32, 47, 0.14);
}

.admin-panel--media {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 251, 253, 0.96) 100%);
}

.events-admin-panel {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.12), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 1.35rem;
}

.admin-panel h2 {
  font-size: clamp(1.5rem, 1.8vw, 2.35rem);
  letter-spacing: -0.03em;
  margin: 0.18rem 0 0;
}

.panel-intro {
  line-height: 1.55;
  margin: 0.5rem 0 0;
  max-width: 50ch;
}

.admin-form {
  background: linear-gradient(180deg, rgba(250, 252, 253, 0.98) 0%, rgba(243, 248, 251, 0.98) 100%);
  border: 1px solid #d7e3ea;
  border-bottom: 1px solid #d7e3ea;
  border-radius: 24px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  margin-bottom: 1.3rem;
  padding: clamp(18px, 2vw, 24px);
}

.admin-form label {
  gap: 0.45rem;
}

.admin-form input,
.admin-form textarea,
.admin-form select {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #c6d6e0;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  min-height: 50px;
  padding: 0.8rem 0.9rem;
}

.admin-form textarea {
  min-height: 120px;
}

.media-dropzone {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.12), transparent 28%),
    linear-gradient(180deg, #f9fcfe 0%, #edf5fa 100%);
  border-radius: 24px;
  gap: 0.55rem;
  min-height: 168px;
  padding: 1.25rem;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.media-dropzone-badge {
  background: rgba(0, 90, 141, 0.1);
  border: 1px solid rgba(0, 90, 141, 0.14);
  border-radius: 999px;
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  padding: 0.45rem 0.7rem;
  text-transform: uppercase;
}

.media-dropzone strong {
  font-size: 1.08rem;
  max-width: 28ch;
}

.media-dropzone:hover,
.media-dropzone:focus-visible,
.media-dropzone.is-dragover {
  box-shadow: 0 18px 30px rgba(0, 90, 141, 0.08);
}

.media-upload-actions {
  background: #f6fafc;
  border: 1px solid #d7e4eb;
  border-radius: 18px;
  padding: 0.95rem 1rem;
}

.media-remote-bar {
  background: linear-gradient(180deg, #f8fbfd 0%, #eef5f9 100%);
  border: 1px solid #d7e3ea;
  border-left: 1px solid #d7e3ea;
  border-radius: 24px;
  padding: 1rem 1.05rem;
  position: relative;
}

.media-remote-bar::before {
  background: linear-gradient(180deg, var(--brand) 0%, var(--teal) 100%);
  border-radius: 999px;
  content: "";
  inset: 16px auto 16px 14px;
  position: absolute;
  width: 5px;
}

.media-remote-status {
  padding-left: 0.65rem;
}

.admin-list {
  gap: 1.05rem;
}

.admin-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(245, 249, 252, 0.96) 100%);
  border: 1px solid #d7e3ea;
  border-left: 1px solid #d7e3ea;
  border-radius: 24px;
  overflow: hidden;
  padding: 1.05rem 1.1rem;
  position: relative;
}

.admin-item::before {
  background: linear-gradient(180deg, var(--teal) 0%, var(--brand) 100%);
  content: "";
  inset: 0 auto 0 0;
  position: absolute;
  width: 7px;
}

.admin-item:hover {
  border-color: #bfd2dd;
  box-shadow: 0 18px 32px rgba(18, 32, 47, 0.1);
}

.admin-item.is-muted {
  opacity: 0.68;
}

.admin-item.is-muted::before {
  background: linear-gradient(180deg, #93a4b2 0%, #6d7f8d 100%);
}

.admin-item.is-archived::before {
  background: linear-gradient(180deg, #6b7b88 0%, #465562 100%);
}

.admin-item.agenda-item--priority-baixa::before {
  background: linear-gradient(180deg, var(--event-low) 0%, #0d8ccb 100%);
}

.admin-item.agenda-item--priority-media::before {
  background: linear-gradient(180deg, var(--event-medium) 0%, #e39c18 100%);
}

.admin-item.agenda-item--priority-alta::before {
  background: linear-gradient(180deg, var(--event-high) 0%, #e04f45 100%);
}

.admin-event-card {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 252, 0.96) 100%);
  border-radius: 28px;
  box-shadow: 0 18px 34px rgba(18, 32, 47, 0.08);
  padding: 1.2rem 1.25rem 1.2rem 1.35rem;
}

.admin-event-header {
  align-items: center;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.admin-event-header .item-meta-row {
  gap: 0.7rem;
  justify-content: flex-start;
}

.admin-event-card h3 {
  color: var(--brand-dark);
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

.admin-event-body {
  background: linear-gradient(180deg, rgba(247, 251, 253, 0.96) 0%, rgba(240, 247, 251, 0.92) 100%);
  border: 1px solid #dbe7ee;
  border-radius: 22px;
  display: grid;
  gap: 1rem;
  padding: 1rem 1.05rem;
}

.admin-event-body p {
  color: #355469;
  font-size: 0.98rem;
  line-height: 1.55;
}

.event-expand-button {
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #e8f2f7 100%);
  border: 1px solid #cbdce6;
  border-radius: 999px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 20px rgba(0, 61, 99, 0.08);
  color: var(--brand-dark);
  cursor: pointer;
  display: inline-flex;
  font-size: 1rem;
  font-weight: 900;
  height: 2.7rem;
  justify-content: center;
  padding: 0;
  width: 2.7rem;
}

.event-expand-button:hover {
  background: linear-gradient(180deg, #f4fbfe 0%, #dbeef8 100%);
}

.event-expand-icon {
  align-items: center;
  color: inherit;
  display: inline-flex;
  justify-content: center;
  line-height: 1;
  transition: transform 180ms ease;
}

.admin-event-timeline {
  gap: 0.7rem;
}

.admin-event-point {
  border-radius: 16px;
  min-width: 144px;
  padding: 0.72rem 0.85rem;
}

.admin-event-card .item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  min-width: 0;
}

.admin-event-card .item-actions button {
  min-width: 124px;
}

.media-admin-item {
  padding-left: 1.3rem;
}

.media-item-header {
  gap: 0.95rem;
}

.media-expand-button {
  background: linear-gradient(180deg, #eef6fa 0%, #ddebf2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  height: 2.6rem;
  width: 2.6rem;
}

.media-item-body {
  border-top: 1px solid #d7e3ea;
  gap: 0.9rem;
  padding-top: 0.95rem;
}

.admin-item h3 {
  font-size: 1.14rem;
}

.item-date {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.admin-nav a,
.secondary-button,
.item-actions button,
.form-actions button,
.modal-actions button {
  border-radius: 16px;
  box-shadow: 0 12px 22px rgba(0, 61, 99, 0.14);
}

.admin-nav a:hover,
.secondary-button:hover,
.item-actions button:hover,
.form-actions button:hover,
.modal-actions button:hover {
  box-shadow: 0 18px 28px rgba(0, 61, 99, 0.18);
}

.item-actions {
  min-width: 124px;
}

.admin-event-card .item-actions button {
  border-radius: 16px;
}

.admin-status {
  border-radius: 18px;
  box-shadow: 0 18px 35px rgba(9, 54, 29, 0.18);
  z-index: 5;
}

.app-modal-backdrop {
  backdrop-filter: blur(6px);
}

.app-modal {
  background: linear-gradient(180deg, #ffffff 0%, #f7fbfd 100%);
  border: 1px solid #d6e2ea;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(6, 20, 32, 0.28);
}

.modal-form input,
.modal-form textarea,
.modal-form select {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #c6d6e0;
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  min-height: 50px;
  padding: 0.8rem 0.9rem;
}

@media (max-width: 1100px) {
  .admin-hero {
    grid-template-columns: 1fr;
  }

  .admin-hero-summary {
    max-width: 100%;
  }

  .admin-hero-stats {
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    width: min(100%, 680px);
  }
}

@media (max-width: 720px) {
  .admin-topbar,
  .admin-hero,
  .admin-layout {
    width: calc(100% - 20px);
  }

  .admin-topbar {
    margin-top: 10px;
    top: 8px;
  }

  .admin-hero {
    padding: 0;
  }

  .admin-hero-summary {
    min-width: 0;
  }

  .admin-hero-stats {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .admin-event-header {
    grid-template-columns: 1fr;
  }

  .admin-event-card .item-actions {
    flex-direction: column;
  }

  .admin-panel,
  .admin-form {
    border-radius: 24px;
  }

  .event-form-section-heading {
    grid-template-columns: 1fr;
  }

  .media-upload-actions {
    align-items: stretch;
  }
}

/* Admin form polish */
#mediaForm,
.event-form {
  gap: 1.25rem;
}

#mediaForm > label,
#mediaForm .form-grid > label,
.event-form .form-grid > label,
.event-form-section--content > label {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(246, 250, 252, 0.92) 100%);
  border: 1px solid #d8e4eb;
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 24px rgba(18, 32, 47, 0.04);
  padding: 0.9rem 0.95rem 1rem;
}

#mediaForm label,
.event-form label {
  color: #123952;
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

#mediaForm input::placeholder,
.event-form input::placeholder,
.event-form textarea::placeholder {
  color: #9ab0bf;
}

.media-dropzone {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.14), transparent 30%),
    linear-gradient(180deg, #fafdff 0%, #edf5fa 100%);
  border: 1.5px dashed #8eb8ce;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  min-height: 212px;
  overflow: hidden;
  padding: 1.6rem 1.25rem 1.35rem;
  position: relative;
}

.media-dropzone::before {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.82), transparent 35%),
    linear-gradient(135deg, rgba(0, 90, 141, 0.18) 0%, rgba(0, 125, 118, 0.16) 100%);
  border: 1px solid rgba(0, 90, 141, 0.12);
  border-radius: 24px;
  box-shadow: 0 14px 28px rgba(0, 90, 141, 0.1);
  content: "";
  height: 64px;
  margin-bottom: 0.35rem;
  width: 64px;
}

.media-dropzone strong {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  line-height: 1.22;
  max-width: 24ch;
}

.media-dropzone-badge {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(0, 90, 141, 0.12);
  box-shadow: 0 8px 18px rgba(0, 90, 141, 0.08);
}

.media-upload-actions {
  align-items: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(244, 249, 252, 0.94) 100%);
  border-radius: 22px;
  box-shadow: 0 12px 26px rgba(18, 32, 47, 0.05);
  padding: 1rem 1.05rem;
}

.media-pending-files {
  color: #587284;
  font-size: 0.95rem;
  font-weight: 800;
}

.event-form-shell {
  gap: 1rem;
  grid-template-columns: 1fr;
}

.event-form-section {
  background:
    radial-gradient(circle at top right, rgba(0, 90, 141, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 249, 252, 0.94) 100%);
  border-radius: 26px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 14px 28px rgba(18, 32, 47, 0.05);
  display: grid;
  gap: 1rem;
  padding: 1.15rem;
}

.event-form-section--content > label textarea {
  min-height: 148px;
}

.event-form .char-counter {
  color: #698396;
  font-size: 0.8rem;
  font-weight: 800;
  margin-top: 0.15rem;
}

@media (max-width: 720px) {
  #mediaForm > label,
  #mediaForm .form-grid > label,
  .event-form .form-grid > label,
  .event-form-section--content > label {
    padding: 0.85rem 0.85rem 0.95rem;
  }

  .media-dropzone {
    min-height: 188px;
    padding: 1.35rem 1.05rem 1.15rem;
  }
}

/* Professional event form refinement */
#mediaForm {
  background: linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
  border: 1px solid #d4e1e9;
  box-shadow: 0 18px 36px rgba(18, 32, 47, 0.07);
  gap: 1rem;
  padding: clamp(20px, 2.2vw, 28px);
}

#mediaForm > label,
#mediaForm .form-grid > label {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 0.45rem;
  padding: 0;
}

#mediaForm .form-grid {
  align-items: end;
  gap: 1rem;
}

#mediaForm label {
  color: #16364d;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

#mediaForm input,
#mediaForm textarea,
#mediaForm select {
  background: #ffffff;
  border: 1px solid #c7d7e1;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 2px 6px rgba(18, 32, 47, 0.03);
  color: #123952;
  font-size: 1rem;
  font-weight: 700;
  min-height: 58px;
  padding: 0.95rem 1rem;
}

#mediaForm input:focus,
#mediaForm textarea:focus,
#mediaForm select:focus {
  border-color: #7aa9c1;
  box-shadow:
    0 0 0 4px rgba(0, 90, 141, 0.08),
    0 10px 22px rgba(0, 90, 141, 0.08);
  transform: none;
}

.media-dropzone {
  min-height: 176px;
  padding: 1.35rem 1.2rem 1.2rem;
}

.media-upload-actions {
  padding: 0.85rem 1rem;
}

.event-form {
  background: linear-gradient(180deg, #ffffff 0%, #f6fafc 100%);
  border: 1px solid #d4e1e9;
  box-shadow: 0 18px 36px rgba(18, 32, 47, 0.07);
  gap: 1rem;
  padding: clamp(20px, 2.2vw, 28px);
}

.event-form-shell {
  gap: 1.2rem;
}

.event-form-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(246, 250, 252, 0.96) 100%);
  border: 1px solid #d8e5ec;
  border-radius: 22px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 10px 24px rgba(18, 32, 47, 0.04);
  gap: 1rem;
  padding: 1.15rem;
}

.event-form .form-grid,
.event-form .form-grid--event-top {
  gap: 1.15rem;
}

.event-form-section--schedule {
  gap: 1.15rem;
}

.event-form-section--schedule .event-row {
  align-items: end;
}

.event-form-section--schedule .event-row--top {
  column-gap: 1.3rem;
  grid-template-columns: auto auto;
}

.event-form-section--schedule .event-row--bottom {
  column-gap: 1.3rem;
  grid-template-columns: auto auto auto;
}

.event-form-section--schedule .event-row--top > label {
  width: 238px;
}

.event-form-section--schedule .event-row--bottom > label {
  width: 154px;
}

.event-form .form-grid > label,
.event-form-section--content > label {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  gap: 0.45rem;
  padding: 0;
}

.event-form label {
  color: #16364d;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.event-form-section--schedule label {
  gap: 0.55rem;
}

.event-form input,
.event-form textarea,
.event-form select {
  background: #ffffff;
  border: 1px solid #c7d7e1;
  border-radius: 15px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.94),
    0 2px 6px rgba(18, 32, 47, 0.03);
  color: #123952;
  font-size: 1rem;
  font-weight: 700;
  min-height: 56px;
  padding: 0.95rem 1rem;
}

.event-form input[type="date"],
.event-form input[type="time"],
.event-form select {
  letter-spacing: 0.01em;
}

.event-form-section--schedule input,
.event-form-section--schedule select {
  min-height: 50px;
  padding: 0.75rem 0.95rem;
}

.event-form input[type="date"],
.event-form input[type="time"] {
  padding-right: 2.5rem;
}

.event-form textarea {
  line-height: 1.5;
  min-height: 118px;
  padding-top: 1rem;
  resize: vertical;
}

.event-form input:focus,
.event-form textarea:focus,
.event-form select:focus {
  border-color: #7aa9c1;
  box-shadow:
    0 0 0 4px rgba(0, 90, 141, 0.08),
    0 10px 22px rgba(0, 90, 141, 0.08);
  transform: none;
}

.event-form-section--content {
  gap: 1rem;
}

.event-form .char-counter {
  color: #6d8495;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  margin-top: 0.1rem;
}

#mediaForm .form-actions,
.event-form .form-actions {
  margin-top: 0.15rem;
}

@media (max-width: 900px) {
  .event-form-section--schedule .event-row--top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
  }

  .event-form-section--schedule .event-row--bottom {
    column-gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .event-form-section--schedule .event-row--top > label,
  .event-form-section--schedule .event-row--bottom > label {
    width: auto;
  }
}

@media (max-width: 720px) {
  #mediaForm,
  .event-form {
    gap: 1.15rem;
    padding: 1rem;
  }

  .media-dropzone {
    min-height: 160px;
    padding: 1.2rem 1rem 1.05rem;
  }

  .event-form-section {
    border-radius: 20px;
    padding: 1rem;
  }

  .event-form .form-grid,
  .event-form .form-grid--event-top {
    gap: 0.9rem;
    grid-template-columns: 1fr;
  }
}
