:root {
  --cvjm-red: #e40038;
  --text-primary: #1b1b1b;
  --text-secondary: #5b5f66;
  --surface: #ffffff;
  --border: #d7dae0;
  --shadow: 0 20px 50px rgba(20, 24, 31, 0.15);
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-L.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 300;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-LI.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-R.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-RI.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-M.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-MI.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-B.ttf") format("truetype");
}

@font-face {
  font-family: "Ubuntu";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/webfonts/Ubuntu-BI.ttf") format("truetype");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Ubuntu", "Segoe UI", Tahoma, sans-serif;
  color: var(--text-primary);
  background: #f6f5f4;
  display: flex;
  flex-direction: column;
}

.auth-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: min(90vw, 620px);
  background: var(--surface);
  padding: 3rem 3.5rem;
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.auth-header h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
}

.lead {
  margin: 0 0 2rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.auth-form {
  display: grid;
  gap: 1.25rem;
}

.field {
  position: relative;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 1.4rem 3rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
}

.field input:focus {
  outline: 2px solid rgba(228, 0, 56, 0.2);
  border-color: var(--cvjm-red);
}

.field label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition:
    transform 0.2s ease,
    color 0.2s ease,
    font-size 0.2s ease;
  pointer-events: none;
}

.field label.switch {
  position: static;
  pointer-events: auto;
  margin: 0;
}

.field label span {
  color: var(--cvjm-red);
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  transform: translateY(-0.55rem);
  font-size: 0.75rem;
  color: #2f3237;
}

.field input[readonly] {
  background: #f1f3f6;
  color: var(--text-secondary);
  pointer-events: none;
  cursor: default;
}

.field-password .icon-button {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #8a8f99;
  cursor: pointer;
}

.form-row {
  text-align: right;
}

.link-secondary {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
}

.link-secondary:hover {
  color: var(--cvjm-red);
}

.switch {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-slider {
  position: relative;
  width: 64px;
  height: 32px;
  background: #e2e4e8;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #61646b;
  transition: background 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.switch-label-on,
.switch-label-off {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.2s ease;
}

.switch-label-off {
  left: 10px;
  opacity: 1;
}

.switch-label-on {
  right: 10px;
  opacity: 0;
  color: #fff;
}

.switch input:checked + .switch-slider {
  background: var(--cvjm-red);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(32px);
}

.switch input:checked + .switch-slider .switch-label-off {
  opacity: 0;
}

.switch input:checked + .switch-slider .switch-label-on {
  opacity: 1;
}

.btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  background: var(--cvjm-red);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.95rem 1.25rem;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(228, 0, 56, 0.25);
}

.auth-footer {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  z-index: 1;
}

.footer-link {
  color: inherit;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--cvjm-red);
}

.bg-triangles {
  position: absolute;
  right: 0;
  bottom: 0;
  max-width: 600px;
  width: 100%;
  height: auto;
  z-index: -1;
  pointer-events: none;
}

@media (max-width: 720px) {
  .auth-card {
    padding: 2.25rem 2rem;
  }

  .auth-header h1 {
    font-size: 1.7rem;
  }

  .auth-footer {
    flex-direction: column;
    gap: 0.6rem;
  }
}

.admin-body {
  background: #f3f4f6;
  display: block;
}

.admin-shell {
  min-height: 100vh;
  display: flex;
  position: relative;
}

.sidebar {
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.75rem 1.5rem;
  transition:
    width 0.25s ease,
    padding 0.25s ease,
    transform 0.25s ease;
  z-index: 20;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  transition: opacity 0.2s ease;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-brand strong {
  font-size: 1.1rem;
}

.sidebar-brand span {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.sidebar-nav a {
  display: block;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  font-weight: 500;
}

.sidebar-nav a.active {
  background: rgba(228, 0, 56, 0.08);
  color: var(--cvjm-red);
}

.sidebar-nav a:hover {
  background: #eceff3;
}

.sidebar-group {
  display: grid;
  gap: 0.35rem;
  padding: 0.4rem 0.2rem 0.2rem;
}

.sidebar-group-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  padding: 0 0.6rem;
}

.sidebar-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.sidebar-group-toggle:hover {
  background: #eceff3;
}

.sidebar-group-toggle i {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.sidebar-subnav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: none;
  gap: 0.3rem;
  position: relative;
}

.sidebar-subnav.is-open {
  display: grid;
}

.sidebar-group-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.sidebar-subnav a {
  padding-left: 2rem;
  font-weight: 500;
  position: relative;
}

.sidebar-subnav::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.25rem;
  bottom: 0.25rem;
  width: 2px;
  background: #cfd3da;
  border-radius: 999px;
}

