/* AgendaDeportiva Pro · Panel administrativo. Palette matched to Android app. */
:root {
  color-scheme: dark;
  --bg: #07090B;
  --header: #0D1013;
  --panel: #121619;
  --panel2: #1B2025;
  --panel3: #252B30;
  --line: #30373C;
  --text: #F8F7F4;
  --muted: #A2A8AD;
  --accent: #FF7900;
  --accent-light: #FFA12B;
  --accent-soft: #351C08;
  --danger: #FF8178;
  --success: #64D8A1;
  --amber: #FFBE62;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(900px 440px at 78% -14%, #321804 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 14px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--accent-light); text-decoration: none; }
a:hover { color: #FFC078; }
button, input, select, textarea { font: inherit; }
button, .btn {
  appearance: none; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: #17110B; padding: 10px 15px; font-weight: 800; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 16px #FF79001A; transition: filter .15s ease, transform .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover { filter: brightness(1.08); color: #17110B; box-shadow: 0 6px 20px #FF79002B; }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 2px; }
.btn.secondary, button.secondary { background: var(--panel3); color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.danger, button.danger { background: #3A0C10; color: #FFD9D9; border: 1px solid #6B2329; box-shadow: none; }
.shell { display: grid; grid-template-columns: 246px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 27px 17px; background: linear-gradient(180deg, #0D1013 0%, #080A0C 100%); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; font-size: 18px; font-weight: 950; letter-spacing: .2px; margin: 0 10px 5px; }
.brand span { color: var(--accent); }
.brand-pro { font-size: 10px; font-weight: 900; letter-spacing: 1px; color: #17110B; background: var(--accent); border-radius: 5px; padding: 2px 5px; }
.subbrand { margin: 0 10px 30px; color: var(--muted); font-size: 11px; letter-spacing: 1.6px; font-weight: 750; }
.nav a { display: flex; align-items: center; padding: 11px 13px; margin: 4px 0; border-radius: 10px; color: #C1C4C6; transition: background .15s ease, color .15s ease; }
.nav a.active, .nav a:hover { background: var(--accent-soft); color: var(--accent-light); }
.sidefoot { position: sticky; top: 85vh; color: #737A80; font-size: 10px; letter-spacing: .7px; padding: 30px 10px 0; }
.main { padding: 30px; max-width: 1500px; width: 100%; margin: 0 auto; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 26px; }
.eyebrow { font-size: 10px; color: var(--accent); font-weight: 900; letter-spacing: 2px; text-transform: uppercase; }
h1 { font-size: clamp(23px, 2.2vw, 30px); line-height: 1.2; margin: 4px 0 0; letter-spacing: -.4px; }
h2 { font-size: 18px; margin: 0 0 8px; letter-spacing: -.15px; }
.muted { color: var(--muted); }
code { overflow-wrap: anywhere; font-size: .9em; color: #FFC078; background: #1C140E; border: 1px solid #3C2818; padding: 2px 5px; border-radius: 5px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-bottom: 22px; }
.stat, .panel { min-width: 0; background: linear-gradient(145deg, #15191C, #101315); border: 1px solid var(--line); border-radius: 16px; padding: 19px; box-shadow: 0 10px 30px #00000016; }
.stat .num { font-size: 31px; font-weight: 900; margin-top: 8px; color: var(--text); }
.stat .label { font-size: 12px; color: var(--muted); }
.panel { margin-bottom: 18px; }
.panelhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 15px; }
.panelhead > div { min-width: 0; }
.tablewrap { overflow: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { text-align: left; padding: 13px 12px; border-bottom: 1px solid #262C30; vertical-align: middle; }
th { font-size: 10px; color: #A2A8AD; letter-spacing: 1px; text-transform: uppercase; font-weight: 850; white-space: nowrap; }
td { font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #FF790008; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; padding: 4px 9px; border-radius: 99px; background: #173126; color: var(--success); font-weight: 850; white-space: nowrap; }
.badge.off { background: #3A0C10; color: #FFA1A1; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 13px; }
.field label { font-size: 12px; color: #C4C7C9; font-weight: 750; }
.field input, .field select, .field textarea, input, select { max-width: 100%; }
.field input, .field select, .field textarea { width: 100%; min-width: 0; background: #0A0D0F; border: 1px solid #373E43; color: var(--text); border-radius: 9px; padding: 11px 12px; outline: none; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px #FF79001A; }
.formgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.formactions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.notice { padding: 12px 14px; border-radius: 10px; background: #17271F; border: 1px solid #28583F; color: #C8F5D8; margin-bottom: 16px; overflow-wrap: anywhere; }
.notice.error { background: #301417; border-color: #6B292F; color: #FFD0D4; }
.platformgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.platform { display: flex; align-items: center; gap: 9px; padding: 10px; background: #0D1113; border: 1px solid #30373C; border-radius: 10px; font-size: 12px; }
.platform input { accent-color: var(--accent); }
.inlineform { display: inline; }
.loginwrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login { width: min(430px, 100%); padding: 30px; border: 1px solid var(--line); background: linear-gradient(145deg, #171B1F, #0D1012); border-radius: 20px; box-shadow: 0 25px 90px #000A; }
.login .brand { margin: 0 0 24px; }
.login h1 { font-size: 25px; margin-bottom: 8px; }
.help { font-size: 12px; color: #91989D; }
.empty { padding: 24px; text-align: center; color: var(--muted); }
.tiny { font-size: 12px; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .subbrand { margin-bottom: 12px; }
  .nav { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
  .nav a { white-space: nowrap; margin: 0; }
  .sidefoot { display: none; }
  .main { padding: 20px 14px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platformgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .formgrid { grid-template-columns: 1fr; gap: 0; }
  .topbar { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .platformgrid { grid-template-columns: 1fr; }
  .panel, .stat { padding: 15px; border-radius: 13px; }
  .panelhead { align-items: flex-start; flex-direction: column; }
  .brand { font-size: 16px; }
  h1 { font-size: 24px; }
  .top-actions button, .top-actions .btn { padding: 9px 11px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

/* 1.4.1 — polished iconography and dedicated user-list/create views */
.icon-svg { width: 18px; height: 18px; flex: 0 0 18px; display: inline-block; vertical-align: middle; }
button .icon-svg, .btn .icon-svg { width: 17px; height: 17px; flex-basis: 17px; }
.brand-link { color: var(--text); text-decoration: none; width: fit-content; }
.brand-link:hover { color: var(--text); }
.brand .brand-rest { color: var(--text); }
.brand-pro { display: inline-flex; align-items: center; justify-content: center; }
.nav { display: grid; gap: 4px; }
.nav a { gap: 12px; min-height: 45px; padding: 11px 13px; font-weight: 650; }
.nav-icon { width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: currentColor; flex: 0 0 22px; }
.nav-icon .icon-svg { width: 20px; height: 20px; }
.nav a.active { box-shadow: inset 3px 0 0 var(--accent); background: linear-gradient(90deg, #351C08 0%, #21160F 100%); }
.page-toolbar, .users-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 19px; padding: 18px 20px; background: linear-gradient(135deg, #171B1F, #101315); border: 1px solid var(--line); border-radius: 16px; }
.page-toolbar h2, .users-toolbar h2 { margin: 3px 0 4px; font-size: 22px; }
.page-toolbar p, .users-toolbar p { margin: 4px 0 0; }
.page-toolbar .btn, .users-toolbar .btn { flex: 0 0 auto; }
.users-list-panel { padding: 0; overflow: hidden; }
.users-list-head { padding: 19px 20px 15px; margin: 0; flex-wrap: wrap; }
.users-list-head h2 { margin-bottom: 4px; }
.user-search { width: min(360px, 100%); min-width: 210px; display: flex; align-items: center; gap: 9px; border: 1px solid #373E43; background: #0A0D0F; border-radius: 10px; padding: 0 11px; color: var(--muted); }
.user-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px #FF79001A; }
.user-search .icon-svg { width: 17px; height: 17px; }
.user-search input { flex: 1; width: 100%; min-width: 0; padding: 11px 0; color: var(--text); border: 0; outline: 0; background: transparent; box-shadow: none; }
.user-search input:focus { border: 0; box-shadow: none; }
.users-list-panel .tablewrap { border-radius: 0 0 15px 15px; }
.users-list-panel table { min-width: 820px; }
.users-list-panel th { padding-top: 12px; padding-bottom: 12px; background: #0E1113; }
.users-list-panel td { padding-top: 14px; padding-bottom: 14px; }
.user-cell { display: flex; align-items: center; gap: 11px; min-width: 160px; }
.user-avatar { width: 37px; height: 37px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(145deg, #FF7900, #B94F00); color: #17110B; font-weight: 900; font-size: 16px; flex: 0 0 37px; box-shadow: 0 5px 13px #FF790022; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 25px; padding: 0 8px; border: 1px solid #3C2818; border-radius: 8px; background: #1C140E; color: #FFC078; font-weight: 800; }
.status-dot { width: 6px; height: 6px; background: currentColor; display: inline-block; border-radius: 50%; }
.badge.off .status-dot { color: #FFA1A1; }
.row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 9px; border: 1px solid #3A2A1D; border-radius: 8px; background: #20160F; color: #FFC078; font-size: 12px; font-weight: 750; text-decoration: none; cursor: pointer; box-shadow: none; }
.btn-icon:hover { color: #FFE0BC; background: #2A1B10; }
button.btn-icon { display: inline-flex; }
.btn-icon .icon-svg { width: 15px; height: 15px; flex-basis: 15px; }
.btn-icon.danger-icon { background: #251114; color: #FFA1A1; border-color: #5B2429; }
.btn-icon.danger-icon:hover { background: #3A151A; color: #FFD9D9; }
.create-user-panel .panelhead { align-items: flex-start; }
.form-step { display: inline-flex; padding: 6px 9px; border-radius: 7px; border: 1px solid #3C2818; background: #1C140E; color: var(--accent-light); font-size: 9px; font-weight: 900; letter-spacing: 1.2px; white-space: nowrap; }
.create-user-panel .formgrid { margin-top: 4px; }
.platform-field { margin-top: 5px; }
.platform-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.platform-heading p { margin: 2px 0 0; }
.platformgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.platform { min-height: 50px; transition: border-color .15s ease, background .15s ease; }
.platform:has(input:checked) { border-color: #8A4B1B; background: #21160F; }
.platform input { width: 17px; height: 17px; flex: 0 0 17px; }
.platform-mark { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #20262B; color: var(--muted); flex: 0 0 26px; }
.platform-mark .icon-svg { width: 15px; height: 15px; }
.platform:has(input:checked) .platform-mark { background: #3A210E; color: var(--accent-light); }
.platform-name { overflow-wrap: anywhere; }
.platform-name small { color: var(--muted); }
.platform-disabled { opacity: .52; }
.create-actions { justify-content: flex-end; margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.empty-platforms, .users-empty { display: flex; align-items: center; flex-direction: column; text-align: center; gap: 8px; padding: 28px 16px; border: 1px dashed #3A4146; border-radius: 12px; }
.empty-platforms p, .users-empty p { margin: 0 0 4px; }
.empty-icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; background: #27190F; color: var(--accent-light); border: 1px solid #4B2B14; border-radius: 14px; }
.empty-icon .icon-svg { width: 24px; height: 24px; }
.users-empty .btn { margin-top: 5px; }
.search-empty { padding: 22px; }
[hidden] { display: none !important; }
@media (max-width: 980px) {
  .page-toolbar, .users-toolbar { align-items: flex-start; }
  .users-list-head { flex-direction: column; align-items: stretch; }
  .user-search { width: 100%; }
  .platformgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .page-toolbar, .users-toolbar { flex-direction: column; align-items: stretch; padding: 16px; }
  .page-toolbar .btn, .users-toolbar .btn { width: 100%; }
  .platformgrid { grid-template-columns: 1fr; }
  .form-step { display: none; }
  .create-actions { flex-direction: column-reverse; align-items: stretch; }
  .create-actions .btn, .create-actions button { width: 100%; }
  .btn-icon span { display: none; }
  .btn-icon { width: 35px; padding: 7px; }
}


/* 1.4.2 — Force AgendaDeportiva Pro orange accent on login and admin UI.
   Overrides an older green palette without changing authentication logic. */
:root {
  --accent: #FF7900 !important;
  --accent-light: #FFA12B !important;
  --accent-soft: #351C08 !important;
}
.brand span,
.login .brand span,
.eyebrow,
.login .eyebrow {
  color: #FF7900 !important;
}
button:not(.secondary):not(.danger),
.btn:not(.secondary):not(.danger),
.login button[type="submit"],
.login button:not(.secondary):not(.danger),
.login .btn:not(.secondary):not(.danger) {
  background: linear-gradient(135deg, #FF7900, #FFA12B) !important;
  color: #17110B !important;
  border-color: #FF7900 !important;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline-color: #FFA12B !important;
}


/* 1.4.3 — Inicio de sesión con el mismo logo y acento naranja de Android. */
.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.login-logo img {
  display: block;
  width: 132px;
  height: 132px;
  max-width: 42vw;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 10px 24px #FF790026);
}
.login .eyebrow { color: #FF7900 !important; }
.login button[type="submit"] {
  background: linear-gradient(135deg, #FF7900, #FFA12B) !important;
  color: #17110B !important;
  border-color: #FF7900 !important;
}
