﻿@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg:       #07070f;
  --bg2:      #0d0d1c;
  --surface:  #111128;
  --gold:     #d4af37;
  --gold-l:   #f5d76e;
  --gold-d:   #a68822;
  --red:      #c41e3a;
  --green:    #00c853;
  --text:     #f0f0ff;
  --muted:    #8888aa;
  --border:   rgba(212,175,55,.22);
  --border2:  rgba(255,255,255,.07);
  --glow:     0 0 28px rgba(212,175,55,.22);
  --shadow:   0 16px 48px rgba(0,0,0,.75);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter','Segoe UI',sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
h1,h2,h3 { font-family: 'Playfair Display',Georgia,serif; }
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--gold-d); border-radius: 3px; }

/* LAYOUT */
.container { width: min(1140px, calc(100% - 2rem)); margin: 0 auto; }
.row { display: flex; } .between { justify-content: space-between; }
.center { align-items: center; } .gap { gap: .7rem; } .wrap { flex-wrap: wrap; }

/* HERO */
.hero {
  position: relative; overflow: hidden;
  padding: 3.8rem 0 2.8rem;
  background: radial-gradient(ellipse 80% 55% at 50% 0%, rgba(212,175,55,.13) 0%, transparent 65%),
              linear-gradient(180deg, #0c0c22 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 52px, rgba(212,175,55,.03) 52px, rgba(212,175,55,.03) 53px),
    repeating-linear-gradient(90deg, transparent, transparent 52px, rgba(212,175,55,.03) 52px, rgba(212,175,55,.03) 53px);
  pointer-events: none;
}
.hero-inner { position: relative; text-align: center; }
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #07070f; font-size: .7rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase;
  padding: .28rem 1rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.hero-inner h1 {
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1;
  letter-spacing: -.02em; margin-bottom: .8rem;
  background: linear-gradient(135deg, #fff 0%, var(--gold) 50%, var(--gold-l) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-inner p { color: var(--muted); font-size: 1.05rem; max-width: 540px; margin: 0 auto 1.6rem; line-height: 1.65; }
.hero-divider { display: flex; align-items: center; gap: .9rem; justify-content: center; margin: 1.4rem 0; }
.hero-divider::before { content: ''; flex: 1; max-width: 110px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.hero-divider::after  { content: ''; flex: 1; max-width: 110px; height: 1px; background: linear-gradient(270deg, transparent, var(--gold)); }
.hero-diamond { color: var(--gold); font-size: 1rem; }

/* SECTIONS */
.section-grid { display: grid; gap: 2rem; padding: 2rem 0 3rem; }
.section-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1.2rem; }
.section-head h2 { font-size: 1.55rem; color: var(--gold-l); white-space: nowrap; }
.section-head-line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }

/* CARDS */
.cards { display: grid; gap: 1.2rem; }
@media (min-width: 680px) { .cards { grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); } }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 1.4rem; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-d), var(--gold-l), var(--gold-d));
}
.card:hover { transform: translateY(-4px); box-shadow: 0 24px 64px rgba(0,0,0,.85), var(--glow); border-color: rgba(212,175,55,.45); }
.card h3 { font-size: 1.25rem; color: var(--gold-l); margin-bottom: .55rem; }
.card p  { color: var(--muted); font-size: .92rem; margin-bottom: .4rem; line-height: 1.55; }
.card p strong { color: var(--text); }
.card small { color: #66668a; font-size: .8rem; }
.card-img { width: 100%; max-height: 200px; object-fit: cover; border-radius: 12px; margin-bottom: .9rem; border: 1px solid var(--border); }
.card-stats { display: flex; gap: .5rem; flex-wrap: wrap; margin: .7rem 0; }
.stat-chip { background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px; padding: .28rem .65rem; font-size: .8rem; color: var(--muted); }
.stat-chip strong { color: var(--text); }
.card-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border2); }
.raffle-menu-wrap { position: relative; margin-left: auto; }
.raffle-menu { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; gap: .35rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 10px; padding: .5rem; min-width: 170px; z-index: 8; box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.raffle-menu .btn { width: 100%; justify-content: flex-start; }
.template-upload-wrap table td .btn { padding: .34rem .62rem; font-size: .78rem; }

/* PROGRESS */
.progress-wrap { margin: .6rem 0; }
.progress-label { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-bottom: .3rem; }
.progress-bar { height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
  color: #07070f; font-weight: 700; font-size: .88rem;
  border: none; padding: .62rem 1.15rem; border-radius: 10px;
  cursor: pointer; transition: filter .15s, transform .1s;
  font-family: inherit; text-decoration: none; letter-spacing: .01em; white-space: nowrap;
}
.btn:hover { filter: brightness(1.14); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); font-weight: 500; }
.btn.ghost:hover { border-color: var(--gold); color: var(--gold); }
.btn.danger { background: linear-gradient(135deg, #c41e3a, #7a001a); color: #fff; }
.btn-boleta {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: linear-gradient(135deg, #c41e3a 0%, #7a001a 100%);
  color: #fff; font-weight: 700; font-size: .88rem;
  border: none; padding: .62rem 1.15rem; border-radius: 10px;
  cursor: pointer; transition: filter .15s, transform .1s; font-family: inherit;
}
.btn-boleta:hover { filter: brightness(1.18); transform: translateY(-1px); }

/* PANELS */
.panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 18px; padding: 1.3rem; box-shadow: 0 10px 36px rgba(0,0,0,.5); }
.panel-title { display: flex; align-items: center; gap: .6rem; margin-bottom: 1.2rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border2); }
.panel-title h2 { font-size: 1.15rem; color: var(--gold-l); }
.panel-title-icon { color: var(--gold); font-size: 1rem; }

/* STATS */
.cards.stats { grid-template-columns: repeat(auto-fill, minmax(162px, 1fr)); }
.stat-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 14px; padding: 1.1rem; text-align: center; position: relative; overflow: hidden; transition: transform .2s; }
.stat-card:hover { transform: translateY(-2px); }
.stat-card::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }
.stat-card small { color: var(--muted); font-size: .76rem; display: block; margin-bottom: .5rem; }
.stat-card h3 { color: var(--gold-l); font-size: 1.1rem; font-family: 'Inter',sans-serif; font-weight: 700; }

