/* Repositorio de Partituras — Banda de Música Las Calderas (piloto)
   Mobile-first · Azul marino + blanco · Estética de app */

:root {
  --navy-950: #040d1a;
  --navy-900: #061426;
  --navy-800: #0b2140;
  --navy-700: #12305e;
  --navy-600: #1a4480;
  --navy-500: #3b82d6;
  --bg: #061426;
  --card: #0d2547;
  --text: #eef3fb;
  --muted: #9db1d4;
  --line: #1b3358;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.45;
}

/* ---------- LOGIN ---------- */
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, var(--navy-700) 0%, var(--navy-950) 70%);
}

.login-card {
  width: 100%;
  max-width: 360px;
  background: var(--card);
  border-radius: 20px;
  padding: 36px 28px 30px;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
}

.login-emblem {
  width: 64px; height: 64px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 34px;
  display: flex; align-items: center; justify-content: center;
}

.login-card h1 { margin: 0 0 4px; font-size: 22px; color: #fff; }
.login-sub { margin: 0; color: var(--muted); font-size: 14px; }
.login-note {
  display: inline-block;
  margin: 12px 0 18px;
  font-size: 12px; font-weight: 700;
  color: #bcd4f5;
  background: rgba(59, 130, 214, .16);
  padding: 5px 12px;
  border-radius: 999px;
  text-transform: uppercase; letter-spacing: .06em;
}

#login-form input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  color: var(--text);
  background: var(--navy-950);
  border: 2px solid var(--line);
  border-radius: 12px;
  margin-bottom: 12px;
  outline: none;
}
#login-form input:focus { border-color: var(--navy-500); }

#login-form button {
  width: 100%;
  padding: 14px;
  font-size: 16px; font-weight: 700;
  color: #fff;
  background: var(--navy-500);
  border: none; border-radius: 12px;
  cursor: pointer;
}
#login-form button:active { background: var(--navy-600); }

.login-error { color: #ff9a9a; font-size: 14px; margin: 10px 0 0; }
.login-remember { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13.5px; color: var(--muted); margin: 14px 0 6px; cursor: pointer; user-select: none; }
.login-remember input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--gold); cursor: pointer; }
.login-remember span { line-height: 1.2; }

/* ---------- HEADER ---------- */
.app-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  background: var(--navy-900);
  color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
  box-shadow: 0 2px 12px rgba(6, 20, 38, .35);
}

.header-brand {
  flex: 1;
  display: flex; align-items: center; gap: 10px;
  min-width: 0;
}
.header-brand-text {
  display: flex; flex-direction: column;
  line-height: 1.3;
  min-width: 0;
}
.header-kicker {
  font-size: 10px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}
.header-band {
  font-size: 12px; font-weight: 800;
  color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.view-title {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 15px; font-weight: 700;
  letter-spacing: .05em;
  color: var(--muted);
  padding: 10px 16px 0;
  white-space: nowrap; overflow: hidden;
}
.view-title span { overflow: hidden; text-overflow: ellipsis; }
.view-title svg { width: 17px; height: 17px; flex: none; color: var(--gold); }
@keyframes titleIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view-title.title-in { animation: titleIn .28s var(--ease-out); }
.header-emblem {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px;
  background: rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
}
.header-spacer { width: 40px; flex: none; }

.icon-btn {
  width: 40px; height: 40px; flex: none;
  border: none; border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 19px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  text-decoration: none;
}
.icon-btn:active { background: rgba(255, 255, 255, .25); }

/* ---------- VISTAS ---------- */
.view { max-width: 560px; margin: 0 auto; padding: 14px 14px 30px; }

.search-wrap {
  position: sticky; top: 60px; z-index: 10;
  padding: 10px 0 16px;
  background: rgba(6, 20, 38, .68);
  backdrop-filter: blur(14px) saturate(1.25);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  mask-image: linear-gradient(180deg, #000 82%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 82%, transparent);
}
#search {
  box-shadow: 0 10px 28px rgba(0, 0, 0, .45);
  border: 1px solid rgba(255, 255, 255, .1);
}
#search {
  width: 100%;
  padding: 13px 16px 13px 42px;
  font-size: 16px;
  color: var(--text);
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239db1d4' stroke-width='2.4'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center / 20px;
  box-shadow: var(--shadow);
  outline: none;
}
#search::placeholder { color: var(--muted); }
#search:focus { box-shadow: 0 0 0 2px var(--navy-500); border-color: var(--navy-500); }

