:root {
  --eventis-primary: #435ebe;
  --eventis-primary-soft: #eef2ff;
  --eventis-text: #25396f;
  --eventis-muted: #6c7893;
  --eventis-border: #e6eaf3;
  --eventis-bg: #f5f7fb;
  --eventis-success: #198754;
  --eventis-warning: #f59f00;
  --eventis-danger: #dc3545;
  --eventis-info: #0dcaf0;
}

body {
  background: var(--eventis-bg);
}

.sidebar-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sidebar-menu {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.sidebar-menu .menu {
  width: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.sidebar-spacer {
  flex: 1 1 auto;
  list-style: none;
}

.sidebar-copyright {
  list-style: none;
  margin-top: auto;
  padding: 1rem 1.5rem 1.35rem;
  color: var(--eventis-muted);
  font-size: .82rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.sidebar-spacer::marker,
.sidebar-copyright::marker {
  content: "";
}

.sidebar-about-link {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--eventis-primary);
  background: var(--eventis-primary-soft);
  flex: 0 0 28px;
}

@media (min-width: 1200px) {
  #sidebar .sidebar-wrapper {
    height: 100vh;
    overflow-y: hidden;
  }

  .sidebar-wrapper .sidebar-header {
    padding: 1.5rem 2rem .75rem;
  }

  .sidebar-wrapper .menu {
    margin-top: .75rem;
    padding: 0 2rem .65rem;
  }

  .sidebar-wrapper .menu .sidebar-title {
    margin: .85rem 0 .45rem;
    font-size: .95rem;
  }

  .sidebar-wrapper .menu .sidebar-item {
    margin-top: .25rem;
  }

  .sidebar-wrapper .menu .sidebar-link {
    padding: .55rem 1rem;
  }

  .sidebar-wrapper .menu .submenu .submenu-item a {
    padding: .45rem 2rem;
  }

  .sidebar-copyright {
    padding: .75rem 1.5rem .9rem;
  }
}

.card,
.modal-content,
.dropdown-menu,
.alert {
  border-radius: 8px;
}

.card {
  border: 1px solid rgba(67, 94, 190, 0.08);
  box-shadow: 0 10px 28px rgba(31, 45, 80, 0.05);
}

#main,
#main-content,
#event-form,
.card,
.card-body,
.row > * {
  min-width: 0;
}

.form-control,
.form-select,
.input-group {
  min-width: 0;
  max-width: 100%;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--eventis-text);
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark .brand-icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--eventis-primary);
}

.page-kicker,
.text-muted-strong {
  color: var(--eventis-muted);
}

.eventis-navbar {
  background: #fff;
  border-bottom: 1px solid var(--eventis-border);
}

.eventis-navbar .navbar-clock {
  color: var(--eventis-text);
  font-weight: 700;
}

.eventis-user-avatar {
  display: inline-flex;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  background: #435ebe;
}

.eventis-toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2100;
  display: grid;
  gap: .75rem;
  width: min(420px, calc(100vw - 2rem));
}

.eventis-toast {
  border: 0;
  border-radius: 8px;
  box-shadow: 0 16px 36px rgba(31, 45, 80, .18);
}

.eventis-toast .toast-body {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
}

.info-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--eventis-primary);
  background: var(--eventis-primary-soft);
  border: 0;
}

.metric-card {
  min-height: 126px;
  height: 100%;
}

.metric-card .card-body {
  min-height: 126px;
}

.dashboard-metrics > [class*="col-"] {
  display: flex;
}

.dashboard-metrics .card {
  width: 100%;
}

.metric-card .metric-value {
  color: var(--eventis-text);
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
}

.metric-card .metric-label {
  color: var(--eventis-muted);
  font-weight: 600;
}

.metric-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  font-size: 1.2rem;
}

.metric-icon.primary {
  background: #435ebe;
}

.metric-icon.success {
  background: #198754;
}

.metric-icon.warning {
  background: #f59f00;
}

.metric-icon.danger {
  background: #dc3545;
}

