/* Teknisoft Contab - Manual estatico */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #1f2d3d;
  --ink-2: #4a5a6b;
  --muted: #7b8a9a;
  --line: #e2e8f0;
  --brand: #1aa58a;
  --brand-2: #2a6fdb;
  --brand-soft: #e6f6f2;
  --side: #2a3f54;
  --side-ink: #d7e0e9;
  --side-active: #1abc9c;
  --warn-bg: #fff7e6; --warn-line: #f0ad4e;
  --info-bg: #eaf3fe; --info-line: #2a6fdb;
  --ok-bg: #e9f7ef; --ok-line: #26b99a;
  --danger-bg: #fdecea; --danger-line: #d9534f;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(20, 32, 44, .08);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code, kbd { font-family: var(--mono); font-size: .86em; background: #eef2f6; border-radius: 5px; padding: .1em .4em; }
kbd { border: 1px solid #cfd8e3; border-bottom-width: 2px; background: #fff; }
pre { background: #1f2d3d; color: #e6edf3; padding: 16px 18px; border-radius: 10px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }

/* Layout */
.layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 18px 0 40px; }
.side .brand { display: flex; align-items: center; gap: 10px; padding: 0 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .brand img { width: 38px; height: 38px; }
.side .brand b { display: block; color: #fff; font-size: 18px; line-height: 1.1; }
.side .brand small { color: #9fb3c8; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.side .search { padding: 14px 16px 6px; }
.side .search input { width: 100%; border: 0; border-radius: 8px; padding: 9px 12px; background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 14px; }
.side .search input::placeholder { color: #9fb3c8; }
.side nav { padding: 6px 0; }
.side .group { padding: 16px 20px 6px; color: #8fa5bb; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.side nav a { display: flex; gap: 10px; align-items: center; padding: 8px 20px; color: var(--side-ink); font-size: 14.5px; border-left: 3px solid transparent; }
.side nav a:hover { background: rgba(255,255,255,.05); text-decoration: none; color: #fff; }
.side nav a.active { background: rgba(255,255,255,.08); border-left-color: var(--side-active); color: #fff; font-weight: 600; }
.side nav a .n { color: #8fa5bb; font-size: 12px; min-width: 20px; }
.side nav a.hidden { display: none; }

.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 5; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: 10px 32px; display: flex; align-items: center; gap: 14px; }
.topbar .crumb { color: var(--muted); font-size: 14px; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 18px; cursor: pointer; }
.topbar .print-btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-2); }

.content { max-width: 1060px; margin: 0 auto; padding: 36px 32px 80px; }
.content h1 { font-size: 34px; line-height: 1.2; margin: 0 0 8px; letter-spacing: -.01em; }
.content .lead { font-size: 19px; color: var(--ink-2); margin: 0 0 28px; }
.content h2 { font-size: 25px; margin: 48px 0 12px; padding-top: 8px; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.content h2:first-of-type { border-top: 0; }
.content h3 { font-size: 19px; margin: 30px 0 8px; scroll-margin-top: 70px; }
.content h4 { font-size: 16px; margin: 22px 0 6px; color: var(--ink-2); }
.content p, .content li { color: #2b3a4a; }
.content ul, .content ol { padding-left: 22px; }
.content li { margin: 4px 0; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px; margin: 0 0 28px; }
.toc b { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.toc ol { margin: 8px 0 0; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; font-size: 15px; }

/* Components */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 18px 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.card .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 20px; margin-bottom: 10px; }
.card h4 { margin: 0 0 6px; color: var(--ink); font-size: 16.5px; }
.card p { margin: 0; font-size: 14.5px; color: var(--ink-2); }
a.card { display: block; color: inherit; transition: transform .12s ease, box-shadow .12s ease; }
a.card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20,32,44,.12); }

.callout { border-left: 4px solid var(--info-line); background: var(--info-bg); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
.callout.tip { border-color: var(--ok-line); background: var(--ok-bg); }
.callout.warn { border-color: var(--warn-line); background: var(--warn-bg); }
.callout.danger { border-color: var(--danger-line); background: var(--danger-bg); }
.callout > b:first-child { display: block; margin-bottom: 2px; }
.callout p { margin: 4px 0; }

figure.shot { margin: 20px 0 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
figure.shot .chrome { display: flex; gap: 6px; padding: 9px 12px; background: #eef2f6; border-bottom: 1px solid var(--line); align-items: center; }
figure.shot .chrome i { width: 10px; height: 10px; border-radius: 50%; background: #d4dbe3; display: inline-block; }
figure.shot .chrome span { margin-left: 10px; font: 12px var(--mono); color: var(--muted); background: #fff; border-radius: 6px; padding: 2px 10px; flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
figure.shot img { display: block; width: 100%; height: auto; cursor: zoom-in; }
figure.shot figcaption { padding: 10px 16px 12px; font-size: 14px; color: var(--ink-2); border-top: 1px solid var(--line); }
figure.shot figcaption b { color: var(--ink); }
figure.shot.phone { max-width: 340px; }
.shots-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.shots-2 figure.shot { margin: 8px 0; }

.steps { counter-reset: s; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: s; position: relative; padding: 2px 0 10px 44px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; display: grid; place-items: center; }

table.t { width: 100%; border-collapse: collapse; margin: 14px 0 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; font-size: 14.5px; }
table.t th, table.t td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: var(--surface-2); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
table.t tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #eef2f6; color: var(--ink-2); vertical-align: middle; }
.badge.green { background: #d9f2e6; color: #187a52; }
.badge.blue { background: #dde9fb; color: #1d4f9c; }
.badge.amber { background: #fdeccd; color: #8a5a00; }
.badge.red { background: #f9dcdc; color: #9b2c2c; }
.badge.violet { background: #ece3fb; color: #5b34a6; }
.btn-like { display: inline-block; font-size: 13px; font-weight: 600; padding: 1px 9px; border-radius: 5px; background: #26b99a; color: #fff; }
.btn-like.grey { background: #6c7a89; }
.btn-like.blue { background: #2a6fdb; }

/* Flow diagram */
.flow { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin: 18px 0 26px; }
.flow .node { flex: 1 1 140px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; position: relative; box-shadow: var(--shadow); }
.flow .node b { display: block; font-size: 14.5px; }
.flow .node small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; margin-top: 2px; }
.flow .node .k { font-size: 11px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .08em; }
.flow .arrow { align-self: center; color: var(--muted); font-size: 20px; }

/* Priority ladder */
.ladder { list-style: none; padding: 0 !important; margin: 18px 0 26px; }
.ladder li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 0 0 8px !important; }
.ladder .lvl { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--brand-2); font-size: 18px; }
.ladder li:nth-child(2) .lvl { background: #2f80c9; }
.ladder li:nth-child(3) .lvl { background: #1d97a8; }
.ladder li:nth-child(4) .lvl { background: #1aa58a; }
.ladder li:nth-child(5) .lvl { background: #56b15d; }
.ladder li:nth-child(6) .lvl { background: #9aa84a; }
.ladder li:nth-child(7) .lvl { background: #b08b3e; }
.ladder li b { display: block; }
.ladder li span { color: var(--ink-2); font-size: 14.5px; }

/* Hero (index) */
.hero { background: linear-gradient(135deg, #1f2d3d 0%, #24476b 55%, #1a7f74 100%); color: #fff; border-radius: 18px; padding: 44px 40px; margin: 0 0 30px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(26,188,156,.45), transparent 65%); }
.hero img.logo { height: 54px; margin-bottom: 18px; position: relative; z-index: 1; }
.hero h1, .hero p { position: relative; z-index: 1; }
.hero h1 { color: #fff; font-size: 40px; margin: 0 0 12px; max-width: 760px; }
.hero p { color: #d8e4ef; font-size: 19px; max-width: 720px; margin: 0 0 22px; }
.hero .pills { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.hero .pills span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 5px 12px; border-radius: 999px; font-size: 13.5px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0 0 30px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat b { display: block; font-size: 28px; color: var(--brand); line-height: 1.1; }
.stat span { font-size: 13.5px; color: var(--ink-2); }

.pager { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--line); }
.pager a { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.pager a small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.pager a.next { text-align: right; }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding: 26px 0 0; }

/* Lightbox */
.lb { position: fixed; inset: 0; background: rgba(12, 20, 30, .88); display: none; align-items: center; justify-content: center; z-index: 50; padding: 24px; cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 100%; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb .cap { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #dfe7ef; font-size: 14px; }

/* Responsive */
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); }
  .topbar { padding: 10px 16px; }
  .topbar .menu-btn { display: inline-block; }
  .topbar .print-btn { display: none; }
  .topbar .crumb { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 24px 16px 60px; }
  .content h1 { font-size: 28px; }
  .hero { padding: 30px 22px; }
  .hero h1 { font-size: 30px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .shots-2 { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
}

@media print {
  .side, .topbar, .pager, .lb { display: none !important; }
  .layout { display: block; }
  .content { max-width: none; padding: 0; }
  figure.shot, .card, .ladder li { box-shadow: none; break-inside: avoid; }
  body { background: #fff; }
}
