/* BlueGym · sistema visual compartido */

:root {
  --navy: #0B2545;
  --navy-soft: #14335c;
  --blue: #1F6FEB;
  --ink: #1C2530;
  --muted: #64748B;
  --line: #E2E8F0;
  --bg: #F6F8FC;
  --white: #FFFFFF;
  --ok: #0F9D58;
  --warn: #C77700;
  --bad: #C0362C;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(11, 37, 69, .08);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------- landing */
.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}

.top-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  font-size: 15px;
  color: var(--navy);
}

.brand .dot {
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--blue);
  display: inline-block;
}

.brand small {
  color: var(--blue);
  letter-spacing: .14em;
  font-weight: 800;
}

.nav-links {
  display: flex;
  gap: 24px;
  margin-left: auto;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a:hover { color: var(--navy); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  transition: .15s ease;
  white-space: nowrap;
}

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #1760d0; }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: #c4cfdd; }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: #081c36; }
.btn-lg { padding: 15px 26px; font-size: 15px; }
.btn-block { width: 100%; }

.hero {
  padding: 76px 0 64px;
  background: linear-gradient(180deg, #FFFFFF 0%, #F6F8FC 100%);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 14px;
}

h1.hero-title {
  font-size: 46px;
  line-height: 1.05;
  letter-spacing: -.02em;
  margin: 0 0 18px;
  color: var(--navy);
  font-weight: 800;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 28px;
  max-width: 520px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-note {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--muted);
}

/* mock de teléfono */
.phone-shell {
  width: 300px;
  margin: 0 auto;
  background: #0B2545;
  border-radius: 34px;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(11,37,69,.28);
}

.phone-screen {
  background: var(--white);
  border-radius: 24px;
  overflow: hidden;
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.phone-head {
  background: var(--navy);
  color: #fff;
  padding: 18px 16px 22px;
}

.phone-head .who { font-size: 11px; opacity: .75; letter-spacing: .08em; text-transform: uppercase; }
.phone-head .name { font-size: 17px; font-weight: 700; margin-top: 2px; }

.phone-body { padding: 14px; display: grid; gap: 10px; }

.mini-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mini-card .ico {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: #EAF1FE;
  color: var(--blue);
  display: grid; place-items: center;
  font-weight: 800; font-size: 13px;
  flex: 0 0 auto;
}

.mini-card .t { font-size: 13px; font-weight: 600; }
.mini-card .s { font-size: 11.5px; color: var(--muted); }

/* secciones */
.section { padding: 72px 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -.015em;
  color: var(--navy);
  margin: 0 0 12px;
}
.section-head p { font-size: 16px; line-height: 1.6; color: var(--muted); margin: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 { margin: 0 0 8px; font-size: 17px; color: var(--navy); }
.card p { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }

.card .num {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  border-radius: 9px;
  background: #EAF1FE;
  color: var(--blue);
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 14px;
}

/* precios */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }

.plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}

.plan.featured {
  border: 2px solid var(--blue);
  box-shadow: var(--shadow);
  position: relative;
}

.plan .tag {
  position: absolute;
  top: -12px; left: 24px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.plan h3 { margin: 0 0 6px; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.plan .price { font-size: 38px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
.plan .price span { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.plan .per { font-size: 12.5px; color: var(--muted); margin: 4px 0 18px; }
.plan ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 9px; }
.plan li { font-size: 13.5px; color: var(--ink); padding-left: 22px; position: relative; line-height: 1.4; }
.plan li::before {
  content: "";
  position: absolute; left: 0; top: 5px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: #E7F6EE;
  border: 2px solid var(--ok);
}
.plan .spacer { flex: 1; }

/* faq */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary {
  cursor: pointer;
  font-weight: 650;
  font-size: 15px;
  color: var(--navy);
  list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-weight: 800; }
.faq details[open] summary::after { content: "–"; }
.faq p { margin: 10px 0 0; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: 760px; }

.cta-band {
  background: var(--navy);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.cta-band h2 { font-size: 30px; margin: 0 0 12px; letter-spacing: -.015em; }
.cta-band p { color: #B9CBE6; margin: 0 0 26px; font-size: 15px; }

footer.site {
  background: #071A31;
  color: #8FA6C4;
  padding: 36px 0;
  font-size: 13px;
}
footer.site .row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer.site a { color: #C9D8EC; }

/* ------------------------------------------------------------ app */
.app-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

.side {
  background: var(--navy);
  color: #fff;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side .brand { color: #fff; margin-bottom: 6px; padding: 0 8px; }
.side .brand small { color: #7FB0FF; }

.tenant-chip {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.07);
  border-radius: 10px;
  padding: 9px 10px;
  margin: 10px 0 18px;
  font-size: 12.5px;
}
.tenant-chip .logo {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--brand, var(--blue));
  display: grid; place-items: center;
  font-weight: 800; font-size: 12px; color: #fff;
  flex: 0 0 auto;
}
.tenant-chip .n { font-weight: 600; line-height: 1.2; }
.tenant-chip .u { font-size: 11px; color: #9DB6D8; }

.side a.item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  color: #C9D8EC;
}
.side a.item:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.item.active { background: var(--brand, var(--blue)); color: #fff; font-weight: 600; }
.side a.item .k { font-size: 11px; opacity: .8; margin-left: auto; }
.side .spacer { flex: 1; }
.side .foot { font-size: 11px; color: #7E96B5; padding: 10px 12px; }

.main { background: var(--bg); min-height: 100vh; }

.main-head {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky; top: 0; z-index: 10;
}
.main-head h1 { font-size: 19px; margin: 0; color: var(--navy); letter-spacing: -.01em; }
.main-head .sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.main-head .actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

.content { padding: 24px 28px 60px; display: grid; gap: 18px; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
}
.kpi .label { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.kpi .value { font-size: 27px; font-weight: 800; color: var(--navy); margin-top: 6px; letter-spacing: -.02em; }
.kpi .delta { font-size: 12px; color: var(--ok); margin-top: 2px; }
.kpi .delta.down { color: var(--bad); }

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.panel-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.panel-head h2 { font-size: 14.5px; margin: 0; color: var(--navy); }
.panel-head .more { margin-left: auto; font-size: 12.5px; color: var(--blue); font-weight: 600; }
.panel-body { padding: 6px 0; }

table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
table.list td { padding: 12px 18px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr:hover td { background: #FAFCFF; }

.pill {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #EEF2F7;
  color: var(--muted);
}
.pill.ok { background: #E7F6EE; color: #0B7A45; }
.pill.warn { background: #FDF3E3; color: var(--warn); }
.pill.bad { background: #FBEAE8; color: var(--bad); }
.pill.blue { background: #EAF1FE; color: #1B5AC0; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: #EAF1FE; color: #1B5AC0;
  display: inline-grid; place-items: center;
  font-size: 11.5px; font-weight: 800;
  margin-right: 9px;
  vertical-align: middle;
}

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }

/* agenda */
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.day {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 300px;
}
.day h4 {
  margin: 0 0 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  display: flex; justify-content: space-between;
}
.slot {
  border-left: 3px solid var(--brand, var(--blue));
  background: #F8FAFF;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  font-size: 12.5px;
}
.slot .h { font-weight: 700; color: var(--navy); font-size: 12px; }
.slot .c { color: var(--ink); }
.slot.done { opacity: .55; border-left-color: var(--ok); }
.slot.empty {
  border: 1px dashed #CBD5E1;
  border-left: 3px dashed #CBD5E1;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  text-align: center;
}

/* configuración de marca */
.brand-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input[type=text] {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}
.field input[type=text]:focus { outline: 2px solid #BFD5FA; border-color: var(--blue); }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 34px; height: 34px; border-radius: 9px;
  border: 2px solid transparent;
  cursor: pointer;
}
.swatch.sel { border-color: var(--navy); box-shadow: 0 0 0 3px #DCE8FB; }

.preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.preview .bar {
  background: var(--brand, var(--blue));
  color: #fff;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 10px;
}
.preview .bar .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,.2);
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.preview .body { padding: 18px; }
.preview .body h4 { margin: 0 0 6px; font-size: 18px; color: var(--navy); }
.preview .body p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.preview .chip {
  display: inline-block; font-size: 11px; font-weight: 700;
  background: #F1F5F9; color: var(--muted);
  padding: 4px 9px; border-radius: 999px;
}

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; padding: 11px 18px; border-radius: 10px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* responsive */
@media (max-width: 980px) {
  .hero-grid, .grid-2, .brand-grid { grid-template-columns: 1fr; }
  .grid-3, .plans, .kpis { grid-template-columns: 1fr 1fr; }
  .week { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; padding: 10px; align-items: center; }
  .side .tenant-chip, .side .foot, .side .spacer { display: none; }
  .side a.item { white-space: nowrap; }
  .nav-links { display: none; }
  h1.hero-title { font-size: 34px; }
}
@media (max-width: 640px) {
  .grid-3, .plans, .kpis { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .main-head { padding: 12px 16px; }
}