.chips {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 2px 0 12px;
}
.chip {
  padding: 12px 6px 10px;
  font-size: 13px; font-weight: 700;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
  line-height: 1.25;
}
.chip .ico { font-size: 24px; line-height: 1; }
.chip .n {
  color: var(--muted); font-weight: 600; font-size: 11px;
  background: rgba(255, 255, 255, .08);
  padding: 1px 8px; border-radius: 999px;
}
.chip.active { background: var(--navy-500); border-color: var(--navy-500); color: #fff; }
.chip.active .n { color: rgba(255, 255, 255, .85); background: rgba(0, 0, 0, .2); }

.result-count { margin: 2px 2px 10px; font-size: 13px; color: var(--muted); }

.cards { display: grid; gap: 10px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  border: none; width: 100%;
  text-align: left;
  cursor: pointer;
  display: block;
  font: inherit; color: inherit;
}
.card:active { transform: scale(.985); }

.card-top { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.badge {
  font-size: 11px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .05em;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(59, 130, 214, .18); color: #bcd4f5;
}
.badge.cat { background: var(--navy-500); color: #fff; }
.card h3 { margin: 0; font-size: 17px; color: #fff; }
.card .meta { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.card .foot {
  margin: 10px 0 0; padding-top: 10px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted); font-weight: 600;
}
.card .go { color: var(--navy-500); font-size: 18px; }

.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ---------- FICHA ---------- */
.detail-hero {
  background: linear-gradient(150deg, var(--navy-800), var(--navy-950));
  color: #fff;
  border-radius: 18px;
  padding: 20px 18px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(8, 28, 54, .25);
}
.detail-hero h2 { margin: 0 0 8px; font-size: 21px; }
.detail-hero .badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-hero .badge { background: rgba(255, 255, 255, .16); color: #fff; }
.detail-hero .badge.cat { background: #fff; color: var(--navy-800); }
.meta-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px 14px; font-size: 13.5px;
}
.meta-grid .k { color: rgba(255, 255, 255, .6); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; display: block; }
.meta-grid .v { font-weight: 600; }
.meta-note { margin: 12px 0 0; font-size: 13px; color: rgba(255, 255, 255, .75); font-style: italic; }

.actions { display: grid; gap: 10px; margin-bottom: 18px; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px;
  font-size: 16px; font-weight: 700;
  border-radius: var(--radius);
  border: none; cursor: pointer;
  text-decoration: none;
  font: inherit;
}
.btn.primary { background: var(--navy-500); color: #fff; box-shadow: var(--shadow); }
.btn.primary:active { background: var(--navy-600); }
.btn.ghost { background: var(--card); color: var(--text); box-shadow: var(--shadow); border: 1px solid var(--line); }

.section-title {
  font-size: 13px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted);
  margin: 18px 2px 10px;
}

.family { margin-bottom: 12px; }
.family-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--navy-800); color: #fff;
  border-radius: 12px;
  font-weight: 800; font-size: 14px;
}
.family-head .count {
  margin-left: auto;
  background: rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 2px 10px; font-size: 12px;
}
.part-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 13px 14px;
  background: var(--card);
  border: none; border-bottom: 1px solid var(--line);
  font: inherit; text-align: left;
  cursor: pointer;
}
.part-row:first-of-type { border-top-left-radius: 0; border-top-right-radius: 0; }
.family .part-row:last-child { border-bottom: none; border-radius: 0 0 12px 12px; }
.family-list { border-radius: 0 0 12px 12px; overflow: hidden; box-shadow: var(--shadow); margin-top: 6px; }
.part-row:active { background: rgba(255, 255, 255, .06); }
.part-name { flex: 1; font-weight: 600; font-size: 15px; color: var(--text); }
.part-pages { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.part-row .go { color: var(--navy-500); }

.app-footer {
  text-align: center;
  font-size: 12px; color: var(--muted);
  padding: 18px 14px calc(22px + env(safe-area-inset-bottom));
}

/* ---------- VISOR PDF ---------- */
.pdf-viewer {
  position: fixed; inset: 0; z-index: 50;
  background: var(--navy-950);
  display: flex; flex-direction: column;
}
.pdf-viewer[hidden] { display: none; }
.pdf-bar {
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  background: var(--navy-900);
}
.pdf-title {
  flex: 1; color: #fff; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pdf-stage {
  flex: 1; overflow: auto;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 8px;
  background: var(--navy-950);
}
#pdf-canvas {
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .5);
  max-width: 100%;
}
.pdf-nav {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  background: var(--navy-900);
}
.pdf-nav .icon-btn { font-size: 30px; width: 52px; height: 52px; }
.pdf-pageinfo {
  color: #fff; font-size: 14px; font-weight: 600;
  min-width: 70px; text-align: center;
}

[hidden] { display: none !important; }

/* ---------- TALLER (clon privado: marca sutil) ---------- */
.taller-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: #d3c69e; border: 1px solid rgba(211, 198, 158, .6);
  border-radius: 999px; padding: 3px 9px; white-space: nowrap; flex: none;
}

