/* ═══════════════════════════════════════════════════
   MOMA EVENTS — CSS BASE
═══════════════════════════════════════════════════ */
:root {
  --blue:        #1E40AF;
  --blue-dark:   #1E3A8A;
  --blue-light:  #DBEAFE;
  --blue-mid:    #3B82F6;
  --white:       #FFFFFF;
  --gray-50:     #F8FAFC;
  --gray-100:    #F1F5F9;
  --gray-200:    #E2E8F0;
  --gray-400:    #94A3B8;
  --gray-600:    #475569;
  --gray-800:    #1E293B;
  --text:        #0F172A;
  --text-muted:  #64748B;
  --radius:      10px;
  --shadow:      0 4px 24px rgba(0,0,0,.08);
  --nav-h:       64px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 1.5rem; }

/* ── BUTTONS ────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .65rem 1.4rem; border-radius: 8px;
  font-size: .88rem; font-weight: 600; transition: all .18s;
  text-decoration: none; white-space: nowrap;
}
.btn--primary {
  background: var(--blue); color: #fff;
}
.btn--primary:hover { background: var(--blue-dark); }
.btn--ghost {
  background: transparent; color: var(--gray-600);
  border: 1px solid var(--gray-200);
}
.btn--ghost:hover { background: var(--gray-100); }
.btn--lg { padding: .8rem 2rem; font-size: .95rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--danger { background: #DC2626; color: #fff; }
.btn--danger:hover { background: #B91C1C; }
.btn--sm { padding: .4rem .85rem; font-size: .78rem; }
.btn--icon {
  padding: .45rem; border-radius: 7px;
  color: var(--gray-600); background: var(--gray-100);
}
.btn--icon:hover { background: var(--gray-200); }

/* ── NAV ────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.nav__inner {
  max-width: 1140px; margin: 0 auto; padding: 0 1.5rem;
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav__logo img { height: 36px; }

/* ── HERO ────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 5rem) 1.5rem 5rem;
  display: flex; align-items: center; justify-content: center; gap: 5rem;
  background: linear-gradient(135deg, #EFF6FF 0%, #FFFFFF 60%);
  max-width: 1140px; margin: 0 auto;
}
.hero__inner { max-width: 520px; }
.hero__label {
  display: inline-block; font-size: .65rem; font-weight: 700;
  letter-spacing: .2em; color: var(--blue-mid); margin-bottom: 1rem;
}
.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 600; line-height: 1.15;
  color: var(--text); margin-bottom: 1.25rem;
}
.hero__title em { font-style: italic; color: var(--blue); }
.hero__sub {
  font-size: 1.05rem; color: var(--text-muted);
  line-height: 1.75; margin-bottom: 2rem;
}
.hero__actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero card visual */
.hero__visual { flex-shrink: 0; }
.hero__card {
  width: 280px; border-radius: 16px;
  background: var(--white); box-shadow: 0 20px 60px rgba(30,64,175,.15);
  overflow: hidden;
}
.hero__card-top { height: 90px; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-mid) 100%); }
.hero__card-body { padding: 1.5rem; text-align: center; }
.hero__card-label { font-size: .6rem; letter-spacing: .2em; color: var(--blue-mid); font-weight: 700; margin-bottom: .5rem; }
.hero__card-names { font-family: 'Playfair Display', serif; font-size: 1.5rem; font-weight: 600; color: var(--text); margin-bottom: .35rem; }
.hero__card-date { font-size: .8rem; color: var(--blue); font-weight: 600; margin-bottom: .25rem; }
.hero__card-venue { font-size: .75rem; color: var(--text-muted); }

