/* Verification status modal */
#statusModal .form-control {
  border-radius: .5rem;
}

#statusModal textarea.form-control {
  min-height: 140px;
}

/* Icons inside attribute/bonus dropdown items */
#filtersBar .dropdown-menu .filter-icon {
  display: inline-flex;
  align-items: center;
  font-size: 1.05rem;
  line-height: 1;
  min-width: 1.1rem;
}

#filtersBar .dropdown-menu .dropdown-item.form-check {
  display: flex;
  align-items: center;
}

/* assets/css/style.css */
/* Spójny styl + responsywność */

/* --- Theme variables --- */
:root {
  --brand-primary: #0d6efd;
  --bg-body: #f8f9fa;
  --text-body: #212529;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, .125);
  --muted: #6c757d;
  --danger: #dc3545;
}


[data-theme="dark"] {
  --bg-body: #0f1115;
  --text-body: #e9ecef;
  --card-bg: #161a22;
  --card-border: rgba(255, 255, 255, .12);
  --muted: #a8b3bd;
}

[data-theme="dark"] {
  --link-color: #9ec5fe;
  --link-hover: #b6d4fe;
  --input-bg: #0f141b;
  --input-border: rgba(255, 255, 255, .14);
}

body {
  font-feature-settings: "kern", "liga";
  background: var(--bg-body);
  color: var(--text-body);
  max-height: 95%;
}

/* Force base text color for common text elements in dark */
[data-theme="dark"] body,
[data-theme="dark"] body *:not(.leaflet-control):not(.leaflet-control *):not(.emoji) {
  color: var(--text-body);
}

/* body gets top padding equal to navbar height to avoid overlap */
body.has-fixed-nav {
  padding-top: calc(var(--nav-height, 56px));
}


/* Components in dark mode */
[data-theme="dark"] .card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .list-group-item {
  background: var(--card-bg);
  color: var(--text-body);
  border-color: var(--card-border);
}

[data-theme="dark"] .navbar {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .25);
}

[data-theme="dark"] .badge.text-bg-light {
  background: #242c3a !important;
  color: var(--text-body) !important;
}

[data-theme="dark"] .map-box {
  border-color: var(--card-border);
  background: #0e131a;
}

/* Force page background to use theme variable even if a leftover utility class set it earlier */
html[data-theme="dark"] body {
  background: var(--bg-body) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--muted) !important;
}

/* Footer + surfaces */
:root {
  --footer-bg: #ffffff;
  --footer-border: rgba(0, 0, 0, .08);
}

[data-theme="dark"] {
  --footer-bg: #0f1115;
  --footer-border: rgba(255, 255, 255, .12);
}

/* Link colors in dark */
[data-theme="dark"] a {
  color: var(--link-color);
}

[data-theme="dark"] a:hover {
  color: var(--link-hover);
}

[data-theme="dark"] .navbar .nav-link {
  color: var(--link-color);
}

[data-theme="dark"] .navbar .nav-link:hover,
[data-theme="dark"] .navbar .nav-link:focus,
[data-theme="dark"] .navbar .nav-link.active {
  color: var(--link-hover);
}

.navbar-brand {
  letter-spacing: .2px;
}

.card-header {
  background: #eef2ff;
  /* delikatny indigo dla kontrastu */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--card-border);
  border-left: 4px solid var(--brand-primary);
}

.list-group-item {
  padding: .75rem 1rem;
}

footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
}

/* Pełny viewport: mapa/lista = okno - navbar - filtry - footer */
:root {
  --footer-height: 98px;
  /* uzupełnia JS w footer.php */
  --nav-height: 56px;
  /* uzupełnia JS w app.js */
  --filters-height: 0px;
  /* uzupełnia JS w app.js */
}

.map-box {
  width: 100%;
  height: calc(100vh - var(--nav-height) - var(--filters-height) - var(--footer-height) - 2px);
  min-height: 320px;
  background: #eee;
  border: 1px solid rgba(0, 0, 0, .08);
}

.scroll-y {
  max-height: calc(100vh - var(--nav-height) - var(--filters-height) - var(--footer-height) - 2px);
  overflow-y: auto;
}

/* Pasek filtrów – kosmetyka */
#filtersBar .card {
  border-radius: .75rem;
}

#filtersBar .form-label {
  font-weight: 600;
  font-size: .85rem;
  color: #495057;
}

#filtersBar .form-select.form-select-sm {
  font-size: .9rem;
}

/* --- Modernized Filters Toolbar --- */
#filtersBar.filters-toolbar .filters-card {
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .6));
  backdrop-filter: saturate(140%) blur(4px);
}

[data-theme="dark"] #filtersBar.filters-toolbar .filters-card {
  background: linear-gradient(180deg, rgba(22, 26, 34, .8), rgba(22, 26, 34, .7));
  backdrop-filter: saturate(140%) blur(6px);
}

#filtersBar.filters-toolbar .card-body {
  padding: 1rem 1rem 1.1rem;
}

#filtersBar.filters-toolbar .filter-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  opacity: .8;
  margin-bottom: .4rem !important;
}

#filtersBar.filters-toolbar .filter-control {
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background-color: var(--card-bg);
  padding: .6rem 1rem;
  line-height: 1.25;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, .03);
  transition: box-shadow .15s ease, border-color .15s ease, background-color .15s ease, transform .05s ease;
}

/* Make native selects visually identical to dropdown buttons */
#filtersBar .form-select.filter-control {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 999px;
  padding: .6rem 2.25rem .6rem 1rem;
  /* leave room for arrow */
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  line-height: 1.25;
}

/* Ensure the Bootstrap dropdown toggle matches the select size */
#filtersBar .btn.filter-control {
  border-radius: 999px;
  padding: .6rem 1rem;
  line-height: 1.25;
}

/* Unify menu look */
#filtersBar .dropdown-menu {
  border-radius: .75rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, .15);
}

#filtersBar.filters-toolbar .filter-control:hover {
  transform: translateY(-1px);
}

#filtersBar.filters-toolbar .filter-control:focus {
  outline: none;
  border-color: rgba(13, 110, 253, .45);
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .15);
}

[data-theme="dark"] #filtersBar.filters-toolbar .filter-control:focus {
  border-color: rgba(158, 197, 254, .5);
  box-shadow: 0 0 0 .25rem rgba(158, 197, 254, .18);
}

