:root {
  --bg: #07110d;
  --bg-soft: #0f1f17;
  --card: rgba(255, 255, 255, 0.93);
  --card-dark: rgba(13, 30, 22, 0.88);
  --text: #142118;
  --muted: #65746b;
  --line: rgba(17, 37, 27, 0.12);
  --accent: #d99a2b;
  --accent-2: #6fbf73;
  --danger: #b42318;
  --warning: #b7791f;
  --info: #2563eb;
  --ok: #138a4a;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 0%, rgba(217, 154, 43, 0.24), transparent 28rem),
    radial-gradient(circle at 90% 8%, rgba(111, 191, 115, 0.2), transparent 30rem),
    linear-gradient(135deg, #07110d 0%, #10271b 55%, #07110d 100%);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url('/static/img/water-pattern.svg');
  background-size: 780px auto;
  opacity: 0.12;
  pointer-events: none;
}
a { color: #17683c; text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: rgba(6, 17, 12, 0.82);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}
.brand-wrap { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.brand-link { display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0; color: #fff; }
.brand-link:hover { text-decoration: none; }
.brand-logo { width: 2.35rem; height: 2.35rem; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,0.1); }
.brand {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  overflow-wrap: anywhere;
}
.badge {
  display: inline-flex;
  align-items: center;
  height: 1.75rem;
  padding: 0 0.7rem;
  border-radius: 999px;
  background: rgba(217, 154, 43, 0.18);
  color: #ffd58d;
  font-size: 0.8rem;
  font-weight: 800;
}
nav { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
nav a, .inline button {
  color: rgba(255, 255, 255, 0.88);
  border: 0;
  background: transparent;
  font: inherit;
  padding: 0.58rem 0.82rem;
  border-radius: 999px;
  cursor: pointer;
}
nav a:hover, .inline button:hover { background: rgba(255, 255, 255, 0.12); text-decoration: none; }
.nav-cta {
  color: #172016 !important;
  background: linear-gradient(135deg, #ffd27a, #d99a2b) !important;
  box-shadow: 0 12px 28px rgba(217, 154, 43, 0.28);
  font-weight: 900;
}
.inline { display: inline; margin: 0; }

.page-frame {
  position: relative;
  display: grid;
  grid-template-columns: minmax(120px, 170px) minmax(0, 1180px) minmax(120px, 170px);
  justify-content: center;
  gap: 1rem;
  width: calc(100% - 1.2rem);
  max-width: 1540px;
  margin: 1.1rem auto 0;
}
.container {
  position: relative;
  z-index: 1;
  grid-column: 2;
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  padding-bottom: 4rem;
}
.page-side-left { grid-column: 1; }
.page-side-right { grid-column: 3; }
.side-rail {
  position: sticky;
  top: 6rem;
  height: calc(100vh - 7rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
}
.promo-box {
  width: min(160px, 100%);
  min-height: 600px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  color: rgba(255, 255, 255, 0.78);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.promo-box span { color: #ffd58d; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.promo-box strong { display: block; font-size: 1.35rem; margin: 0.4rem 0; }
.promo-box small { color: rgba(255, 255, 255, 0.62); }
.rail-clock {
  width: min(160px, 100%);
  display: grid;
  gap: 0.28rem;
  padding: 0.8rem 0.7rem;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.94), rgba(239,250,242,0.88));
  border: 1px solid rgba(255,255,255,0.48);
  box-shadow: var(--shadow);
  color: #142118;
  text-align: center;
}
.rail-clock > span {
  color: #6b5a22;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.rail-clock-time {
  color: #102016;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}
.rail-clock-date {
  color: #526156;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: capitalize;
}

.hero, .submit-hero {
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.75fr);
  align-items: center;
  gap: 1.4rem;
  padding: clamp(1.4rem, 4vw, 3.4rem);
  border-radius: 32px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 255, 246, 0.88)),
    radial-gradient(circle at 75% 30%, rgba(217, 154, 43, 0.28), transparent 18rem);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.48);
}
.hero h1, .submit-hero h1 {
  margin: 0.2rem 0 0.85rem;
  line-height: 0.98;
  letter-spacing: 0;
  font-size: clamp(2.35rem, 6vw, 5.4rem);
}
.hero p, .submit-hero p { font-size: 1.08rem; color: #3b4a40; max-width: 66ch; }
.eyebrow {
  margin: 0;
  color: #92701b;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
}
.hero-art, .submit-hero img { width: 100%; max-height: 330px; object-fit: contain; filter: drop-shadow(0 22px 28px rgba(0,0,0,0.18)); }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.3rem; }

.card {
  margin-top: 1rem;
  padding: 1.15rem;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filter-card { margin-top: 1.2rem; }
.filters {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) repeat(3, minmax(140px, 1fr)) repeat(3, minmax(112px, 0.75fr)) auto;
  gap: 0.8rem;
  align-items: end;
}
label { display: grid; gap: 0.35rem; color: #2f4135; font-weight: 750; }
input, select, textarea {
  width: 100%;
  border: 1px solid #d7dfd9;
  border-radius: 14px;
  background: #fff;
  color: #122016;
  font: inherit;
  padding: 0.78rem 0.85rem;
  outline: none;
}
input:focus, select:focus, textarea:focus { border-color: #7abf82; box-shadow: 0 0 0 4px rgba(111, 191, 115, 0.18); }
textarea { min-height: 9rem; resize: vertical; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  background: #163723;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0.82rem 1.08rem;
  min-height: 2.65rem;
  text-decoration: none;
}
button:hover, .button:hover { transform: translateY(-1px); text-decoration: none; }
.primary { background: linear-gradient(135deg, #1e8d50, #126439); color: #fff; }
.big { font-size: 1.05rem; padding: 1rem 1.35rem; }
.ghost { background: rgba(18, 52, 32, 0.09); color: #143720; }
.success { background: #138a4a; }
.danger { background: #b42318; }
.danger-soft { background: #fff0ee; color: #b42318; border: 1px solid rgba(180, 35, 24, 0.18); }
.tiny { min-height: 2rem; padding: 0.42rem 0.65rem; font-size: 0.82rem; }
.submit-big { font-size: 1.05rem; padding-block: 1rem; }

.calendar-summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin: 1.1rem 0;
  color: rgba(255, 255, 255, 0.8);
}
.calendar-summary strong { font-size: 2rem; color: #ffd58d; }
.month-nav { display: flex; gap: 0.45rem; overflow-x: auto; padding-bottom: 0.2rem; }
.month-nav a {
  flex: 0 0 auto;
  color: #173721;
  background: #fff;
  border-radius: 999px;
  padding: 0.42rem 0.72rem;
  font-weight: 800;
}
.month-block {
  margin: 1rem 0 1.35rem;
  padding: 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.13);
}
.month-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; color: #fff; padding: 0.2rem 0.3rem 0.85rem; }
.month-title h2 { margin: 0; font-size: clamp(1.35rem, 2.5vw, 2rem); letter-spacing: 0; }
.month-title span { color: #ffd58d; font-weight: 850; }
.month-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(295px, 360px);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 0.2rem 0.2rem 0.8rem;
}
.month-scroll::-webkit-scrollbar { height: 10px; }
.month-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.35); border-radius: 999px; }
.event-card {
  position: relative;
  overflow: hidden;
  min-height: 250px;
  border-radius: 24px;
  background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(241,248,241,0.96));
  border: 1px solid rgba(255,255,255,0.5);
  box-shadow: 0 12px 34px rgba(0,0,0,0.18);
  scroll-snap-align: start;
}
.event-card::after {
  content: "";
  position: absolute;
  right: -2rem;
  bottom: -2.6rem;
  width: 9rem;
  height: 9rem;
  background: url('/static/img/carp-mark.svg') center/contain no-repeat;
  opacity: 0.09;
  pointer-events: none;
}
.event-card-link { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 0.85rem; height: 100%; padding: 1rem; color: inherit; }
.event-card-link:hover { text-decoration: none; }
.event-date {
  align-self: start;
  display: grid;
  place-items: center;
  min-height: 78px;
  border-radius: 20px;
  background: linear-gradient(160deg, #163723, #0f2517);
  color: #fff;
  text-align: center;
  box-shadow: inset 0 -18px 35px rgba(217, 154, 43, 0.12);
}
.event-date strong { font-size: 1.55rem; line-height: 1; }
.event-date span { font-size: 0.78rem; color: #ffd58d; font-weight: 800; }
.event-main h3 { margin: 0 0 0.45rem; font-size: 1.1rem; line-height: 1.22; letter-spacing: 0; }
.venue { margin: 0 0 0.7rem; color: var(--muted); }
.event-meta { display: grid; gap: 0.3rem; color: #243528; font-weight: 800; font-size: 0.9rem; }
.event-facts {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0.05rem 0 0;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(17, 37, 27, 0.09);
  box-shadow: none;
}
.event-facts th,
.event-facts td {
  padding: 0.42rem 0.52rem;
  border-bottom: 1px solid rgba(17, 37, 27, 0.08);
  font-size: 0.78rem;
  line-height: 1.2;
  vertical-align: top;
}
.event-facts th {
  width: 4.7rem;
  background: rgba(19, 55, 35, 0.06);
  color: #607066;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.event-facts td {
  background: rgba(255,255,255,0.78);
  color: #213228;
  font-weight: 850;
}
.event-facts tr:last-child th,
.event-facts tr:last-child td {
  border-bottom: 0;
}
.card-footer { margin-top: 0.75rem; }
.is-past { filter: grayscale(0.85); opacity: 0.52; }
.past-ribbon {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 3;
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(29, 33, 30, 0.78);
  color: #fff;
  font-size: 0.73rem;
  font-weight: 900;
}

.tag-list { display: flex; gap: 0.35rem; flex-wrap: wrap; margin-top: 0.65rem; }
.event-tag-strip {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  padding: 0 1rem 0.7rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 100, 59, 0.45) rgba(23, 100, 59, 0.08);
}
.event-tag-strip::-webkit-scrollbar { height: 8px; }
.event-tag-strip::-webkit-scrollbar-thumb { background: rgba(23, 100, 59, 0.45); border-radius: 999px; }
.event-tag-strip::-webkit-scrollbar-track { background: rgba(23, 100, 59, 0.08); border-radius: 999px; }
.event-tag-strip .tag { flex: 0 0 auto; white-space: nowrap; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(111, 191, 115, 0.14);
  color: #17643b;
  padding: 0.28rem 0.5rem;
  font-weight: 850;
  font-size: 0.75rem;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.38rem 0.62rem;
  font-size: 0.78rem;
  font-weight: 900;
}
.status-ok { background: rgba(19, 138, 74, 0.12); color: #0d6b3b; }
.status-info { background: rgba(37, 99, 235, 0.11); color: #1f56c4; }
.status-warn { background: rgba(183, 121, 31, 0.14); color: #8a570e; }
.status-bad { background: rgba(180, 35, 24, 0.12); color: #b42318; }
.status-neutral { background: #eef2ef; color: #56645c; }

.detail { padding: clamp(1.2rem, 3vw, 2rem); }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.detail h1 { margin: 0.2rem 0 0.7rem; font-size: clamp(2rem, 4vw, 4rem); line-height: 0.98; letter-spacing: 0; }
.detail-date-calendar {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(280px, 1.3fr);
  gap: 1rem;
  align-items: center;
  margin-top: 1.2rem;
  padding: 1rem;
  border: 1px solid rgba(17, 37, 27, 0.12);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(244, 250, 246, 0.96), rgba(255, 250, 238, 0.92));
}
.detail-date-calendar-fallback { grid-template-columns: 1fr; }
.detail-date-copy h2 {
  margin: 0.2rem 0 0;
  font-size: clamp(1.35rem, 2.5vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}
.detail-date-months {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 0.85rem;
  min-width: 0;
}
.detail-date-month {
  min-width: 0;
  padding: 0.85rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.82);
  border: 1px solid rgba(17, 37, 27, 0.08);
}
.detail-date-month > strong {
  display: block;
  margin-bottom: 0.65rem;
  color: #173721;
  font-weight: 950;
  text-transform: capitalize;
}
.detail-date-weekdays,
.detail-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}
.detail-date-weekdays span,
.detail-date-day,
.detail-date-empty {
  min-height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  font-size: 0.84rem;
}
.detail-date-weekdays span {
  color: #77847c;
  font-weight: 900;
}
.detail-date-day {
  position: relative;
  background: #fff;
  color: #26362c;
  font-weight: 800;
}
.detail-date-day.is-weekend,
.detail-date-day.is-holiday {
  color: #b42318;
}
.detail-date-empty { background: transparent; }
.detail-date-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.28);
}
.detail-date-day.is-event-date {
  z-index: 1;
  background: rgba(255, 210, 122, 0.28);
  color: #102016;
  font-weight: 950;
  outline: 2px solid #d99a2b;
  outline-offset: -4px;
  animation: pulseDateRing 1.35s ease-out infinite;
}
.detail-date-day.is-event-date.is-weekend,
.detail-date-day.is-event-date.is-holiday {
  color: #b42318;
  outline-color: #b42318;
}
@keyframes pulseDateRing {
  0% { box-shadow: 0 0 0 0 rgba(217, 154, 43, 0.58); }
  70% { box-shadow: 0 0 0 9px rgba(217, 154, 43, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 154, 43, 0); }
}
dl { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 0; margin: 1.4rem 0 0; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
dt, dd { margin: 0; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
dt { background: rgba(19, 55, 35, 0.06); color: #45554a; font-weight: 900; }
dd { background: #fff; }
dt:last-of-type, dd:last-of-type { border-bottom: 0; }
.back-row { margin: 0 0 1rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid h2 { margin: 0.6rem 0 0; }
.form-narrow { max-width: 420px; display: grid; gap: 1rem; }
.submit-hero { margin-bottom: 1rem; grid-template-columns: minmax(0, 1fr) minmax(180px, 270px); }
.submit-hero h1 { font-size: clamp(2rem, 5vw, 4rem); }

.alert {
  margin: 0.9rem 0;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: #fff8e9;
  border: 1px solid rgba(217, 154, 43, 0.24);
  color: #5f4412;
}
.alert.error { background: #fff1f0; border-color: rgba(180, 35, 24, 0.22); color: #8f1d14; }
.alert.success { background: #effaf2; border-color: rgba(19, 138, 74, 0.2); color: #0d6b3b; }
.alert.info { background: #eff6ff; border-color: rgba(37, 99, 235, 0.18); color: #1d4fa8; }
.muted, .small { color: var(--muted); }
.small { font-size: 0.82rem; }
.muted-alert { background: #f3f4f3; color: #5c655f; border-color: #e2e7e2; }
.success-card { text-align: center; max-width: 720px; margin-inline: auto; }
.contact-card { max-width: 760px; margin-inline: auto; }
.contact-card h1 { margin: 0.25rem 0 0.75rem; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: 0; }
.contact-card p { color: #3b4a40; font-size: 1.05rem; }
.contact-email {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1e8d50, #126439);
  color: #fff;
  font-weight: 950;
}
.contact-email:hover { text-decoration: none; }

.stats { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 0.8rem; margin: 1rem 0; }
.stat {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-radius: 20px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow);
}
.stat:hover { text-decoration: none; }
.stat strong { font-size: 2rem; }
.stat span { color: var(--muted); font-weight: 850; }
.stat-ok { border-left: 6px solid var(--ok); }
.stat-info { border-left: 6px solid var(--info); }
.stat-warn { border-left: 6px solid var(--warning); }
.stat-bad { border-left: 6px solid var(--danger); }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.8rem 0 1rem; }
.admin-tabs a {
  background: rgba(255, 255, 255, 0.88);
  color: #173721;
  padding: 0.55rem 0.78rem;
  border-radius: 999px;
  font-weight: 900;
}
.admin-tabs a.active { background: #ffd27a; }
.table-wrap { overflow-x: auto; border-radius: 18px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: 0.85rem; border-bottom: 1px solid #e7ece8; }
th { background: #f1f6f2; color: #314238; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.select-cell {
  width: 3.1rem;
  text-align: center;
}
.event-select,
.js-event-select-all {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: #138a4a;
  cursor: pointer;
}
.bulk-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.85rem 0 1rem;
  padding: 0.85rem;
  border-radius: 18px;
  background: #f4f8f5;
  border: 1px solid #dfe8e1;
}
.bulk-select-all {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 0.42rem;
  width: auto;
  font-weight: 900;
}
.bulk-count {
  color: #5d6c62;
  font-weight: 850;
  margin-right: auto;
}
.bulk-actions button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
}
.row-actions, .actions { display: flex; gap: 0.45rem; flex-wrap: wrap; align-items: center; }
.row-actions form, .actions form { margin: 0; }
.status-line { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.8rem; }
.source-preview { color: var(--muted); }
.admin-actions { margin: 1rem 0; }

.datepicker-popover {
  position: absolute;
  z-index: 80;
  width: 292px;
  padding: 0.8rem;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #dce5df;
  box-shadow: 0 18px 50px rgba(0,0,0,0.24);
}
.datepicker-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }
.datepicker-head button { min-height: 2rem; padding: 0.25rem 0.55rem; background: #f0f5f1; color: #163723; }
.datepicker-title { font-weight: 950; color: #173721; text-transform: capitalize; }
.datepicker-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.datepicker-grid span, .datepicker-grid button { min-height: 2rem; border-radius: 10px; font-size: 0.82rem; }
.datepicker-grid span { display: grid; place-items: center; color: #77847c; font-weight: 850; }
.datepicker-grid button { background: #f5f8f6; color: #173721; padding: 0; }
.datepicker-grid button:hover, .datepicker-grid button.is-today { background: #dff2e3; }
.datepicker-grid button.is-selected { background: #163723; color: #fff; }
.datepicker-grid .blank { background: transparent; }

.footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  padding: 2rem 1rem 3rem;
}

@media (max-width: 1180px) {
  .page-frame { grid-template-columns: minmax(0, 1fr); width: calc(100% - 1rem); max-width: 1180px; }
  .container { grid-column: 1; }
  .side-rail { display: none; }
}
@media (max-width: 880px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero, .submit-hero { grid-template-columns: 1fr; }
  .hero-art, .submit-hero img { max-height: 220px; }
  .filters { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-date-calendar { grid-template-columns: 1fr; }
  dl { grid-template-columns: 1fr; }
  dt { border-bottom: 0; padding-bottom: 0.3rem; }
  dd { padding-top: 0.3rem; }
}
@media (max-width: 560px) {
  nav { width: 100%; }
  nav a, .inline button { padding: 0.48rem 0.6rem; }
  .month-scroll { grid-auto-columns: minmax(280px, 88vw); }
  .event-card-link { grid-template-columns: 1fr; }
  .event-date { width: 88px; min-height: 72px; }
  .detail-date-calendar { padding: 0.8rem; }
  .detail-date-month { padding: 0.7rem; }
  .detail-date-weekdays span, .detail-date-day, .detail-date-empty { min-height: 2rem; font-size: 0.78rem; }
  .stats { grid-template-columns: 1fr; }
}

/* v3 additions */
.admin-nav-link {
  color: #173721 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  font-weight: 950;
  box-shadow: 0 8px 20px rgba(0,0,0,0.14);
}
.admin-nav-link:hover { background: #fff !important; }
.standalone-title {
  color: #fff;
  text-shadow: 0 8px 24px rgba(0,0,0,0.32);
  letter-spacing: 0;
  margin: 0.3rem 0 1rem;
}
.admin-card h2 { margin-top: 0; }
.admin-stats-compact { grid-template-columns: repeat(6, minmax(130px, 1fr)); }
.stat.active { outline: 4px solid rgba(255, 210, 122, 0.48); transform: translateY(-2px); }
.stat-user { border-left: 6px solid #8b5cf6; }
.stats-wide { grid-template-columns: repeat(5, minmax(150px, 1fr)); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.stats-grid-charts .chart-card:first-child { grid-column: 1 / -1; }
.stat-table { margin-top: 0; }
.stat-table h2 { margin-top: 0; }
.chart-card { margin-top: 0; }
.chart-card h2 { margin: 0 0 0.9rem; }
.bar-chart { display: grid; gap: 0.72rem; }
.bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(120px, 1fr) 72px;
  gap: 0.75rem;
  align-items: center;
}
.bar-row span { color: #2f4135; font-weight: 850; }
.bar-row strong { text-align: right; font-variant-numeric: tabular-nums; }
.bar-row meter {
  width: 100%;
  height: 0.9rem;
}
.bar-row meter::-webkit-meter-bar { background: #e5eee8; border: 0; border-radius: 999px; }
.bar-row meter::-webkit-meter-optimum-value { background: linear-gradient(135deg, #1e8d50, #d99a2b); border-radius: 999px; }
.bar-row meter::-moz-meter-bar { background: linear-gradient(135deg, #1e8d50, #d99a2b); border-radius: 999px; }
.line-chart {
  width: 100%;
  height: auto;
  min-height: 220px;
  display: block;
}
.line-chart line {
  stroke: rgba(17, 37, 27, 0.18);
  stroke-width: 2;
}
.line-chart polyline {
  fill: none;
  stroke: #17683c;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.line-chart circle {
  fill: #d99a2b;
  stroke: #fff;
  stroke-width: 2;
}
.line-chart text {
  fill: #65746b;
  font-size: 0.82rem;
  font-weight: 800;
}
.security-list { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; color: #2d3e34; }
.light-muted { color: rgba(255,255,255,0.82); }
.light-muted a { color: #ffd58d; font-weight: 900; }

.side-rail { min-width: 0; }
.promo-carousel, .promo-placeholder {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.08);
}
.side-slot, .promo-placeholder.side-slot {
  width: min(160px, 100%);
  min-height: 600px;
}
.main-slot-section { margin: 1rem 0 0; }
.main-slot, .promo-placeholder.main-slot {
  width: 100%;
  min-height: clamp(170px, 24vw, 290px);
}
.promo-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 650ms ease, transform 1000ms ease;
}
.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.promo-slide.active { opacity: 1; transform: scale(1); }
.promo-carousel .promo-slide-default img { filter: blur(3px) saturate(0.82); transform: scale(1.03); opacity: 0.58; }
.promo-carousel .promo-slide-default span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  color: #fff6d9;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(1rem, 2.2vw, 2.2rem);
  font-weight: 950;
  text-shadow: 0 3px 18px rgba(0,0,0,0.7);
}
.promo-carousel.side-slot .promo-slide-default span {
  align-content: center;
  justify-items: center;
  padding: 0.75rem 0.45rem;
  font-size: clamp(0.72rem, 0.95vw, 0.95rem);
  line-height: 1.25;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
  word-break: normal;
}
.promo-placeholder {
  color: rgba(255,255,255,0.78);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1rem;
  border-style: dashed;
}
.promo-placeholder span { color: #ffd58d; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; }
.promo-placeholder strong { display: block; font-size: 1.35rem; margin: 0.4rem 0; }
.promo-placeholder small { color: rgba(255,255,255,0.62); }

.today-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: center;
  gap: 1rem;
}
.today-card h2 { margin: 0.2rem 0; font-size: clamp(1.7rem, 3vw, 2.6rem); letter-spacing: 0; }
.today-card p { color: var(--muted); margin: 0; }
.mini-calendar {
  background: #0f2517;
  color: #fff;
  border-radius: 20px;
  padding: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}
.mini-calendar > strong { display: block; margin-bottom: 0.7rem; color: #ffd58d; }
.mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0.25rem; }
.mini-grid b, .mini-grid span {
  min-height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 0.82rem;
}
.mini-grid b { color: rgba(255,255,255,0.62); }
.mini-grid span { background: rgba(255,255,255,0.08); }
.mini-grid span.is-weekend,
.mini-grid span.is-holiday {
  color: #ff8b7d;
  font-weight: 950;
}
.mini-grid span.today { background: linear-gradient(135deg, #ffd27a, #d99a2b); color: #102016; font-weight: 950; box-shadow: 0 0 0 4px rgba(217,154,43,0.16); }
.mini-grid span.today.is-weekend,
.mini-grid span.today.is-holiday {
  color: #8f1d14;
}
.mini-empty { background: transparent !important; }

.month-scroll-wrap { position: relative; }
.scroll-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
  width: 3.2rem;
  height: 3.2rem;
  min-height: 3.2rem;
  padding: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffd27a, #d99a2b);
  color: #132015;
  font-size: 2.5rem;
  line-height: 1;
  box-shadow: 0 14px 28px rgba(0,0,0,0.28);
  border: 2px solid rgba(255,255,255,0.85);
}
.scroll-left { left: -0.7rem; }
.scroll-right { right: -0.7rem; }
.month-scroll { scroll-padding-left: 2.8rem; scroll-padding-right: 2.8rem; }

.event-title-line { display: grid; gap: 0.35rem; }
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: max-content;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  background: rgba(19, 138, 74, 0.13);
  color: #0d6b3b;
  font-size: 0.75rem;
  font-weight: 950;
}
.pulse-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: #18a957;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(24,169,87,0.52);
  animation: pulseDot 1.25s infinite;
}
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(24,169,87,0.55); }
  70% { box-shadow: 0 0 0 10px rgba(24,169,87,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,169,87,0); }
}
.live-alert { display: flex; align-items: center; gap: 0.5rem; background: #effaf2; border-color: rgba(19,138,74,0.2); color: #0d6b3b; }
.calendar-button { background: #2563eb; }
.back-button {
  background: linear-gradient(135deg, #ffd27a, #d99a2b) !important;
  color: #132015 !important;
  border: 2px solid rgba(255,255,255,0.9);
  box-shadow: 0 14px 32px rgba(0,0,0,0.24);
  font-size: 1.05rem;
  padding-inline: 1.25rem;
}

.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.97);
  color: #142118;
  box-shadow: 0 24px 70px rgba(0,0,0,0.32);
  border: 1px solid rgba(17,37,27,0.12);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; }
.cookie-banner button { flex: 0 0 auto; }

.event-date strong { max-width: 100%; text-align: center; }
.event-date strong:not(:only-child) { font-size: clamp(0.92rem, 2vw, 1.45rem); }

@media (max-width: 1180px) {
  .main-slot { min-height: 220px; }
}
@media (max-width: 880px) {
  .today-card { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stats-wide, .admin-stats-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .scroll-left { left: 0.2rem; }
  .scroll-right { right: 0.2rem; }
  .cookie-banner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .main-slot { min-height: 170px; }
  .stats-wide, .admin-stats-compact { grid-template-columns: 1fr; }
  .scroll-arrow { width: 2.6rem; height: 2.6rem; min-height: 2.6rem; font-size: 2rem; }
}

/* v4/v5 fixes */
.form-hint { margin: -0.25rem 0 0.5rem; color: #68766c; font-size: 0.92rem; }

.main-slot-section {
  width: 100%;
  margin: 1rem 0 0;
  transform: none;
}
.main-slot, .promo-placeholder.main-slot {
  width: 100%;
  aspect-ratio: 2360 / 420;
  min-height: auto;
  height: auto;
}
.side-slot, .promo-placeholder.side-slot {
  width: min(160px, 100%);
  aspect-ratio: 320 / 1200;
  min-height: 0;
  height: auto;
}
.promo-slide {
  background: linear-gradient(135deg, rgba(7,17,13,0.98), rgba(19,55,35,0.92));
  transform: none !important;
}
.promo-slide img { object-fit: contain !important; }
.promo-slide.active { transform: none !important; }
.promo-placeholder small::after { content: " · główne 2360×420 px, boczne 320×1200 px"; }

/* Stable scroll arrows; no hover jump. */
.scroll-arrow:hover,
.scroll-arrow:focus-visible {
  transform: translateY(-50%) !important;
  filter: brightness(1.06);
  outline: 4px solid rgba(255, 210, 122, 0.38);
}

/* Event cards with photos. */
.event-card {
  min-height: 560px;
  display: flex;
  flex-direction: column;
}
.event-card::after { opacity: 0.045; }
.event-card-link {
  display: flex !important;
  flex-direction: column;
  gap: 0;
  padding: 0 !important;
  height: auto !important;
  flex: 1 0 auto;
  overflow: hidden;
}
.event-thumb {
  position: relative;
  margin: 0;
  width: 100%;
  height: 138px;
  overflow: hidden;
  background: #102016;
}
.event-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event-card-body {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 1rem;
  flex: 1;
}
.event-card-map {
  position: relative;
  z-index: 2;
  padding: 0 1rem 1rem;
}
.event-map,
.map-unavailable {
  overflow: hidden;
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(17, 37, 27, 0.14);
  background: #e8f0eb;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.55);
}
.event-map iframe {
  display: block;
  width: 100%;
  height: 340px;
  border: 0;
  background: #e8f0eb;
}
.event-map-compact iframe {
  height: 145px;
}
.map-unavailable {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 1rem;
  color: #5f6f65;
  text-align: center;
  font-weight: 850;
}
.map-unavailable-compact {
  min-height: 145px;
  font-size: 0.86rem;
}
.map-open-link {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 0.55rem;
  color: #17683c;
  font-size: 0.85rem;
  font-weight: 900;
}
.event-card .past-ribbon { top: 0.85rem; right: 0.85rem; }
.past-events-heading {
  margin-top: 2.2rem;
  color: #fff;
  padding: 0.4rem 0.2rem;
}
.past-events-heading h2 { margin: 0 0 0.35rem; font-size: clamp(1.5rem, 3vw, 2.2rem); letter-spacing: 0; }
.past-events-heading p { margin: 0; color: rgba(255,255,255,0.78); }
.past-month-block { opacity: 0.86; }

.detail-image {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
  margin-bottom: 1rem;
  background: #102016;
  border: 1px solid rgba(17, 37, 27, 0.12);
}
.detail-map-section {
  margin-top: 1.2rem;
}
.detail-map-section h2 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  letter-spacing: 0;
}
.maps-button { background: #17683c; }
.event-image-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  padding: 0.9rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.94);
  box-shadow: var(--shadow);
}
.event-image-preview img {
  width: 180px;
  height: 96px;
  object-fit: cover;
  border-radius: 14px;
  background: #102016;
}
.event-image-preview span { font-weight: 900; color: #26362c; }
.admin-event-name { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 0.7rem; align-items: center; }
.admin-thumb {
  width: 70px;
  height: 48px;
  object-fit: cover;
  border-radius: 10px;
  background: #102016;
  border: 1px solid rgba(17, 37, 27, 0.12);
}

@media (max-width: 560px) {
  .event-card-body { grid-template-columns: 1fr; }
  .event-thumb { height: 155px; }
  .event-image-preview { align-items: flex-start; flex-direction: column; }
  .event-image-preview img { width: 100%; height: 150px; }
}

/* 2FA setup */
.twofa-setup { padding: clamp(1.2rem, 3vw, 2rem); max-width: 980px; margin-inline: auto; }
.twofa-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 1.4rem; align-items: center; }
.qr-wrap { display: grid; place-items: center; padding: 1rem; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.qr-code { width: 240px; height: 240px; image-rendering: pixelated; }
.secret-code { display: block; padding: 0.85rem 1rem; border-radius: 16px; background: #0b2115; color: #f5d37d; font-weight: 900; letter-spacing: 0.08em; overflow-wrap: anywhere; }
.twofa-confirm-form { margin-top: 1.4rem; max-width: 420px; }
.twofa-login-form { margin: 0; }
.login-card { margin-inline: auto; }
@media (max-width: 760px) {
  .twofa-grid { grid-template-columns: 1fr; }
  .qr-wrap { justify-self: start; }
}

/* Admin sections */
.admin-subtabs {
  margin-top: -0.35rem;
}
.prompt-box {
  min-height: 240px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #172016;
}
.import-card .form-grid { margin-top: 1rem; }
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.asset-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid #dfe7e1;
  border-radius: 18px;
  background: #fff;
}
.asset-preview img {
  width: 112px;
  height: 76px;
  object-fit: contain;
  border-radius: 12px;
  background: #102016;
}
.asset-preview strong,
.asset-preview span {
  display: block;
  overflow-wrap: anywhere;
}
.asset-preview span { color: var(--muted); font-size: 0.84rem; margin-top: 0.25rem; }
.image-upload-preview {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.6rem;
  padding: 0.65rem;
  border: 1px solid #dfe7e1;
  border-radius: 14px;
  background: #f8fbf8;
}
.image-upload-preview img {
  width: 112px;
  height: 76px;
  object-fit: contain;
  border-radius: 10px;
  background: #102016;
}
.image-upload-preview span {
  color: #2f4135;
  font-size: 0.84rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}
.marketing-slot form { margin: 1rem 0; }
.promo-admin-thumb {
  width: 96px;
  height: 54px;
  object-fit: contain;
}
.marketing-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}
.marketing-status-card {
  display: grid;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.94);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: var(--shadow);
}
.marketing-status-card h2 {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0;
}
.marketing-status-card p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}
.marketing-status-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.marketing-status-card li {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(17,37,27,0.1);
}
.marketing-status-card li span {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}
.marketing-filters {
  grid-template-columns: minmax(180px, 1.4fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) auto;
  margin-bottom: 1rem;
}
.toggle-line {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.85rem;
  padding: 0 0.85rem;
  border: 1px solid #d7dfd9;
  border-radius: 14px;
  background: #fff;
  font-weight: 850;
}
.toggle-line input { width: auto; }

@media (max-width: 980px) {
  .asset-grid { grid-template-columns: 1fr; }
  .marketing-status-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .asset-preview { grid-template-columns: 1fr; }
  .asset-preview img { width: 100%; height: 130px; }
  .image-upload-preview { grid-template-columns: 1fr; }
  .image-upload-preview img { width: 100%; height: 130px; }
  .brand-link { max-width: 100%; }
}