/* ── TIPOS ────────────────────────────────────────────── */
.tipos { padding: 5rem 1.5rem; background: var(--gray-50); }
.section-label {
  font-size: .65rem; font-weight: 700; letter-spacing: .2em;
  color: var(--blue-mid); margin-bottom: .75rem;
}
.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 600;
  color: var(--text); margin-bottom: 2.5rem;
}
.tipos__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.25rem;
}
.tipo-card {
  background: var(--white); border-radius: var(--radius);
  padding: 1.75rem 1.25rem; text-align: center;
  border: 2px solid var(--gray-200); transition: all .2s;
}
.tipo-card--active { border-color: var(--blue); }
.tipo-card--soon { opacity: .6; }
.tipo-card__icon { font-size: 2rem; margin-bottom: .75rem; }
.tipo-card__name { font-weight: 600; color: var(--text); margin-bottom: .5rem; }
.tipo-card__badge {
  display: inline-block; font-size: .65rem; font-weight: 700;
  letter-spacing: .08em; padding: .2rem .6rem; border-radius: 99px;
  background: var(--blue-light); color: var(--blue);
}
.tipo-card__badge--soon { background: var(--gray-100); color: var(--gray-400); }

/* ── CTA ────────────────────────────────────────────── */
.cta { padding: 5rem 1.5rem; text-align: center; background: var(--blue); }
.cta__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3vw, 2.2rem); color: #fff;
  margin-bottom: .75rem;
}
.cta__sub { color: rgba(255,255,255,.7); margin-bottom: 2rem; }
.cta .btn--primary { background: #fff; color: var(--blue); }
.cta .btn--primary:hover { background: var(--blue-light); }

/* ── FOOTER ────────────────────────────────────────────── */
.footer { padding: 2rem 1.5rem; text-align: center; border-top: 1px solid var(--gray-200); }
.footer p { font-size: .82rem; color: var(--text-muted); }

/* ── LOGIN ────────────────────────────────────────────── */
.login-page {
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-box {
  background: var(--white); border-radius: 16px;
  padding: 2.5rem; box-shadow: var(--shadow);
}
.login-logo { text-align: center; margin-bottom: 1.5rem; }
.login-logo img { height: 44px; margin: 0 auto; }
.login-title { font-size: 1.4rem; font-weight: 700; color: var(--text); text-align: center; margin-bottom: .35rem; }
.login-sub { font-size: .83rem; color: var(--text-muted); text-align: center; margin-bottom: 1.75rem; }
.login-form { display: flex; flex-direction: column; gap: 1rem; }
.login-back { text-align: center; margin-top: 1.25rem; font-size: .82rem; color: var(--text-muted); }
.login-back a { color: var(--blue); }

/* ── FORMS ────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-size: .8rem; font-weight: 600; color: var(--gray-600); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: .65rem .9rem; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: .9rem; color: var(--text);
  background: var(--white); outline: none; transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus { border-color: var(--blue-mid); }
.input-wrap { position: relative; }
.input-wrap input { padding-right: 2.8rem; width: 100%; }
.btn-eye {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  color: var(--gray-400); padding: .2rem;
}
.btn-eye svg { width: 18px; height: 18px; }
.form-error {
  font-size: .8rem; color: #DC2626; background: #FEF2F2;
  padding: .6rem .85rem; border-radius: 7px; border-left: 3px solid #DC2626;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── APP LAYOUT ────────────────────────────────────────── */
.app-page { display: flex; min-height: 100vh; background: var(--gray-50); }

.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--blue-dark); color: #fff;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 50;
  transition: transform .25s;
}
.sidebar__logo {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar__logo img { height: 32px; filter: brightness(0) invert(1); }
.sidebar__nav { flex: 1; padding: 1rem .75rem; display: flex; flex-direction: column; gap: .25rem; }
.sidebar__link {
  display: flex; align-items: center; gap: .65rem;
  padding: .65rem .85rem; border-radius: 8px;
  font-size: .88rem; font-weight: 500; color: rgba(255,255,255,.7);
  transition: all .15s;
}
.sidebar__link:hover,
.sidebar__link.active { background: rgba(255,255,255,.12); color: #fff; }
.sidebar__link i { width: 17px; height: 17px; }
.sidebar__bottom { padding: 1rem .75rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar__user {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem .5rem .85rem; font-size: .82rem; color: rgba(255,255,255,.8);
  flex-direction: column; text-align: center;
}
.sidebar__user i { width: 32px; height: 32px; color: rgba(255,255,255,.5); }
.sidebar__rol { font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.4); }
.sidebar__logout {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .6rem; border-radius: 8px; font-size: .82rem; font-weight: 500;
  color: rgba(255,255,255,.6); transition: all .15s;
}
.sidebar__logout:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar__logout i { width: 15px; height: 15px; }

.app-main { flex: 1; margin-left: 240px; display: flex; flex-direction: column; min-height: 100vh; }
.app-topbar {
  height: 60px; background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 1rem; padding: 0 1.5rem;
  position: sticky; top: 0; z-index: 40;
}
.app-topbar__title { font-size: 1rem; font-weight: 700; color: var(--text); }
.btn-menu { display: none; color: var(--gray-600); }
.btn-menu i { width: 22px; height: 22px; }
.app-content { padding: 1.75rem; flex: 1; }

/* ── CARDS ────────────────────────────────────────────── */
.card {
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-200); overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100);
}
.card-title { font-size: .9rem; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .5rem; }
.card-body { padding: 1.25rem; }

