/* =============================================
   Torneo Provincial Voley Sub 16 - Córdoba 2026
   ============================================= */

:root {
  --voley-orange: #e85d04;
  --voley-orange-hover: #c94e03;
  --voley-dark: #1a1a2e;
  --voley-darker: #16213e;
}

/* Bootstrap primary override */
.btn-primary, .bg-primary, .card-header.bg-primary { background-color: var(--voley-orange) !important; border-color: var(--voley-orange) !important; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--voley-orange-hover) !important; border-color: var(--voley-orange-hover) !important; }
.text-primary { color: var(--voley-orange) !important; }
.border-primary { border-color: var(--voley-orange) !important; }
.progress-bar { background-color: var(--voley-orange) !important; }
.btn-outline-primary { color: var(--voley-orange); border-color: var(--voley-orange); }
.btn-outline-primary:hover { background-color: var(--voley-orange); border-color: var(--voley-orange); }
.navbar.bg-primary { background-color: var(--voley-dark) !important; }

/* --------- PUBLIC --------- */
body { font-family: 'Segoe UI', system-ui, sans-serif; background-color: #f0f2f5; }

.hero-header {
  background: linear-gradient(135deg, var(--voley-dark) 0%, var(--voley-darker) 60%, #0f3460 100%);
  position: relative;
  overflow: hidden;
}
.hero-header::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at center, rgba(232,93,4,.15) 0%, transparent 60%);
  pointer-events: none;
}

.premio-card { transition: transform .2s, box-shadow .2s; }
.premio-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.15) !important; }

/* Instagram button */
.btn-instagram {
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  transition: opacity .2s, transform .1s;
}
.btn-instagram:hover { opacity: .9; transform: scale(1.01); }

