* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap");

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f5f7fb 0%, #ffffff 50%, #f7f9fc 100%);
  color: #101828;
}

#featureSwitch,
#activeSwitch {
  width: 50px;
  padding: 11px;
}

.form-check-input.switch-success,
.form-check-input.switch-warning,
.form-check-input.switch-danger {
  background-color: var(--switch-color);
  border-color: var(--switch-color);
}

.form-check-input.switch-success:focus,
.form-check-input.switch-warning:focus,
.form-check-input.switch-danger:focus {
  border-color: var(--switch-color);
  box-shadow: 0 0 0 0.25rem rgba(var(--switch-rgb), 0.25);
}

.switch-success {
  --switch-color: #198754;
  --switch-rgb: 25, 135, 84;
}

.switch-warning {
  --switch-color: #ffc107;
  --switch-rgb: 255, 193, 7;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='black'/%3e%3c/svg%3e");
}

.switch-danger {
  --switch-color: #dc3545;
  --switch-rgb: 220, 53, 69;
  --bs-form-switch-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='white'/%3e%3c/svg%3e");
}

@keyframes fadeRise {
  0% { opacity: 0; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

main.container-fluid.login {
  animation: fadeRise 220ms ease-out;
  padding-top: 16px;
}

.card, .table, .modal-content, .afl-card {
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.06);
  border-color: rgba(16, 24, 40, 0.08);
}

.table thead th {
  background: #f8fafc;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #334155;
  border-bottom-width: 1px;
}

.table tbody tr:hover {
  background: #f7f9fc;
}

.table td,
.table th {
  vertical-align: middle;
  padding: 0.5rem 0.6rem;
}

.table td {
  font-size: 13px;
}

.table-responsive {
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  background: #fff;
}

.table-responsive .table {
  margin-bottom: 0;
}

.table-status-cell {
  padding: 0 !important;
  background: #fff;
}

.table-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  padding: 24px 16px;
  text-align: center;
  color: #475467;
}

.table-status-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.table-status-caption {
  margin-top: 4px;
  font-size: 12px;
  color: #667085;
}

.table-status-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(148, 163, 184, 0.3);
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: tableSpin 0.8s linear infinite;
  flex: 0 0 auto;
}

@media (max-width: 576px) {
  .table-status-cell {
    position: sticky;
    left: 0;
    display: block;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    z-index: 1;
  }

  .table-status {
    flex-direction: column;
    gap: 10px;
    min-height: 140px;
    width: 100%;
    max-width: 100%;
    padding: 28px 14px;
    box-sizing: border-box;
    margin: 0 auto;
  }

  .table-status-title,
  .table-status-caption {
    text-align: center;
  }
}

@keyframes tableSpin {
  to { transform: rotate(360deg); }
}

.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.1px;
}

.btn-outline-dark {
  border-color: #cbd5e1;
}

.btn-dark {
  background: #0f172a;
  border-color: #0f172a;
}

input.form-control,
select.form-control,
textarea.form-control {
  border-radius: 10px;
  border-color: #e2e8f0;
  box-shadow: none;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
}

.event-picker {
  position: relative;
  z-index: 20;
}

.event-picker-trigger {
  width: 100%;
  min-height: 58px;
  padding: 9px 40px 9px 12px;
  text-align: left;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  box-shadow: none;
  position: relative;
}

.event-picker-trigger:focus,
.event-picker-trigger.is-open {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.2);
  outline: none;
}

.event-picker-trigger::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 14px;
}

.event-picker-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.2;
}

.event-picker-caption {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.2;
}

.event-picker-menu {
  position: fixed;
  z-index: 2000;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid rgba(16, 24, 40, 0.08);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.event-picker-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.event-picker-item:hover,
.event-picker-item.is-active {
  background: #f8fafc;
}

.event-picker-empty {
  padding: 12px;
  font-size: 13px;
  color: #64748b;
}

.allfancy-page form,
.allbm-page form {
  position: relative;
  z-index: 10;
  overflow: visible;
}

.allfancy-page .table-responsive,
.allbm-page .table-responsive,
#bm_markets {
  position: relative;
  z-index: 1;
}

.allfancy-page .sticky-event-name .badge {
  display: inline-block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.30;
  padding: 4px 10px;
  border-radius: 10px;
}

.allfancy-page .sticky-event-name .badge.fancy-name-badge-secondary {
  background-color: #6c757d;
  color: #fff;
}

.allfancy-page .sticky-event-name .badge.fancy-name-badge-warning {
  background-color: #ffc107;
  color: #212529;
}

.allfancy-page #select_all,
.allfancy-page .row_select {
  transform: scale(2);
  cursor: pointer;
  accent-color: #0d6efd;
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.allfancy-page .row_select:active,
.allfancy-page #select_all:active {
  transform: scale(2.1);
}

.allfancy-page .row_select:disabled {
  cursor: not-allowed;
  accent-color: #cbd5e1;
  filter: grayscale(0.4);
}

.allfancy-page .row_select:disabled:hover {
  filter: grayscale(0.4);
}

.allfancy-page #select_all:focus,
.allfancy-page .row_select:focus {
  box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.allfancy-page .row_select:hover,
.allfancy-page #select_all:hover {
  transform: scale(2.05);
  filter: brightness(0.97);
}

.navbar {
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.navbar .btn {
  box-shadow: none;
}

.bm-market {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  padding: 10px 10px 2px;
}

.bm-market-head {
  padding: 6px 8px;
  border-bottom: 1px solid #eceff3;
  margin-bottom: 6px;
}

.bm-market-title {
  font-size: 14px;
  letter-spacing: 0.2px;
  color: #1f2a37;
}

.bm-market-actions .btn {
  padding: 2px 10px;
}

#bm_markets .table {
  margin-bottom: 0;
}

#bm_markets .table thead th {
  background: #f6f7f9;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

#bm_markets .table td {
  font-size: 13px;
}

#bm_markets .badge {
  font-size: 11px;
  padding: 4px 6px;
}

#bm_markets .table tbody tr:hover {
  background: #fafbfc;
}

.allevent-page,
.activeevent-page,
.allfancy-page,
.allbm-page,
.createuser-page,
.index-page {
  max-width: 100%;
  overflow-x: hidden;
}

.allevent-page .table-responsive,
.activeevent-page .table-responsive,
.allfancy-page .table-responsive,
.allbm-page .table-responsive,
.createuser-page .table-responsive,
.index-page .table-responsive {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}


.allevent-page td.sticky-event-name,
.activeevent-page td.sticky-event-name,
.allfancy-page td.sticky-event-name,
.allbm-page td.sticky-event-name,
.createuser-page td.sticky-event-name,
.index-page td.sticky-event-name {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}


.suspended {
  position: absolute;
  left: 0;
  width: 200%;
  /* 10% back + 10% lay = 20%   */
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.40);
  color: #fff;
  text-align: center;
  padding: 20px 0;
  z-index: 999;
  height: 100%;
  pointer-events: none;
  font-size: 10px;
}