.table thead th {
  color: var(--eventis-text);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.table td {
  color: #41516c;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.badge-soft {
  border-radius: 999px;
  padding: .45rem .65rem;
  font-weight: 700;
}

.badge-soft-success {
  color: #096236;
  background: #dff7eb;
}

.badge-soft-warning {
  color: #7a5300;
  background: #fff2cc;
}

.badge-soft-danger {
  color: #8d1825;
  background: #ffe1e5;
}

.badge-soft-primary {
  color: #273f96;
  background: #e7ecff;
}

.badge-soft-secondary {
  color: #46546a;
  background: #edf0f5;
}

.badge-soft-info {
  color: #055160;
  background: #d9f8fd;
}

.participant-ratio {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  border-radius: 999px;
  padding: .32rem .55rem;
  font-size: .82rem;
  line-height: 1.1;
  font-weight: 700;
}

.ratio-success {
  color: #096236;
  background: #dff7eb;
}

.ratio-warning {
  color: #7a5300;
  background: #fff2cc;
}

.ratio-danger {
  color: #8d1825;
  background: #ffe1e5;
}

.ratio-info {
  color: #055160;
  background: #d9f8fd;
}

.event-type-dot {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
}

.event-type-dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.event-type-dot-image {
  background: #eef2ff;
  overflow: hidden;
}

.event-type-dot.party {
  background: #e8590c;
}

.event-type-dot.concert {
  background: #7048e8;
}

.event-type-dot.training {
  background: #1971c2;
}

.event-type-dot.meal {
  background: #2b8a3e;
}

.event-type-dot.meeting {
  background: #0b7285;
}

.event-row-link {
  color: var(--eventis-text);
  font-weight: 700;
}

.event-row-link:hover {
  color: var(--eventis-primary);
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:focus-within,
.clickable-row:hover {
  background: #f8faff;
}

.filter-bar {
  display: grid;
  grid-template-columns: minmax(200px, 1.2fr) minmax(130px, .7fr) repeat(3, minmax(130px, .65fr)) minmax(150px, auto);
  gap: .75rem;
  align-items: end;
}

.filter-bar.filter-users {
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, .7fr) minmax(150px, .7fr) auto;
}

.filter-bar.filter-compact {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, .6fr) auto;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
  gap: 1.5rem;
}

.stats-filter-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .75fr) minmax(150px, .75fr) minmax(190px, 1fr) minmax(190px, 1fr) auto;
  gap: .75rem;
  align-items: end;
}

.dropdown-check-list {
  width: min(320px, 90vw);
  max-height: 280px;
  overflow: auto;
  padding: .45rem;
}

.stats-filter-grid .dropdown-toggle {
  display: flex;
  align-items: center;
}

.dropdown-check-list .dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0;
  border-radius: 8px;
}

.detail-list {
  display: grid;
  gap: .75rem;
}

.detail-item {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--eventis-border);
}

.detail-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-item .detail-icon {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--eventis-primary);
  background: var(--eventis-primary-soft);
  flex: 0 0 34px;
}

.leaflet-preview {
  height: 320px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--eventis-border);
  background: #eaf0f5;
}

.event-parts-list {
  display: grid;
  gap: .45rem;
}

.event-part-item {
  display: grid;
  gap: .1rem;
  padding: .65rem .75rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  background: #f8faff;
}

.registration-parts-grid {
  display: grid;
  gap: .55rem;
}

.registration-part-choice,
.registration-part-editor {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: .75rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  background: #fff;
}

.registration-part-choice {
  cursor: pointer;
}

.registration-part-editor {
  display: block;
  background: #f8faff;
}

.registration-part-editor.is-disabled {
  background: #f4f6fb;
  opacity: .72;
}

.registration-part-editor.is-disabled .form-label,
.registration-part-editor.is-disabled .text-muted-strong {
  color: #8a96aa;
}

.event-part-datetime {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, .65fr);
  gap: .4rem;
}

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

.event-builder-row {
  display: grid;
  min-width: 0;
  gap: .9rem 1rem;
  padding: 1rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  background: #f8faff;
}

.event-part-builder-row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "name meeting action"
    "start end action";
}

.event-option-builder-row {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  grid-template-areas:
    "label type action"
    "values required action";
}

.event-builder-field {
  min-width: 0;
}

.event-builder-field .form-label {
  margin-bottom: .35rem;
  font-size: .78rem;
  font-weight: 800;
  color: var(--eventis-muted);
}

.event-builder-name {
  grid-area: name;
}

.event-builder-meeting {
  grid-area: meeting;
}

.event-builder-start {
  grid-area: start;
}

.event-builder-end {
  grid-area: end;
}

.event-option-label-field {
  grid-area: label;
}

.event-option-type-field {
  grid-area: type;
}

.event-option-required-field {
  grid-area: required;
}

