@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700;800&family=Barlow+Condensed:wght@600;700;800&display=swap');

/* ══════════════════════════════════════════
   VARIABLES
══════════════════════════════════════════ */
:root {
  --gold:       #b8860b;
  --gold-lt:    #f5edd6;
  --gold-dk:    #8a6508;
  --dark:       #1a1612;
  --dark2:      #2e2820;
  --text:       #1a1612;
  --muted:      #7a7060;
  --bg:         #f7f6f3;
  --surface:    #ffffff;
  --border:     #e4e0d8;
  --danger:     #c0392b;
  --success:    #1a7a4a;
  --info:       #1a5fa8;
  --warn:       #b35a00;
  --radius:     12px;
  --radius-sm:  8px;
  --radius-lg:  20px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,.09), 0 2px 4px rgba(0,0,0,.05);
  --shadow-lg:  0 8px 30px rgba(0,0,0,.13);
  --nav-h:      58px;
  --nav-bg:     #ffffff;
  --nav-text:   #1a1612;
  --nav-accent: #b8860b;
  --hero-bg:    #1a1612;
  --pos1-bg:    #FFD700;
  --pos1-text:  #6b4e00;
  --pos2-bg:    #C0C0C0;
  --pos2-text:  #333333;
  --pos3-bg:    #CD7F32;
  --pos3-text:  #ffffff;
  --font:       'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-cond:  'Barlow Condensed', 'Barlow', sans-serif;
  --tr:         .15s ease;
}

/* ══════════════════════════════════════════
   RESET & BASE
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; object-fit: cover; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }

/* ══════════════════════════════════════════
   TIPOGRAFÍA UTILITARIA
══════════════════════════════════════════ */
.font-cond   { font-family: var(--font-cond) !important; }
.fw-bold     { font-weight: 700; }
.fw-800      { font-weight: 800; }
.text-muted  { color: var(--muted); font-size: .82rem; }
.text-gold   { color: var(--gold); }
.text-danger { color: var(--danger); }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* ══════════════════════════════════════════
   LAYOUT UTILITARIO
══════════════════════════════════════════ */
.d-flex          { display: flex; }
.align-center    { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center  { justify-content: center; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex-1 { flex: 1; min-width: 0; }
.w-100  { width: 100%; }
.mt-1   { margin-top: .5rem; }
.mt-2   { margin-top: 1rem; }
.mt-3   { margin-top: 1.5rem; }
.mb-1   { margin-bottom: .5rem; }
.mb-2   { margin-bottom: 1rem; }
.mb-3   { margin-bottom: 1.5rem; }
.p-0    { padding: 0; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.separator { height: 1px; background: var(--border); margin: 1rem 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: .75rem; }

@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════
   TOPNAV
══════════════════════════════════════════ */
.topnav {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid rgba(0,0,0,.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  box-shadow: var(--shadow-sm);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--font-cond);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: var(--nav-text);
  text-decoration: none;
}
.nav-brand span { color: var(--nav-accent); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: var(--tr);
}
.nav-icon-btn { color: var(--nav-text); opacity: .7; }
.nav-icon-btn:hover { background: rgba(255,255,255,.15); opacity: 1; }
.badge-count {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  padding: 0 3px;
  background: var(--danger);
  color: #fff;
  border-radius: 8px;
  font-size: .6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ══════════════════════════════════════════
   PAGE WRAP
══════════════════════════════════════════ */
.page-wrap {
  padding: 1.25rem 1rem 5.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.page-wrap.wide { max-width: 1100px; }

/* ══════════════════════════════════════════
   SECTION TITLE
══════════════════════════════════════════ */
.section-title {
  font-family: var(--font-cond);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--dark);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
.label-tag {
  font-family: var(--font);
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: var(--gold-lt);
  color: var(--gold-dk);
  padding: .2rem .55rem;
  border-radius: 4px;
}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--tr);
}
.card-link:hover { box-shadow: var(--shadow-md); }
.card-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.card-body { padding: 1.1rem; }
.card-footer {
  padding: .75rem 1.1rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ══════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .65rem;
  margin-bottom: 1.25rem;
}
@media (min-width: 520px) { .stats-grid { grid-template-columns: repeat(4,1fr); } }

.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: .9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.stat-card.gold { border-left: 3px solid var(--gold); }
.stat-card.red  { border-left: 3px solid var(--danger); }
.stat-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-value {
  font-family: var(--font-cond);
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.stat-sub { font-size: .72rem; color: var(--muted); }

/* ══════════════════════════════════════════
   HORSE CARD
══════════════════════════════════════════ */
.horse-card {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: .85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--tr), border-color var(--tr);
}
.horse-card:hover { box-shadow: var(--shadow-md); border-color: var(--gold); }
.horse-avatar {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gold-lt);
}
.horse-avatar-placeholder {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  flex-shrink: 0;
  background: var(--gold-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.horse-name {
  font-family: var(--font-cond);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
}
.horse-meta { font-size: .75rem; color: var(--muted); margin-top: .1rem; }
.horse-badges { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }

/* ══════════════════════════════════════════
   EVENT CARD
══════════════════════════════════════════ */
.event-card { overflow: hidden; }
.event-banner {
  height: 120px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 100%);
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: .85rem 1rem;
}
.event-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .4;
}
.event-banner-content { position: relative; z-index: 1; }
.event-banner-title {
  font-family: var(--font-cond);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.event-banner-date { font-size: .75rem; color: rgba(255,255,255,.7); margin-top: .15rem; }

/* ══════════════════════════════════════════
   BADGES / CHIPS
══════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  font-size: .63rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-gold    { background: var(--gold-lt); color: var(--gold-dk); }
.badge-dark    { background: var(--dark); color: #fff; }
.badge-success { background: #d3f0e3; color: #155c37; }
.badge-danger  { background: #fde0de; color: #9b2820; }
.badge-info    { background: #ddeaf8; color: #154e8a; }
.badge-warn    { background: #fde8d6; color: #7a3800; }
.badge-muted   { background: var(--border); color: var(--muted); }

/* Posiciones en resultados */
.pos-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-cond);
  font-size: 1rem;
  font-weight: 800;
  flex-shrink: 0;
}
.pos-1 { background: var(--pos1-bg); color: var(--pos1-text); }
.pos-2 { background: var(--pos2-bg); color: var(--pos2-text); }
.pos-3 { background: var(--pos3-bg); color: var(--pos3-text); }
.pos-n { background: var(--border); color: var(--muted); }

/* ══════════════════════════════════════════
   RANKING LIST
══════════════════════════════════════════ */
.rank-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--tr);
}
.rank-item:last-child { border-bottom: none; }
.rank-item:hover { background: var(--bg); }
.rank-num {
  font-family: var(--font-cond);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--muted);
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}
.rank-num.top { color: var(--gold); }