/* Compact grid spacing on small screens; airy on larger */
#filtersBar.filters-toolbar .row.g-2 {
  gap: .75rem 1rem;
}

@media (min-width: 992px) {
  #filtersBar.filters-toolbar .row.g-2 {
    gap: .75rem 1.25rem;
  }
}

/* Normalize select height and arrow alignment */
#filtersBar.filters-toolbar select.filter-control.form-select-sm {
  padding-right: 2.25rem;
  /* space for arrow */
  background-position: right .8rem center;
  background-size: 16px 12px;
}


@media (max-width:576px) {
  #filtersBar .btn {
    width: 100%;
  }
}



/* Klikalne etykiety statusów przy statystykach */
.status-toggle {
  cursor: pointer;
  user-select: none;
  padding: 2px 6px;
  border-radius: .3rem;
  border: 1px solid transparent;
  font-weight: 500
}

.status-toggle:hover {
  text-decoration: underline
}

.status-interested.active {
  background: #fff3cd;
  color: #664d03;
  border-color: #ffe69c
}

.status-going.active {
  background: #d1e7dd;
  color: #0f5132;
  border-color: #a3cfbb
}

/* Dodatkowe dopieszczenie dark dla elementów */
[data-theme="dark"] .card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .card-header {
  background: #141925;
  color: var(--text-body);
  border-bottom-color: var(--card-border);
  border-left: 4px solid var(--link-color);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

[data-theme="dark"] .list-group-item {
  background: var(--card-bg);
  color: var(--text-body);
  border-color: var(--card-border);
}

/* Galeria – obraz dopasowany do ramki, sensowne tło w dark */
.carousel-item img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: contain;
  background-color: #000;
}

main.container-fluid {
  padding-top: 0;
  min-height: calc(100vh - var(--nav-height) - var(--footer-height));
}

/* Admin layout: navbar fixed top, footer fixed bottom */
body.admin-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.admin-layout main {
  flex: 1 0 auto;
}

body.admin-layout nav.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

body.admin-layout footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* Audience badges inside quick tiles */
/* Audience badges inside quick tiles */
.aud-badge {
  position: absolute;
  top: .4rem;
  right: .5rem;
  z-index: 5;
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .9);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  backdrop-filter: saturate(140%) blur(4px);
}

[data-theme="dark"] .aud-badge {
  background: rgba(22, 26, 34, .9);
  color: var(--text-body);
  border: 1px solid rgba(255, 255, 255, .15);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .45);
}

.aud-badge.aud-common {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
}

.aud-badge.aud-admin {
  border-color: #f87171;
  background: #fee2e2;
  color: #991b1b;
}

.aud-badge.aud-org {
  border-color: #60a5fa;
  background: #dbeafe;
  color: #1e3a8a;
}

[data-theme="dark"] .aud-badge.aud-common {
  background: rgba(148, 163, 184, .25);
  color: #e2e8f0;
}

[data-theme="dark"] .aud-badge.aud-admin {
  background: rgba(239, 68, 68, .25);
  color: #fca5a5;
}

[data-theme="dark"] .aud-badge.aud-org {
  background: rgba(59, 130, 246, .25);
  color: #93c5fd;
}

/* Group wrapper minor polish */
.dash-group .badge.text-bg-light {
  opacity: .8;
}

/* --- Event Attribute Icons Block --- */
.list-group-item {
  position: relative;
}

/* Default: inline row of icons that can wrap; no absolute positioning so nothing gets clipped */
.event-attr-icons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.85rem;
  align-items: right;
  margin-left: auto;
}

/* Optional modifier when we explicitly want absolute placement */
.list-group-item .event-attr-icons.abs {
  position: absolute;
  bottom: 4px;
  right: 8px;
}

.event-attr-icons span,
.event-attr-icons i {
  display: inline-block;
  line-height: 1.2;
}


/* Forms (inputs/selects) in dark */
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-check-label,
[data-theme="dark"] label {
  color: var(--text-body);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] textarea,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"] {
  background-color: var(--input-bg);
  color: var(--text-body);
  border-color: var(--input-border);
}

[data-theme="dark"] .form-control::placeholder {
  color: var(--muted);
}

[data-theme="dark"] .form-select option {
  background-color: var(--input-bg);
  color: var(--text-body);
}

/* Filters search input: unify look and dark-mode support */
#filtersBar .input-group.input-group-sm>.form-control,
#filtersBar .input-group.input-group-sm>.input-group-text,
#filtersBar .input-group.input-group-sm>.btn {
  border-radius: 999px;
}

/* Dark: input-group pieces (text addon + input + clear button) */
[data-theme="dark"] #filtersBar .input-group .input-group-text {
  background-color: var(--input-bg);
  color: var(--muted);
  border-color: var(--input-border);
}

[data-theme="dark"] #filtersBar .input-group .form-control {
  background-color: var(--input-bg);
  color: var(--text-body);
  border-color: var(--input-border);
}

[data-theme="dark"] #filtersBar .input-group .form-control::placeholder {
  color: var(--muted);
}

[data-theme="dark"] #filtersBar .input-group .btn-outline-secondary {
  color: var(--text-body);
  background-color: var(--input-bg);
  border-color: var(--input-border);
}

[data-theme="dark"] #filtersBar .input-group .btn-outline-secondary:hover {
  background-color: rgba(255, 255, 255, .05);
  border-color: var(--link-color);
}

/* --- Filters search input: pill container + seamless seams --- */
#filtersBar .input-group.input-group-sm {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  border-radius: 999px;
  overflow: hidden;
  /* ukryj łączenia */
}

#filtersBar .input-group.input-group-sm>.input-group-text,
#filtersBar .input-group.input-group-sm>.form-control {
  border-radius: 0 !important;
  /* brak lokalnych zaokrągleń, kontener ma radius */
  border: 0;
  /* bez własnych ramek – korzystamy z ramki kontenera */
}

#filtersBar .input-group.input-group-sm>.input-group-text {
  background: var(--card-bg);
  color: var(--muted);
}

#filtersBar .input-group.input-group-sm>.form-control {
  background: var(--card-bg);
}

/* Clear button jako lekki ghost wewnątrz kapsuły */
#filtersBar .input-group.input-group-sm>.btn-outline-secondary {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  height: 100%;
  padding: .4rem .6rem;
  margin-left: 0;
}

