html {
  font-size: 14px;
}

:root {
  --minddesk-event-accent: #87384f;
  --minddesk-gold: #d3a344;
  --minddesk-gold-light: #f2d58d;
  --minddesk-dark: #0b1220;
  --minddesk-ink: #17212b;
  --minddesk-paper: #fffcf6;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255, 252, 246, .9), 0 0 0 0.25rem rgba(135, 56, 79, .24);
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% -10%, rgba(216, 171, 72, .18), transparent 28%),
    radial-gradient(circle at 88% 10%, rgba(135, 56, 79, .16), transparent 30%),
    linear-gradient(180deg, #0b1220 0%, #090a0d 220px, #efe6d6 220px, #efe6d6 100%);
  color: #17212b;
  display: flex;
  flex-direction: column;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.event-stage-background {
  background-color: #090a0d;
  background-image:
    linear-gradient(180deg, rgba(5, 7, 11, .72) 0%, rgba(9, 10, 13, .54) 34%, rgba(239, 230, 214, .9) 70%, rgba(239, 230, 214, .96) 100%),
    linear-gradient(90deg, rgba(5, 7, 11, .55) 0%, rgba(5, 7, 11, .2) 46%, rgba(5, 7, 11, .5) 100%),
    url("/img/backgrounds/event-stage-1920.jpg");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
}

.top-menu-bar {
  background:
    radial-gradient(circle at 16% -20%, rgba(222, 174, 73, .14), transparent 32%),
    linear-gradient(180deg, #0b1220 0%, #090a0d 58%, #06070a 100%);
  border-bottom: 1px solid rgba(218, 171, 72, .62);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  flex: 0 0 auto;
  padding: 8px 0;
}

.top-menu-inner {
  align-items: center;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(132px, 1fr) auto minmax(132px, 1fr);
  min-height: 68px;
}

.top-menu-left,
.top-menu-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.top-menu-actions {
  justify-content: flex-end;
}

.brand-icon-link {
  border-radius: 10px;
  display: inline-flex;
  flex: 0 0 auto;
  text-decoration: none;
}

.brand-icon {
  background:
    radial-gradient(circle at 50% 42%, rgba(218, 171, 72, .12), transparent 68%),
    rgba(9, 10, 13, .62);
  border: 1px solid rgba(218, 171, 72, .52);
  border-radius: 10px;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(255, 255, 255, .04);
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .42));
  height: 52px;
  object-fit: contain;
  padding: 4px;
  width: 52px;
}

.hamburger-button,
.top-action-button {
  align-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(218, 171, 72, .54);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .22);
  color: #f4ead9;
  display: inline-flex;
  justify-content: center;
  text-decoration: none;
  transition: background-color .16s ease, transform .16s ease;
}

.hamburger-button {
  height: 44px;
  width: 44px;
}

.top-action-button {
  min-height: 40px;
  padding: 0 14px;
  font-size: .86rem;
  font-weight: 800;
}

.hamburger-button:hover,
.hamburger-button:focus,
.top-action-button:hover,
.top-action-button:focus {
  background: rgba(218, 171, 72, .14);
  color: #ffffff;
  transform: translateY(-1px);
}

.hamburger-button .navbar-toggler-icon {
  background-image: none;
  border-bottom: 2px solid #f4ead9;
  border-top: 2px solid #f4ead9;
  height: 16px;
  position: relative;
  width: 20px;
}

.hamburger-button .navbar-toggler-icon::before {
  border-top: 2px solid #f4ead9;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 5px;
}

.top-menu-title {
  display: grid;
  justify-items: center;
  line-height: 1;
  text-align: center;
}