/* ══════════════════════════════════════════
   RESULT TABLE
══════════════════════════════════════════ */
.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
.result-table th {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: .6rem .85rem;
  text-align: left;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  background: var(--bg);
}
.result-table td {
  padding: .75rem .85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.result-table tr:last-child td { border-bottom: none; }
.result-table tr.highlight-row { background: var(--gold-lt); }
.result-table tr:hover td { background: var(--bg); }

/* ══════════════════════════════════════════
   FORMS
══════════════════════════════════════════ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-bottom: 1rem;
}
.form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--dark);
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: .72rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font);
  font-size: .93rem;
  color: var(--text);
  transition: border-color var(--tr), box-shadow var(--tr);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,134,11,.13);
}
.form-input::placeholder { color: var(--muted); }
.form-input[disabled],
.form-select[disabled] {
  background: var(--bg);
  color: var(--muted);
  cursor: not-allowed;
}
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7060' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
}
.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }
.form-hint  { font-size: .72rem; color: var(--muted); }
.form-error { font-size: .72rem; color: var(--danger); font-weight: 600; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* Checkbox / Radio custom */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--gold);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .68rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background var(--tr), box-shadow var(--tr), transform var(--tr);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { background: var(--gold-dk); box-shadow: 0 2px 8px rgba(184,134,11,.3); }

.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark2); }

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); background: var(--gold-lt); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a03025; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #145e37; }