#filtersBar .input-group.input-group-sm>.btn-outline-secondary:hover {
  background: rgba(0, 0, 0, .04) !important;
}

[data-theme="dark"] #filtersBar .input-group.input-group-sm>.btn-outline-secondary:hover {
  background: rgba(255, 255, 255, .06) !important;
}

/* Wyrównaj wysokości i fonty */
#filtersBar .input-group.input-group-sm .form-control,
#filtersBar .input-group.input-group-sm .input-group-text {
  line-height: 1.25;
  padding-top: .55rem;
  padding-bottom: .55rem;
}

/* Dropdowns */
[data-theme="dark"] .dropdown-menu {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .dropdown-item {
  color: var(--text-body);
}

[data-theme="dark"] .dropdown-item:hover {
  background: #212735;
  color: var(--text-body);
}

/* Badges & muted */
[data-theme="dark"] .badge {
  color: inherit;
}

[data-theme="dark"] .badge.text-bg-light {
  background: #242c3a !important;
  color: var(--text-body) !important;
}

[data-theme="dark"] .text-muted {
  color: var(--muted) !important;
}

/* Filters bar card in dark */
[data-theme="dark"] #filtersBar .card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] #filtersBar .card .card-body {
  color: var(--text-body);
}

/* Table color fixes for admin */
[data-theme="dark"] table {
  color: var(--text-body);
}

[data-theme="dark"] .table thead th {
  color: var(--text-body);
  border-color: var(--card-border);
}

[data-theme="dark"] .table td {
  border-color: var(--card-border);
}

/* --- Pagination (dark mode) --- */
[data-theme="dark"] .pagination {
  --pg-bg: var(--card-bg);
  --pg-border: var(--card-border);
  --pg-text: var(--text-body);
  --pg-muted: var(--muted);
  --pg-active-bg: var(--link-color);
  --pg-active-text: #0f1115;
  /* readable on light-blue */
}

[data-theme="dark"] .pagination .page-link {
  background-color: var(--pg-bg);
  color: var(--pg-text);
  border-color: var(--pg-border);
  box-shadow: none;
}

[data-theme="dark"] .pagination .page-link:hover,
[data-theme="dark"] .pagination .page-link:focus {
  background-color: rgba(255, 255, 255, .06);
  color: var(--pg-text);
  border-color: var(--pg-border);
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
  background-color: rgba(255, 255, 255, .04);
  color: var(--pg-muted);
  border-color: var(--pg-border);
}

[data-theme="dark"] .pagination .page-item.active .page-link {
  background-color: var(--pg-active-bg);
  color: var(--pg-active-text);
  border-color: var(--pg-active-bg);
}

/* Slight rounding for a modern look */
.pagination .page-link {

}

/* Misc tweaks */
[data-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%);
}

[data-theme="dark"] footer {
  color: var(--text-body);
}

/* Leaflet popup colors */
[data-theme="dark"] .leaflet-popup-content-wrapper {
  background: var(--card-bg);
  color: var(--text-body);
}

[data-theme="dark"] .leaflet-popup-tip {
  background: var(--card-bg);
}

/* --- Admin dashboard quick links --- */
.admin-quick-card {
  transition: transform .12s ease, box-shadow .12s ease;
}

.admin-quick-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
}

.admin-quick-icon {
  font-size: 1.6rem;
  line-height: 1;
}

/* Dark mode tweaks for quick links */
[data-theme="dark"] .admin-quick-card {
  background: var(--card-bg);
  border-color: var(--card-border);
}

[data-theme="dark"] .admin-quick-card .text-muted {
  color: var(--muted) !important;
}

/* --- Modern Navbar (glass) --- */
.nav-modern {
  --nav-surface: rgba(255, 255, 255, .75);
  --nav-text: #0f172a;
  /* slate-900 */
  --nav-muted: #475569;
  /* slate-600 */
  --nav-border: rgba(15, 23, 42, .08);
  --nav-hover: rgba(2, 132, 199, .12);
  /* cyan-600 */

  backdrop-filter: saturate(140%) blur(10px);
  background: linear-gradient(180deg, var(--nav-surface), rgba(255, 255, 255, .6));
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 10px 30px rgba(2, 6, 23, .06);
  z-index: 8000;
}

[data-theme="dark"] .nav-modern {
  --nav-surface: rgba(17, 24, 39, .75);
  /* gray-900 */
  --nav-text: #e5e7eb;
  /* gray-200 */
  --nav-muted: #9ca3af;
  /* gray-400 */
  --nav-border: rgba(255, 255, 255, .1);
  --nav-hover: rgba(59, 130, 246, .18);
  /* blue-500 */

  background: linear-gradient(180deg, var(--nav-surface), rgba(17, 24, 39, .65));
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.nav-modern .navbar-brand img {
  display: block;
  height: 40px;
}

.nav-modern .navbar-brand,
.nav-modern .nav-link,
.nav-modern .btn,
.nav-modern .navbar-toggler {
  color: var(--nav-text);
}

.nav-modern .navbar-toggler {
  border: 1px solid transparent;
}

.nav-modern .navbar-toggler:focus {
  box-shadow: 0 0 0 .25rem rgba(59, 130, 246, .25);
}

/* Links */
.nav-modern .nav-link {
  position: relative;
  font-weight: 600;
  opacity: .95;
}

.nav-modern .nav-link:hover,
.nav-modern .nav-link:focus {
  opacity: 1;
}

.nav-modern .nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .35rem;
  height: 2px;
  background: currentColor;
  opacity: 0;
  transform: scaleX(.4);
  transition: transform .18s ease, opacity .18s ease;
}

.nav-modern .nav-link:hover::after,
.nav-modern .nav-link:focus::after,
.nav-modern .nav-link.active::after {
  opacity: .9;
  transform: scaleX(1);
}

/* Dropdown menu */
.nav-modern .dropdown-menu {
  border-radius: .75rem;
  border: 1px solid var(--nav-border);
  box-shadow: 0 12px 30px rgba(2, 6, 23, .12);
  padding: .4rem;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: saturate(140%) blur(8px);
  z-index: 9000;
}