.top-menu-title span {
  color: rgba(244, 234, 217, .72);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.top-menu-title strong {
  color: #f2d58d;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  font-weight: 880;
  letter-spacing: 0;
}

.top-menu-user {
  color: rgba(244, 234, 217, .72);
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-shell {
  flex: 1 0 auto;
}

.content-main {
  backdrop-filter: blur(6px);
  background: rgba(255, 252, 246, .88);
  border: 1px solid rgba(140, 100, 36, .34);
  border-radius: 8px;
  box-shadow:
    0 18px 42px rgba(32, 37, 45, .12),
    inset 0 1px 0 rgba(255, 255, 255, .64);
  margin-bottom: 20px;
  margin-top: 20px;
  padding: 24px;
}

.content-main-stage {
  backdrop-filter: none;
  background: transparent;
  border: 0;
  box-shadow: none;
  margin-bottom: 28px;
  margin-top: 28px;
  padding: 0;
}

.status-bar {
  background:
    linear-gradient(180deg, #06070a 0%, #090a0d 42%, #0b1220 100%);
  border-top: 1px solid rgba(218, 171, 72, .54);
  box-shadow:
    0 -10px 28px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  color: #f4ead9;
  flex: 0 0 auto;
  font-size: .82rem;
  font-weight: 700;
  padding: 7px 0;
}

.status-bar-inner {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: 26px;
  text-align: center;
}

.offcanvas {
  background: linear-gradient(180deg, var(--minddesk-paper) 0%, #f6f0e5 100%);
  border-right: 1px solid rgba(140, 100, 36, .32);
  color: var(--minddesk-ink);
}

.offcanvas-header {
  border-bottom: 1px solid rgba(140, 100, 36, .22);
}

.offcanvas-title {
  color: var(--minddesk-ink);
  font-weight: 850;
  letter-spacing: 0;
}

.btn-close:focus {
  box-shadow: 0 0 0 .25rem rgba(135, 56, 79, .18);
}

.app-menu {
  display: grid;
  gap: 8px;
}

.app-menu a {
  border-radius: 8px;
  color: #17212b;
  display: block;
  font-weight: 740;
  padding: 10px 12px;
  text-decoration: none;
}

.app-menu a:hover,
.app-menu a:focus {
  background: rgba(135, 56, 79, .09);
  color: #87384f;
}

.btn-primary {
  background: linear-gradient(180deg, #f1d489 0%, #d3a344 100%);
  border-color: #d5aa50;
  box-shadow: 0 10px 22px rgba(27, 37, 48, .14);
  color: #17120d;
  font-weight: 800;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(180deg, #f5dda0 0%, #dcaf55 100%);
  border-color: #e1b85f;
  color: #100d09;
}

.btn-outline-primary {
  background: rgba(255, 252, 246, .72);
  border-color: rgba(140, 100, 36, .42);
  color: #8a5f21;
  font-weight: 760;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: rgba(218, 171, 72, .16);
  border-color: rgba(140, 100, 36, .7);
  color: #17120d;
}

.btn-outline-secondary {
  background: rgba(255, 252, 246, .72);
  border-color: rgba(140, 100, 36, .34);
  color: #6b6258;
  font-weight: 760;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  background: rgba(135, 56, 79, .08);
  border-color: rgba(135, 56, 79, .46);
  color: var(--minddesk-event-accent);
}

.app-menu .btn-outline-secondary {
  background: rgba(255, 252, 246, .58);
  border-color: rgba(140, 100, 36, .42);
  color: #6b5125;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: rgba(135, 56, 79, .6);
  box-shadow: 0 0 0 .2rem rgba(135, 56, 79, .15);
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.auth-stage {
  align-items: center;
  display: grid;
  min-height: min(560px, calc(100vh - 190px));
  padding: 32px 0;
}

.auth-card {
  backdrop-filter: blur(12px);
  background:
    radial-gradient(circle at 92% 8%, rgba(135, 56, 79, .12), transparent 34%),
    linear-gradient(180deg, rgba(255, 252, 246, .96), rgba(246, 240, 229, .92));
  border: 1px solid rgba(140, 100, 36, .34);
  border-radius: 8px;
  box-shadow:
    0 24px 58px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .76);
  color: var(--minddesk-ink);
  margin: 0 auto;
  max-width: 440px;
  padding: 28px;
  width: 100%;
}

.auth-card h1 {
  font-size: 1.8rem;
  line-height: 1.1;
  margin: 12px 0 20px;
}

.auth-card-brand {
  align-items: center;
  display: flex;
  gap: 12px;
}

.auth-card-brand img {
  background: #030303;
  border: 1px solid rgba(218, 171, 72, .5);
  border-radius: 10px;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
  height: 48px;
  object-fit: contain;
  padding: 4px;
  width: 48px;
}

.auth-card-brand span {
  color: var(--minddesk-event-accent);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 8px 0 24px;
}

.admin-heading-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.admin-heading-title img {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  object-fit: contain;
  background: #030303;
  border: 1px solid rgba(218, 171, 72, .5);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .2);
}

.admin-heading span {
  color: #87384f;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-heading h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.admin-shortcuts a,
.admin-panel {
  border: 1px solid rgba(140, 100, 36, .32);
  border-radius: 8px;
  background: rgba(255, 252, 246, .94);
  box-shadow:
    0 18px 42px rgba(18, 32, 50, .1),
    inset 0 1px 0 rgba(255, 255, 255, .74);
}

.admin-shortcuts a {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 18px;
  color: #232521;
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.admin-shortcuts a:hover,
.admin-shortcuts a:focus {
  border-color: rgba(135, 56, 79, .46);
  box-shadow: 0 22px 52px rgba(18, 32, 50, .14);
  color: #17212b;
  transform: translateY(-1px);
}

.admin-shortcuts strong {
  font-size: 1.1rem;
}

.admin-shortcuts span {
  color: #677063;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-grid-wide {
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}

.admin-panel {
  padding: 18px;
}

.admin-panel h2 {
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.admin-form {
  display: grid;
  gap: 10px;
}

.admin-form label {
  margin-bottom: -4px;
  color: #525a4f;
  font-size: 0.9rem;
  font-weight: 700;
}

.admin-form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 6px 0;
}

.admin-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.admin-table-panel {
  overflow-x: auto;
}

.admin-table-panel table {
  min-width: 720px;
}

.admin-package-actions {
  min-width: 420px;
}

.admin-inline-stack {
  display: grid;
  gap: 6px;
  margin: 0 0 8px;
}

.admin-inline-stack:last-child {
  margin-bottom: 0;
}

.admin-inline-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.admin-muted {
  color: #677063;
}

.admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.admin-metric {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(140, 100, 36, .32);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(180deg, rgba(255, 252, 246, .94), rgba(246, 240, 229, .9));
  box-shadow: 0 18px 42px rgba(18, 32, 50, .1);
}

.admin-metric span,
.messaging-readiness span {
  color: #677063;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-metric strong {
  font-size: 1.55rem;
  line-height: 1;
}

.messaging-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.messaging-readiness div {
  display: grid;
  gap: 4px;
  border: 1px solid #e0e4dd;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.messaging-readiness strong {
  overflow-wrap: anywhere;
}

.admin-ledger-panel {
  margin-top: 18px;
}

.admin-filter {
  display: grid;
  grid-template-columns: auto minmax(220px, 420px) auto;
  gap: 10px;
  align-items: center;
  margin: -8px 0 20px;
}

.admin-filter label {
  color: #525a4f;
  font-weight: 700;
}

.admin-subheading {
  margin-top: 8px;
  border-top: 1px solid #e0e4dd;
  padding-top: 14px;
}

.admin-subheading h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-checks-inline {
  align-items: end;
  padding-top: 26px;
}

.guest-editor {
  display: grid;
  gap: 10px;
}

.guest-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.2fr) minmax(120px, 1fr) minmax(120px, 0.9fr) 88px 96px 92px;
  gap: 8px;
  align-items: end;
  border: 1px solid #e0e4dd;
  border-radius: 8px;
  padding: 10px;
  background: #fbfcfa;
}

.guest-row-checks {
  display: grid;
  gap: 6px;
  padding-bottom: 6px;
}

.guest-row-checks label {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.muted-inline {
  display: block;
  color: #677063;
  font-size: 0.82rem;
}

.table-actions {
  display: flex;
  gap: 10px;
  white-space: nowrap;
}

.table th {
  color: #525a4f;
  font-size: 0.82rem;
  text-transform: uppercase;
}

@media (max-width: 960px) {
  .admin-shortcuts,
  .admin-grid,
  .admin-grid-wide,
  .admin-filter,
  .admin-inline-row,
  .messaging-readiness,
  .guest-row {
    grid-template-columns: 1fr;
  }

  .admin-checks-inline {
    padding-top: 0;
  }
}

@media (max-width: 767.98px) {
  body.event-stage-background {
    background-image:
      linear-gradient(180deg, rgba(5, 7, 11, .72) 0%, rgba(9, 10, 13, .58) 36%, rgba(239, 230, 214, .92) 72%, rgba(239, 230, 214, .98) 100%),
      linear-gradient(90deg, rgba(5, 7, 11, .48) 0%, rgba(5, 7, 11, .2) 50%, rgba(5, 7, 11, .48) 100%),
      url("/img/backgrounds/event-stage-960.jpg");
    background-attachment: scroll;
    background-position: center top;
  }

  .top-menu-bar {
    padding: 7px 0;
  }

  .top-menu-inner {
    gap: 8px;
    grid-template-columns: minmax(92px, 1fr) auto minmax(92px, 1fr);
    min-height: 56px;
  }

  .top-menu-left {
    gap: 8px;
  }

  .brand-icon {
    height: 42px;
    width: 42px;
  }

  .hamburger-button {
    height: 40px;
    width: 40px;
  }

  .top-action-button {
    font-size: .8rem;
    min-height: 38px;
    padding: 0 11px;
  }

  .top-menu-title strong {
    font-size: 1.2rem;
  }

  .top-menu-title span {
    font-size: .68rem;
  }

  .top-menu-user {
    display: none;
  }

  .content-main {
    margin-top: 14px;
    padding: 16px;
  }

  .content-main-stage {
    margin-bottom: 18px;
    padding: 0 10px;
  }

  .auth-stage {
    min-height: calc(100vh - 168px);
    padding: 18px 0;
  }

  .auth-card {
    margin: 24px auto;
    padding: 22px;
  }
}
