/* =========================================================
   VendingPro ERP — Manual de Usuario
   Stylesheet global
   ========================================================= */

:root {
    /* Color palette */
    --brand: #1d4ed8;
    --brand-dark: #1e40af;
    --brand-light: #dbeafe;
    --brand-ultralight: #eff6ff;

    --ink-900: #0a0e27;
    --ink-800: #111827;
    --ink-700: #1f2937;
    --ink-600: #374151;
    --ink-500: #6b7280;
    --ink-400: #9ca3af;
    --ink-300: #d1d5db;
    --ink-200: #e5e7eb;
    --ink-100: #f3f4f6;
    --ink-50:  #f9fafb;

    --paper: #ffffff;
    --paper-warm: #fdfcfa;
    --paper-tint: #f7f8fa;

    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --info: #2563eb;

    /* Typography */
    --font-display: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    /* Layout */
    --sidebar-w: 280px;
    --content-max: 760px;
    --topbar-h: 64px;

    /* Spacing scale */
    --s-1: 4px;
    --s-2: 8px;
    --s-3: 12px;
    --s-4: 16px;
    --s-5: 20px;
    --s-6: 24px;
    --s-8: 32px;
    --s-10: 40px;
    --s-12: 48px;
    --s-16: 64px;
    --s-20: 80px;

    /* Radii */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(10, 14, 39, 0.04), 0 1px 1px rgba(10, 14, 39, 0.03);
    --shadow-md: 0 4px 12px rgba(10, 14, 39, 0.06), 0 2px 4px rgba(10, 14, 39, 0.04);
    --shadow-lg: 0 12px 32px rgba(10, 14, 39, 0.08), 0 4px 8px rgba(10, 14, 39, 0.04);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-700);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* =========================================================
   LAYOUT — Three-column wrapper
   ========================================================= */

.manual-wrap {
    display: grid;
    grid-template-columns: var(--sidebar-w) 1fr;
    min-height: 100vh;
}

/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    background: var(--ink-900);
    color: rgba(255, 255, 255, 0.78);
    padding: var(--s-8) 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--ink-800);
}

.sidebar-header {
    padding: 0 var(--s-6) var(--s-8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: var(--s-6);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    text-decoration: none;
    color: #fff;
}

.sidebar-logo-mark {
    width: 36px;
    height: 36px;
    background: var(--brand);
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.sidebar-logo-mark svg {
    width: 20px;
    height: 20px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
}

.sidebar-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.01em;
    line-height: 1.1;
}

.sidebar-logo-sub {
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-top: 2px;
}

.sidebar-search {
    padding: 0 var(--s-6) var(--s-6);
}

.sidebar-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: var(--s-3) var(--s-4);
    border-radius: var(--r-md);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.15s ease;
}

.sidebar-search-input::placeholder { color: rgba(255, 255, 255, 0.4); }

.sidebar-search-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--brand);
}

.sidebar-nav { padding: 0 var(--s-3); }

.sidebar-section {
    margin-bottom: var(--s-6);
}

.sidebar-section-title {
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 var(--s-3) var(--s-2);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: var(--s-2) var(--s-3);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    border-radius: var(--r-sm);
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.12s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.sidebar-link.active {
    background: var(--brand);
    color: #fff;
    font-weight: 500;
}

.sidebar-link-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-link.active .sidebar-link-num {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

/* =========================================================
   CONTENT AREA
   ========================================================= */

.content-area {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--paper);
}

/* Topbar */
.topbar {
    height: var(--topbar-h);
    border-bottom: 1px solid var(--ink-200);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--s-8);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 13px;
    color: var(--ink-500);
}

.breadcrumb a {
    color: var(--ink-500);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--brand); }

.breadcrumb-sep {
    color: var(--ink-300);
}

.breadcrumb-current {
    color: var(--ink-800);
    font-weight: 500;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.topbar-link {
    padding: var(--s-2) var(--s-4);
    border-radius: var(--r-sm);
    color: var(--ink-600);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.12s ease;
}

.topbar-link:hover {
    background: var(--ink-100);
    color: var(--ink-900);
}

.topbar-link-primary {
    background: var(--brand);
    color: #fff;
}

.topbar-link-primary:hover {
    background: var(--brand-dark);
    color: #fff;
}

/* =========================================================
   PAGE CONTENT
   ========================================================= */

.page {
    flex: 1;
    padding: var(--s-12) var(--s-16);
    max-width: calc(var(--content-max) + var(--s-32, 128px));
}

.page-header {
    margin-bottom: var(--s-10);
    padding-bottom: var(--s-8);
    border-bottom: 1px solid var(--ink-200);
}

.page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: var(--s-3);
}

.page-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--brand);
}