.btn-sm { padding: .42rem .85rem; font-size: .78rem; }
.btn-lg { padding: .9rem 1.6rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ══════════════════════════════════════════
   TABS
══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: .2rem;
  padding: .25rem;
  background: var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab-btn {
  flex-shrink: 0;
  padding: .48rem 1rem;
  border-radius: 6px;
  font-size: .82rem;
  font-weight: 700;
  background: transparent;
  color: var(--muted);
  transition: var(--tr);
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
.tab-btn.active {
  background: var(--surface);
  color: var(--dark);
  box-shadow: var(--shadow-sm);
}

/* ══════════════════════════════════════════
   FLASH MESSAGES
══════════════════════════════════════════ */
.flash {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  line-height: 1.45;
}
.flash-success { background: #d3f0e3; color: #155c37; border-left: 3px solid var(--success); }
.flash-error   { background: #fde0de; color: #9b2820; border-left: 3px solid var(--danger); }
.flash-info    { background: #ddeaf8; color: #154e8a; border-left: 3px solid var(--info); }
.flash-warn    { background: #fde8d6; color: #7a3800; border-left: 3px solid var(--warn); }

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 3rem 1rem;
  text-align: center;
  color: var(--muted);
}
.empty-state svg { opacity: .3; }
.empty-state h3 {
  font-family: var(--font-cond);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
}
.empty-state p { font-size: .88rem; max-width: 280px; }

/* ══════════════════════════════════════════
   MODAL (bottom sheet en móvil)
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(26,22,18,.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  padding: 1.25rem 1.25rem calc(1.5rem + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  max-height: 92dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 600px) {
  .modal-overlay { align-items: center; }
  .modal-sheet { border-radius: var(--radius-lg); max-height: 88dvh; }
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
@media (min-width: 600px) { .modal-handle { display: none; } }
.modal-title {
  font-family: var(--font-cond);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 1.1rem;
}

/* ══════════════════════════════════════════
   LIVE INDICATOR
══════════════════════════════════════════ */
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .7rem;
  font-weight: 700;
  color: var(--danger);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.live-dot {
  width: 7px;
  height: 7px;
  background: var(--danger);
  border-radius: 50%;
  animation: blink 1.1s ease-in-out infinite;
}
@keyframes blink { 0%,100%{ opacity:1; } 50%{ opacity:.15; } }

.carrera-live {
  border: 2px solid var(--gold) !important;
  animation: pulse-gold 2.5s ease-in-out infinite;
}
@keyframes pulse-gold {
  0%,100% { border-color: var(--gold); }
  50%      { border-color: var(--gold-lt); }
}

/* ══════════════════════════════════════════
   LOGIN / REGISTRO PAGE
══════════════════════════════════════════ */
.login-wrap {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--bg);
}
.login-card {
  width: 100%;
  max-width: 390px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.login-logo {
  font-family: var(--font-cond);
  font-size: 2.1rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: .25rem;
  color: var(--dark);
}
.login-logo span { color: var(--gold); }
.login-sub {
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 1.75rem;
}

/* ══════════════════════════════════════════
   ADMIN SIDEBAR DESKTOP
══════════════════════════════════════════ */
@media (min-width: 900px) {
  .admin-layout {
    display: grid;
    grid-template-columns: 230px 1fr;
    min-height: 100dvh;
  }
  .sidebar {
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    background: var(--nav-bg);
    color: var(--nav-text);
    display: flex;
    flex-direction: column;
  }
  .sidebar-brand {
    padding: 1.2rem 1.2rem .9rem;
    font-family: var(--font-cond);
    font-size: 1.35rem;
    font-weight: 800;
    border-bottom: 1px solid rgba(255,255,255,.07);
    flex-shrink: 0;
  }
  .sidebar-brand span { color: var(--nav-accent); }
  .sidebar-nav { padding: .6rem 0; flex: 1; overflow-y: auto; }
  .sidebar-group {
    padding: .65rem 1.2rem .2rem;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--nav-text);
    opacity: .35;
  }
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem 1.2rem;
    color: var(--nav-text);
    opacity: .65;
    font-size: .86rem;
    font-weight: 600;
    transition: background var(--tr), color var(--tr);
    border-left: 3px solid transparent;
    text-decoration: none;
  }
  .sidebar-link:hover { background: rgba(128,128,128,.1); opacity: 1; }
  .sidebar-link.active {
    background: rgba(128,128,128,.12);
    color: var(--nav-accent);
    opacity: 1;
    border-left-color: var(--nav-accent);
  }
  .sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; }
  .admin-content { padding: 1.5rem 2rem 2rem; overflow-y: auto; }
  .bottom-nav { display: none !important; }
  .topnav.admin-mobile { display: none; }
}
@media (max-width: 899px) {
  .sidebar { display: none; }
  .admin-content { padding: 0 0 5.5rem; }
}

/* ══════════════════════════════════════════
   BOTTOM NAV (MOBILE)
══════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  box-shadow: 0 -2px 12px rgba(0,0,0,.07);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bnav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: .52rem .25rem;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--tr);
  position: relative;
  border: none;
  background: none;
  cursor: pointer;
}
.bnav-item svg { width: 21px; height: 21px; stroke: currentColor; fill: none; flex-shrink: 0; }
.bnav-item.active { color: var(--gold); }
.bnav-item:hover { color: var(--gold); }

/* ══════════════════════════════════════════
   QR
══════════════════════════════════════════ */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}
.qr-container img {
  width: 180px;
  height: 180px;
  border: 6px solid var(--gold-lt);
  border-radius: var(--radius);
}

/* ══════════════════════════════════════════
   COLOR INPUT
══════════════════════════════════════════ */
input[type="color"].form-input {
  padding: .35rem .5rem;
  height: 44px;
  cursor: pointer;
}

/* ══════════════════════════════════════════
   FILE INPUT
══════════════════════════════════════════ */
input[type="file"].form-input {
  padding: .5rem .75rem;
  cursor: pointer;
  font-size: .82rem;
  color: var(--muted);
}
input[type="file"].form-input::-webkit-file-upload-button {
  background: var(--gold-lt);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--gold-dk);
  font-weight: 700;
  font-size: .78rem;
  padding: .3rem .7rem;
  cursor: pointer;
  margin-right: .75rem;
}

/* ══════════════════════════════════════════
   RESPONSIVE MISC
══════════════════════════════════════════ */
@media (max-width: 480px) {
  .section-title { font-size: 1.25rem; }
  .stat-value    { font-size: 1.65rem; }
  .card-body     { padding: .9rem; }
  .card-header   { padding: .75rem .9rem; }
  .btn           { font-size: .84rem; }
}
