@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --lx-blue: #1a73e8;
  --lx-blue-deep: #1557c0;
  --lx-blue-bright: #4da3ff;
  --lx-blue-soft: #e8f2ff;
  --lx-bg: #f4f7fb;
  --lx-card: #ffffff;
  --lx-ink: #1f2937;
  --lx-night: #1a73e8;
  --lx-deep: #111827;
  --lx-surface: #ffffff;
  --lx-muted: #6b7280;
  --lx-line: #e6ebf2;
  --lx-line-strong: #d5dee9;
  --lx-teal: #1a73e8;
  --lx-aqua: #4da3ff;
  --lx-emerald: #059669;
  --lx-gold: #1a73e8;
  --lx-gold-deep: #1557c0;
  --lx-cream: #f4f7fb;
  --lx-paper: #ffffff;
  --lx-warn: #d97706;
  --lx-danger: #dc2626;
  --lx-ok: #059669;
  --lx-ok-bg: #d1fae5;
  --lx-radius: 12px;
  --lx-radius-lg: 16px;
  --lx-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 28px rgba(16, 24, 40, 0.06);
  --lx-glow-gold: none;
  --font-display: Inter, system-ui, sans-serif;
  --font-body: Inter, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --bh-sidebar: 260px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--lx-ink);
  background: var(--lx-bg);
  min-height: 100vh;
}

.brand-mark,
.brand-hero {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--lx-deep);
}

.brand-hero {
  font-size: clamp(2rem, 6vw, 2.6rem);
  margin: 0;
  line-height: 1.05;
  color: var(--lx-deep);
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lx-blue);
  background: var(--lx-blue-soft);
  border: 0;
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  margin-bottom: 0.75rem;
}

.brand-orb {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: inline-block;
  background: linear-gradient(135deg, var(--lx-blue), var(--lx-blue-bright));
}

/* ── Shell BanaHost ── */
.bh-body {
  display: flex;
  min-height: 100vh;
  background: var(--lx-bg);
}

.bh-sidebar {
  width: var(--bh-sidebar);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--lx-line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 1040;
}

.bh-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.15rem 1.15rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--lx-line);
}

.bh-logo {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--lx-blue), var(--lx-blue-bright));
  font-size: 1.05rem;
  flex-shrink: 0;
}

.bh-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.bh-brand-text strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #111827;
}

