:root {
    --brand-primary: #5a1f24;
    --brand-ink: #101523;
    --brand-soft: #f3f4f6;
    --navy: #5a1f24;
    --navy-mid: #3f1519;
    --gold: #5a1f24;
    --gold-soft: #f5ebec;
    --ink: #1d2430;
    --muted: #6b7280;
    --line: #e5e7eb;
    --bg: #f3f4f6;
    --card: #ffffff;
    --danger: #8f2d2d;
    --ok: #2d6a4f;
    --pink: #5a1f24;
    --pink-dark: #3f1519;
    --pink-soft: #f5ebec;
}

* { box-sizing: border-box; }

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--brand-soft);
    color: var(--ink);
    min-height: 100vh;
}

a { color: var(--brand-primary); }

.top-nav {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.brand-wrap { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    object-fit: contain;
    border: 1px solid rgba(0, 0, 0, .06);
    background: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-title { font-weight: 800; color: #2f1f22; font-size: 1.05rem; }
.brand-subtitle { font-size: .72rem; color: #6b7280; font-weight: 600; margin-top: 2px; }
.navbar .nav-link { font-weight: 600; font-size: .9rem; color: #2e3440; }
.navbar .nav-link.active { color: var(--brand-primary); }
.nav-tabs .nav-link { color: #4b5563; font-weight: 700; }
.nav-tabs .nav-link.active {
    color: var(--brand-primary);
    border-color: #e5e7eb #e5e7eb #fff;
}
.btn-login {
    border: 1px solid var(--brand-primary);
    color: var(--brand-primary);
    font-size: .8rem;
    background: #fff;
}
.btn-login:hover,
.btn-login:focus {
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.hero-carousel-home .carousel-item { min-height: 340px; }
.hero-carousel-home .carousel-control-prev-icon,
.hero-carousel-home .carousel-control-next-icon { filter: invert(1); }
.hero-carousel-home .carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, .45);
}
.hero-slide-wrap {
    position: relative;
    overflow: hidden;
    min-height: 340px;
    color: #fff;
    display: flex;
    align-items: center;
    border-radius: 0 0 14px 14px;
    background:
        linear-gradient(105deg, rgba(10, 16, 28, .22) 0%, rgba(20, 45, 72, .14) 50%, rgba(6, 10, 18, .12) 100%),
        var(--hero-img) center / cover no-repeat;
    background-color: #1a2332;
}
.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 720px;
    padding: 76px 24px;
}
.hero-copy h1,
.hero-copy p {
    text-shadow: 0 1px 3px rgba(0, 0, 0, .85), 0 2px 22px rgba(0, 0, 0, .55);
}
.hero-copy h1 {
    font-size: clamp(1.7rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
}

.section-title {
    font-weight: 800;
    text-align: center;
    margin: 36px 0 24px;
    color: #1d2330;
}

.content-card {
    border: 1px solid #e8eaee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 20px rgba(9, 18, 28, .06);
}
.icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f5ebec;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-weight: 700;
}

.btn-pink {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    font-weight: 700;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
}
.btn-pink:hover { background: #3f1519; color: #fff; }
.btn-outline-pink {
    background: #fff;
    color: var(--brand-primary);
    border: 1px solid var(--brand-primary);
    font-weight: 700;
}
.btn-outline-pink:hover { background: #f5ebec; color: var(--brand-primary); }

.demo-box { padding: 1.3rem 1.25rem; }
.demo-box h2 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
    color: #1d2330;
}
.robot-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid #e5e7eb;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.8rem;
    background: #f9fafb;
    border-radius: 8px;
}
.details-title {
    font-weight: 800;
    text-align: center;
    margin: 28px 0 12px;
}
.demo-result { max-width: 860px; margin: 0 auto 2rem; }

.doc-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}
.doc-section h2 {
    font-weight: 800;
    font-size: 1.25rem;
    margin-bottom: 0.7rem;
}
pre.code {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 10px;
    padding: 0.9rem 1rem;
    font-size: 0.82rem;
    overflow: auto;
}

.vars-block {
    font-family: ui-monospace, Consolas, "Courier New", monospace;
    font-size: 0.92rem;
    line-height: 1.7;
}
.var-line { white-space: pre-wrap; word-break: break-word; }
.var-name { color: var(--brand-primary); font-weight: 700; }
.var-eq { color: #6b7280; }
.var-val { color: #1d2430; }

.page-narrow { max-width: 920px; margin: 0 auto; padding: 2.2rem 1rem 3rem; }
.page-narrow h1 { font-weight: 800; margin-bottom: 0.7rem; }

.price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.2rem;
}
.price-card {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 12px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(9, 18, 28, .06);
}
.price-card h2 { font-size: 1.2rem; font-weight: 800; }
.price-card .amount { font-size: 2rem; font-weight: 800; color: var(--brand-primary); }

.auth-page { padding: 2.5rem 1rem 3.5rem; }
.auth-box {
    max-width: 420px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 12px;
    padding: 1.7rem 1.45rem;
    box-shadow: 0 10px 20px rgba(9, 18, 28, .06);
}
.auth-box h1 { font-size: 1.4rem; font-weight: 800; }

.site-footer a {
    display: block;
    color: #d9c89a;
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.site-footer a:hover { color: #fff; }

.floating-contacts {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
}
.btn-floating {
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}
.btn-floating:hover { color: #fff; filter: brightness(1.1); }
.btn-floating.btn-telegram { background-color: #0088cc; }

.page-wrap { padding: 1.4rem 0 2.5rem; }

.panel {
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 12px;
}
.panel-header {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e8eaee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}
.panel-body { padding: 1.2rem; }

.ads-banner,
.ad-slot {
    border: 1px dashed #e8c4c7;
    background: #f5ebec;
    min-height: 90px;
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    padding: 1rem;
    border-radius: 12px;
}
.ad-header { margin-bottom: 1rem; }
.ad-footer { margin-top: 1.2rem; }
.ad-sidebar { min-height: 220px; }

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 700;
}
.pill-ok { background: #e8f5e9; color: var(--ok); }
.pill-warn { background: #fff4e5; color: #9a6700; }
.pill-off { background: #f5ebec; color: var(--danger); }

.btn-gold, .btn-ink {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    font-weight: 700;
}
.btn-gold:hover, .btn-ink:hover { background: #3f1519; color: #fff; }

.form-control, .form-select {
    border-radius: 8px;
    border-color: #d1d5db;
    padding: 0.6rem 0.75rem;
}

.token-box {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 0.82rem;
    background: #f9fafb;
    word-break: break-all;
}

.table thead th {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    background: #f9fafb;
}

.empresa-card {
    border: 1px solid #e8eaee;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
}
.empresa-card h3 { font-size: 1.15rem; margin: 0; font-weight: 800; }
.anexos-cta {
    border-top: 1px solid #e8eaee;
    padding-top: 1rem;
    background: #f5ebec;
    margin: 0 -1.2rem -1.2rem;
    padding: 1rem 1.2rem 1.15rem;
    border-radius: 0 0 12px 12px;
}
.ruc-chip {
    font-family: ui-monospace, Consolas, monospace;
    background: var(--brand-primary);
    color: #fff;
    border-radius: 6px;
    padding: 0.15rem 0.5rem;
    font-size: 0.85rem;
}
.empty-state {
    padding: 2.4rem 1rem;
    text-align: center;
    color: var(--muted);
}

@media (max-width: 900px) {
    .price-grid { grid-template-columns: 1fr; }
    .brand-title { font-size: .92rem; }
}
