/* HEXORALEAGUE — hoja de estilos (estética Proxink: oscuro + dorado) */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Manrope', system-ui, sans-serif;
  color: #eceef4;
  background: #0c0e13;
  min-height: 100vh;
}
a { color: #d4af37; text-decoration: none; }
a:hover { color: #e8cd7e; }
input, button, textarea, select { font-family: inherit; }
input::placeholder, textarea::placeholder { color: #5f6676; }
::selection { background: rgba(212,175,55,0.32); }
h1, h2, h3 { font-family: 'Cinzel', serif; color: #f5f0e2; }
.cinzel { font-family: 'Cinzel', serif; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 28px;
  background: rgba(12,14,19,0.9); backdrop-filter: blur(14px);
  border-bottom: 1px solid #1c1f28;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(184,145,46,0.35)); }
.brand-txt { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: 'Cinzel', serif; font-weight: 700; font-size: 18px; letter-spacing: 0.5px; color: #f5f0e2; }
.brand-tag { font-size: 9.5px; letter-spacing: 2px; text-transform: uppercase; color: #d4af37; font-weight: 700; margin-top: 3px; }
.topnav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topnav > a { font-weight: 700; font-size: 14px; color: #b9c0cd; padding: 8px 12px; border-radius: 10px; }
.topnav > a:hover { background: #1c212c; color: #f5f0e2; }
.topnav > a.active { color: #f5f0e2; }
.btn-ghost { border: 1px solid #313746; background: #1c212c; color: #d3d8e2 !important; font-size: 13.5px !important; }
.btn-ghost:hover { border-color: #d4af37; }
.btn-gold { background: linear-gradient(135deg,#e8cd7e,#c9a24a); color: #14161c !important; font-weight: 800 !important; box-shadow: 0 6px 16px rgba(201,162,74,0.22); }

.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 12px; margin-left: 4px; border-left: 1px solid #262b37; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: #14161c; }
.avatar.admin { background: linear-gradient(150deg,#c9a0ec,#9a5fd0); }
.avatar.judge { background: linear-gradient(150deg,#e8cd7e,#b8912e); }
.user-meta { display: flex; flex-direction: column; line-height: 1.15; }
.user-name { font-weight: 800; font-size: 13px; color: #f5f0e2; }
.user-role { font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.user-role.admin { color: #b47ce8; }
.user-role.judge { color: #57c98a; }
.logout { font-size: 13px; color: #8b93a3 !important; font-weight: 700; padding: 6px 8px; }
.logout:hover { color: #e07d7d !important; }

/* ---------- Page ---------- */
.page { max-width: 1080px; width: 100%; margin: 0 auto; padding: 40px 28px 90px; }
.page.narrow { max-width: 840px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.kicker { font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: #d4af37; font-weight: 700; margin-bottom: 8px; }
.page h1 { font-weight: 700; font-size: 34px; margin: 0 0 6px; }
.muted { color: #9aa1b2; font-size: 15px; max-width: 640px; margin: 0; line-height: 1.55; }
.small-muted { color: #8b93a3; font-size: 13px; }
.backlink { display: inline-block; border: 1px solid #313746; background: #1c212c; color: #b9c0cd; font-weight: 700; padding: 8px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 18px; }
.backlink:hover { border-color: #3a4152; color: #f5f0e2; }

/* ---------- Flash ---------- */
.flash { padding: 12px 0; font-weight: 700; font-size: 14px; }
.flash .wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }
.flash.ok { background: rgba(87,201,138,0.1); color: #57c98a; border-bottom: 1px solid rgba(87,201,138,0.25); }
.flash.err { background: rgba(224,102,102,0.1); color: #e07d7d; border-bottom: 1px solid rgba(224,102,102,0.25); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 18px; }
.card { background: #161922; border: 1px solid #262b37; border-radius: 18px; padding: 22px; box-shadow: 0 8px 22px rgba(0,0,0,0.25); }
.card.pad { padding: 24px 26px; }
.ev-card { position: relative; overflow: hidden; display: block; }
.ev-card:hover { transform: translateY(-3px); border-color: #3a4152; box-shadow: 0 16px 34px rgba(0,0,0,0.4); }
.ev-card .accent { position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#e8cd7e,#c9a24a); }
.ev-card .body { padding-left: 8px; }
.ev-card h3 { font-size: 22px; margin: 6px 0 0; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; align-items: flex-start; }
.spacer { flex: 1; }

.badge { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.badge.upcoming { background: rgba(212,175,55,0.16); color: #e8cd7e; }
.badge.finished { background: rgba(63,127,184,0.18); color: #7fb2e0; }
.badge.pending { background: rgba(212,175,55,0.16); color: #e8cd7e; }
.badge.approved { background: rgba(87,201,138,0.16); color: #57c98a; }
.badge.rejected { background: rgba(224,102,102,0.12); color: #e07d7d; }
.badge.admin { background: rgba(154,95,208,0.16); color: #b47ce8; }
.badge.judge { background: rgba(87,201,138,0.14); color: #57c98a; }
.tag { font-size: 12.5px; font-weight: 800; padding: 6px 12px; border-radius: 10px; background: #232834; color: #9aa1b2; }
.tag.gold { background: rgba(212,175,55,0.14); color: #e8cd7e; }
.tag.green { background: rgba(87,201,138,0.14); color: #57c98a; }
.tag.red { background: rgba(224,102,102,0.12); color: #e07d7d; }

/* ---------- Forms ---------- */
label.field { display: block; font-weight: 800; font-size: 13px; color: #d3d8e2; margin-bottom: 7px; }
.input, input[type=text], input[type=email], input[type=password], input[type=date], textarea, select {
  width: 100%; border: 1px solid #2c313d; border-radius: 12px; padding: 12px 14px;
  font-size: 14.5px; outline: none; background: #12151d; color: #eceef4;
}
input[type=date] { color-scheme: dark; }
.input:focus, input:focus, textarea:focus, select:focus { border-color: #d4af37; }
textarea { resize: vertical; line-height: 1.6; }
.mb { margin-bottom: 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.btn { border: none; cursor: pointer; background: linear-gradient(135deg,#e8cd7e,#c9a24a); color: #14161c; font-weight: 800; font-size: 15px; padding: 13px 24px; border-radius: 13px; box-shadow: 0 10px 24px rgba(201,162,74,0.25); }
.btn:hover { transform: translateY(-1px); }
.btn.sm { font-size: 13px; padding: 10px 18px; border-radius: 11px; box-shadow: none; }
.btn.green { background: linear-gradient(135deg,#7fd6a0,#4fae78); color: #0e1a13; }
.btn.block { width: 100%; text-align: center; }
.btn.disabled, .btn:disabled { background: #232834; color: #8b93a3; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-secondary { border: 1px solid #313746; background: #1c212c; cursor: pointer; color: #b9c0cd; font-weight: 700; font-size: 14px; padding: 13px 20px; border-radius: 12px; }
.btn-secondary:hover { border-color: #3a4152; color: #f5f0e2; }
.btn-danger { border: 1px solid #313746; background: #1c212c; cursor: pointer; color: #b9c0cd; font-weight: 700; font-size: 12.5px; padding: 8px 13px; border-radius: 10px; }
.btn-danger:hover { border-color: #e07d7d; color: #e07d7d; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.err-msg { color: #e07d7d; font-size: 13px; font-weight: 700; margin-top: 12px; }

/* ---------- Login ---------- */
.login-wrap { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.login-hero { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 25% 15%, #1c2130 0%, #0c0e13 65%); display: flex; flex-direction: column; justify-content: space-between; padding: 52px; border-right: 1px solid #1c1f28; }
.login-hero .glow { position: absolute; top: -120px; right: -120px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(212,175,55,0.16), transparent 70%); }
.login-hero .logo { display: flex; align-items: center; gap: 13px; position: relative; }
.login-hero .logo img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 6px 16px rgba(184,145,46,0.4)); }
.login-hero .logo span { font-family: 'Cinzel', serif; font-weight: 700; font-size: 24px; color: #f5f0e2; letter-spacing: 1px; }
.login-hero .big { font-family: 'Cinzel', serif; font-size: 40px; line-height: 1.18; color: #f5f0e2; font-weight: 700; max-width: 480px; position: relative; }
.login-hero .big-kick { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: #d4af37; font-weight: 700; margin-bottom: 18px; position: relative; }
.login-hero p { color: #9aa1b2; font-size: 16px; max-width: 420px; margin-top: 18px; line-height: 1.6; position: relative; }
.login-hero .chips { display: flex; gap: 9px; flex-wrap: wrap; position: relative; }
.login-hero .chips span { font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: #6f7686; border: 1px solid #2c313d; border-radius: 999px; padding: 6px 12px; }
.login-form-side { display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-box { width: 100%; max-width: 360px; }
.login-box h1 { font-size: 30px; margin: 0 0 6px; }
.center-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px; background: radial-gradient(120% 90% at 50% 0%, #1c2130 0%, #0c0e13 60%); }
.center-box { width: 100%; max-width: 400px; background: #161922; border: 1px solid #2f3646; border-radius: 20px; padding: 32px; box-shadow: 0 30px 70px rgba(0,0,0,0.5); }

/* ---------- Stars ---------- */
.stars { display: inline-flex; align-items: center; gap: 2px; line-height: 1; }
.stars .star { color: #3a4152; }
.stars .star.on { color: #e8cd7e; }
.stars-form { display: inline-block; }
.star-btn { background: none; border: none; cursor: pointer; padding: 0 1px; color: #3a4152; line-height: 1; }
.star-btn.on { color: #e8cd7e; }
.star-btn:hover { color: #e8cd7e; }

/* ---------- Assignment ficha ---------- */
.ficha { background: linear-gradient(150deg,#1b1f2b,#14161d); border: 1px solid #2f3646; border-radius: 20px; padding: 4px; box-shadow: 0 16px 40px rgba(0,0,0,0.4); }
.ficha .inner { border-radius: 17px; overflow: hidden; }
.ficha .head { background: linear-gradient(135deg,#e8cd7e,#c9a24a); padding: 22px 26px; color: #14161c; }
.ficha .head .k { font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; opacity: 0.75; }
.ficha .head .pos { font-family: 'Cinzel', serif; font-weight: 700; font-size: 30px; margin-top: 4px; }
.ficha .fns { padding: 24px 26px; }
.fn-item { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.fn-item .chk { flex-shrink: 0; width: 22px; height: 22px; border-radius: 7px; background: rgba(212,175,55,0.15); color: #e8cd7e; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; margin-top: 1px; }
.fn-item span.txt { color: #cfd4de; font-size: 14.5px; line-height: 1.55; }

/* ---------- Meals ---------- */
.meal-block { margin-bottom: 18px; }
.meal-title { font-weight: 800; font-size: 14px; color: #d3d8e2; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.lock-pill { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; color: #e8cd7e; background: rgba(212,175,55,0.14); padding: 2px 8px; border-radius: 999px; }
.meal-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; }
.meal-opt { position: relative; }
.meal-opt input { position: absolute; opacity: 0; pointer-events: none; }
.meal-opt label { display: block; cursor: pointer; text-align: center; border: 2px solid #2c313d; background: #12151d; border-radius: 13px; padding: 15px 10px; font-weight: 800; font-size: 14px; color: #cfd4de; }
.meal-opt input:checked + label { border-color: #d4af37; background: rgba(212,175,55,0.10); color: #e8cd7e; }
.meal-opt.locked label { cursor: default; opacity: 0.5; }
.meal-opt.locked input:checked + label { opacity: 1; }
.info-box { font-size: 12.5px; color: #6f7686; background: #12151d; border: 1px dashed #2c313d; border-radius: 11px; padding: 11px 14px; line-height: 1.5; margin-top: 16px; }

/* ---------- Applications (org) ---------- */
.app-card { margin-bottom: 16px; }
.app-avatar { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #232834; color: #d4af37; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; }
.note-quote { margin-top: 12px; background: #12151d; border-left: 3px solid #2c313d; border-radius: 0 10px 10px 0; padding: 10px 14px; color: #cfd4de; font-size: 13.5px; line-height: 1.5; }
.private-box { margin-top: 16px; background: #12151d; border: 1px solid #262b37; border-radius: 14px; padding: 14px 16px; }
.private-tag { font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: #b47ce8; background: rgba(154,95,208,0.16); padding: 3px 9px; border-radius: 999px; }
.divider { border-top: 1px solid #262b37; margin-top: 16px; padding-top: 16px; }
.section-label { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: #8b93a3; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-top: 20px; }
.tile { background: #161922; border: 1px solid #262b37; border-radius: 15px; padding: 16px 18px; }
.tile .n { font-family: 'Cinzel', serif; font-size: 26px; margin-top: 4px; }
.inline-form { display: inline; }
.empty { text-align: center; padding: 50px 20px; background: #12151d; border: 2px dashed #2c313d; border-radius: 18px; color: #8b93a3; }

/* email preview */
.email-card { background: #12151d; border: 1px solid #2f3646; border-radius: 16px; overflow: hidden; margin-bottom: 18px; }
.email-card .top { background: rgba(87,201,138,0.1); border-bottom: 1px solid rgba(87,201,138,0.25); padding: 12px 18px; }
.email-card .top .t { font-weight: 800; font-size: 13.5px; color: #57c98a; }
.email-card .body { padding: 18px; font-size: 13.5px; color: #cfd4de; line-height: 1.7; white-space: pre-wrap; }

.day-choices { display: flex; gap: 8px; }
.day-choices label { flex: 1; }
.day-choices input { position: absolute; opacity: 0; pointer-events: none; }
.day-choices label span { display: block; cursor: pointer; text-align: center; border: 2px solid #2c313d; background: #12151d; color: #9aa1b2; font-weight: 800; font-size: 14px; padding: 11px; border-radius: 12px; }
.day-choices input:checked + span { border-color: #d4af37; background: rgba(212,175,55,0.08); color: #e8cd7e; }

.pos-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pos-choice input { position: absolute; opacity: 0; pointer-events: none; }
.pos-choice label { display: block; cursor: pointer; border: 2px solid #2c313d; background: #12151d; border-radius: 14px; padding: 16px; }
.pos-choice label .nm { font-weight: 800; font-size: 16px; color: #f5f0e2; }
.pos-choice label .ds { font-size: 12.5px; color: #9aa1b2; margin-top: 4px; line-height: 1.5; }
.pos-choice input:checked + label { border-color: #d4af37; background: rgba(212,175,55,0.08); }

.meal-builder { background: #12151d; border: 1px solid #262b37; border-radius: 14px; padding: 14px 15px; margin-bottom: 14px; }
.mini-label { font-weight: 800; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: #8b93a3; margin-bottom: 6px; display: block; }

.stack { display: flex; flex-direction: column; }
.stack.g10 { gap: 10px; }
.stack.g12 { gap: 12px; }
.stack.g16 { gap: 16px; }
.stack.g18 { gap: 18px; }

@media (max-width: 820px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .two-col, .pos-choices { grid-template-columns: 1fr; }
}