.page-title {
    font-family: var(--font-display);
    font-size: 44px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink-900);
    letter-spacing: -0.02em;
    margin-bottom: var(--s-4);
}

.page-subtitle {
    font-size: 18px;
    color: var(--ink-500);
    line-height: 1.5;
    max-width: 640px;
}

/* =========================================================
   PROSE — Article content
   ========================================================= */

.prose { max-width: var(--content-max); }

.prose h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--ink-900);
    letter-spacing: -0.015em;
    margin-top: var(--s-12);
    margin-bottom: var(--s-4);
    scroll-margin-top: 80px;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
    font-family: var(--font-body);
    font-size: 19px;
    font-weight: 600;
    color: var(--ink-900);
    margin-top: var(--s-8);
    margin-bottom: var(--s-3);
    scroll-margin-top: 80px;
}

.prose h4 {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-800);
    margin-top: var(--s-6);
    margin-bottom: var(--s-2);
    text-transform: none;
}

.prose p {
    margin-bottom: var(--s-4);
    color: var(--ink-700);
    line-height: 1.7;
}

.prose p:last-child { margin-bottom: 0; }

.prose strong {
    color: var(--ink-900);
    font-weight: 600;
}

.prose em { font-style: italic; }

.prose a {
    color: var(--brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.12s ease;
}

.prose a:hover { color: var(--brand-dark); }

.prose ul, .prose ol {
    margin-bottom: var(--s-4);
    padding-left: var(--s-6);
}

.prose ul li, .prose ol li {
    margin-bottom: var(--s-2);
    line-height: 1.7;
    color: var(--ink-700);
}

.prose ul li::marker { color: var(--brand); }

.prose ol { counter-reset: list-counter; padding-left: 0; list-style: none; }

.prose ol li {
    counter-increment: list-counter;
    position: relative;
    padding-left: 36px;
}

.prose ol li::before {
    content: counter(list-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    display: grid;
    place-items: center;
    font-family: var(--font-body);
}

.prose code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--ink-100);
    color: var(--ink-800);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--ink-200);
}

.prose pre {
    background: var(--ink-900);
    color: #f9fafb;
    padding: var(--s-5);
    border-radius: var(--r-md);
    overflow-x: auto;
    margin-bottom: var(--s-4);
    font-size: 14px;
    line-height: 1.6;
}

.prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    border: none;
}

/* =========================================================
   CALLOUTS — Tip, Alert, Note, Important
   ========================================================= */

.callout {
    display: flex;
    gap: var(--s-4);
    padding: var(--s-5);
    border-radius: var(--r-md);
    margin: var(--s-6) 0;
    border-left: 3px solid;
}

.callout-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
}

.callout-icon svg { width: 100%; height: 100%; }

.callout-content { flex: 1; }

.callout-title {
    font-weight: 600;
    color: var(--ink-900);
    margin-bottom: 4px;
    font-size: 14px;
}

.callout-body {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-700);
}

.callout-body p { margin-bottom: var(--s-2); }
.callout-body p:last-child { margin-bottom: 0; }

.callout-tip {
    background: #eff6ff;
    border-color: var(--brand);
}
.callout-tip .callout-icon { color: var(--brand); }

.callout-warning {
    background: #fffbeb;
    border-color: var(--warning);
}
.callout-warning .callout-icon { color: var(--warning); }

.callout-danger {
    background: #fef2f2;
    border-color: var(--danger);
}
.callout-danger .callout-icon { color: var(--danger); }

.callout-success {
    background: #f0fdf4;
    border-color: var(--success);
}
.callout-success .callout-icon { color: var(--success); }

.callout-note {
    background: var(--ink-50);
    border-color: var(--ink-400);
}
.callout-note .callout-icon { color: var(--ink-500); }

/* =========================================================
   SCREENSHOT PLACEHOLDERS
   ========================================================= */

.screenshot {
    margin: var(--s-6) 0;
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 2px dashed var(--ink-300);
    background: var(--ink-50);
    position: relative;
    transition: all 0.2s ease;
}

/* Cuando contiene una imagen real (no placeholder), quitar borde punteado */
.screenshot:has(img) {
    border: 1px solid var(--ink-200);
    background: var(--paper);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.screenshot:not(:has(img)):hover {
    border-color: var(--brand);
    background: var(--brand-ultralight);
}

.screenshot-placeholder {
    padding: var(--s-12) var(--s-6);
    text-align: center;
    color: var(--ink-500);
}

.screenshot-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--s-4);
    color: var(--ink-400);
}

.screenshot-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--s-2);
}

.screenshot-desc {
    font-size: 14px;
    color: var(--ink-500);
    max-width: 480px;
    margin: 0 auto;
}