[data-theme="dark"] .nav-modern .dropdown-menu {
  background: rgba(17, 24, 39, .95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
}

.nav-modern .dropdown-item {
  border-radius: .5rem;
  font-weight: 500;
}

.nav-modern .dropdown-item:hover,
.nav-modern .dropdown-item:focus {
  background: var(--nav-hover);
}

/* Right-side utilities (theme toggle, buttons) */
.nav-modern #themeToggle {
  border-radius: 999px;
  border: 1px solid var(--nav-border);
  background: transparent;
  padding: .4rem .65rem;
}

.nav-modern #themeToggle:hover {
  background: var(--nav-hover);
}

/* Make sure navbar sits above Leaflet controls */

/* --- Footer theming fixes --- */
.site-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
}

[data-theme="dark"] .site-footer {
  background: var(--footer-bg);
  border-top-color: var(--footer-border);
}

/* Make footer text readable in dark */
[data-theme="dark"] .site-footer,
[data-theme="dark"] .site-footer .text-muted {
  color: var(--text-body) !important;
  opacity: .9;
}

[data-theme="dark"] .table {
  --bs-table-bg: var(--card-bg);
  --bs-table-striped-bg: rgba(255, 255, 255, .04);
  --bs-table-hover-bg: rgba(255, 255, 255, .06);
  --bs-table-color: var(--text-body);
  --bs-table-border-color: var(--card-border);
  color: var(--text-body);
}

/* Force cell backgrounds (Bootstrap sets transparent by default) */
[data-theme="dark"] .table> :not(caption)>*>* {
  background-color: var(--card-bg) !important;
  color: var(--text-body) !important;
  border-color: var(--card-border) !important;
}

/* Header row */
[data-theme="dark"] .table thead th {
  background-color: #141925 !important;
  color: var(--text-body) !important;
  border-color: var(--card-border) !important;
}

/* Striped and hover states */
[data-theme="dark"] .table-striped>tbody>tr:nth-of-type(odd)>* {
  background-color: rgba(255, 255, 255, .04) !important;
}

[data-theme="dark"] .table-hover>tbody>tr:hover>* {
  background-color: rgba(255, 255, 255, .06) !important;
}

/* Small helper: table borders inside cards */
[data-theme="dark"] .card .table {
  border-color: var(--card-border);
}

@media (max-width: 576px) {

  /* Navbar: tighter paddings and smaller logo */
  .nav-modern .container-fluid {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .nav-modern .navbar-brand img {
    height: 32px;
  }

  .nav-modern .navbar-toggler {
    padding: .3rem .5rem;
  }

  .nav-modern .nav-link::after {
    display: none;
  }

  /* Filters: hide scrollbar, enable smooth swipe, slightly smaller controls */
  #filtersBar.filters-toolbar .row.flex-nowrap {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
  }

  #filtersBar.filters-toolbar .row.flex-nowrap::-webkit-scrollbar {
    display: none;
  }

  #filtersBar.filters-toolbar .filter-label {
    font-size: .72rem;
    letter-spacing: .02em;
  }

  #filtersBar.filters-toolbar .filter-control {
    padding: .5rem .75rem;
    font-size: .95rem;
  }

  /* Narrower min-widths so 3-4 pola mieszczą się lepiej */
  #filtersBar .col[style*="min-width"] {
    min-width: 150px !important;
  }

  #filtersBar .col:nth-child(2)[style*="min-width"] {
    min-width: 180px !important;
  }

  /* Miasto ciut szersze */

  /* More compact card radius and spacing */
  #filtersBar.filters-toolbar .filters-card {
    border-radius: .9rem;
  }
}

/* Mobile collapsed filters toggle */
.filters-toggle-btn {
  border-radius: .75rem;
}

/* When filters are collapsed, map should use full height (filters-height = 0 via JS) */
@media (max-width: 576px) {
  #filtersCollapse.collapse {
    margin-bottom: .5rem;
  }

  /* Ensure the filters card looks good inside collapse */
  #filtersBar .card {
    border-radius: .9rem;
  }
}

/* Better look for toggler icon regardless of light/dark */
.nav-modern .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Optional: snap points while swiping filters */
#filtersBar.filters-toolbar .row.flex-nowrap {
  scroll-snap-type: x proximity;
}

#filtersBar.filters-toolbar .row.flex-nowrap>.col {
  scroll-snap-align: start;
}

[data-theme="dark"] .alert {
  background-color: #1f2834;
  /* deep slate */
  color: var(--text-body);
  border-color: #2f3b4c;
}

[data-theme="dark"] .alert a {
  color: var(--link-color);
}

[data-theme="dark"] .alert a:hover {
  color: var(--link-hover);
}

/* Specific variants tuned for contrast and readability */
[data-theme="dark"] .alert-info {
  background-color: #0e2435;
  /* navy/ink */
  border-color: #1f4b76;
  color: #cfe8ff;
}

[data-theme="dark"] .alert-warning {
  background-color: #2b220a;
  /* warm dark amber */
  border-color: #6f5a14;
  color: #ffe8a3;
}

[data-theme="dark"] .alert-success {
  background-color: #0d2619;
  /* deep green */
  border-color: #1f6b45;
  color: #cfeee0;
}

[data-theme="dark"] .alert-danger {
  background-color: #2e1212;
  /* deep red */
  border-color: #7a1e1e;
  color: #ffd0d0;
}

/* Slightly stronger shadow to lift alerts above map/list surfaces in dark */
[data-theme="dark"] .alert {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .35);
}

/* --- Auth (register/login) modern look --- */
.auth-card {
  border-radius: 1rem;
}

.auth-aside {
  background: radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, .25), rgba(17, 24, 39, 0) 60%),
    linear-gradient(180deg, rgba(59, 130, 246, .12), rgba(59, 130, 246, .0));
}

[data-theme="dark"] .auth-aside {
  background: radial-gradient(120% 120% at 0% 0%, rgba(59, 130, 246, .25), rgba(17, 24, 39, 0) 60%),
    linear-gradient(180deg, rgba(15, 23, 42, .6), rgba(15, 23, 42, .2));
}

/* Floating labels readability in dark */
[data-theme="dark"] .form-floating>label {
  color: var(--muted);
}

[data-theme="dark"] .form-floating .form-control {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-body);
}

[data-theme="dark"] .form-floating .form-control:focus {
  border-color: rgba(158, 197, 254, .5);
  box-shadow: 0 0 0 .25rem rgba(158, 197, 254, .18);
}