/* ---------- MODO OFFLINE / GUARDADOS ---------- */
.offline-info {
  position: relative;
  background: var(--navy-800);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 44px 12px 14px;
  margin-bottom: 12px;
  font-size: 13.5px; color: var(--text);
}
.offline-info p { margin: 0 0 6px; }
.offline-info p:last-child { margin: 0; }
.offline-info .offline-example { color: var(--muted); font-size: 12.5px; }
.offline-info .icon-btn {
  position: absolute; top: 6px; right: 6px;
  width: 30px; height: 30px; font-size: 14px; border-radius: 9px;
}
.saved-link { width: 100%; margin-bottom: 12px; }
.saved-link[hidden] { display: none; }

.part-row-wrap { display: flex; align-items: stretch; }
.part-row-wrap .part-row { flex: 1; min-width: 0; }
.save-btn {
  flex: none; width: 54px;
  background: var(--card);
  border: none; border-bottom: 1px solid var(--line);
  font-size: 18px; cursor: pointer; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.save-btn:active { background: rgba(255, 255, 255, .08); }
.save-btn.saved { color: #d3c69e; }
.save-btn:disabled { opacity: .5; }
.family-list .part-row-wrap:last-child .part-row { border-bottom: none; border-radius: 0 0 0 12px; }
.family-list .part-row-wrap:last-child .save-btn { border-bottom: none; border-radius: 0 0 12px 0; }
.family-list .part-row-wrap:only-child .part-row { border-radius: 0 0 0 12px; }

.action-row { display: flex; gap: 10px; align-items: stretch; }
.action-row .btn { flex: 1; min-width: 0; }
.action-row .save-btn {
  width: 58px; flex: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card);
}
#view-saved .part-row-wrap { margin-bottom: 8px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
#view-saved .part-row { border-bottom: none; border-radius: 12px 0 0 12px; }
#view-saved .save-btn { border-bottom: none; border-radius: 0 12px 12px 0; }

/* ---------- crédito footer ---------- */
.app-footer .credit { font-size: 10px; opacity: .5; }

/* ---------- badges ---------- */
.badge.nuevo { background: #e5484d; color: #fff; }
.badge.fav { background: rgba(211, 198, 158, .18); color: #d3c69e; }

/* ---------- navegación lateral derecha ---------- */
.view { padding-bottom: 32px; padding-right: 70px; }
.app-footer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); padding-right: 70px; }
.tabbar {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  width: 58px; padding: 10px 0;
  background: rgba(10, 18, 38, .92);
  border: 1px solid var(--line); border-right: none;
  border-radius: 14px 0 0 14px;
  backdrop-filter: blur(6px);
}
.tabbar[hidden] { display: none; }
.tab {
  background: none; border: none; color: var(--muted);
  font-size: 20px; padding: 8px 2px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  position: relative; font-family: inherit;
}
.tab span { font-size: 9px; font-weight: 700; }
.tab.active { color: #d3c69e; }
.tab-badge {
  position: absolute; top: 4px; right: 6px;
  background: #e5484d; color: #fff; font-size: 10px; font-weight: 800;
  border-radius: 999px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
  font-style: normal;
}
.tab-badge[hidden] { display: none; }

/* ---------- modo lectura (visor PDF) ---------- */
.pdf-viewer.reading .pdf-bar,
.pdf-viewer.reading .pdf-nav { display: none; }
.pdf-viewer.reading .pdf-stage { padding: 0; }
.pdf-viewer.reading #pdf-canvas { border-radius: 0; }

/* ---------- selector de repertorio (overlay) ---------- */
.rep-picker {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .6);
  display: flex; align-items: flex-end; justify-content: center;
}
.rep-picker[hidden] { display: none; }
.rep-picker-card {
  background: var(--navy-900); border: 1px solid var(--line);
  border-radius: 18px 18px 0 0; padding: 18px;
  width: 100%; max-width: 560px; max-height: 72vh; overflow: auto;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}
.rep-picker-card h3 { margin: 0 0 12px; font-size: 16px; }
.rep-picker-card .btn { width: 100%; margin-top: 6px; }
.rep-picker-row {
  display: block; width: 100%; text-align: left;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 13px 14px; margin-bottom: 8px;
  font: inherit; font-weight: 600; cursor: pointer;
}
.rep-picker-row:disabled { opacity: .55; }

/* ---------- repertorios ---------- */
.rep-new { display: flex; gap: 10px; margin-top: 16px; }
.rep-new input {
  flex: 1; min-width: 0;
  background: var(--navy-800); border: 1px solid var(--line); color: var(--text);
  border-radius: 12px; padding: 13px 14px; font: inherit;
}
.rep-new .btn { flex: none; padding: 13px 18px; }
#rep-add-inline { margin-top: 12px; }
#rep-add-search {
  width: 100%; background: var(--navy-800); border: 1px solid var(--line);
  color: var(--text); border-radius: 12px; padding: 13px 14px; font: inherit;
  margin-bottom: 10px;
}
#rep-add-results .part-row-wrap {
  margin-bottom: 8px; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow);
}
#rep-add-results .part-row { border-bottom: none; }
.rep-remove { color: #e5484d; }
.btn.danger { background: transparent; border: 1px solid #e5484d; color: #e5484d; width: 100%; margin-top: 20px; }

/* ---------- novedades / actividad ---------- */
.activity-row { display: flex; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--line); }
.a-dot { width: 8px; height: 8px; border-radius: 50%; background: #d3c69e; flex: none; margin-top: 6px; }
.activity-row p { margin: 0; font-size: 14px; }
.activity-row small { color: var(--muted); }

/* ---------- herramientas ---------- */
.tool-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
}
.tool-card h3 { margin: 0 0 12px; font-size: 17px; }
.tool-note { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.tool-card .btn { width: 100%; }
.metro-display { text-align: center; margin-bottom: 6px; }
.metro-display span { font-size: 58px; font-weight: 800; }
.metro-display small { color: var(--muted); margin-left: 6px; font-size: 14px; }
#metro-slider { width: 100%; margin: 8px 0 14px; accent-color: #d3c69e; }
.metro-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 12px; }
.metro-row .btn { flex: 1; }
.metro-row select {
  flex: 1; background: var(--navy-800); color: var(--text);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; font: inherit;
}
.metro-lights { display: flex; gap: 10px; justify-content: center; margin-top: 14px; min-height: 16px; }
.metro-lights i { width: 14px; height: 14px; border-radius: 50%; background: var(--line); }
.metro-lights i.on { background: #d3c69e; }
.metro-lights i.on.accent { background: #e5484d; }
.tuner-display { text-align: center; margin-top: 16px; }
#tuner-note { font-size: 64px; font-weight: 800; line-height: 1; }
.tuner-meter {
  position: relative; height: 10px; background: var(--navy-800);
  border-radius: 999px; margin: 16px 34px; overflow: visible;
}
.tuner-meter::after {
  content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px;
  background: var(--muted); opacity: .5; transform: translateX(-50%);
}
#tuner-needle {
  position: absolute; top: -3px; bottom: -3px; width: 4px;
  background: #d3c69e; left: calc(50% - 2px); border-radius: 2px;
}
#tuner-needle.ok { background: #37d47a; }
#tuner-cents { color: var(--muted); font-size: 14px; }

/* ---------- ensayo de hoy ---------- */
.ensayo {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900));
  border: 1px solid rgba(211, 198, 158, .45);
  border-radius: var(--radius);
  padding: 16px 14px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.ensayo[hidden] { display: none; }
.ensayo-kicker {
  margin: 0 0 4px; font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #d3c69e;
}
.ensayo h2 { margin: 0 0 2px; font-size: 20px; }
.ensayo .meta { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.ensayo-obra { border-top: 1px solid var(--line); padding: 10px 0; }
.ensayo-obra:first-of-type { border-top: none; }
.ensayo-obra-head {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text);
  font: inherit; cursor: pointer; padding: 2px 0;
}
.ensayo-obra-head strong { font-size: 15.5px; display: block; }
.ensayo-obra-head .meta { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.ensayo-partes { display: grid; gap: 8px; margin-top: 8px; }
.ensayo-parte { width: 100%; padding: 12px; font-size: 14px; }
.ensayo .meta-note { margin: 8px 0 0; }

/* ---------- CALENDARIO ---------- */
.cal-mes { color: var(--gold, #d4a017); font-weight: 700; font-size: 13px; text-transform: capitalize; margin: 14px 0 6px; }
.cal-row { display: flex; align-items: center; gap: 10px; background: var(--card, #101c33); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.cal-row.past { opacity: .62; }
.cal-tipo { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.cal-info { flex: 1; min-width: 0; font-size: 14px; }
.cal-info small { color: var(--muted); text-transform: capitalize; }
.cal-row .btn { flex-shrink: 0; padding: 8px 10px; font-size: 13px; }

/* ============================================================
   REDISEÑO 2026-10-13 — iconos vectoriales minimalistas,
   paleta refinada (azul profundo + dorado) y transiciones suaves
   ============================================================ */
:root {
  --gold: #d3c69e;
  --gold-hi: #f1e8cf;
  --gold-soft: rgba(211, 198, 158, .14);
  --ease-out: cubic-bezier(.2, .7, .3, 1);
}


/* ---------- transiciones entre vistas ---------- */
@keyframes viewIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.view:not([hidden]) { animation: viewIn .32s var(--ease-out); }

/* ---------- header refinado ---------- */
.app-header {
  background: linear-gradient(180deg, #0a1c36 0%, var(--navy-900) 100%);
  border-bottom: 1px solid rgba(211, 198, 158, .22);
  box-shadow: 0 4px 18px rgba(2, 8, 18, .45);
}
.header-emblem {
  background: linear-gradient(140deg, var(--gold-hi), var(--gold));
  color: #0a1428;
  box-shadow: 0 2px 8px rgba(211, 198, 158, .35);
  width: auto; padding: 6px 8px; gap: 5px;
}
.header-emblem svg { width: 15px; height: 15px; }

/* ---------- disclaimer ---------- */
.disclaimer {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(120% 90% at 50% 0%, var(--navy-700) 0%, var(--navy-950) 70%);
}
.disclaimer[hidden] { display: none; }
.disclaimer-card {
  width: 100%;
  max-width: 380px;
  border-radius: 18px;
  padding: 26px 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
}
.disclaimer-card h3 {
  margin: 0 0 12px;
  font-size: 19px;
  letter-spacing: .02em;
}
.disc-main { font-size: 15px; line-height: 1.55; margin: 0 0 14px; }
.disc-fine {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 18px;
  text-align: justify;
}
.disclaimer-card .btn { width: 100%; }
.disc-steps {
  text-align: left;
  font-size: 14.5px;
  line-height: 1.7;
  margin: 0 0 18px;
  padding-left: 22px;
}
.disc-steps svg { width: 16px; height: 16px; vertical-align: -3px; }

/* ---------- tablón de avisos ---------- */
.tablon {
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(211, 198, 158, .14), rgba(211, 198, 158, .05));
  border: 1px solid rgba(211, 198, 158, .35);
  border-left: 4px solid var(--gold);
}
.tablon[hidden] { display: none; }
.tablon-kicker {
  display: flex; align-items: center; gap: 7px;
  margin: 0 0 8px;
  font-size: 11px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold);
}
.tablon-kicker svg { width: 16px; height: 16px; }
.aviso + .aviso { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.aviso h3 { margin: 0 0 4px; font-size: 15px; }
.aviso p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink-soft); }
.aviso-fecha { font-size: 11.5px !important; color: var(--muted) !important; margin-top: 4px !important; }

/* ---------- login refinado ---------- */
.login-emblem {
  width: 84px; height: 72px;
  border-radius: 22px;
  background: linear-gradient(140deg, var(--gold-hi), var(--gold));
  color: #0a1428;
  box-shadow: 0 10px 28px rgba(211, 198, 158, .35);
  gap: 8px;
}
.login-emblem svg { width: 30px; height: 30px; }
.login-card {
  border: 1px solid rgba(255, 255, 255, .09);
  background: linear-gradient(165deg, #10294e 0%, var(--navy-900) 60%);
}
#login-form button {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #0a1428;
  box-shadow: 0 6px 18px rgba(211, 198, 158, .3);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
#login-form button:active { transform: scale(.98); }

/* ---------- barra lateral con vectores ---------- */
.tabbar {
  width: 62px;
  background: rgba(8, 17, 34, .94);
  border: 1px solid rgba(211, 198, 158, .18);
  border-right: none;
  box-shadow: -6px 0 24px rgba(0, 0, 0, .4);
}
.tab {
  padding: 9px 2px;
  border-radius: 12px;
  margin: 1px 5px;
  transition: color .2s var(--ease-out), background .2s var(--ease-out), transform .15s var(--ease-out);
}
.tab svg { width: 23px; height: 23px; display: block; }
.tab span { font-size: 9px; font-weight: 700; letter-spacing: .02em; }
.tab:active { transform: scale(.93); }
.tab.active {
  color: var(--gold);
  background: var(--gold-soft);
  box-shadow: inset 0 0 0 1px rgba(211, 198, 158, .35);
}
.tab.active svg { filter: drop-shadow(0 0 6px rgba(211, 198, 158, .5)); }
/* Tabs solo con icono (sin texto) */
.tab span { display: none; }
.tab { padding: 12px 2px; }
.tab svg { width: 24px; height: 24px; }

/* ---------- chips con vectores ---------- */
.chip { transition: transform .15s var(--ease-out), background .2s var(--ease-out), border-color .2s; }
.chip:active { transform: scale(.96); }
.chip .ico { font-size: 0; line-height: 0; }
.chip .ico svg { width: 26px; height: 26px; }
.chip.active {
  background: linear-gradient(160deg, var(--gold-hi), var(--gold));
  border-color: transparent;
  color: #0a1428;
  box-shadow: 0 6px 16px rgba(211, 198, 158, .3);
}
.chip.active .n { color: #0a1428; background: rgba(0, 0, 0, .14); }

/* ---------- botones de guardar (vector) ---------- */
.save-btn svg { width: 20px; height: 20px; }
.save-btn.saved { color: var(--gold); }
.save-btn.saved svg { filter: drop-shadow(0 0 5px rgba(211, 198, 158, .55)); }

/* ---------- botones principales ---------- */
.btn.primary {
  background: linear-gradient(180deg, #3f7fe0, #2b5cb3);
  box-shadow: 0 6px 18px rgba(47, 111, 208, .35);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn.primary:active { transform: scale(.98); box-shadow: 0 2px 8px rgba(47, 111, 208, .3); }
.btn.ghost { transition: transform .15s var(--ease-out), background .2s; }
.btn.ghost:active { transform: scale(.98); }

/* ---------- tarjetas con relieve sutil ---------- */
.card {
  border: 1px solid rgba(255, 255, 255, .07);
  background: linear-gradient(165deg, #10294e 0%, var(--card) 70%);
  transition: transform .15s var(--ease-out), border-color .2s;
}
.card:active { transform: scale(.985); border-color: rgba(211, 198, 158, .35); }
.detail-hero { border: 1px solid rgba(211, 198, 158, .25); }
.badge.cat { background: linear-gradient(160deg, var(--gold-hi), var(--gold)); color: #0a1428; }

/* ---------- iconos vectoriales en herramientas ---------- */
.tool-card h3 svg { width: 22px; height: 22px; vertical-align: -5px; margin-right: 2px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.ensayo-kicker svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 2px; }
.offline-info p svg { width: 17px; height: 17px; vertical-align: -3px; }
.rep-picker-card h3 svg { width: 20px; height: 20px; vertical-align: -4px; margin-right: 2px; }
.icon-btn svg { width: 20px; height: 20px; display: block; }
.badge svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.cal-tipo svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 3px; }

/* ---------- respeta movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  .view:not([hidden]) { animation: none; }
  * { transition-duration: .01ms !important; }
}