.screenshot-dims {
    margin-top: var(--s-3);
    display: inline-block;
    background: var(--paper);
    border: 1px solid var(--ink-200);
    padding: 4px 12px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-500);
}

.screenshot img {
    display: block;
    max-width: 100%;
    height: auto;
}

.screenshot-caption {
    padding: var(--s-3) var(--s-5);
    background: var(--ink-50);
    border-top: 1px solid var(--ink-200);
    font-size: 13px;
    color: var(--ink-600);
    font-style: italic;
}

/* Variante para capturas de app movil — proporcion real de pantalla de telefono */
.screenshot.is-mobile {
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}
.screenshot.is-mobile img {
    border-radius: var(--r-md);
}
@media (max-width: 640px) {
    .screenshot.is-mobile {
        max-width: 280px;
    }
}

/* =========================================================
   KBD — Keyboard hints
   ========================================================= */

kbd {
    display: inline-block;
    padding: 2px 8px;
    background: var(--paper);
    border: 1px solid var(--ink-300);
    border-bottom-width: 2px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--ink-700);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

/* =========================================================
   TABLES
   ========================================================= */

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--s-6) 0;
    font-size: 14px;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-md);
    overflow: hidden;
}

.prose table th {
    background: var(--ink-50);
    text-align: left;
    padding: var(--s-3) var(--s-4);
    font-weight: 600;
    color: var(--ink-800);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--ink-200);
}

.prose table td {
    padding: var(--s-3) var(--s-4);
    border-bottom: 1px solid var(--ink-100);
    color: var(--ink-700);
    vertical-align: top;
}

.prose table tr:last-child td { border-bottom: none; }

.prose table tr:hover td { background: var(--ink-50); }

/* =========================================================
   STEP CARDS — Visual procedures
   ========================================================= */

.steps {
    counter-reset: step-counter;
    margin: var(--s-6) 0;
}

.step {
    counter-increment: step-counter;
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: var(--s-5);
    padding: var(--s-5);
    border-left: 2px solid var(--ink-200);
    position: relative;
    margin-bottom: var(--s-3);
}

.step::before {
    content: counter(step-counter);
    position: absolute;
    left: -16px;
    top: var(--s-5);
    width: 32px;
    height: 32px;
    background: var(--brand);
    color: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
}

.step > div:first-child { display: none; }

.step-title {
    font-weight: 600;
    color: var(--ink-900);
    font-size: 15px;
    margin-bottom: 4px;
}

.step-body {
    font-size: 14px;
    color: var(--ink-700);
    line-height: 1.6;
}

.step-body p { margin-bottom: var(--s-2); }
.step-body p:last-child { margin-bottom: 0; }

/* =========================================================
   ROLE BADGES — User role indicators
   ========================================================= */

.roles-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-6);
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid;
}