/* Autofill: unify background with theme to avoid light patches */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
  -webkit-text-fill-color: var(--text-body) !important;
}

/* --- Hard kill: no label pill on hover/focus (incl. pseudo-elements) --- */
.form-floating>label,
.form-floating:hover>label,
.form-floating:focus-within>label,
.form-floating>label:hover,
.form-floating>label:focus {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.form-floating>label::before,
.form-floating>label::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

/* Safari/iOS sometimes paints a speech-bubble on labels; ensure pointer events are off */
.form-floating>label {
  pointer-events: none;
}

/* --- Dark mode: month switcher contrast & readability --- */
[data-theme="dark"] .btn-light.disabled,
[data-theme="dark"] .btn-light:disabled {
  background: var(--card-bg);
  color: var(--text-body);
  border: 1px solid var(--card-border);
  opacity: 1;
  /* ensure full readability */
  font-weight: 600;
}

[data-theme="dark"] .btn-outline-secondary {
  color: var(--text-body);
  border-color: var(--card-border);
}

[data-theme="dark"] .btn-outline-secondary:hover,
[data-theme="dark"] .btn-outline-secondary:focus {
  background: #212735;
  border-color: var(--link-color);
  color: var(--link-hover);
}


/* Promoted event highlight */
.event-row.promoted {
  border: 2px solid #f3c13a !important;
  /* gold-like */
  box-shadow: 0 0.25rem 0.75rem rgba(243, 193, 58, .25);
  position: relative;
}

.event-row.promoted .badge.bg-warning {
  position: absolute;
  top: 6px;
  /* inside the frame – avoids cutting text */
  left: 12px;
  /* left corner */
  transform: none;
  border: 0;
  /* clean pill; no overlap with border */
  border-radius: .5rem;
  background: #f3c13a;
  color: #111;
  font-weight: 800;
  padding: .28rem .7rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  z-index: 20;
}

[data-theme="dark"] .event-row.promoted {
  border-color: #f3c13a !important;
  box-shadow: 0 0.4rem 1rem rgba(243, 193, 58, .25);
}

[data-theme="dark"] .event-row.promoted .badge.bg-warning {
  background: #f3c13a;
  color: #161a22;
  /* darker text for contrast on gold */
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}

#filtersBar .dropdown-menu {
  z-index: 5000;
  position: absolute;
}

/* Ensure filters toolbar and its menus always overlay map/list */
#filtersBar {
  position: relative;
  z-index: 3000;
}

#filtersBar .filters-card {
  position: relative;
  z-index: 3500;
}

#filtersBar .dropdown-menu {
  z-index: 6000;
  position: absolute;
}

/* Make map a lower stacking context so menus appear above */
.map-box {
  position: relative;
  z-index: 1;
}

/* Better spacing for multi-select dropdown items (attr/bonus) */
#filtersBar .dropdown-menu .form-check {
  padding-left: 0.75rem;
}

#filtersBar .dropdown-menu .form-check-input {
  margin-left: 0.25rem;
  margin-right: 0.5rem;
}

#filtersBar .dropdown-menu .form-check span {
  margin-left: 0.25rem;
}

/* AND/OR mode toggle (i/lub) */
#filtersBar .mode-toggle .btn {
  padding: .15rem .5rem;
  line-height: 1.1;
}

#filtersBar .mode-toggle .btn.active {
  background: var(--brand-primary);
  color: #fff;
  border-color: var(--brand-primary);
}

#filtersBar .mode-toggle .btn.active:hover,
#filtersBar .mode-toggle .btn.active:focus {
  background: #0b5ed7;
  /* slightly darker brand */
  color: #fff;
  border-color: #0b5ed7;
}

[data-theme="dark"] #filtersBar .mode-toggle .btn.active {
  background: var(--link-color);
  /* light blue used in dark theme */
  color: #fff;
  border-color: var(--link-color);
}

[data-theme="dark"] #filtersBar .mode-toggle .btn.active:hover,
[data-theme="dark"] #filtersBar .mode-toggle .btn.active:focus {
  filter: brightness(0.9);
}

/* Highlight active selection in dropdowns (single-choice) */
#filtersBar .dropdown-menu .dropdown-item.active,
#filtersBar .dropdown-menu .dropdown-item:active {
  background: var(--brand-primary);
  color: #fff;
}

/* Dla checkboxów: podświetl cały wiersz gdy zaznaczone */
#filtersBar .dropdown-menu .dropdown-item.form-check:has(.form-check-input:checked) {
  background: rgba(13, 110, 253, .12);
  color: inherit;
  border-radius: .5rem;
}

/* --- Admin fixed footer --- */
.admin-footer {
  background: var(--footer-bg);
  border-top: 1px solid var(--footer-border);
  z-index: 1030;
  /* above content, below nav dropdowns */
}

/* Admin Users: full width table wrapper */
.table-wrap-90 {
  width: 100% !important;
  margin-left: 0;
  margin-right: 0;
}

.card .table {
  width: 100%;
}

/* --- Dashboard sections (modern) --- */
.dash-section {
  position: relative;
}

.dash-header {
  margin-bottom: .5rem;
}

.dash-title {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  margin: 0;
}

.dash-subtitle {
  margin: .125rem 0 0;
  font-size: .9rem;
  opacity: .85;
}

/* Tile: glassy, rounded, subtle gradient */
.quick-tile {
  position: relative;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  border-radius: 1.1rem;
  padding: 1rem 1.25rem;
  padding-right: 6.5rem;
  /* reserve space for badge */
  min-height: 92px;
  /* more breathing room */
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .82), rgba(255, 255, 255, .68));
  box-shadow: 0 .35rem 1rem rgba(0, 0, 0, .06);
  backdrop-filter: saturate(140%) blur(8px);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

.quick-tile:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 .9rem 2rem rgba(0, 0, 0, .14);
  border-color: rgba(13, 110, 253, .35);
}

.quick-tile:focus-within {
  outline: 0;
  border-color: rgba(13, 110, 253, .5);
  box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .14), 0 .6rem 1.4rem rgba(0, 0, 0, .12);
}

@media (max-width: 576px) {
  .quick-tile {
    padding-right: 4.75rem;
    min-height: 84px;
  }
}