/* ── TABLE ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; }
thead th {
  text-align: left; padding: .75rem 1rem;
  font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-muted);
  background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
tbody td { padding: .8rem 1rem; border-bottom: 1px solid var(--gray-100); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--gray-50); }
.td-bold { font-weight: 600; color: var(--text); }
.td-gray { color: var(--text-muted); font-size: .8rem; }
.td-actions { display: flex; gap: .4rem; align-items: center; }

/* ── BADGES ────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem; border-radius: 99px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
}
.badge-admin    { background: #EFF6FF; color: var(--blue); }
.badge-cliente  { background: #F0FDF4; color: #166534; }
.badge-active   { background: #F0FDF4; color: #166534; }
.badge-inactive { background: #FEF2F2; color: #DC2626; }

/* ── PAGINATION ────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: .35rem; padding: 1rem 1.25rem; border-top: 1px solid var(--gray-100);
}
.pag-btn {
  min-width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 7px; font-size: .8rem; font-weight: 500; color: var(--gray-600);
  background: var(--gray-100); transition: all .15s;
}
.pag-btn:hover { background: var(--blue-light); color: var(--blue); }
.pag-btn.active { background: var(--blue); color: #fff; }
.pag-btn:disabled { opacity: .4; pointer-events: none; }
.pag-info { font-size: .75rem; color: var(--text-muted); padding: 0 .5rem; }

/* ── MODAL ────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 1rem;
}
.modal {
  background: var(--white); border-radius: 14px;
  width: 100%; max-width: 480px; box-shadow: 0 20px 60px rgba(0,0,0,.2);
  overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: .95rem; font-weight: 700; }
.modal-close { color: var(--gray-400); padding: .25rem; border-radius: 6px; }
.modal-close:hover { background: var(--gray-100); color: var(--text); }
.modal-close i { width: 18px; height: 18px; }
.modal-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: .65rem;
  padding: 1rem 1.25rem; border-top: 1px solid var(--gray-100);
}

/* ── SPINNER ────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px; border: 3px solid var(--gray-200);
  border-top-color: var(--blue); border-radius: 50%;
  animation: spin .7s linear infinite; margin: 1.5rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-full {
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}

/* ── TOAST ────────────────────────────────────────────── */
#toastContainer {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 999;
  display: flex; flex-direction: column; gap: .5rem;
}
.toast {
  min-width: 240px; padding: .8rem 1rem; border-radius: 10px;
  font-size: .84rem; font-weight: 500; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  animation: slideIn .2s ease;
}
.toast--success { background: #166534; }
.toast--error   { background: #DC2626; }
@keyframes slideIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { flex-direction: column; gap: 3rem; text-align: center; }
  .hero__actions { justify-content: center; }
  .hero__visual { display: none; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .app-main { margin-left: 0; }
  .btn-menu { display: flex; }
  .form-row { grid-template-columns: 1fr; }
}