.bh-brand-text small {
  color: var(--lx-muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.bh-nav {
  padding: 0.85rem 0.75rem 1.5rem;
}

.bh-nav-title {
  margin: 0.85rem 0.65rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa3b2;
}

.bh-nav-title:first-child { margin-top: 0.2rem; }

.bh-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  color: #4b5563;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}

.bh-nav-link i {
  font-size: 1.05rem;
  color: #7b8794;
  width: 1.15rem;
  text-align: center;
}

.bh-nav-link:hover {
  background: #f5f8fc;
  color: var(--lx-blue);
}

.bh-nav-link:hover i { color: var(--lx-blue); }

.bh-nav-link.is-active {
  background: var(--lx-blue-soft);
  color: var(--lx-blue);
}

.bh-nav-link.is-active i { color: var(--lx-blue); }

.bh-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.bh-topbar {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid var(--lx-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 1.25rem;
  position: sticky;
  top: 0;
  z-index: 30;
}

.bh-topbar-end {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.bh-hello {
  font-weight: 600;
  color: #374151;
  font-size: 0.92rem;
}

.bh-menu-btn,
.bh-btn-ghost {
  border: 1px solid var(--lx-line);
  background: #fff;
  color: #374151;
  border-radius: 10px;
  padding: 0.35rem 0.7rem;
  font-weight: 600;
}

.bh-menu-btn { font-size: 1.25rem; line-height: 1; }

.bh-btn-ghost:hover,
.bh-menu-btn:hover {
  border-color: #c9d6e8;
  color: var(--lx-blue);
}

.bh-content {
  padding: 1.35rem 1.75rem 2.4rem;
  width: 100%;
}

.bh-scrim {
  display: none;
}

@media (max-width: 991.98px) {
  .bh-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: none;
  }
  .bh-body.is-nav-open .bh-sidebar {
    transform: none;
    box-shadow: 8px 0 32px rgba(16, 24, 40, 0.18);
  }
  .bh-scrim {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 1035;
  }
  .bh-scrim[hidden] { display: none !important; }
}

/* ── Hero banner ── */
.bh-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(90deg, #1a6fe8 0%, #2d86f2 48%, #5ba3ff 100%);
  color: #fff;
  border-radius: var(--lx-radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.15rem;
  box-shadow: 0 12px 28px rgba(26, 115, 232, 0.22);
}

.bh-hero h1 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.bh-hero p {
  margin: 0.25rem 0 0;
  opacity: 0.92;
  font-size: 0.95rem;
}

.bh-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.bh-hero .form-control,
.bh-hero .form-label {
  color: #fff;
}

.bh-hero .form-label { opacity: 0.9; font-size: 0.78rem; }

.bh-hero .form-control {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.bh-hero .form-control:focus {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18);
}

.bh-hero .btn-light {
  font-weight: 700;
  color: var(--lx-blue);
}

/* ── Buttons ── */
.btn-lotix {
  background: var(--lx-blue);
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(26, 115, 232, 0.28);
}

.btn-lotix:hover,
.btn-lotix:focus {
  background: var(--lx-blue-deep);
  color: #fff;
}

.btn-gold {
  background: var(--lx-blue);
  border: 0;
  color: #fff;
  font-weight: 700;
  border-radius: 10px;
}

.bh-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  background: #fff;
  border: 1px solid var(--lx-line-strong);
  color: var(--lx-blue);
  font-weight: 700;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  text-decoration: none;
}

.bh-btn-outline:hover {
  border-color: var(--lx-blue);
  color: var(--lx-blue-deep);
  background: #f8fbff;
}

/* ── Login / Guest ── */
.guest-body {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(77, 163, 255, 0.45), transparent 55%),
    radial-gradient(780px 480px at 95% 15%, rgba(21, 87, 192, 0.35), transparent 50%),
    radial-gradient(640px 420px at 70% 110%, rgba(26, 115, 232, 0.28), transparent 55%),
    linear-gradient(155deg, #0b2a5c 0%, #1456b8 42%, #1a73e8 72%, #4da3ff 100%);
}

.guest-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.guest-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}

.guest-shell::after {
  content: "00  17  42  68  99";
  position: absolute;
  left: 6%;
  bottom: 8%;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.12);
  pointer-events: none;
  white-space: nowrap;
}

.guest-panel {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 20px;
  padding: 2rem 1.85rem 1.85rem;
  box-shadow:
    0 24px 60px rgba(8, 32, 78, 0.35),
    0 0 0 1px rgba(26, 115, 232, 0.06);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
  animation: guest-panel-in 0.45s ease-out;
}

.guest-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 1.25rem;
  right: 1.25rem;
  height: 4px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(90deg, #1557c0, #1a73e8, #4da3ff);
}

@keyframes guest-panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.guest-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}

.guest-brand .bh-logo {
  width: 2.6rem;
  height: 2.6rem;
  font-size: 1.2rem;
  box-shadow: 0 10px 22px rgba(26, 115, 232, 0.35);
}

.guest-brand .brand-hero {
  font-size: 1.65rem;
  color: #0f172a;
}

.guest-tagline {
  color: var(--lx-muted);
  margin: 0.15rem 0 0;
  font-size: 0.92rem;
}

.guest-form .form-label {
  font-weight: 600;
  color: #334155;
  font-size: 0.9rem;
}

.guest-form .form-control {
  border-radius: 12px;
  border-color: #d7e2f0;
  background: #f5f8fc;
  padding: 0.7rem 0.9rem;
}

.guest-form .form-control:focus {
  border-color: var(--lx-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.16);
}

.guest-pass {
  position: relative;
}

.guest-pass .form-control {
  padding-right: 3rem;
}