.quick-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  background: linear-gradient(180deg, rgba(13, 110, 253, .12), rgba(13, 110, 253, .08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}

.quick-body {
  min-width: 0;
}

.quick-title {
  font-weight: 800;
  margin-bottom: .2rem;
  line-height: 1.15;
  font-size: 1.02rem;
}

.quick-desc {
  line-height: 1.25;
  font-size: .9rem;
  opacity: .85;
}

/* Dark mode */
[data-theme="dark"] .quick-tile {
  background: linear-gradient(180deg, rgba(22, 26, 34, .9), rgba(22, 26, 34, .78));
  border-color: var(--card-border);
  box-shadow: 0 .45rem 1.25rem rgba(0, 0, 0, .45);
}

[data-theme="dark"] .quick-tile:hover {
  box-shadow: 0 .9rem 1.8rem rgba(0, 0, 0, .35);
  border-color: rgba(158, 197, 254, .35);
}

[data-theme="dark"] .quick-icon {
  background: rgba(158, 197, 254, .14);
}

/* Stats tiles */
.stats-row {
  margin-bottom: .75rem;
}

.stat-tile {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .7));
  backdrop-filter: saturate(140%) blur(4px);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: rgba(13, 110, 253, .08);
}

.stat-body {
  display: grid;
}

.stat-value {
  font-weight: 800;
  font-size: 1.4rem;
  line-height: 1;
}

.stat-label {
  font-size: .85rem;
  color: var(--muted);
}

[data-theme="dark"] .stat-tile {
  background: linear-gradient(180deg, rgba(22, 26, 34, .85), rgba(22, 26, 34, .7));
}

[data-theme="dark"] .stat-icon {
  background: rgba(158, 197, 254, .14);
}

/* Roles & permissions helpers */
.form-check .form-check-label code {
  font-size: .75rem;
}

/* --- Event hero + thumbnails --- */
.hero-wrap {
  margin: 0;
}

.hero-img {
  width: 100%;
  max-height: 560px;
  object-fit: contain;
  background: #000;
  /* czarne tło przy innych proporcjach */
  border-radius: .5rem;
}

.thumb-rail {
  overflow-x: auto;
  padding: .25rem;
}

.thumb-rail .thumb {
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  border-radius: .5rem;
  border: 2px solid transparent;
  background: transparent;
}

.thumb-rail .thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: .4rem;
}

/* Updated active thumbnail styling with underline */
/* Updated active thumbnail styling with underline */
.thumb-rail .thumb.active {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .45);
  position: relative;
  z-index: 1;
}

.thumb-rail .thumb.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 8%;
  width: 84%;
  height: 4px;
  background: var(--brand-primary);
  border-radius: 3px 3px 0 0;
}

/* Dark mode override for active thumbnail with underline */
/* Dark mode override for active thumbnail with underline */
[data-theme="dark"] .thumb-rail .thumb.active {
  border-color: var(--link-color);
  box-shadow: 0 0 0 3px rgba(158, 197, 254, .45);
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .thumb-rail .thumb.active::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 8%;
  width: 84%;
  height: 4px;
  background: var(--link-color);
  border-radius: 3px 3px 0 0;
}

/* delikatny odstęp pod głównym zdjęciem */
.auth-aside .hero-wrap {
  margin-bottom: .5rem;
}

/* Inline SVG icons sizing for table action buttons */
.table .btn .icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
}

/* Left events list: make it scroll and roughly match map height as a fallback */
#eventsList {
  max-height: calc(96vh - var(--nav-height) - var(--filters-height) - var(--footer-height) - 2px);
  overflow-y: auto;
}

/* --- Hero gallery navigation --- */
.hero-gallery {
  position: relative;
}

.hero-gallery .hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(6px) saturate(140%);
  color: #111;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .18);
  cursor: pointer;
  user-select: none;
  z-index: 2;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}

.hero-gallery .hero-nav .icon {
  width: 22px;
  height: 22px;
}

.hero-gallery .hero-prev {
  left: .5rem;
}

.hero-gallery .hero-next {
  right: .5rem;
}

.hero-gallery .hero-nav:hover,
.hero-gallery .hero-nav:focus {
  background: rgba(255, 255, 255, .95);
  transform: translateY(-50%) scale(1.04);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
  outline: none;
}

[data-theme="dark"] .hero-gallery .hero-nav {
  background: rgba(22, 26, 34, .78);
  color: #fff;
  border-color: rgba(255, 255, 255, .2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6);
}

[data-theme="dark"] .hero-gallery .hero-nav:hover,
[data-theme="dark"] .hero-gallery .hero-nav:focus {
  background: rgba(22, 26, 34, .9);
}

.event-attr-icons .attr-ico {
  display: inline-flex;
  align-items: center;
}

.cluster-circle {
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: rgba(13, 109, 253, 0.73);
  border: 2px solid #0d6efd;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}

/* --- Map top-right info panel --- */
.map-info-panel {
  position: relative;
  max-width: 320px;
  min-width: 240px;
  padding: .75rem .85rem;
  border-radius: .75rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-body);
  box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .15);
}

.map-info-panel .mip-title {
  font-weight: 700;
  margin: 0 1.25rem 0 0;
  line-height: 1.25;
}

.map-info-panel .mip-close {
  position: absolute;
  top: .35rem;
  right: .45rem;
  border: 0;
  background: transparent;
  line-height: 1;
  font-size: 1.15rem;
  opacity: .65;
  cursor: pointer;
}

.map-info-panel .mip-close:hover {
  opacity: 1;
}

.map-info-panel .mip-line {
  font-size: .9rem;
  color: var(--muted);
}

.map-info-panel .mip-actions {
  margin-top: .5rem;
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  color: rgb(255, 255, 255)
}

/* Dark theme alignment */
[data-theme="dark"] .map-info-panel {
  background: var(--card-bg);
  border-color: var(--card-border);
  box-shadow: 0 .9rem 1.8rem rgba(0, 0, 0, .35);
}

/* --- Admin Verification: group headers & toggles --- */
.table-group-header {
  background: linear-gradient(180deg, rgba(13, 110, 253, .06), rgba(13, 110, 253, .03)) !important;
}

[data-theme="dark"] .table-group-header {
  background: linear-gradient(180deg, rgba(158, 197, 254, .12), rgba(158, 197, 254, .06)) !important;
}

.table-group-header .group-toggle {
  cursor: pointer;
  font-weight: 700;
}

.table-group-header .group-caret {
  display: inline-block;
  width: 1rem;
  text-align: center;
}