.role-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.role-super { background: #faf5ff; color: #6b21a8; border-color: #e9d5ff; }
.role-super::before { background: #a855f7; }

.role-gerente { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; }
.role-gerente::before { background: #2563eb; }

.role-operaciones { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.role-operaciones::before { background: #16a34a; }

.role-contabilidad { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.role-contabilidad::before { background: #d97706; }

.role-ventas { background: #fce7f3; color: #9d174d; border-color: #fbcfe8; }
.role-ventas::before { background: #ec4899; }

.role-tecnico { background: #ecfeff; color: #155e75; border-color: #a5f3fc; }
.role-tecnico::before { background: #0891b2; }

.role-cliente { background: #f5f3ff; color: #5b21b6; border-color: #ddd6fe; }
.role-cliente::before { background: #7c3aed; }

/* =========================================================
   PAGE FOOTER NAV — Prev / Next
   ========================================================= */

.page-footer {
    margin-top: var(--s-16);
    padding-top: var(--s-8);
    border-top: 1px solid var(--ink-200);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-4);
}

.page-nav-link {
    display: block;
    padding: var(--s-5);
    border: 1px solid var(--ink-200);
    border-radius: var(--r-md);
    text-decoration: none;
    transition: all 0.15s ease;
    background: var(--paper);
}

.page-nav-link:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.page-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--ink-500);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-nav-title {
    color: var(--ink-900);
    font-weight: 600;
    font-size: 15px;
}

.page-nav-next { text-align: right; }
.page-nav-next .page-nav-label { justify-content: flex-end; }

/* =========================================================
   TOC — Table of Contents (right rail, optional)
   ========================================================= */

.toc {
    position: sticky;
    top: calc(var(--topbar-h) + var(--s-6));
    padding: var(--s-4);
    font-size: 13px;
}

.toc-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ink-500);
    margin-bottom: var(--s-3);
}

.toc-list { list-style: none; padding: 0; }

.toc-list li { margin-bottom: var(--s-2); }

.toc-list a {
    color: var(--ink-600);
    text-decoration: none;
    display: block;
    padding: 2px 0;
    border-left: 2px solid transparent;
    padding-left: var(--s-3);
    margin-left: -2px;
    transition: all 0.12s ease;
}

.toc-list a:hover { color: var(--brand); }

.toc-list a.active {
    color: var(--brand);
    border-color: var(--brand);
    font-weight: 500;
}

/* =========================================================
   HOMEPAGE HERO
   ========================================================= */

.hero {
    padding: var(--s-20) var(--s-12);
    background:
        radial-gradient(ellipse at top left, rgba(29, 78, 216, 0.08), transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(29, 78, 216, 0.05), transparent 50%),
        var(--paper-warm);
    text-align: center;
    border-bottom: 1px solid var(--ink-200);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: 6px 14px;
    background: var(--paper);
    border: 1px solid var(--ink-200);
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ink-700);
    margin-bottom: var(--s-6);
}

.hero-eyebrow-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2); }
    50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0.05); }
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 700;
    line-height: 1.05;
    color: var(--ink-900);
    letter-spacing: -0.025em;
    margin-bottom: var(--s-5);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-title em {
    font-style: normal;
    color: var(--brand);
    font-weight: 600;
}

.hero-subtitle {
    font-size: 18px;
    color: var(--ink-500);
    max-width: 580px;
    margin: 0 auto var(--s-8);
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: var(--s-3);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    padding: var(--s-3) var(--s-6);
    border-radius: var(--r-md);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s ease;
    font-size: 15px;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.btn-ghost {
    background: var(--paper);
    color: var(--ink-700);
    border-color: var(--ink-200);
}
.btn-ghost:hover { border-color: var(--ink-400); }

/* Homepage cards grid */
.section-grid {
    padding: var(--s-16) var(--s-12);
    max-width: 1200px;
    margin: 0 auto;
}

.section-grid-header {
    text-align: center;
    margin-bottom: var(--s-12);
}

.section-grid-eyebrow {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--s-2);
}

.section-grid-title {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--ink-900);
    letter-spacing: -0.02em;
    margin-bottom: var(--s-3);
}

.section-grid-subtitle {
    color: var(--ink-500);
    font-size: 16px;
    max-width: 540px;
    margin: 0 auto;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--s-5);
}

.card {
    background: var(--paper);
    border: 1px solid var(--ink-200);
    border-radius: var(--r-lg);
    padding: var(--s-6);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    border-color: var(--brand);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.card-icon {
    width: 44px;
    height: 44px;
    background: var(--brand-ultralight);
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    margin-bottom: var(--s-4);
    color: var(--brand);
}

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

.card-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-400);
    font-weight: 500;
    margin-bottom: var(--s-2);
}

.card-title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: var(--s-2);
    letter-spacing: -0.01em;
}

.card-desc {
    color: var(--ink-500);
    font-size: 14px;
    line-height: 1.5;
    flex: 1;
    margin-bottom: var(--s-4);
}

.card-pages {
    font-size: 12px;
    color: var(--ink-500);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1024px) {
    :root { --sidebar-w: 240px; }
    .page { padding: var(--s-8) var(--s-10); }
    .hero { padding: var(--s-12) var(--s-6); }
    .section-grid { padding: var(--s-12) var(--s-6); }
}

@media (max-width: 768px) {
    .manual-wrap { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .sidebar.open { transform: translateX(0); }
    .topbar { padding: 0 var(--s-4); }
    .page { padding: var(--s-6) var(--s-4); }
    .page-title { font-size: 32px; }
    .hero-title { font-size: 36px; }
    .page-footer { grid-template-columns: 1fr; }
    .mobile-menu-btn { display: flex; }
}

.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--ink-200);
    border-radius: var(--r-sm);
    background: var(--paper);
    cursor: pointer;
    color: var(--ink-700);
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: inline-flex; }
}

/* Backdrop for mobile sidebar */
.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 39, 0.5);
    z-index: 99;
}

.sidebar-backdrop.show { display: block; }

/* =========================================================
   UTILITIES
   ========================================================= */

.text-center { text-align: center; }
.mb-0 { margin-bottom: 0 !important; }

/* Print styles */
@media print {
    .sidebar, .topbar, .page-footer { display: none; }
    .page { padding: 0; max-width: 100%; }
}

/* =========================================================
   LOGO BLOCK — Sidebar header con logo.webp + MANUAL DE USO
   ========================================================= */
.sidebar-logo-block {
    display: block;
    text-decoration: none;
    padding: 0;
}

.sidebar-logo-img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 56px;
    width: auto;
    margin-bottom: 10px;
}

.sidebar-logo-sub-text {
    display: block;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-top: 4px;
}
