/* Manual de usuario Icon.Arizone. Color corporativo: panel lateral de la aplicacion rgb(0,175,240). */
:root {
  --brand: #00aff0; --brand-strong: #0077a8; --brand-soft: #e5f6fd;
  --bg: #ffffff; --bg-alt: #f5f7f9; --text: #1d2730; --muted: #5b6b78; --border: #dde3e8;
  --code: #eef2f5; --warn-bg: #fff6e0; --warn: #8a5a00; --tip-bg: #e9f8ef; --tip: #1f6b3a;
  --danger-bg: #fdecec; --danger: #a12626;
  --radius: 8px; --sidebar: 280px; --toc: 220px; --top: 56px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #33c2f5; --brand-strong: #7fd6f7; --brand-soft: #0c2b38;
    --bg: #12181d; --bg-alt: #182028; --text: #e3e9ee; --muted: #9aa8b3; --border: #2a353f;
    --code: #1f2a33; --warn-bg: #3a2d0c; --warn: #f2c46b; --tip-bg: #12321f; --tip: #8fdcaa;
    --danger-bg: #3d1717; --danger: #f4a0a0; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #33c2f5; --brand-strong: #7fd6f7; --brand-soft: #0c2b38;
  --bg: #12181d; --bg-alt: #182028; --text: #e3e9ee; --muted: #9aa8b3; --border: #2a353f;
  --code: #1f2a33; --warn-bg: #3a2d0c; --warn: #f2c46b; --tip-bg: #12321f; --tip: #8fdcaa;
  --danger-bg: #3d1717; --danger: #f4a0a0; color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; }
a { color: var(--brand-strong); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }

/* Cabecera */
.top { position: sticky; top: 0; z-index: 20; height: var(--top); display: flex; align-items: center; gap: 12px;
  padding: 0 16px; background: var(--brand); color: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 600; white-space: nowrap; }
.brand small { font-weight: 400; opacity: .9; margin-left: 4px; }
.menu-btn, .theme-btn { background: transparent; border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: var(--radius);
  width: 38px; height: 38px; font-size: 18px; cursor: pointer; flex: none; }
.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 520px; margin-left: auto; }
.search input { width: 100%; height: 38px; border-radius: var(--radius); border: 0; padding: 0 12px; font-size: 15px; background: #fff; color: #1d2730; }
#resultados { position: absolute; top: 44px; left: 0; right: 0; max-height: 70vh; overflow: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
#resultados a { display: block; padding: 8px 10px; border-radius: 6px; text-decoration: none; color: var(--text); }
#resultados a[aria-selected="true"], #resultados a:hover { background: var(--brand-soft); }
#resultados small { display: block; color: var(--muted); }
#resultados mark { background: #ffe58a; color: #000; }

/* Estructura */
.layout { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--toc); max-width: 1440px; margin: 0 auto; }
.sidebar { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; padding: 16px 8px 40px; border-right: 1px solid var(--border); background: var(--bg-alt); }
.cat summary { cursor: pointer; font-weight: 600; padding: 6px 10px; border-radius: 6px; list-style-position: inside; }
.cat summary:hover { background: var(--brand-soft); }
.cat ul { list-style: none; margin: 0 0 8px; padding: 0 0 0 14px; }
.cat a { display: block; padding: 4px 10px; border-radius: 6px; color: var(--text); text-decoration: none; font-size: 15px; }
.cat a:hover { background: var(--brand-soft); }
.cat a[aria-current="page"] { background: var(--brand); color: #fff; }
main { padding: 20px 40px 40px; min-width: 0; }
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow: auto; padding: 24px 16px; font-size: 14px; }
.toc ul { list-style: none; padding: 0; margin: 8px 0 0; }
.toc li.l3 { padding-left: 12px; }
.toc a { display: block; padding: 3px 0; color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.activo { color: var(--brand-strong); }
.migas { font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.migas a { color: var(--muted); }

/* Contenido */
article { max-width: 860px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 8px 0 16px; }
h2 { font-size: 1.45rem; margin: 40px 0 12px; padding-bottom: 6px; border-bottom: 2px solid var(--brand-soft); }
h3 { font-size: 1.15rem; margin: 28px 0 8px; }
.anchor { margin-left: 8px; opacity: 0; text-decoration: none; color: var(--muted); font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
kbd { display: inline-block; padding: 1px 7px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--bg-alt); font: 600 .85em/1.5 Consolas, monospace; }
code { background: var(--code); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.ruta { display: inline-block; background: var(--brand-soft); padding: 2px 8px; border-radius: 6px; font-weight: 600; }
table { border-collapse: collapse; width: 100%; margin: 12px 0 20px; font-size: 15px; display: block; overflow-x: auto; }
th, td { border: 1px solid var(--border); padding: 7px 10px; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); }
ol.pasos { counter-reset: paso; list-style: none; padding-left: 0; }
ol.pasos > li { counter-increment: paso; position: relative; padding: 2px 0 10px 42px; }
ol.pasos > li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.nota, .aviso, .consejo, .error { border-left: 4px solid; border-radius: var(--radius); padding: 10px 14px; margin: 16px 0; }
.nota { background: var(--brand-soft); border-color: var(--brand); }
.consejo { background: var(--tip-bg); border-color: var(--tip); }
.aviso { background: var(--warn-bg); border-color: var(--warn); }
.error { background: var(--danger-bg); border-color: var(--danger); }
.nota::before, .consejo::before, .aviso::before, .error::before { font-weight: 700; display: block; }
.nota::before { content: "Nota"; } .consejo::before { content: "Consejo"; } .aviso::before { content: "Atención"; } .error::before { content: "Error habitual"; }
.tarjetas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 16px 0; padding: 0; list-style: none; }
.tarjetas a { display: block; height: 100%; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; color: var(--text); background: var(--bg-alt); }
.tarjetas a:hover { border-color: var(--brand); }
.tarjetas strong { display: block; color: var(--brand-strong); }
details.faq { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; margin: 8px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
dl.glosario dt { font-weight: 700; margin-top: 12px; }
dl.glosario dd { margin-left: 0; color: var(--text); }

/* Capturas */
figure.shot { margin: 20px 0; }
figure.shot img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius); cursor: zoom-in; display: block; }
figure.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.pending-box { display: grid; place-items: center; text-align: center; min-height: 120px; border: 2px dashed var(--border); border-radius: var(--radius); color: var(--muted); background: var(--bg-alt); padding: 16px; }
.pending-box small { display: block; font-family: Consolas, monospace; }
#lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 24px; }
#lightbox[hidden] { display: none; }
#lightbox img { max-width: 100%; max-height: 100%; background: #fff; }
#lightbox button { position: absolute; top: 12px; right: 16px; font-size: 32px; background: none; border: 0; color: #fff; cursor: pointer; }