.table-group-header .badge-count {
  display: inline-block;
  border-radius: 999px;
  padding: .15rem .5rem;
  font-size: .75rem;
  background: rgba(0, 0, 0, .06);
}

[data-theme="dark"] .table-group-header .badge-count {
  background: rgba(255, 255, 255, .08);
}

/* --- Verification table modern look --- */
.verif-table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: .75rem;
}

.verif-table thead th {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .8rem;
  border-bottom-width: 2px;
}

.verif-table tbody tr:hover>* {
  transition: background-color .12s ease;
}

.verif-table td,
.verif-table th {
  vertical-align: middle;
}

.verif-table .form-select.form-select-sm,
.verif-table .form-control.form-control-sm {
  border-radius: .5rem;
}

/* Ghost button (subtle) */
.btn-ghost {
  border: 1px solid var(--card-border);
  background: transparent;
  color: inherit;
}

.btn-ghost:hover,
.btn-ghost:focus {
  background: rgba(13, 110, 253, .08);
  border-color: rgba(13, 110, 253, .35);
  color: inherit;
}

[data-theme="dark"] .btn-ghost:hover,
[data-theme="dark"] .btn-ghost:focus {
  background: rgba(158, 197, 254, .14);
  border-color: rgba(158, 197, 254, .35);
}

.btn-ghost .icon {
  width: 1rem;
  height: 1rem;
}

/* --- Mobile tweaks: ensure list shows ~4 items and fix overlaps --- */
@media (max-width: 576px) {
  #eventsList {
    /* aim for ~4 items visible; adjust if your row is taller/shorter */
    min-height: 360px;
  }

  .event-row .title-col {
    flex: 1 1 auto;
    min-width: 0;
  }

  .event-row .dist-col {
    flex: 0 0 auto;
  }

  .event-row .cat-col {
    width: 100%;
  }
}

/* --- Footer: stats + social --- */
.site-footer .footer-stats .dot-online,
.site-footer .footer-stats .dot-visits,
.site-footer .footer-stats .dot-map {
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  display: inline-block;
}

.site-footer .footer-stats .dot-online {
  background: #22c55e;
  /* green-500 */
}

.site-footer .footer-stats .dot-map {
  background: #0d6efd;
  /* brand */
}

.site-footer .footer-stats .dot-visits {
  background: #c50dfd;
  /* brand */
}

.site-footer .footer-social .btn {
  border-radius: .5rem;
  padding: .25rem .5rem;
}

.site-footer .footer-tagline {
  opacity: .9;
}

@media (max-width: 576px) {
  .site-footer .container {
    gap: .35rem !important;
  }

  .site-footer .footer-tagline {
    order: 3;
    width: 100%;
    text-align: center;
    margin-top: .15rem;
  }
}

.comm-attach-hint {
  opacity: .85
}

[data-theme="dark"] .comm-attach-hint {
  color: var(--muted)
}

/* --- Communications helpers --- */
.comm-attach-hint {
  opacity: .85
}

[data-theme="dark"] .comm-attach-hint {
  color: var(--muted)
}

/* Bell badge tweak */
#notifBellWrap .badge {
  font-size: .65rem;
  padding: .25em .45em;
}

/* Communications: internal comment highlight */
.comm-internal {
  background: #fff8e1
}

[data-theme="dark"] .comm-internal {
  background: #2a2412
}

li.event-row {
  padding-top: 1.2rem;
  overflow: visible;
}

/* --- Place profile polish --- */
/* --- Reviews (places) --- */
.rating-stars .star {
  font-size: 1.15rem;
  cursor: pointer;
  user-select: none;
}

.rating-stars .star.active {
  color: #f7c948;
  /* warm yellow */
}

.review-meta {
  font-size: .85rem;
  color: var(--muted);
}

.comment-actions .btn-sm {
  padding: .1rem .45rem;
}

.attr-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .15rem .5rem;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  font-size: .82rem;
}

.attr-chip i {
  font-style: normal;
}

/* --- Admin: fixed, sensible height for event form map --- */
body.admin-layout #eventMap {
  height: 300px !important;
  min-height: 300px;
  max-height: 100px;
  /* na wszelki wypadek na mniejszych ekranach */
}

@media (max-width: 992px) {
  body.admin-layout #eventMap {
    height: 320px !important;
  }
}

@media (max-width: 576px) {
  body.admin-layout #eventMap {
    height: 260px !important;
  }
}

/* --- Admin: Events list visual overhaul --- */
#eventsList.card {
  border-radius: 1rem;
  border-color: var(--card-border);
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .08);
}

[data-theme="dark"] #eventsList.card {
  box-shadow: 0 .75rem 2rem rgba(0, 0, 0, .35);
}

#eventsList .table {
  --bs-table-bg: var(--card-bg);
  --bs-table-striped-bg: rgba(0, 0, 0, .02);
  --bs-table-hover-bg: rgba(13, 110, 253, .06);
  border-radius: 1rem;
  overflow: hidden;
}

[data-theme="dark"] #eventsList .table {
  --bs-table-striped-bg: rgba(255, 255, 255, .04);
  --bs-table-hover-bg: rgba(255, 255, 255, .06);
}

#eventsList thead.sticky-top th {
  top: calc(var(--nav-height, 56px) + 12px);
  z-index: 3;
  background: linear-gradient(180deg, #fff, rgba(255, 255, 255, .92)) !important;
  border-bottom: 1px solid var(--card-border) !important;
}

[data-theme="dark"] #eventsList thead.sticky-top th {
  background: linear-gradient(180deg, #141925, rgba(20, 25, 37, .92)) !important;
}

#eventsList .group-wrap .group-header td {
  background: linear-gradient(180deg, rgba(13, 110, 253, .08), rgba(13, 110, 253, .03));
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 800;
}

[data-theme="dark"] #eventsList .group-wrap .group-header td {
  background: linear-gradient(180deg, rgba(59, 130, 246, .18), rgba(59, 130, 246, .08));
}

#eventsList .btn-group-toggle {
  border-radius: .65rem;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-body);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

#eventsList .btn-group-toggle:hover {
  filter: brightness(1.03);
}

#eventsList .btn-group-toggle .chev {
  display: inline-block;
  transition: transform .18s ease;
}

#eventsList .btn-group-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}

#eventsList .btn-group-toggle .label {
  font-weight: 900;
}

