/* ============================================================
   Latin Events — dark theme
   Recreated from the "Victoria Latin Events" Claude Design board.
   ============================================================ */
:root {
  --bg: #0c0c0e;
  --panel: #141418;
  --panel-2: #161619;
  --field: #0e0e11;
  --border: #26262c;
  --border-2: #2a2a31;
  --border-soft: #1e1e24;
  --text: #f4f4f6;
  --text-soft: #cfcfd6;
  --text-soft-2: #b8b8c0;
  --muted: #8a8a92;
  --muted-2: #6a6a72;
  --accent: #ff0000;
  --radius: 12px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Archivo", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
a { color: inherit; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 8px; border: 3px solid var(--bg); }

@keyframes shFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shPop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

input::placeholder, textarea::placeholder { color: var(--muted-2); }

/* ---------- Top utility bar (auth links) ---------- */
.topbar {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(12, 12, 14, 0.85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 30;
}
.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 11px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.topbar .view-toggle { margin-left: 0; }
.topbar .btn { padding: 9px 18px; font-size: 14px; }
.topbar .brand {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 26px;
  letter-spacing: .5px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text);
}
.topbar nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.topbar nav a:hover { color: var(--text); }
.topbar nav a.active { color: var(--text); }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.container { max-width: 1180px; margin: 0 auto; padding: 28px; }
.narrow { max-width: 560px; margin-left: auto; margin-right: auto; }

/* ---------- Board header ---------- */
.board-header {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 28px 20px;
}
.board-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.board-title h1 {
  font-family: "Anton", sans-serif;
  font-weight: 400;
  font-size: 46px;
  letter-spacing: .5px;
  margin: 0;
  line-height: .95;
  text-transform: uppercase;
}
.board-title p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.search {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.search .icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  color: var(--muted-2); font-size: 14px;
}
.search input {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 16px 11px 38px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
}
.search input:focus { border-color: var(--accent); }

.view-toggle {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}
.view-toggle button {
  display: inline-flex; align-items: center; gap: 7px;
  border: none; border-radius: 999px; padding: 8px 16px;
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; background: transparent; color: #a0a0a8;
}
.view-toggle button.active { background: var(--accent); color: #fff; }

/* ---------- Chips / pill buttons ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); color: var(--text-soft);
  border: 1px solid var(--border-2); border-radius: 999px;
  padding: 10px 18px; font-family: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip.small { padding: 8px 15px; font-size: 13px; }

.chips {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding-top: 2px; animation: shFade .2s ease;
}
.chips .clear {
  background: none; border: none; color: var(--muted);
  font-family: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; padding: 8px 6px; text-decoration: underline;
}

/* ---------- Primary button ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px; justify-content: center;
  background: var(--accent); color: #fff; border: none;
  border-radius: 999px; padding: 13px 22px;
  font-family: inherit; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn .plus { font-size: 19px; line-height: 1; margin-top: -2px; }
.btn.block { width: 100%; }
.btn.secondary { background: #1e1e24; color: var(--text-soft); }
.btn.secondary:hover { filter: brightness(1.15); }
.btn.danger { background: #b00020; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: not-allowed; filter: none; }

/* ---------- Board / grid ---------- */
.board { max-width: 1180px; margin: 0 auto; padding: 0 28px 80px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 26px 22px;
  animation: shFade .3s ease;
}
.list { display: flex; flex-direction: column; gap: 10px; animation: shFade .3s ease; }

/* grid card */
.gcard { display: flex; flex-direction: column; gap: 11px; text-decoration: none; color: inherit; }
.poster {
  display: block; position: relative; aspect-ratio: 1/1; border-radius: 8px;
  overflow: hidden; background: #1a1a1f; text-decoration: none;
}
a.poster { cursor: pointer; }
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
a.poster:hover img { transform: scale(1.04); }
.poster-gen {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  justify-content: space-between; gap: 10px; padding: 18px; overflow: hidden;
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,0), rgba(0,0,0,0) 22px, rgba(0,0,0,.05) 22px, rgba(0,0,0,.05) 23px);
}
.poster-gen .top {
  display: flex; justify-content: space-between; align-items: center;
  font-family: inherit; font-size: 17px; font-weight: 800;
  letter-spacing: 1px; text-transform: uppercase; opacity: .9;
}
.poster-gen .top .cat {
  font-size: 11px; font-weight: 700; letter-spacing: .8px;
  padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.16);
}
.poster-gen .time {
  font-family: inherit; font-size: 13px; font-weight: 700; letter-spacing: .5px;
  opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gcard .meta { display: flex; flex-direction: column; gap: 5px; }
.gcard .date {
  color: var(--accent); font-size: 15px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .6px; margin-bottom: 1px;
}
.gcard .name { font-size: 15px; font-weight: 600; line-height: 1.25; }
a.name { color: inherit; text-decoration: none; cursor: pointer; }
a.name:hover { text-decoration: underline; }
.gcard .venue { color: var(--muted); font-size: 13px; }
.gcard .times { color: var(--text-soft-2); font-size: 12.5px; font-weight: 600; letter-spacing: .2px; }
.gcard .row {
  display: flex; align-items: center; justify-content: space-between; margin-top: 1px;
}
.gcard .price { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.linkout { color: var(--accent); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.linkout:hover { text-decoration: underline; }
.fav { background: none; border: none; cursor: pointer; padding: 4px; font-size: 16px; line-height: 1; }

/* list row */
.lrow {
  display: flex; align-items: center; gap: 16px;
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 12px 16px; text-decoration: none; color: inherit;
}
.lrow:hover { border-color: #2c2c33; }
.lrow .thumb {
  display: block; position: relative; flex: 0 0 auto; width: 74px; height: 74px;
  border-radius: 8px; overflow: hidden; background: #1a1a1f; text-decoration: none;
}
a.thumb { cursor: pointer; }
a.thumb:hover img { transform: scale(1.04); }
.lrow .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease; }
.lrow .thumb .poster-gen { padding: 0; }
.lrow .when { flex: 0 0 96px; display: flex; flex-direction: column; gap: 3px; }
.lrow .when .date { color: var(--accent); font-size: 14px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.lrow .when .times { color: var(--text-soft-2); font-size: 12.5px; font-weight: 600; }
.lrow .body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.lrow .name { font-size: 15px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .venue { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .end { flex: 0 0 auto; display: flex; align-items: center; gap: 18px; }
.lrow .cat-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--text-soft);
  background: var(--border-soft); border: 1px solid #2a2a31; border-radius: 999px;
  padding: 5px 12px; white-space: nowrap;
}
.lrow .price { color: var(--text-soft); font-size: 14px; font-weight: 600; min-width: 58px; text-align: right; }

/* ---------- Empty state ---------- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 90px 20px; text-align: center;
}
.empty .big { font-family: "Anton", sans-serif; font-size: 30px; color: #33333a; text-transform: uppercase; }
.empty p { margin: 0; color: var(--muted-2); max-width: 340px; font-size: 15px; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(6,6,8,.72); backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 20px; overflow-y: auto; z-index: 50; animation: shFade .2s ease;
}
.modal {
  width: 100%; max-width: 540px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 18px; padding: 28px;
  animation: shPop .25s cubic-bezier(.2,.8,.3,1);
}
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-head h2 {
  font-family: "Anton", sans-serif; font-weight: 400; font-size: 26px;
  margin: 0; text-transform: uppercase; letter-spacing: .5px;
}
.modal-close {
  background: var(--border-soft); border: none; color: #a0a0a8;
  width: 34px; height: 34px; border-radius: 999px; font-size: 17px; cursor: pointer;
}

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; height: 200px; border: 2px dashed var(--border-2); border-radius: 12px;
  cursor: pointer; margin-bottom: 20px; overflow: hidden; position: relative; background: var(--field);
}
.dropzone.drag { border-color: var(--accent); background: rgba(255,0,0,.1); }
.dropzone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dropzone .replace {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.8)); color: #fff; font-size: 12px; text-align: center;
}
.dropzone .ic { font-size: 30px; color: #5a5a62; }
.dropzone .t1 { font-size: 14px; font-weight: 600; color: #d4d4da; }
.dropzone .t2 { font-size: 12px; color: var(--muted-2); }
.dropzone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.field-grid { display: flex; flex-direction: column; gap: 14px; }
.row3 { display: flex; gap: 12px; }
.flabel {
  font-size: 12px; font-weight: 700; color: #9a9aa2;
  text-transform: uppercase; letter-spacing: .8px; margin-bottom: 7px;
}
.modal input, .modal select, .panel input, .panel textarea, input, textarea, select {
  width: 100%; background: var(--field); border: 1px solid var(--border-2);
  color: var(--text); border-radius: 10px; padding: 12px 14px;
  font-family: inherit; font-size: 14px; outline: none; color-scheme: dark;
}
.modal input:focus, .modal select:focus, .panel input:focus, .panel textarea:focus,
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
.modal select { cursor: pointer; }
.checkline {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 4px;
  cursor: pointer; font-size: 14px; color: #d4d4da; user-select: none; white-space: nowrap;
}
.checkline input { width: 17px; height: 17px; accent-color: var(--accent); cursor: pointer; }
.modal-actions { display: flex; gap: 12px; margin-top: 26px; }
.modal-hint { margin: 12px 0 0; font-size: 12px; color: #5a5a62; text-align: center; }

/* ---------- Forms (account/admin pages) ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
}
.section-title { font-family: "Anton", sans-serif; font-weight: 400; font-size: 30px; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 .25rem; }
label { display: block; }
.panel label { font-weight: 600; margin: 1rem 0 .35rem; color: var(--text-soft); }
textarea { min-height: 110px; resize: vertical; }
.hint { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.form-actions { margin-top: 1.5rem; display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* ---------- Messages ---------- */
.msg { padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; font-weight: 600; }
.msg.error { background: rgba(176,0,32,.16); color: #ff9aa6; }
.msg.success { background: rgba(15,138,95,.18); color: #7ce0bd; }
.msg.info { background: rgba(245,184,0,.14); color: #f3cf7a; }
.config-warning { background: rgba(245,184,0,.14); color: #f3cf7a; padding: .85rem 1.25rem; text-align: center; font-size: .95rem; }
.config-warning code { background: rgba(255,255,255,.08); padding: .05rem .35rem; border-radius: 5px; }

/* ---------- Status pills + admin rows ---------- */
.pill {
  display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase;
  padding: .18rem .6rem; border-radius: 999px; letter-spacing: .03em;
}
.pill.pending { background: rgba(245,184,0,.16); color: #f3cf7a; }
.pill.approved { background: rgba(15,138,95,.18); color: #7ce0bd; }
.pill.rejected { background: rgba(176,0,32,.16); color: #ff9aa6; }

/* Category manager (admin) */
.cat-add { display: flex; gap: .5rem; margin: .85rem 0 .25rem; max-width: 480px; }
.cat-add input { flex: 1; }
.cat-row { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; max-width: 480px; }
.cat-row .cat-name { flex: 1; }

.admin-row {
  background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem;
  display: flex; gap: 1.1rem; align-items: flex-start;
}
.admin-row img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: #1a1a1f; }
.admin-row .meta { flex: 1; min-width: 0; }
.admin-row .loc { color: var(--muted); font-size: .9rem; }
.admin-row .desc { color: var(--text-soft-2); font-size: .95rem; }
.admin-row .row-actions { display: flex; gap: .5rem; flex-shrink: 0; flex-wrap: wrap; }

@media (max-width: 600px) {
  .topbar .brand { font-size: 19px; }
  .topbar-inner, .board-header, .board { padding-left: 18px; padding-right: 18px; }
  .row3 { flex-wrap: wrap; }
  .row3 > * { flex: 1 1 auto !important; width: auto !important; }
  .lrow .when { flex-basis: 80px; }
  .admin-row { flex-direction: column; }
  .admin-row img { width: 100%; height: 160px; }
}