/* Pie y paginacion */
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; max-width: 860px; }
.pager a { flex: 1; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; text-decoration: none; }
.pager a small { display: block; color: var(--muted); }
.pager .next { text-align: right; }
.pie { margin-top: 32px; font-size: 13px; color: var(--muted); }

/* Responsive */
@media (max-width: 1150px) { .layout { grid-template-columns: var(--sidebar) minmax(0, 1fr); } .toc { display: none; } }
@media (max-width: 820px) {
  .layout { display: block; }
  .menu-btn { display: block; }
  .brand small { display: none; }
  .sidebar { position: fixed; z-index: 30; top: var(--top); left: 0; width: min(85vw, 320px); transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 16px rgba(0,0,0,.2); }
  body.nav-abierta .sidebar { transform: none; }
  main { padding: 16px; }
  h1 { font-size: 1.6rem; }
  .pager { flex-direction: column; }
}
@media (max-width: 480px) { .brand span { display: none; } }

/* Impresion */
@media print {
  .top, .sidebar, .toc, .pager, .migas, .anchor, #lightbox, .skip { display: none !important; }
  .layout { display: block; }
  main { padding: 0; }
  body { font-size: 11pt; color: #000; background: #fff; }
  a { color: #000; text-decoration: none; }
  h2, h3 { break-after: avoid; } figure, table, .nota, .aviso, .consejo, .error { break-inside: avoid; }
}