.bg-gradient-instagram {
  background: linear-gradient(45deg, #f9ce34, #ee2a7b, #6228d7) !important;
}

/* Cuenta confirmada */
.cuenta-confirmada { background-color: #f0fff4 !important; border-color: #28a745 !important; }

/* Form overlay */
.form-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(3px);
  z-index: 10;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}
#form-overlay-wrapper { min-height: 200px; }

/* --------- ADMIN --------- */
.login-bg {
  background: linear-gradient(135deg, var(--voley-dark) 0%, var(--voley-darker) 100%);
  min-height: 100vh;
  padding: 1rem;
}

.admin-body { background: #f4f6f9; }

.admin-sidebar {
  width: 220px;
  min-height: calc(100vh - 56px);
  position: sticky;
  top: 56px;
  align-self: flex-start;
  transition: transform .25s;
}
.admin-sidebar .nav-link {
  color: rgba(255,255,255,.7);
  padding: .6rem 1.2rem;
  border-radius: 6px;
  margin: 2px 8px;
  font-size: .92rem;
  transition: background .15s, color .15s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.admin-sidebar .nav-link.active {
  background: var(--voley-orange);
  color: #fff;
}

.admin-main { min-width: 0; }
.page-title { color: var(--voley-dark); font-weight: 700; }

/* Sidebar mobile */
@media (max-width: 991px) {
  .admin-sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    z-index: 1040;
    transform: translateX(-100%);
  }
  .admin-sidebar.sidebar-open { transform: translateX(0); }
  .admin-main { margin-left: 0 !important; }
}

/* Sidebar section labels */
.nav-section-label {
  list-style: none;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: .6rem 1.2rem .2rem;
  margin-top: .25rem;
}

/* Navbar pública */
.pub-navbar {
  background: var(--voley-dark) !important;
}
.pub-navbar .nav-link { color: rgba(255,255,255,.75); transition: color .15s; }
.pub-navbar .nav-link:hover,
.pub-navbar .nav-link.active { color: #fff; }
.pub-navbar .nav-link.active {
  border-bottom: 2px solid var(--voley-orange);
}

/* Sortable th cursor */
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { background: rgba(255,255,255,.1); }

/* --------- DARK MODE --------- */
html.dark-init body { background: #0f1117 !important; }

body.dark-mode { background-color: #0f1117 !important; color: #e8e9ea !important; }

body.dark-mode .card { background-color: #1e2130 !important; border-color: #2d3148 !important; color: #e8e9ea; }
body.dark-mode .card-header { border-color: #2d3148 !important; }
body.dark-mode .card-header.bg-light,
body.dark-mode .card-header.bg-white { background-color: #252840 !important; color: #e8e9ea !important; }
body.dark-mode .card-footer { background-color: #1a1d2e !important; border-color: #2d3148 !important; }

body.dark-mode main { color: #e8e9ea; }
body.dark-mode .text-muted { color: #9fa8c0 !important; }
body.dark-mode .text-dark { color: #e8e9ea !important; }
body.dark-mode .bg-white { background-color: #1e2130 !important; }
body.dark-mode .bg-light { background-color: #252840 !important; }
body.dark-mode .border-bottom, body.dark-mode .border, body.dark-mode .border-top { border-color: #2d3148 !important; }

body.dark-mode .form-control, body.dark-mode .form-select { background-color: #252840 !important; border-color: #3d4168 !important; color: #e8e9ea !important; }
body.dark-mode .form-control:focus, body.dark-mode .form-select:focus { background-color: #2d3050 !important; border-color: var(--voley-orange) !important; color: #e8e9ea !important; box-shadow: 0 0 0 .2rem rgba(232,93,4,.25) !important; }
body.dark-mode .form-control::placeholder { color: #6b7280 !important; }

body.dark-mode .table { color: #e8e9ea !important; border-color: #2d3148 !important; }
body.dark-mode .table th, body.dark-mode .table td { border-color: #2d3148 !important; }
body.dark-mode .table-striped > tbody > tr:nth-of-type(odd) > * { background-color: rgba(255,255,255,.04) !important; color: #e8e9ea !important; }
body.dark-mode .table-hover > tbody > tr:hover > * { background-color: rgba(255,255,255,.07) !important; color: #e8e9ea !important; }
body.dark-mode .table-light, body.dark-mode .table-light th { background-color: #252840 !important; color: #e8e9ea !important; }

body.dark-mode .badge.bg-secondary { background-color: #4a4f6b !important; }
body.dark-mode .badge.bg-light { background-color: #2d3148 !important; color: #e8e9ea !important; }

body.dark-mode .modal-content { background-color: #1e2130 !important; border-color: #2d3148 !important; color: #e8e9ea !important; }
body.dark-mode .modal-header, body.dark-mode .modal-footer { border-color: #2d3148 !important; }

body.dark-mode .list-group-item { background-color: #1e2130 !important; border-color: #2d3148 !important; color: #e8e9ea !important; }

body.dark-mode .dropdown-menu { background-color: #1e2130 !important; border-color: #2d3148 !important; }
body.dark-mode .dropdown-item { color: #e8e9ea !important; }
body.dark-mode .dropdown-item:hover { background-color: #2d3148 !important; }

body.dark-mode .btn-outline-secondary { color: #9fa8c0 !important; border-color: #4a4f6b !important; }
body.dark-mode .btn-outline-secondary:hover { background-color: #2d3148 !important; color: #e8e9ea !important; }
body.dark-mode .btn-light { background-color: #2d3148 !important; border-color: #3d4168 !important; color: #e8e9ea !important; }

body.dark-mode .alert-info { background-color: #1a2a3a !important; border-color: #1e3a5f !important; color: #93c5e8 !important; }
body.dark-mode .alert-warning { background-color: #2a1f0a !important; border-color: #4a3800 !important; color: #f5d87a !important; }
body.dark-mode .alert-success { background-color: #0d2318 !important; border-color: #1a4a2e !important; color: #6ee7a0 !important; }
body.dark-mode .alert-danger { background-color: #2a0d10 !important; border-color: #4a1a1f !important; color: #f87a88 !important; }

body.dark-mode .accordion-item { background-color: #1e2130 !important; border-color: #2d3148 !important; }
body.dark-mode .accordion-button { background-color: #252840 !important; color: #e8e9ea !important; }
body.dark-mode .accordion-button:not(.collapsed) { background-color: #2d3050 !important; color: #e8e9ea !important; }
body.dark-mode .accordion-body { background-color: #1e2130 !important; }

body.dark-mode hr { border-color: #2d3148 !important; }
body.dark-mode .cuenta-confirmada { background-color: #0d2318 !important; border-color: #1a4a2e !important; }

/* --------- PRINT --------- */
.print-only { display: none; }

@media print {
  .no-print, .admin-sidebar, nav.navbar { display: none !important; }
  .admin-main { margin: 0 !important; padding: 0 !important; }
  .print-only { display: block !important; }
  body, .card { box-shadow: none !important; }
  .hero-header, .login-bg { background: none !important; color: #000 !important; }
  table { font-size: 11px; }
  .badge { border: 1px solid #ccc !important; color: #000 !important; background: none !important; }
  a[href]::after { content: none !important; }
}
