/* ===== Rentalme · Manuales del alojamiento ===== */
:root {
  --brand: #3b71fe;
  --brand-dark: #2754d4;
  --brand-light: #e8efff;
  --brand-50: #f5f8ff;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --bg: #f8fafc;
  --white: #ffffff;
  --border: #e2e8f0;
  --warn-bg: #fff7ed;
  --warn-border: #fb923c;
  --warn-ink: #9a3412;
  --success-bg: #ecfdf5;
  --success-ink: #065f46;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 4px 14px rgba(59,113,254,0.18), 0 2px 4px rgba(15,23,42,0.06);
  --shadow-hover: 0 8px 24px rgba(59,113,254,0.28), 0 4px 8px rgba(15,23,42,0.08);
  --shadow-card: 0 2px 8px rgba(15,23,42,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  line-height: 1.5;
}

a { color: var(--brand); text-decoration: none; }

/* ===== Header ===== */
.header {
  background: var(--brand);
  color: var(--white);
  padding: 22px 20px 26px;
  text-align: center;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 4px 16px rgba(59,113,254,0.25);
  position: relative;
}

.header img.logo {
  height: 36px;
  margin-bottom: 8px;
  filter: brightness(0) invert(1);
}

.header h1 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header .subtitle {
  font-size: 0.82rem;
  opacity: 0.85;
  margin-top: 4px;
  font-weight: 400;
}

.header .back {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.18);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background 0.2s;
}
.header .back:hover { background: rgba(255,255,255,0.28); }
.header .back svg { width: 22px; height: 22px; }

/* ===== Container ===== */
.container {
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 16px 40px;
}

.intro {
  text-align: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ===== Section title ===== */
.section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 22px 6px 10px;
}
.section-title:first-of-type { margin-top: 6px; }

/* ===== Grid de tarjetas ===== */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 16px 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.15s, box-shadow 0.2s;
  border: 1.5px solid transparent;
  min-height: 110px;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15,23,42,0.08);
  border-color: var(--brand-light);
}

.card .icon-wrap {
  width: 40px;
  height: 40px;
  background: var(--brand-light);
  color: var(--brand);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card .icon-wrap svg { width: 22px; height: 22px; }

.card .name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.card .brand-tag {
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: -4px;
}

.card.empty .icon-wrap {
  background: #f1f5f9;
  color: var(--ink-faint);
}

.card.empty::after {
  content: "Próximamente";
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.62rem;
  background: #f1f5f9;
  color: var(--ink-faint);
  padding: 3px 7px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ===== Detalle ===== */
.device-hero {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
  text-align: center;
}

.device-hero .photo {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 14px;
  border-radius: 12px;
  display: block;
  background: var(--brand-50);
}

.device-hero h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.device-hero .model {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 4px;
}

/* ===== Diagrama SVG ===== */
.diagram-wrap {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 14px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.diagram-wrap h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.diagram-wrap h3 svg { width: 18px; height: 18px; color: var(--brand); }

.diagram-svg {
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  max-width: 380px;
}

.diagram-legend {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin-top: 14px;
  font-size: 0.84rem;
  align-items: start;
}

.diagram-legend .num {
  background: var(--brand);
  color: var(--white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.diagram-legend .desc {
  color: var(--ink-soft);
  line-height: 1.4;
  padding-top: 2px;
}
.diagram-legend .desc strong { color: var(--ink); }

/* ===== Pasos ===== */
.steps {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}

.steps h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.steps h3 svg { width: 18px; height: 18px; color: var(--brand); }

.steps ol {
  list-style: none;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 10px 0 10px 38px;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.5;
  border-bottom: 1px solid #f1f5f9;
}
.steps li:last-child { border-bottom: none; padding-bottom: 0; }
.steps li:first-child { padding-top: 0; }

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 10px;
  width: 26px;
  height: 26px;
  background: var(--brand);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
}
.steps li:first-child::before { top: 0; }

.steps li code,
.steps li .key {
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.86em;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}

/* ===== Tips / warnings ===== */
.tip {
  background: var(--warn-bg);
  border-left: 4px solid var(--warn-border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.tip svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--warn-border);
  margin-top: 1px;
}

.tip .text {
  font-size: 0.88rem;
  color: var(--warn-ink);
  line-height: 1.45;
}

.tip .text strong { display: block; margin-bottom: 3px; }

.info {
  background: var(--brand-50);
  border-left: 4px solid var(--brand);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.info svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--brand); margin-top: 1px; }
.info .text { font-size: 0.88rem; color: var(--ink); line-height: 1.45; }
.info .text strong { display: block; margin-bottom: 3px; color: var(--brand-dark); }

/* ===== Empty placeholder ===== */
.placeholder {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.placeholder .pill {
  display: inline-block;
  background: var(--brand-light);
  color: var(--brand-dark);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.placeholder h2 { font-size: 1.1rem; margin-bottom: 8px; }
.placeholder p { color: var(--ink-soft); font-size: 0.9rem; }

/* ===== Footer ===== */
.footer {
  text-align: center;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.footer strong { color: var(--ink); }

@media (min-width: 500px) {
  .header { padding: 28px 20px 30px; }
  .header h1 { font-size: 1.28rem; }
  .grid { gap: 12px; }
  .card { min-height: 124px; padding: 18px; }
}
