@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --purple: #7142c8;
  --blue: #4f63f5;
  --green: #16b978;
  --ink: #202538;
  --muted: #788094;
  --bg: #f4f6fb;
  --line: #e8ebf2;
  --shadow: 0 5px 22px #25365b0b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px 'DM Sans', sans-serif;
}

button, input, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.brand {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid #f0f1f6;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #14c58b, #119b70);
  color: #fff;
  font-weight: 700;
  font-size: 19px;
}

.brand b {
  display: block;
  font-size: 14px;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.side-nav {
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-link {
  border: 0;
  background: transparent;
  text-align: left;
  color: #626b7c;
  border-radius: 9px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.nav-link:hover {
  background: #f4f0ff;
  color: var(--purple);
}

.nav-link.active {
  background: linear-gradient(100deg, #17c47f, #0cae73);
  color: white;
  box-shadow: 0 5px 12px #16b97826;
}

.sidebar-bottom {
  margin-top: auto;
  padding: 16px 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
}

.avatar,
.profile-chip span {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #d9f8e9;
  color: #079b69;
  font-weight: 700;
}

.user-info {
  min-width: 0;
  flex: 1;
}

.user-info b {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 11px;
}

.user-info small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}

.logout-btn {
  border: 0;
  background: none;
  color: #8b92a2;
  font-size: 19px;
}

.main-area {
  margin-left: 230px;
  width: calc(100% - 230px);
  min-width: 0;
}

.topbar {
  height: 76px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar h1 {
  font-size: 19px;
  margin: 0;
  font-family: 'Space Grotesk', sans-serif;
}

.topbar p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0 0;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification {
  position: relative;
  width: 31px;
  height: 31px;
  border: 1px solid var(--line);
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #6b7385;
}

.notification i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff6574;
  right: 5px;
  top: 4px;
}

.profile-chip {
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #60697b;
  font-size: 11px;
}

.mobile-menu {
  display: none;
}

.page {
  display: none;
  padding: 25px 28px 45px;
  max-width: 1500px;
  margin: auto;
}

.page.active {
  display: block;
}

.hidden {
  display: none !important;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 17px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  box-shadow: var(--shadow);
}

.stat-card small {
  display: block;
  color: #777f90;
  font-size: 10px;
  margin-bottom: 5px;
}

.stat-card strong {
  font: 700 24px 'Space Grotesk', sans-serif;
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.blue {
  background: #e9edff;
  color: #465bf2;
}

.green {
  background: #e0f8e9;
  color: #1aad6b;
}

.orange {
  background: #fff0dd;
  color: #f18a24;
}

.purple {
  background: #f0e7ff;
  color: #9853e8;
}

.role-value {
  font-size: 18px !important;
}

.promo-banner {
  min-height: 112px;
  padding: 20px 25px;
  border-radius: 12px;
  background: linear-gradient(105deg, #6178ed, #7950b5);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.promo-banner h2 {
  font: 700 18px 'Space Grotesk', sans-serif;
  margin: 0 0 5px;
}

.promo-banner p {
  margin: 0 0 10px;
  font-size: 11px;
  color: #e9eaff;
}

.banner-tags {
  display: flex;
  gap: 7px;
}

.banner-tags span {
  background: #ffffff30;
  border: 1px solid #ffffff25;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 9px;
}

.banner-symbol {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffffff25;
  font-size: 33px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 23px 0 15px;
}

.section-head h2 {
  font: 700 17px 'Space Grotesk', sans-serif;
  margin: 0;
}

.section-head p {
  font-size: 11px;
  color: var(--muted);
  margin: 5px 0 0;
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--purple);
  font-weight: 700;
  font-size: 11px;
}

.event-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-row {
  display: grid;
  grid-template-columns: 45px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow);
}

.event-emblem {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #4e6bff, #7640c7);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.event-main {
  min-width: 0;
}

.event-main h3 {
  font-size: 13px;
  margin: 0 0 4px;
}

.event-main p {
  font-size: 11px;
  color: #777f90;
  margin: 0 0 9px;
  line-height: 1.5;
}

.event-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: #70798b;
  font-size: 10px;
}

.event-side {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
  white-space: nowrap;
}

.fee {
  font-size: 10px;
  color: #697286;
}

.primary-btn,
.secondary-btn {
  border: 0;
  border-radius: 8px;
  padding: 10px 15px;
  font-weight: 700;
  font-size: 11px;
}

.primary-btn {
  background: linear-gradient(100deg, #4f63f5, #773ee0);
  color: white;
  box-shadow: 0 4px 10px #4f63f526;
}

.secondary-btn {
  background: #f0edff;
  color: var(--purple);
}

.event-side .primary-btn {
  padding: 8px 12px;
}

.event-poster {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.event-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.event-card h3 {
  font-size: 13px;
  margin: 5px 0;
}

.event-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.event-card .primary-btn {
  margin-top: 8px;
}

.search-box {
  width: min(270px, 100%);
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.filter-row {
  display: flex;
  gap: 8px;
  margin: 12px 0 17px;
}

.filter {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: white;
  color: #6c7485;
  font-size: 11px;
}

.filter.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel h3 {
  font: 700 16px 'Space Grotesk', sans-serif;
  margin: 0 0 15px;
}

.manage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: 18px;
}

.event-form label,
.panel label,
.modal-card label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #515a6c;
  margin: 12px 0 6px;
}

.event-form input,
.event-form textarea,
.panel input,
.panel select,
.modal-card input,
.modal-card select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #e1e5ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
}

.event-form textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.full-btn {
  width: 100%;
  margin-top: 15px;
}

.small-note {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.compact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.compact-item {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 12px;
}

.compact-item b {
  display: block;
  margin-bottom: 5px;
}

.compact-item p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  padding: 30px;
  text-align: center;
  background: #fff;
  border: 1px dashed #d9deea;
  border-radius: 12px;
  color: var(--muted);
  font-size: 12px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: #141a2d99;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow: auto;
}

.modal-card {
  width: min(430px, 100%);
  background: white;
  border-radius: 18px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 70px #0b102544;
  max-height: 95vh;
  overflow: auto;
}

.modal-card h2 {
  font: 700 25px 'Space Grotesk', sans-serif;
  margin: 7px 0;
}

.modal-card > p {
  font-size: 11px;
  color: var(--muted);
}

.close-btn {
  position: absolute;
  right: 15px;
  top: 13px;
  border: 0;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  background: #f2f3f8;
  color: #596174;
  font-size: 19px;
}

.eyebrow {
  font-size: 9px;
  letter-spacing: 1.5px;
  color: var(--purple);
  font-weight: 700;
}

.auth-message {
  font-size: 11px;
  color: #c04455;
  min-height: 15px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  transition: .2s;
  z-index: 80;
  background: #20283d;
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  font-size: 12px;
  pointer-events: none;
  max-width: 90%;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1100px) {
  .sidebar {
    width: 205px;
  }

  .main-area {
    margin-left: 205px;
    width: calc(100% - 205px);
  }

  .stats-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .events-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page {
    padding: 22px 20px 35px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform .2s;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 0 100vmax #11182b55;
  }

  .main-area {
    margin-left: 0;
    width: 100%;
  }

  .mobile-menu {
    display: block;
    border: 0;
    background: #f1f2f8;
    border-radius: 8px;
    padding: 8px;
  }

  .topbar {
    height: 68px;
    padding: 0 15px;
  }

  .topbar h1 {
    font-size: 16px;
  }

  .topbar p {
    max-width: 55vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-chip b {
    display: none;
  }

  .page {
    padding: 18px 14px 30px;
  }

  .manage-layout {
    grid-template-columns: 1fr;
  }

  .event-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .event-side {
    grid-column: 2;
    align-items: flex-start;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-box {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-row {
    gap: 9px;
  }

  .stat-card {
    padding: 13px 11px;
  }

  .stat-card strong {
    font-size: 20px;
  }

  .stat-card small {
    font-size: 9px;
  }

  .stat-icon {
    width: 29px;
    height: 29px;
    font-size: 15px;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .promo-banner {
    padding: 18px;
  }

  .promo-banner h2 {
    font-size: 16px;
  }

  .banner-symbol {
    width: 42px;
    height: 42px;
    font-size: 25px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 24px 20px;
  }
}

.show-password-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 500;
    color: #515a6c;
    cursor: pointer;
    margin-top: 10px;
}

#showPassword {
    width: auto;
    margin: 0;
    padding: 0;
    cursor: pointer;
}