.event-option-values-field {
  grid-area: values;
}

.event-option-required-control {
  min-height: 31px;
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
}

.event-builder-action {
  grid-area: action;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.event-type-category-list {
  display: grid;
  gap: 1rem;
}

.participant-part-dots {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.participant-part-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-flex;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(31, 45, 80, .12);
}

.participant-part-dot.is-missing {
  background: #c9d1df;
}

.participant-part-dot.is-default {
  background: #21a366;
}

.participant-part-dot.is-custom {
  background: #f59f00;
}

.participant-single-part {
  display: inline-flex;
  min-width: 210px;
  color: var(--eventis-text);
  font-weight: 700;
}

.participant-part-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .35rem;
  max-width: 420px;
}

.participant-part-filter {
  width: min(240px, 100%);
}

.masked-value {
  display: inline-flex;
  min-width: 72px;
  color: var(--eventis-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  letter-spacing: 0;
}

.audit-change-list {
  display: grid;
  gap: .25rem;
  min-width: 260px;
  font-size: .85rem;
}

.ban-autocomplete {
  position: relative;
}

.ban-suggestions {
  position: absolute;
  z-index: 1055;
  top: calc(100% + .35rem);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: .35rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(31, 45, 80, .14);
}

.ban-suggestion,
.ban-suggestion-empty {
  width: 100%;
  padding: .7rem .75rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--eventis-text);
  text-align: left;
}

.ban-suggestion {
  display: grid;
  gap: .2rem;
  cursor: pointer;
}

.ban-suggestion small,
.ban-suggestion-empty {
  color: var(--eventis-muted);
}

.ban-suggestion:hover,
.ban-suggestion:focus,
.ban-suggestion.is-active {
  background: var(--eventis-primary-soft);
  color: var(--eventis-primary);
  outline: 0;
}

.attachment-list {
  display: grid;
  gap: .6rem;
}

.attachment-delete-item {
  cursor: pointer;
}

.attachment-input-list {
  display: grid;
  gap: .65rem;
}

.attachment-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
}

.attachment-input-row:first-child {
  grid-template-columns: 1fr;
}

.auto-field {
  background-color: #f8fafc;
}

.stat-bar {
  height: .65rem;
  border-radius: 999px;
  overflow: hidden;
  background: #edf1f7;
}

.stat-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.stat-card-value {
  color: var(--eventis-text);
  font-size: 1.8rem;
  line-height: 1;
  font-weight: 800;
}

.participation-detail-table .person-row {
  border-top: 2px solid var(--eventis-border);
}

.participation-detail-table .person-total {
  color: var(--eventis-text);
  background: #f8faff;
  font-weight: 800;
}

.info-list,
.recipient-list {
  display: grid;
  gap: .65rem;
}

.info-item {
  display: grid;
  gap: .15rem;
  padding: .75rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  color: var(--eventis-text);
  background: #fff;
}

.info-item:hover,
.info-item:focus {
  background: #f8faff;
  color: var(--eventis-primary);
}

.info-date {
  color: var(--eventis-muted);
  font-size: .82rem;
  font-weight: 700;
}

.filtered-select {
  display: grid;
  gap: .25rem;
}

.dashboard-info-popup {
  max-height: min(62vh, 620px);
  overflow: auto;
}

.info-popup-item {
  padding: 0 0 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--eventis-border);
}