#eventsList .btn-group-toggle .count {
  font-weight: 700;
}

#eventsList .badge.bg-light.border {
  background: #eef2ff !important;
  color: #243b6b;
  border-color: rgba(13, 110, 253, .25) !important;
}

#eventsList .bg-warning-subtle {
  background: #fff3cd !important;
  color: #856404 !important;
}

#eventsList .bg-success-subtle {
  background: #d1e7dd !important;
  color: #0f5132 !important;
}

#eventsList .bg-secondary-subtle {
  background: #e2e3e5 !important;
  color: #41464b !important;
}

[data-theme="dark"] #eventsList .bg-warning-subtle {
  background: rgba(255, 193, 7, .15) !important;
  color: #ffda6a !important;
}

[data-theme="dark"] #eventsList .bg-success-subtle {
  background: rgba(25, 135, 84, .18) !important;
  color: #8ce0b4 !important;
}

[data-theme="dark"] #eventsList .bg-secondary-subtle {
  background: rgba(108, 117, 125, .18) !important;
  color: #cfd4da !important;
}

#eventsList .table tbody tr.event-row td {
  vertical-align: middle;
}

#eventsList .table tbody tr.event-row a {
  font-weight: 700;
}

#eventsList .table tbody tr.event-row:hover td {
  transition: background-color .12s ease;
}

#eventsList td.text-end .btn {
  margin-left: .25rem;
  border-radius: .5rem;
}

#eventsList .pagination .page-link {
  border-radius: .5rem;
}

@media (max-width: 768px) {
  #eventsList .table thead {
    font-size: .85rem;
  }

  #eventsList .table td {
    font-size: .92rem;
  }
}

/* Table-embedded tools (events list) */
#eventsList .table thead .table-tools th {
  padding: .5rem 1rem;
  background: var(--card-bg);
  position: sticky;
  top: calc(var(--nav-height, 56px) + 6px);
  z-index: 4;
}

#eventsList .table-tools form {
  display: flex;
  align-items: center;
  gap: .5rem;
}

#eventsList .table-tools .table-search .input-group-text {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

#eventsList .table-tools .table-search .form-control {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

#eventsList .table-tools .btn,
#eventsList .table-tools .form-select {
  border-radius: 999px;
}

#eventsList thead.sticky-top th {
  top: calc(var(--nav-height, 56px) + 52px);
}

#eventsList .table thead tr.table-tools+tr th {
  border-top: 0;
}

#eventsList mark {
  background: #ffe69c;
  padding: .05rem .2rem;
  border-radius: .2rem;
}

/* Label wymaganych pól z czerwoną gwiazdką */
label.required::after,
label[required]::after {
  content: " *";
  color: var(--danger);
  font-weight: bold;
}

/* === Required fields: red outline when invalid === */
/* Inputs & selects that are required and currently invalid */
.form-control:required:invalid:not(:placeholder-shown),
.form-select:required:invalid,
input:required:invalid:not(:placeholder-shown),
textarea:required:invalid:not(:placeholder-shown) {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15) !important;
}

/* Avoid showing red state on untouched fields that use placeholders */
.form-control:required:invalid:placeholder-shown,
input:required:invalid:placeholder-shown,
textarea:required:invalid:placeholder-shown {
  box-shadow: none !important;
}

/* Checkboxes / radios required and invalid */
.form-check-input:required:invalid {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

/* Bootstrap validation compatibility (when .was-validated is added) */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.was-validated .form-check-input:invalid {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .15) !important;
}

/* Dark theme keeps the same red but ensures contrast around the control */
[data-theme="dark"] .form-check-input:required:invalid {
  box-shadow: 0 0 0 .2rem rgba(220, 53, 69, .25);
}

#personResults {
  display: none;
}

#orgResults {
  display: none;
}

/* Recurring icon next to status badge */
.recurring-ico {
  display: inline-flex;
  align-items: center;
  margin-left: .35rem;
  opacity: .8;
  vertical-align: middle;
}

.recurring-ico:hover {
  opacity: 1;
}

[data-theme="dark"] .recurring-ico {
  opacity: .9;
}

/* Admin events list: fix status and actions cell layout */
.td-status {
  white-space: nowrap;
}

.td-status .badge {
  vertical-align: middle;
}

.td-status .recurring-ico {
  display: inline-flex;
  align-items: center;
  margin-left: .35rem;
  opacity: .85;
}

.td-actions {
  width: 1%;
  white-space: nowrap;
}

.td-actions .btn {
  padding-left: .5rem;
  padding-right: .5rem;
}

.td-actions .btn i {
  display: inline-block;
  line-height: 1;
}

/* Czerwone gwiazdki przy etykietach wymaganych pól */
label.required::after {
  content: " *";
  color: #dc3545;
  /* Bootstrap red */
  font-weight: 600;
}

/* Podkreślenie / obramowanie pól wymaganych, jeśli puste */
input:required:invalid,
select:required:invalid,
textarea:required:invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.15rem rgba(220, 53, 69, 0.25);
}

/* Po wypełnieniu wraca normalny kolor */
input:required:valid,
select:required:valid,
textarea:required:valid {
  border-color: var(--bs-border-color, #ced4da);
  box-shadow: none;
}

/* --- Social auth buttons --- */
.btn-social {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  border-radius: .65rem;
  padding: .6rem .9rem;
  font-weight: 600
}

.btn-social .ico {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px
}

.btn-google {
  background: #fff;
  border: 1px solid var(--card-border);
  color: #202124
}

.btn-google:hover {
  background: #fff;
  filter: brightness(.98)
}

.btn-facebook {
  background: #1877F2;
  border: 1px solid #1877F2;
  color: #fff
}

.btn-facebook:hover {
  filter: brightness(.92);
  color: #fff
}

.btn-microsoft {
  background: #fff;
  border: 1px solid var(--card-border);
  color: #111
}

.btn-microsoft:hover {
  background: #fff;
  filter: brightness(.98)
}

/* Dark mode */
[data-theme="dark"] .btn-google,
[data-theme="dark"] .btn-microsoft {
  background: var(--card-bg);
  border-color: var(--card-border);
  color: var(--text-body)
}

[data-theme="dark"] .btn-google:hover,
[data-theme="dark"] .btn-microsoft:hover {
  filter: brightness(1.05)
}