.guest-pass-toggle {
  position: absolute;
  right: 0.35rem;
  bottom: 0.35rem;
  width: 2.45rem;
  height: 2.45rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.guest-pass-toggle:hover,
.guest-pass-toggle:focus-visible {
  color: var(--lx-blue);
  background: rgba(26, 115, 232, 0.08);
  outline: none;
}

.guest-form .btn-lotix {
  margin-top: 0.35rem;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  font-size: 1.02rem;
  box-shadow: 0 12px 28px rgba(26, 115, 232, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.guest-form .btn-lotix:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(26, 115, 232, 0.4);
}

/* ── Dashboard cards ── */
.dash-hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.dash-action {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  text-decoration: none;
  color: var(--lx-ink) !important;
  background: #fff;
  border-radius: var(--lx-radius);
  padding: 1.1rem 1.15rem;
  min-height: 118px;
  border: 1px solid var(--lx-line);
  box-shadow: var(--lx-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dash-action:hover {
  transform: translateY(-2px);
  border-color: #c9d8ee;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.08);
  color: var(--lx-ink);
}

.dash-action-icon {
  font-size: 1.35rem;
  margin-bottom: 0.45rem;
  color: var(--lx-blue);
}

.dash-action-title {
  display: block;
  font-size: 1.02rem;
  font-weight: 700;
}

.dash-action-desc {
  font-size: 0.82rem;
  color: var(--lx-muted);
}

.dash-action--pos {
  border-color: #bfd6f8;
  background: linear-gradient(180deg, #f4f9ff, #fff);
}

.lx-sorteo-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lx-muted);
  margin-bottom: 0.6rem;
}

.lx-sorteo-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.lx-sorteo-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: left;
  text-decoration: none;
  background: var(--lx-paper);
  border: 1px solid var(--lx-line);
  border-radius: 12px;
  padding: 0.7rem 0.65rem 0.75rem;
  min-height: 6rem;
  color: var(--lx-ink);
  box-shadow: var(--lx-shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lx-sorteo-card:hover {
  border-color: #bfd6f8;
  color: var(--lx-ink);
}

.lx-sorteo-card.is-active {
  border-color: var(--lx-blue);
  background: #f5f9ff;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.lx-sorteo-icon { font-size: 1.1rem; color: var(--lx-blue); line-height: 1; }
.lx-sorteo-name {
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
}
.lx-sorteo-meta { font-size: 0.72rem; color: var(--lx-muted); font-weight: 600; }
.lx-sorteo-factor {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lx-blue);
}

@media (max-width: 520px) {
  .lx-sorteo-cards { grid-template-columns: 1fr; }
}

.dash-block {
  background: #fff;
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius-lg);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--lx-shadow);
}

.dash-block h2,
.dash-block .h6 {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lx-config-highlight {
  border: 1px solid #bfd6f8;
  background: #f7fbff;
}

.lx-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--lx-blue-soft);
  color: var(--lx-blue);
  border: 0;
}

.lx-pill-gold {
  background: var(--lx-ok-bg);
  color: #047857;
}

.stat-card {
  background: #fff;
  border: 1px solid var(--lx-line);
  border-radius: var(--lx-radius-lg);
  padding: 1.1rem 1rem;
  text-align: left;
  box-shadow: var(--lx-shadow);
}

.stat-card .label {
  color: var(--lx-muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.stat-card .value {
  font-weight: 800;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  color: var(--lx-deep);
  margin-top: 0.25rem;
  letter-spacing: -0.03em;
}

.bh-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bh-empty {
  color: var(--lx-muted);
  text-align: center;
  padding: 1.4rem 0.5rem;
  margin: 0;
}

.table > :not(caption) > * > * { background: transparent; }

.table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lx-muted);
  border-bottom-color: var(--lx-line);
  font-weight: 700;
}

.badge.text-bg-success { background: var(--lx-ok) !important; }
.badge.text-bg-warning { background: var(--lx-warn) !important; color: #111 !important; }
.badge.text-bg-danger { background: var(--lx-danger) !important; }

.form-control, .form-select {
  border-radius: 10px;
  border-color: var(--lx-line-strong);
}

.form-control:focus, .form-select:focus {
  border-color: var(--lx-blue);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
}

.alert {
  border-radius: 12px;
  border: 0;
  font-weight: 500;
}

.app-nav { display: none; }

@media print {
  .bh-sidebar, .bh-topbar, .bh-scrim, .d-print-none { display: none !important; }
  .bh-body { display: block; background: #fff; }
  .bh-content { max-width: none; padding: 0; }
  .dash-block, .stat-card, .bh-hero {
    background: #fff !important;
    color: #111 !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    break-inside: avoid;
  }
  .bh-hero p, .bh-hero h1, .bh-hero-pill { color: #111 !important; }
  a { color: #111 !important; text-decoration: none !important; }
}