.info-popup-item:last-child {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.info-popup-item h6 {
  margin: .2rem 0 .5rem;
  color: var(--eventis-text);
  font-weight: 800;
}

.recipient-list {
  max-height: 190px;
  overflow: auto;
  padding: .75rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  padding: .75rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
}

.attachment-item > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.role-permission-category-list {
  display: grid;
  gap: 1rem;
}

.role-permission-category {
  display: grid;
  gap: .55rem;
}

.role-permission-category-title {
  color: var(--eventis-text);
  font-size: .82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.role-permission-badge {
  display: inline-flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  white-space: normal;
  line-height: 1.2;
  text-align: center;
  font-size: .78rem;
}

.role-permission-check {
  display: flex;
  gap: .55rem;
  min-height: 38px;
  align-items: flex-start;
  padding: .55rem .65rem;
  border: 1px solid var(--eventis-border);
  border-radius: 8px;
  background: #fff;
}

.role-permission-check .form-check-label {
  line-height: 1.25;
}

.log-line {
  display: grid;
  grid-template-columns: 150px 150px 1fr 130px;
  gap: 1rem;
  align-items: center;
  padding: .9rem 0;
  border-bottom: 1px solid var(--eventis-border);
}

.logs-filter {
  min-width: min(100%, 620px);
}

.auth-wrapper {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 520px) 1fr;
  background: #fff;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
}

.auth-visual {
  display: flex;
  align-items: stretch;
  padding: 1.5rem;
  background: #f1f4ff;
}

.auth-visual-inner {
  width: 100%;
  border-radius: 8px;
  padding: 3rem;
  background:
    linear-gradient(rgba(67, 94, 190, .82), rgba(36, 52, 120, .82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.18' stroke-width='2'%3E%3Cpath d='M120 150h660v510H120z'/%3E%3Cpath d='M120 240h660M210 150v510M300 150v510M390 150v510M480 150v510M570 150v510M660 150v510M750 150v510M120 330h660M120 420h660M120 510h660M120 600h660'/%3E%3Ccircle cx='300' cy='330' r='36' fill='%23fff' fill-opacity='.16'/%3E%3Ccircle cx='570' cy='420' r='46' fill='%23fff' fill-opacity='.14'/%3E%3Ccircle cx='660' cy='240' r='32' fill='%23fff' fill-opacity='.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  color: #fff;
}

.auth-visual-image {
  min-height: 100%;
}

.auth-visual-inner h1 {
  font-size: 2.4rem;
  font-weight: 800;
}

.timeline-list {
  position: relative;
  display: grid;
  gap: 1rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: .85rem;
}

.timeline-link {
  cursor: pointer;
  border-radius: 8px;
  padding: .35rem;
  margin: -.35rem;
}

.timeline-link:hover,
.timeline-link:focus {
  background: #f8faff;
}

.timeline-badge {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
}

.copyright {
  color: var(--eventis-muted);
  font-size: .9rem;
}

.settings-tabs-card .nav-tabs {
  gap: .25rem;
  flex-wrap: wrap;
}

.settings-tabs-card .tab-content {
  padding-top: 1.25rem;
}

.settings-tabs-card .nav-link {
  color: var(--eventis-muted);
  font-weight: 700;
}

.settings-preview {
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.25rem;
  border: 1px dashed var(--eventis-border);
  border-radius: 8px;
  background: #f8faff;
}

.module-card {
  min-height: 280px;
}

.module-card .card-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.module-card-head,
.module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.module-card-content {
  flex: 1 1 auto;
}

.module-card-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--eventis-border);
}

.module-card-icon,
.module-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  color: var(--eventis-primary);
  background: var(--eventis-primary-soft);
  font-size: 1.2rem;
}

.module-empty-icon {
  width: 64px;
  height: 64px;
  font-size: 1.5rem;
}

.module-card .form-switch .form-check-input {
  width: 2.75rem;
  height: 1.45rem;
  margin-top: 0;
  cursor: pointer;
}

.module-card .form-switch .form-check-input:disabled {
  cursor: not-allowed;
}

@media (max-width: 1199px) {
  .filter-bar,
  .filter-bar.filter-users,
  .filter-bar.filter-compact,
  .stats-filter-grid,
  .event-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  #main #main-content {
    padding: 1rem;
  }

  .page-title-headings {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .page-title-headings > .d-flex {
    width: 100%;
  }

  .event-form-heading-actions .btn {
    flex: 1 1 150px;
  }

  .page-heading {
    margin-bottom: 1rem;
  }

  .auth-wrapper {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 2rem 1.25rem;
  }

  .auth-visual {
    display: none;
  }

  .role-permission-grid,
  .log-line {
    grid-template-columns: 1fr;
  }

  .metric-card .metric-value {
    font-size: 1.6rem;
  }

  .eventis-toast-container {
    top: .75rem;
    right: .75rem;
    width: calc(100vw - 1.5rem);
  }

  .event-part-builder-row,
  .event-option-builder-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .event-part-builder-row {
    grid-template-areas:
      "name"
      "meeting"
      "start"
      "end"
      "action";
  }

  .event-option-builder-row {
    grid-template-areas:
      "label"
      "type"
      "values"
      "required"
      "action";
  }

  .event-builder-action {
    padding-top: .15rem;
  }

  .attachment-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .attachment-input-row,
  .attachment-input-row:first-child,
  .event-part-datetime {
    grid-template-columns: 1fr;
  }
}
