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

:root {
  --bg: #0f0f14;
  --bg2: #16161e;
  --bg3: #1e1e2a;
  --border: #2a2a3a;
  --accent: #c4903a;
  --accent2: #a87830;
  --text: #e8e8f0;
  --text-dim: #888899;
  --success: #4ecb8d;
  --danger: #e05555;
  --warning: #e0a040;
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* Navbar */
.navbar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  display: flex; align-items: center; height: 54px; gap: 1rem;
}
.navbar-brand { font-size: 1rem; font-weight: 600; color: var(--text); }
.navbar-brand span { color: var(--accent); }
.navbar-spacer { flex: 1; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 1rem; border: none; border-radius: 4px;
  font-size: 0.82rem; font-weight: 500; cursor: pointer;
  letter-spacing: 0.01em; transition: opacity 0.15s, background 0.15s; white-space: nowrap;
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.76rem; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1.2rem; }
label { display: block; font-size: 0.78rem; color: var(--text-dim); margin-bottom: 0.35rem; letter-spacing: 0.02em; text-transform: uppercase; }
input[type=text], input[type=password], input[type=number] {
  width: 100%; background: var(--bg3); border: 1px solid var(--border); color: var(--text);
  padding: 0.55rem 0.85rem; border-radius: 4px; font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.15s;
}
input:focus { border-color: var(--accent); }
input::placeholder { color: rgba(232,232,240,0.3); }

/* Cards */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }

/* Page shell */
.page { padding: 2rem 0; }
.page-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; }
.page-title { font-size: 1.3rem; font-weight: 600; }

/* Login */
.login-wrap { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 100vh; gap: 1rem; }
.login-card { width: 100%; max-width: 360px; }
.login-back {
  display: block; width: 100%; max-width: 360px; padding: 0.85rem 1.5rem;
  background: var(--bg2); border: 1px solid var(--border); border-radius: 8px;
  font-size: 0.95rem; font-weight: 500; color: var(--text); text-align: center;
  letter-spacing: 0.01em; transition: border-color 0.2s, background 0.2s;
}
.login-back:hover { border-color: var(--accent); background: var(--bg); text-decoration: none; }
.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { font-size: 1.5rem; font-weight: 700; }
.login-logo h1 span { color: var(--accent); }
.login-logo p { color: var(--text-dim); font-size: 0.85rem; margin-top: 0.3rem; }
#login-error { color: var(--danger); font-size: 0.85rem; margin-top: 0.5rem; min-height: 1.2rem; }

/* Lista de eventos */
.ev-grid { display: flex; flex-direction: column; gap: 0.75rem; }
.ev-card {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 6px;
  padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: 0.5rem;
}
.ev-card-main { display: flex; align-items: baseline; gap: 0.6rem; flex-wrap: wrap; }
.ev-title { font-weight: 600; font-size: 1rem; }
.ev-pin { font-size: 0.75rem; color: var(--warning); font-family: ui-monospace, monospace; }
.ev-meta { font-size: 0.78rem; color: var(--text-dim); }
.ev-count { color: var(--accent); }
.ev-actions { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }

.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-dim); }
.empty-state p { font-size: 1.05rem; margin-bottom: 1.5rem; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 0.8rem 1.2rem; border-radius: 6px; font-size: 0.88rem; max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4); animation: slideIn 0.2s ease;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 1.5rem; width: 100%; max-width: 420px; }
.modal h3 { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.modal-actions { display: flex; gap: 0.5rem; justify-content: flex-end; margin-top: 1.5rem; }

/* QR / compartir */
.share-link {
  display: flex; gap: 0.5rem; margin-top: 1rem;
}
.share-link input { flex: 1; font-size: 0.82rem; }
.qr-box { text-align: center; margin: 1rem 0; }
.qr-box img { width: 240px; height: 240px; background: #fff; border-radius: 8px; padding: 8px; }