.sidebar-subnav a.active::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.2rem;
  bottom: 0.2rem;
  width: 2px;
  background: var(--cvjm-red);
  border-radius: 999px;
}

.sidebar-footer {
  margin-top: auto;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.admin-main {
  flex: 1;
  padding: 2rem 2.75rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.topbar-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: space-between;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 0.55rem 1.2rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  background: transparent;
}

.btn-primary-solid {
  background: var(--cvjm-red);
  color: #fff;
  border-color: var(--cvjm-red);
  box-shadow: 0 10px 20px rgba(228, 0, 56, 0.18);
}

.btn-primary-solid:hover {
  box-shadow: 0 14px 25px rgba(228, 0, 56, 0.22);
}

.btn-outline {
  /* Pale Peach */
  /* background: #fff3ee;  */

  background: #f4f1ef;
  border-color: var(--border);
  color: var(--text-primary);
}

.btn-outline:hover {
  border-color: #c9ced6;
  background: #ffebe2;
}

.page-title {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 700;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.tab {
  text-decoration: none;
  color: var(--text-secondary);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 500;
  background: transparent;
}

.tab.active {
  color: var(--text-primary);
  background: #fff;
  border-color: var(--border);
  box-shadow: 0 10px 18px rgba(20, 24, 31, 0.06);
}

.tab:hover {
  color: var(--text-primary);
  border-color: var(--border);
  background: #fff;
}

.tabs-mobile {
  display: none;
  gap: 0.75rem;
  align-items: center;
}

.tabs-mobile label {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.tabs-mobile select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  font-size: 1rem;
  line-height: 1.3;
  min-height: 52px;
  background: #fff;
  min-width: 180px;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 12px 22px rgba(20, 24, 31, 0.08);
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.card p {
  margin: 0;
  color: var(--text-secondary);
}

.table-card {
  padding: 1.75rem;
}

.table-title {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.form-card {
  padding: 1.75rem;
}

.form-title {
  margin-top: 0;
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.form-error-summary {
  display: none;
  margin-bottom: 1.25rem;
  border-radius: 12px;
  border: 1px solid rgba(228, 0, 56, 0.25);
  background: rgba(228, 0, 56, 0.08);
  color: #8a1a26;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.form-error-summary.is-visible {
  display: block;
}

.form-error-footer {
  display: none;
  border-radius: 12px;
  border: 1px solid rgba(228, 0, 56, 0.25);
  background: rgba(228, 0, 56, 0.08);
  color: #8a1a26;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.form-error-footer.is-visible {
  display: block;
}

.magic-link-progress {
  display: none;
  margin-top: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(16, 54, 96, 0.2);
  background: rgba(16, 54, 96, 0.06);
  color: #153760;
  padding: 0.9rem 1rem;
  font-size: 0.95rem;
}

.magic-link-progress.magic-link-progress--visible {
  display: block;
}

.magic-link-progress-bar-wrap {
  margin-top: 0.75rem;
}

.magic-link-progress-bar {
  width: 100%;
  height: 10px;
}

.magic-link-progress-text {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

.data-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

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

.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.showcase-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.showcase-group h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-secondary);
}

.choice-group {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.choice-group legend {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.listbox-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.listbox-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.listbox {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.6rem 0.5rem;
  display: grid;
  gap: 0.35rem;
  max-height: 180px;
  overflow-y: auto;
}

.listbox-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.1;
  position: static;
  left: auto;
  top: auto;
  pointer-events: auto;
  transform: none;
  color: var(--text-primary);
  transition: background 0.2s ease;
}

.listbox-option:hover {
  background: #f1f3f6;
}

.listbox-option input {
  accent-color: var(--cvjm-red);
}

.listbox-option span {
  color: inherit;
}

.option-item {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
}

.option-item input {
  accent-color: var(--cvjm-red);
}

.data-form .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1rem 0.8rem;
  font-size: 1rem;
  min-height: 120px;
  resize: vertical;
}

.data-form .field textarea:focus {
  outline: 2px solid rgba(228, 0, 56, 0.2);
  border-color: var(--cvjm-red);
}

.data-form .field textarea:focus + label,
.data-form .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-0.55rem);
  font-size: 0.75rem;
  color: #2f3237;
}

.range-field,
.file-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.range-field label,
.file-field label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.range-field input[type="range"] {
  width: 100%;
  accent-color: var(--cvjm-red);
}

.file-field input[type="file"] {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fff;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.alert-info {
  background: #eef2f8;
  color: #2f3a4a;
  border-color: #d7deea;
}

.event-info-box {
  margin-top: 0.75rem;
}

.alert-success {
  background: #ecf7f1;
  color: #1f5a3b;
  border-color: #cfe9db;
}

.alert-warning {
  background: #fff4e5;
  color: #7a4a10;
  border-color: #f2ddb8;
}

.alert-error {
  background: #fdecee;
  color: #7a1e26;
  border-color: #f2c8cf;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  background: rgba(228, 0, 56, 0.12);
  color: var(--cvjm-red);
}

.badge-muted {
  background: #eef1f5;
  color: #52606f;
}

.badge-success {
  background: #dff2e9;
  color: #1f5a3b;
}

.role-warning {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  color: #b56b12;
  font-size: 0.85rem;
}

.role-warning i {
  font-size: 0.9em;
}

.already-assigned {
  color: #6c7784;
  font-size: 0.9rem;
  font-weight: 600;
}

.tooltip-trigger {
  position: relative;
}

.tooltip-trigger::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  bottom: 100%;
  background: #1c1f26;
  color: #fff;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.tooltip-trigger:hover::after,
.tooltip-trigger:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.loader-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #e2e6ee;
  border-top-color: var(--cvjm-red);
  animation: spin 1s linear infinite;
}

.progress {
  flex: 1;
  min-width: 140px;
  height: 10px;
  border-radius: 999px;
  background: #e7eaf0;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: var(--cvjm-red);
}

.modal-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 11, 16, 0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 30;
}

.modal,
.drawer {
  position: fixed;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 45px rgba(12, 14, 20, 0.25);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  z-index: 40;
}

.modal {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  width: min(520px, 92vw);
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
}

.modal-header,
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.drawer {
  top: 0;
  right: 0;
  height: 100vh;
  width: min(380px, 90vw);
  padding: 1.5rem;
  transform: translateX(8%);
  display: grid;
  gap: 1rem;
  align-content: start;
}

.drawer .button-row {
  justify-content: flex-start;
}

.drawer .button-row .btn {
  white-space: nowrap;
  max-height: 44px;
  display: inline-flex;
  align-items: center;
}

.modal-open .modal-backdrop,
.drawer-open .drawer-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.modal-open .modal.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.drawer-open .drawer {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.tabbed-panel {
  display: grid;
  gap: 1.5rem;
}

.tablist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tab-button {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-secondary);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.tab-button.is-active {
  border-color: rgba(228, 0, 56, 0.45);
  color: var(--cvjm-red);
  background: rgba(228, 0, 56, 0.08);
}

.tab-panels {
  display: grid;
  gap: 1.5rem;
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

@keyframes spin {
  from {
    transform: rotate(0);
  }
  to {
    transform: rotate(360deg);
  }
}

.form-subgrid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 0;
  padding: 0;
  margin: 0;
}

.form-subgrid-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-subgrid-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 1rem;
  max-width: 100%;
}

.form-subgrid-fields.compact {
  grid-template-columns: 90px 120px 140px;
  justify-content: start;
}

.form-subgrid-fields.thirds {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  background: #fff;
}

.choice-pill input {
  accent-color: var(--cvjm-red);
}

.choice-pill:has(input:checked) {
  border-color: rgba(228, 0, 56, 0.5);
  background: rgba(228, 0, 56, 0.08);
}

.data-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.data-form .field input {
  padding-right: 1rem;
}

.data-form .field input[readonly] {
  background: #f1f3f6;
  color: var(--text-secondary);
}

.data-form .field input[disabled] {
  background: #f1f3f6;
  color: var(--text-secondary);
}

.data-form .field.has-error input,
.data-form .field.has-error select {
  border-color: rgba(228, 0, 56, 0.6);
  box-shadow: 0 0 0 2px rgba(228, 0, 56, 0.12);
}

.data-form .field select {
  width: 100%;
  height: 56px;
  padding: 1.4rem 2.5rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--text-primary);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #6d7482 50%),
    linear-gradient(135deg, #6d7482 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

.combo {
  position: relative;
  width: 100%;
}

.field .combo-input {
  width: 100%;
  height: 56px;
  padding: 1.4rem 2.75rem 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 1rem;
  background: #fff;
  color: var(--text-primary);
}

.combo-toggle {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
}

.combo-list {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  max-height: 320px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 10;
}

.combo.is-open .combo-list {
  display: block;
}

.combo-option {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
}

.combo-option-verein {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.combo-option-name {
  font-size: 1rem;
  color: var(--text-primary);
}

.combo-option.is-verein .combo-option-verein {
  font-weight: 700;
}

.combo-option:hover,
.combo-option.is-active {
  background: var(--cvjm-red);
}

.combo-option:hover .combo-option-verein,
.combo-option:hover .combo-option-name,
.combo-option.is-active .combo-option-verein,
.combo-option.is-active .combo-option-name {
  color: #fff;
}

.combo-empty {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  display: none;
}

.combo-empty.is-visible {
  display: block;
}

.data-form .field select[multiple] {
  height: auto;
  min-height: 140px;
  padding: 0.6rem 0.8rem;
  background-image: none;
}

.data-form .field select:focus {
  outline: 2px solid rgba(228, 0, 56, 0.2);
  border-color: var(--cvjm-red);
}

.person-assign-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  width: 100%;
}

@media (max-width: 720px) {
  .person-assign-form {
    grid-template-columns: 1fr;
  }
}

.data-form .field select:focus + label,
.data-form .field select:valid + label {
  transform: translateY(-0.55rem);
  font-size: 0.75rem;
  color: #2f3237;
}

.data-form .field select.select-float-label:required:invalid + label {
  transform: translateY(-0.55rem);
  font-size: 0.75rem;
  color: #2f3237;
}

.form-error {
  font-size: 0.85rem;
  color: var(--cvjm-red);
  min-height: 1.1rem;
  display: none;
}

.form-error.is-visible {
  display: block;
}

.span-full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-card .form-actions {
  margin-top: 0.75rem;
}

.modal-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.modal-actions .btn {
  flex: 1 1 0;
  min-width: 180px;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.data-table th,
.data-table td {
  padding: 0.85rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.data-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.data-table th.col-action {
  text-align: right;
}

.data-table tbody tr {
  transition: background 0.2s ease;
}

.data-table tbody tr:hover {
  background: #f7f8fa;
}

.col-action,
.cell-action {
  text-align: right;
}

.table-action-form {
  display: inline-flex;
}

.table-action-group {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  justify-content: flex-end;
  width: 100%;
}

.table-action-button {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.table-action-button.is-text {
  width: auto;
  height: auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: #f4f1ef;
}

.table-action-button.is-text.is-primary {
  border-color: var(--cvjm-red);
  background: var(--cvjm-red);
  color: #fff;
}

.frontend-dashboard .admin-shell {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.person-picker {
  display: grid;
  gap: 0.5rem;
}

.person-picker-label {
  font-weight: 600;
  color: var(--text-secondary);
}

.person-table tbody tr.is-selected {
  background: #eef1f5;
}

.person-select-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  left: -9999px;
}

.person-select-button.is-selected {
  background: var(--cvjm-red);
  border-color: var(--cvjm-red);
  color: #fff;
}

.person-table .cell-action {
  text-align: right;
}

.person-table .person-select-button {
  margin-left: auto;
}

.table-action-button:hover {
  color: var(--cvjm-red);
  background: rgba(228, 0, 56, 0.08);
}

.table-action-button.is-text:hover {
  background: #ffebe2;
}

.table-action-button.is-text.is-primary:hover {
  background: #c60031;
  color: #fff;
}

.table-action-button.is-confirmed,
.event-confirmed-check {
  color: #1f8f3a;
}

.table-action-button.is-unconfirmed {
  color: var(--text-secondary);
}

.event-confirmed-check {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.frontend-page {
  display: none;
}

.frontend-page.is-active {
  display: block;
}

.frontend-page .card + .card {
  margin-top: 1.5rem;
}

.data-table-numbered.has-sort-controls
  tbody
  tr:first-child
  .table-action-group
  form:first-child {
  display: none;
}

.data-table-numbered.has-sort-controls
  tbody
  tr:last-child
  .table-action-group
  form:nth-child(2) {
  display: none;
}

.data-table-numbered tbody {
  counter-reset: row;
}

.data-table-numbered tbody tr {
  counter-increment: row;
}

.data-table-numbered .row-number::before {
  content: counter(row);
  color: var(--text-secondary);
}

.data-table-numbered .col-number,
.data-table-numbered .row-number {
  width: 3ch;
}

.th-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sort-buttons {
  display: flex;
  gap: 0.2rem;
}

.sort-button {
  border: none;
  background: transparent;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease;
}

.sort-button:hover {
  color: var(--cvjm-red);
}

.row-muted {
  color: var(--text-secondary);
}

.address-lines {
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.contact-item i {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: center;
}

.pagination-info {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.pagination-input {
  width: 70px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.5rem;
  font-size: 0.95rem;
}

.pagination-size {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.pagination-size label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pagination-size select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.95rem;
  background: #fff;
}

@media (max-width: 720px) {
  .pagination {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .pagination-status {
    justify-self: start;
  }

  .pagination-size {
    justify-self: start;
  }

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

  .showcase-grid {
    grid-template-columns: 1fr;
  }

  .form-subgrid-fields {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: flex-start;
  }

  .frontend-table-wrapper {
    overflow-x: visible;
  }

  .frontend-table {
    min-width: 0;
  }

  .frontend-table thead {
    display: none;
  }

  .frontend-table tbody tr {
    display: block;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
  }

  .frontend-table tbody td {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.35rem 0;
    border-bottom: 0;
    word-break: break-word;
  }

  .frontend-table tbody td::before {
    display: none;
  }

  .frontend-table tbody td span {
    display: block;
  }

  .frontend-table tbody td {
    justify-content: flex-start;
  }

  .frontend-table tbody td[data-label="Name"] {
    font-weight: 700;
  }

  .frontend-table tbody td.cell-action {
    justify-content: flex-end;
    width: 100%;
  }

  .frontend-table .cell-action,
  .frontend-table .col-action {
    text-align: left;
  }

  .frontend-table .table-action-group {
    justify-content: flex-end;
  }

  .frontend-table .row-number,
  .frontend-table .col-number {
    display: none;
  }
}

.sidebar-collapsed .sidebar {
  width: 0;
  padding: 0;
  border-right: 0;
}

.sidebar-collapsed .sidebar-inner {
  opacity: 0;
  pointer-events: none;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.toggle-in-header {
  display: none;
}

.sidebar-collapsed .toggle-in-sidebar {
  display: none;
}

.sidebar-collapsed .toggle-in-header {
  display: inline-flex;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(9, 11, 16, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.sidebar-open .sidebar {
  transform: translateX(0);
}

.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 960px) {
  .admin-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    width: 260px;
    border-right: none;
    box-shadow: 0 20px 45px rgba(12, 14, 20, 0.25);
  }

  .sidebar-collapsed .sidebar {
    width: 260px;
    padding: 1.75rem 1.5rem;
  }

  .admin-main {
    padding: 1.75rem 1.5rem 2.5rem;
  }

  .toggle-in-header {
    display: inline-flex;
  }

  .toggle-in-sidebar {
    display: inline-flex;
  }

  .tabs {
    display: none;
  }

  .tabs-mobile {
    display: flex;
  }
}