/* ADMIN HEADER */
.admin-header { background: linear-gradient(90deg, #060610, #0d0d1c 50%, #060610); border-bottom: 1px solid var(--border); padding: .9rem 0; }
.admin-header h1 { font-size: 1.25rem; background: linear-gradient(135deg, #fff, var(--gold-l)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* AUTH */
.admin-bg { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse 55% 50% at 50% 20%, rgba(212,175,55,.09) 0%, transparent 60%), linear-gradient(180deg, #060610 0%, #0d0d1c 100%); }
.auth-wrap { width: min(440px, 94vw); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 2rem; box-shadow: 0 28px 80px rgba(0,0,0,.8), var(--glow); position: relative; overflow: hidden; }
.auth-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--red), var(--gold), var(--red)); }
.auth-logo { text-align: center; margin-bottom: 1.6rem; }
.auth-logo .auth-icon { font-size: 3.2rem; display: block; margin-bottom: .5rem; filter: drop-shadow(0 0 18px rgba(212,175,55,.55)); }
.auth-logo h1 { font-size: 1.7rem; background: linear-gradient(135deg, #fff, var(--gold-l)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.auth-logo p { color: var(--muted); font-size: .87rem; margin-top: .35rem; }

/* ADMIN LAYOUT */
.admin-layout { display: grid; gap: 1.2rem; padding: 1.2rem 0 3rem; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .65rem; }
.span-2 { grid-column: 1 / -1; }

/* FORM SECTIONS */
.form-section { background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; padding: 1.1rem 1.2rem 1.2rem; margin-bottom: .85rem; }
.form-section-title { font-size: .78rem; font-weight: 700; color: var(--gold); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .85rem; }
.field-hint { font-size: .72rem; color: var(--muted); font-weight: 400; margin-top: .12rem; }
.create-btn { width: 100%; padding: .8rem; font-size: 1rem; letter-spacing: .05em; margin-top: .3rem; }

/* WHATSAPP BUTTON */
.wa-btn { background: linear-gradient(135deg, #128C7E, #075E54) !important; color: #fff !important; border-color: transparent !important; }
.wa-btn:hover { background: linear-gradient(135deg, #25D366, #128C7E) !important; box-shadow: 0 0 14px rgba(37,211,102,.35) !important; }

/* FORMS */
label { display: grid; gap: .3rem; font-size: .87rem; color: var(--muted); font-weight: 500; margin-bottom: .7rem; }
input,select,textarea { background: var(--bg2); border: 1px solid var(--border2); border-radius: 9px; padding: .58rem .8rem; font: inherit; color: var(--text); transition: border-color .15s; }
input:focus,select:focus,textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(212,175,55,.14); }
select option { background: var(--surface); }
textarea { min-height: 80px; resize: vertical; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.meta-chip { background: var(--bg2); border: 1px solid var(--border2); border-radius: 11px; padding: .65rem .85rem; }
.meta-chip span { display: block; font-size: .72rem; color: var(--muted); margin-bottom: .22rem; }
.meta-chip strong { font-size: .94rem; color: var(--gold-l); }
.total-box { background: linear-gradient(135deg, rgba(212,175,55,.09), rgba(212,175,55,.03)); border: 1px solid rgba(212,175,55,.3); border-radius: 12px; padding: .85rem 1rem; margin: 1rem 0; }
.total-box p { color: var(--text); margin-bottom: .3rem; }
.total-box strong { color: var(--gold-l); font-size: 1.2rem; }
.reserve-form h4 { color: var(--gold); font-size: .92rem; margin-bottom: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(195px, 1fr)); gap: .3rem 1rem; }

/* NUMBER GRID */
.number-grid-wrap { margin-bottom: 1.2rem; }
.number-legend { display: flex; gap: .9rem; flex-wrap: wrap; margin-bottom: .7rem; font-size: .78rem; }
.legend-item { display: flex; align-items: center; gap: .35rem; color: var(--muted); }
.legend-dot { width: 11px; height: 11px; border-radius: 3px; }
.number-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: .38rem; max-height: 290px; overflow-y: auto; padding: .8rem; background: var(--bg2); border: 1px solid var(--border); border-radius: 14px; }
.number-btn { aspect-ratio: 1; border: 1px solid rgba(0,200,83,.28); background: linear-gradient(135deg, #0c1f13, #091508); color: #00c853; font-weight: 700; font-size: .86rem; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .14s; font-family: 'Courier New',monospace; }
.number-btn:hover:not(:disabled) { background: linear-gradient(135deg, #00c853, #007a3a); color: #fff; border-color: #00c853; box-shadow: 0 0 14px rgba(0,200,83,.45); transform: scale(1.09); }
.number-btn.reserved { background: linear-gradient(135deg, #271503, #1c0e02); color: #ee9b00; border-color: rgba(238,155,0,.28); cursor: not-allowed; }
.number-btn.paid { background: linear-gradient(135deg, #04152a, #020e1e); color: #4488ff; border-color: rgba(68,136,255,.28); cursor: not-allowed; }
.number-btn.selected { background: linear-gradient(135deg, var(--gold), var(--gold-d)); color: #07070f; border-color: var(--gold); box-shadow: 0 0 18px rgba(212,175,55,.55); transform: scale(1.06); }

.raffle-paused-alert {
  width: min(1140px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: .95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, .35);
  background: linear-gradient(135deg, rgba(212,175,55,.12), rgba(7,7,15,.8));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .8rem;
  flex-wrap: wrap;
}

.raffle-paused-alert p {
  color: var(--gold-l);
  font-weight: 600;
  margin: 0;
}

/* RIFFA: FILTERS + SELLER FIELD */
.number-search-wrap {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: .55rem;
  margin: .65rem 0 .95rem;
}
.number-search-input,
.number-status-filter {
  width: 100%;
}
.seller-field-wrap {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.seller-field-wrap input {
  flex: 1;
}
.seller-badge {
  border-radius: 999px;
  padding: .23rem .6rem;
  font-size: .72rem;
  font-weight: 700;
  background: rgba(0,200,83,.14);
  border: 1px solid rgba(0,200,83,.32);
  color: #00c853;
  white-space: nowrap;
}
.seller-badge.error {
  background: rgba(196,30,58,.14);
  border-color: rgba(196,30,58,.32);
  color: #ff4466;
}

/* RIFFA: SOCIAL LINKS */
.social-links-bar {
  margin-top: 1rem;
}
.social-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.social-btn {
  --social-color: var(--gold-d);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 999px;
  padding: .38rem .86rem;
  font-size: .79rem;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background: var(--social-color);
  border: 1px solid rgba(255,255,255,.16);
  transition: transform .12s ease, filter .12s ease;
}
.social-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

/* RIFFA: RESERVED NUMBER TOAST */
.reserved-toast {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(2px);
  display: grid;
  place-items: center;
  padding: 1rem;
}
.reserved-toast-inner {
  width: min(440px, 96vw);
  background: linear-gradient(160deg, #150e05, #201309);
  border: 1px solid rgba(238,155,0,.35);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  box-shadow: 0 20px 45px rgba(0,0,0,.55);
  position: relative;
}
.reserved-toast-title {
  color: #ffcd6f;
  font-weight: 800;
  margin-bottom: .35rem;
}
.reserved-toast-msg {
  color: #f2d9b1;
  font-size: .88rem;
  line-height: 1.5;
  margin-bottom: .8rem;
}

/* ADMIN: SELLERS */
#sellersList table strong {
  color: var(--gold-l);
}

/* MODALS */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; padding: 1rem; z-index: 50; backdrop-filter: blur(5px); }
.hidden { display: none !important; }
.modal-content { width: min(960px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; padding: 1.5rem; max-height: 94vh; overflow-y: auto; position: relative; box-shadow: 0 28px 90px rgba(0,0,0,.9), 0 0 60px rgba(212,175,55,.07); }
.modal-content.large { width: min(1100px, 100%); }
.modal-header { margin-bottom: 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 1.5rem; color: var(--gold-l); }
.close-btn { position: absolute; right: 1rem; top: 1rem; background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px; padding: .32rem .56rem; cursor: pointer; color: var(--muted); font-size: .84rem; transition: all .14s; }
.close-btn:hover { border-color: var(--red); color: var(--red); }

/* BOLETA MODAL */
.boleta-header { text-align: center; padding: .4rem 0 1rem; }
.boleta-icon { font-size: 3.2rem; display: block; margin-bottom: .5rem; filter: drop-shadow(0 0 14px rgba(196,30,58,.65)); }
.boleta-header h3 { font-size: 1.4rem; color: var(--gold-l); margin-bottom: .4rem; }

/* TABLES */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; }
thead tr { background: var(--bg2); border-bottom: 1px solid var(--border); }
th { text-align: left; padding: .7rem .8rem; color: var(--gold); font-weight: 600; font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }
td { text-align: left; border-bottom: 1px solid var(--border2); padding: .6rem .8rem; color: var(--text); vertical-align: middle; }
tbody tr:hover { background: rgba(212,175,55,.04); }
td a { color: var(--gold); text-decoration: none; font-size: .82rem; }
td a:hover { text-decoration: underline; }
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: .7rem;
  padding-top: .6rem;
  border-top: 1px solid var(--border2);
}
.table-pagination-meta {
  color: var(--muted);
  font-size: .8rem;
}
.table-pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--muted);
  font-size: .8rem;
}

.movement-compact-toggle {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  color: var(--muted);
  font-size: .82rem;
}

.movement-compact-toggle input {
  width: auto;
}

.movements-table.compact th,
.movements-table.compact td {
  padding: .5rem .6rem;
}

.movement-compact-details {
  font-size: .78rem;
}

.movement-compact-details summary {
  cursor: pointer;
  color: var(--gold-l);
  font-weight: 600;
}

.movement-compact-details div {
  margin-top: .2rem;
  color: var(--muted);
}

.movement-compact-details strong {
  color: var(--text);
}

/* STATUS PILLS */
.status-pill { border-radius: 999px; padding: .22rem .65rem; font-size: .74rem; font-weight: 600; display: inline-block; white-space: nowrap; }
.status-pill.paid     { background: rgba(0,200,83,.14);   color: #00c853; border: 1px solid rgba(0,200,83,.28); }
.status-pill.partial  { background: rgba(238,155,0,.14);  color: #ee9b00; border: 1px solid rgba(238,155,0,.28); }
.status-pill.reserved { background: rgba(68,136,255,.14); color: #5599ff; border: 1px solid rgba(68,136,255,.28); }
.status-pill.expired,
.status-pill.cancelled{ background: rgba(196,30,58,.14);  color: #ff4466; border: 1px solid rgba(196,30,58,.28); }
.status-pill.default  { background: rgba(255,255,255,.07); color: var(--muted); border: 1px solid var(--border2); }

/* RAFFLE ADMIN CARD */
.raffle-admin-card { background: var(--bg2); border: 1px solid var(--border2); border-left: 3px solid var(--gold-d); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .4rem; }
.raffle-admin-card h3 { color: var(--gold-l); font-size: 1.1rem; }
.raffle-admin-card p  { font-size: .88rem; color: var(--muted); }
.raffle-admin-card p strong { color: var(--text); }

/* DETAIL SECTION */
.detail-section { background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; padding: 1rem; margin-bottom: .8rem; }
.detail-section p { font-size: .9rem; color: var(--muted); margin-bottom: .3rem; }
.detail-section p strong { color: var(--text); }
.detail-collapsible { padding: .85rem 1rem; }
.detail-collapsible-summary {
  cursor: pointer;
  list-style: none;
  color: var(--gold-l);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.detail-collapsible-summary::-webkit-details-marker { display: none; }
.detail-collapsible-summary::after {
  content: '▾';
  color: var(--muted);
  font-size: .9rem;
  transition: transform .15s ease;
  transform: rotate(-90deg);
}
.detail-collapsible-summary.is-open::after {
  transform: rotate(0deg);
}
.section-toggle-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: .7rem .85rem;
}
.section-toggle-btn:hover {
  border-color: var(--gold);
}

/* ALERTS */
.result { margin-top: .7rem; font-weight: 600; font-size: .89rem; }
.error  { color: #ff4466; }
.result a { color: var(--gold); text-decoration: none; }
.result a:hover { text-decoration: underline; }
.hint   { color: var(--muted); font-size: .87rem; line-height: 1.55; }

/* TABS */
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; padding-bottom: .9rem; border-bottom: 1px solid var(--border2); }
.tab-btn { background: var(--bg2); border: 1px solid var(--border2); border-radius: 10px; padding: .45rem 1rem; font: inherit; font-size: .82rem; color: var(--muted); cursor: pointer; transition: all .15s; white-space: nowrap; }
.tab-btn:hover { border-color: var(--gold); color: var(--text); }
.tab-btn.active { background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%); color: #07070f; font-weight: 700; border-color: transparent; box-shadow: 0 4px 14px rgba(212,175,55,.3); }

/* KPI GRID */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px, 1fr)); gap: .9rem; margin-bottom: 1.5rem; }
.kpi-card { background: var(--bg2); border: 1px solid var(--border2); border-radius: 16px; padding: 1.1rem 1.2rem; position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.kpi-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 20px rgba(212,175,55,.12); }
.kpi-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); }
.kpi-icon  { font-size: 1.7rem; margin-bottom: .45rem; display: block; }
.kpi-label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; margin-bottom: .3rem; }
.kpi-value { font-size: 1.25rem; font-weight: 700; color: var(--gold-l); font-family: 'Inter', sans-serif; line-height: 1.2; }
.kpi-sub   { font-size: .72rem; color: var(--muted); margin-top: .25rem; }

/* FILTER BAR */
.filter-bar { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.1rem; padding: .85rem 1rem; background: var(--bg2); border: 1px solid var(--border2); border-radius: 12px; }
.filter-bar label { margin-bottom: 0; font-size: .8rem; gap: .25rem; }
.filter-bar input, .filter-bar select { padding: .42rem .7rem; font-size: .83rem; min-width: 130px; }

/* REPORT TOOLBAR */
.report-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: .7rem; margin-bottom: .9rem; flex-wrap: wrap; }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state span { font-size: 2.8rem; display: block; margin-bottom: .8rem; opacity: .4; }
.empty-state p { font-size: .9rem; }

/* BADGE */
.badge { border-radius: 7px; padding: .18rem .52rem; font-size: .72rem; font-weight: 700; display: inline-block; line-height: 1.4; }
.badge-green  { background: rgba(0,200,83,.14);   color: #00c853; }
.badge-orange { background: rgba(238,155,0,.14);  color: #ee9b00; }
.badge-red    { background: rgba(196,30,58,.14);  color: #ff4466; }
.badge-blue   { background: rgba(68,136,255,.14); color: #4488ff; }
.badge-gold   { background: rgba(212,175,55,.14); color: var(--gold-l); }

/* INLINE PROGRESS FOR TABLES */
.pct-bar  { display: inline-block; width: 72px; height: 5px; background: var(--border2); border-radius: 3px; vertical-align: middle; margin-left: .4rem; overflow: hidden; }
.pct-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold-d), var(--gold-l)); transition: width .5s; }

/* NAV TABS PANEL */
.tab-panel.hidden { display: none !important; }

/* RAFFLE SELECTOR BAR */
.raffle-selector-bar {
  background: linear-gradient(90deg, rgba(212,175,55,.07), rgba(212,175,55,.03));
  border-bottom: 1px solid var(--border);
  padding: .65rem 0;
  position: sticky; top: 0; z-index: 10;
}
.raffle-selector-bar .row { gap: .8rem; align-items: center; flex-wrap: wrap; }
.raffle-selector-bar label { margin: 0; font-size: .83rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.raffle-selector-bar select { max-width: 280px; padding: .38rem .7rem; font-size: .83rem; }
.raffle-active-badge {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-d) 100%);
  color: #07070f; font-size: .72rem; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase;
  padding: .22rem .8rem; border-radius: 999px; white-space: nowrap;
}

.admin-section-nav {
  border-bottom: 1px solid var(--border2);
  background: linear-gradient(90deg, rgba(13,13,28,.95), rgba(7,7,15,.95));
  position: sticky;
  top: 50px;
  z-index: 9;
}

.admin-section-nav-inner {
  display: flex;
  gap: .45rem;
  padding: .55rem 0;
  overflow-x: auto;
}

.admin-nav-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--muted);
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .78rem;
  cursor: pointer;
  white-space: nowrap;
}

.admin-nav-btn:hover {
  border-color: var(--gold);
  color: var(--text);
}

.admin-nav-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #07070f;
  border-color: transparent;
  font-weight: 700;
}

/* LUCKY SLOT MACHINE */
.lucky-slot-machine {
  background: var(--bg2); border: 1px solid var(--border); border-radius: 16px;
  padding: 1.2rem; margin: 1rem 0; text-align: center; overflow: hidden;
  position: relative;
}
.lucky-slot-machine::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, #6c3fa0, #9b59b6, #6c3fa0);
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { 0%{background-position:0} 100%{background-position:200px} }
.lucky-drum-wrap {
  display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; min-height: 64px; align-items: center;
}
.lucky-drum {
  width: 58px; height: 58px; border: 2px solid #9b59b6; border-radius: 12px;
  background: linear-gradient(135deg, #1a0a30, #2d1257);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 1.25rem; font-family: 'Courier New', monospace;
  color: var(--gold-l); overflow: hidden; position: relative;
  box-shadow: 0 0 18px rgba(155, 89, 182, .4);
}
.lucky-drum.spinning {
  animation: drumSpin .12s linear infinite;
  border-color: var(--gold);
  box-shadow: 0 0 24px rgba(212,175,55,.55);
}
.lucky-drum.landing {
  animation: drumLand .4s ease-out forwards;
}
@keyframes drumSpin {
  0%   { transform: translateY(0); opacity: 1; }
  25%  { transform: translateY(-6px); opacity: .6; }
  50%  { transform: translateY(0); opacity: 1; }
  75%  { transform: translateY(6px); opacity: .6; }
  100% { transform: translateY(0); opacity: 1; }
}
@keyframes drumLand {
  0%   { transform: scale(1.18) rotate(-2deg); }
  30%  { transform: scale(0.92) rotate(1deg); }
  60%  { transform: scale(1.06) rotate(0deg); }
  100% { transform: scale(1) rotate(0deg); }
}
.lucky-result-label { font-size: .8rem; color: var(--muted); margin-top: .5rem; min-height: 1.2em; }

/* PROOF FILE PREVIEW */
.proof-file-preview {
  display: flex; gap: .5rem; flex-wrap: wrap; margin: .6rem 0;
}
.proof-file-thumb {
  width: 72px; height: 72px; border-radius: 10px; border: 1px solid var(--border);
  object-fit: cover; background: var(--bg2); display: flex; align-items: center;
  justify-content: center; font-size: 1.6rem; overflow: hidden; position: relative;
}
.proof-file-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* PROOF NUMBER CHIPS */
.proof-number-chips {
  display: flex; gap: .35rem; flex-wrap: wrap; margin: .5rem 0;
}
.proof-number-chip {
  display: inline-flex; align-items: center; gap: .28rem;
  background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px;
  padding: .28rem .55rem; font-size: .8rem; cursor: pointer;
  transition: all .14s; user-select: none;
}
.proof-number-chip.selected {
  background: linear-gradient(135deg, var(--gold), var(--gold-d));
  color: #07070f; border-color: var(--gold); font-weight: 700;
}
.proof-number-chip:hover:not(.selected) { border-color: var(--gold); color: var(--gold-l); }

/* PERMISSION CHECKBOX GRID */
.permission-checkbox-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .4rem .8rem; margin: .5rem 0;
}
.permission-checkbox-grid label {
  display: flex; align-items: center; gap: .5rem; margin: 0; cursor: pointer; font-size: .83rem; color: var(--text);
}
.permission-checkbox-grid input[type=checkbox] { width: auto; accent-color: var(--gold); }

/* MANAGER CARD */
.manager-card {
  background: var(--bg2); border: 1px solid var(--border2);
  border-left: 3px solid #9b59b6; border-radius: 12px; padding: 1rem;
  display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem;
}
.manager-card h4 { color: var(--gold-l); font-size: 1rem; }
.manager-card .manager-meta { font-size: .83rem; color: var(--muted); }
.manager-assignments { display: flex; gap: .35rem; flex-wrap: wrap; margin: .3rem 0; }
.assignment-chip {
  background: rgba(155,89,182,.15); border: 1px solid rgba(155,89,182,.3);
  color: #c39bd3; border-radius: 7px; padding: .18rem .52rem;
  font-size: .72rem; font-weight: 600;
}

/* PROOF STATUS PILLS */
.status-pill.pendiente   { background: rgba(238,155,0,.14);  color: #ee9b00; border: 1px solid rgba(238,155,0,.28); }
.status-pill.aprobado    { background: rgba(0,200,83,.14);   color: #00c853; border: 1px solid rgba(0,200,83,.28); }
.status-pill.rechazado   { background: rgba(196,30,58,.14);  color: #ff4466; border: 1px solid rgba(196,30,58,.28); }
.status-pill.en_revision { background: rgba(68,136,255,.14); color: #4488ff; border: 1px solid rgba(68,136,255,.28); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .hero { padding: 2.2rem 0 1.8rem; }
  .admin-header h1 { font-size: 1rem; }
  .number-grid { grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); }
  .number-search-wrap { grid-template-columns: 1fr; }
  .seller-field-wrap { flex-direction: column; align-items: stretch; }
  .auth-card { padding: 1.4rem; }
  .cards.stats { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .card-actions { flex-direction: column; }
  .btn,.btn-boleta { width: 100%; text-align: center; justify-content: center; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .tabs { gap: .3rem; }
  .tab-btn { font-size: .75rem; padding: .38rem .65rem; }
}
