/* ============================================================
   ERP AUTOMOTRIZ — Tema oscuro automotriz (glassmorphism + rojo)
   ============================================================ */

:root {
    --bg: #0b0b0f;
    --bg-2: #101016;
    --panel: #15151d;
    --panel-2: #1b1b25;
    --border: #262633;
    --border-2: #32323f;
    --text: #f2f2f5;
    --muted: #9a9aa8;
    --muted-2: #6e6e7c;
    --red: #e10600;
    --red-2: #ff2d20;
    --orange: #ff6b35;
    --amber: #ffb800;
    --green: #22c55e;
    --blue: #3b82f6;
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --glass: rgba(21, 21, 29, 0.72);
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    font-size: 14.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-head); letter-spacing: 0.3px; margin: 0; }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.02rem; font-weight: 600; }
a { color: inherit; text-decoration: none; }
p { margin: 0.35rem 0; }
img { max-width: 100%; }

::selection { background: rgba(225, 6, 0, 0.5); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: #2c2c38; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a48; }

/* ============ GLASS CARDS ============ */
.glass-card {
    background: var(--glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-head h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-head h3::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: linear-gradient(180deg, var(--red-2), var(--red));
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.05rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font-family: var(--font-head);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: all 0.16s ease;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--red-2), var(--red));
    color: #fff;
    box-shadow: 0 6px 18px rgba(225, 6, 0, 0.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(225, 6, 0, 0.45); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-2);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--red); color: #fff; background: rgba(225, 6, 0, 0.12); }

.btn-danger {
    background: rgba(225, 6, 0, 0.14);
    border-color: rgba(225, 6, 0, 0.5);
    color: #ff8d86;
}
.btn-danger:hover { background: rgba(225, 6, 0, 0.3); color: #fff; }

.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.82rem; }
.btn-lg { padding: 0.75rem 1.6rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ============ FORMS ============ */
.form-group { margin-bottom: 0.9rem; }
.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 0.35rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="url"], select, textarea {
    width: 100%;
    background: rgba(10, 10, 14, 0.6);
    border: 1px solid var(--border-2);
    color: var(--text);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    font-family: var(--font-body);
    font-size: 0.92rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(225, 6, 0, 0.18);
}

input::placeholder, textarea::placeholder { color: var(--muted-2); }

select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239a9aa8' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; padding-right: 2.2rem; }

textarea { resize: vertical; }

input[type="color"].input-color {
    width: 44px;
    height: 34px;
    padding: 2px;
    cursor: pointer;
    border-radius: 8px;
}

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; }
.form-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.9rem; }
.form-grid-2.no-gap { grid-template-columns: 110px 1fr; }
.form-stack > * + * { margin-top: 1rem; }

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    margin-bottom: 0.9rem;
}
.checkbox-row input[type="checkbox"] {
    width: 17px; height: 17px;
    accent-color: var(--red);
    cursor: pointer;
}

.form-legend {
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.02rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--red-2);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.form-card { padding: 1.4rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 0.7rem; margin-top: 1.2rem; }
.hint-text { font-size: 0.78rem; color: var(--muted-2); margin-top: 0.3rem; }
.self-end { align-self: end; }
.notes-text { color: var(--muted); font-size: 0.92rem; }
.code-block {
    background: #0a0a0e;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.8rem 1rem;
    font-family: ui-monospace, monospace;
    font-size: 0.85rem;
    color: #9ef0c5;
    overflow-x: auto;
}

/* ============ BADGES / TAGS ============ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-ok { background: rgba(34, 197, 94, 0.14); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.35); }
.badge-warn { background: rgba(255, 184, 0, 0.12); color: #fbbf24; border: 1px solid rgba(255, 184, 0, 0.35); }
.badge-danger { background: rgba(225, 6, 0, 0.15); color: #ff8d86; border: 1px solid rgba(225, 6, 0, 0.45); }
.badge-dark { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--border-2); }
.badge-featured { position: absolute; top: 10px; left: 10px; background: linear-gradient(135deg, var(--amber), var(--orange)); color: #1a1000; z-index: 2; }
.badge-latest { background: rgba(59, 130, 246, 0.15); color: #7db4ff; border: 1px solid rgba(59, 130, 246, 0.4); font-size: 0.66rem; margin-left: 0.4rem; }
.big-badge { font-size: 1rem; padding: 0.35rem 1rem; }

.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.55rem;
    border-radius: 7px;
    font-size: 0.72rem;
    font-weight: 600;
}
.tag-key { background: rgba(225, 6, 0, 0.13); color: #ff9d96; }
.tag-dl { background: rgba(59, 130, 246, 0.13); color: #7db4ff; }
.tag-ver { background: rgba(255, 255, 255, 0.06); color: var(--muted); border: 1px solid var(--border-2); }
.tag-off { background: rgba(255, 255, 255, 0.04); color: var(--muted-2); text-decoration: line-through; }

.sku-chip {
    font-family: ui-monospace, monospace;
    font-size: 0.72rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 0.12rem 0.5rem;
    border-radius: 6px;
}

/* ============ ALERTS ============ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid;
}
.alert svg { flex-shrink: 0; margin-top: 2px; }
.alert-success { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.35); color: #86efac; }
.alert-danger { background: rgba(225, 6, 0, 0.1); border-color: rgba(225, 6, 0, 0.4); color: #ffa49e; }
.alert-info { background: rgba(59, 130, 246, 0.1); border-color: rgba(59, 130, 246, 0.35); color: #a5c8ff; }
.alert a { text-decoration: underline; }
.alert-list { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.alert-close {
    margin-left: auto;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
}
.alert-close:hover { opacity: 1; }

/* ============ APP LAYOUT (sidebar) ============ */
.admin-body { background: radial-gradient(1200px 600px at 85% -10%, rgba(225, 6, 0, 0.08), transparent 60%), var(--bg); }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 252px;
    flex-shrink: 0;
    background: rgba(13, 13, 18, 0.92);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1.1rem 1.1rem 1rem;
    border-bottom: 1px solid var(--border);
}
.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red-2), #7a0300);
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 6, 0, 0.4);
    flex-shrink: 0;
}
.brand-icon.big { width: 54px; height: 54px; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.brand-sub { font-size: 0.7rem; color: var(--muted-2); letter-spacing: 1px; text-transform: uppercase; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 0.8rem 0.7rem; }

.nav-section {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--muted-2);
    padding: 0.9rem 0.6rem 0.4rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.7rem;
    border-radius: 10px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    margin-bottom: 2px;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.nav-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav-link.active {
    color: #fff;
    background: linear-gradient(90deg, rgba(225, 6, 0, 0.22), rgba(225, 6, 0, 0.06));
    border-color: rgba(225, 6, 0, 0.35);
}
.nav-link.active svg { color: var(--red-2); }

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem;
    border-top: 1px solid var(--border);
}
.user-chip { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), #7a0300);
    color: #fff;
    font-weight: 700;
    font-family: var(--font-head);
    font-size: 1.05rem;
    flex-shrink: 0;
}
.user-avatar.small { width: 30px; height: 30px; font-size: 0.85rem; }
.user-meta { min-width: 0; }
.user-name { font-size: 0.88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 0.7rem; color: var(--red-2); text-transform: uppercase; letter-spacing: 0.8px; }
.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-2);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.15s;
}
.btn-logout:hover { border-color: var(--red); color: var(--red-2); }
.btn-logout svg { width: 17px; height: 17px; }

/* Main area */
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.6rem;
    border-bottom: 1px solid var(--border);
    background: rgba(11, 11, 15, 0.8);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar-title { font-family: var(--font-head); font-size: 1.15rem; font-weight: 700; }
.topbar-right { margin-left: auto; display: flex; gap: 0.5rem; align-items: center; }
.chip {
    font-size: 0.72rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}
.chip-role { border-color: rgba(225, 6, 0, 0.4); color: #ff9d96; }
.btn-burger {
    display: none;
    background: none;
    border: 1px solid var(--border-2);
    border-radius: 9px;
    color: var(--text);
    padding: 0.4rem 0.5rem;
    cursor: pointer;
}

.app-content { padding: 1.6rem; max-width: 1500px; width: 100%; margin: 0 auto; }

/* Page helpers */
.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.3rem;
}
.head-sub { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.86rem; margin-top: 0.3rem; flex-wrap: wrap; }
.head-actions { display: flex; gap: 0.55rem; align-items: center; flex-wrap: wrap; }
.head-note { color: var(--muted); font-size: 0.88rem; max-width: 640px; }
.page-grid { display: flex; flex-direction: column; gap: 1.3rem; }

/* Filter bar */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.filter-bar .input-search { min-width: 240px; }
.filter-bar .input-select { width: auto; min-width: 160px; }
.filter-bar .input-date { width: 150px; }
.report-filters { margin-bottom: 1.3rem; }
.filter-group { display: flex; align-items: center; gap: 0.5rem; }
.filter-group label { font-size: 0.78rem; color: var(--muted); }
.filter-actions { margin-left: auto; }

/* ============ TABLES ============ */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th {
    text-align: left;
    font-family: var(--font-head);
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted-2);
    padding: 0.6rem 0.7rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.table td {
    padding: 0.65rem 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.035);
    vertical-align: middle;
}
.table tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
.table tbody tr:last-child td { border-bottom: none; }
.cell-strong { font-weight: 600; }
.cell-sub { color: var(--muted-2); font-size: 0.78rem; }
.cell-name { font-weight: 500; }
.mono-cell { font-family: ui-monospace, monospace; font-size: 0.82rem; color: #c9c9d4; }
.mono-link { font-family: ui-monospace, monospace; font-size: 0.84rem; color: #ff8d86; }
.mono-link:hover { color: #fff; text-decoration: underline; }
.empty-cell { text-align: center; color: var(--muted-2); padding: 1.6rem !important; }
.th-actions { text-align: right; }
.td-actions { text-align: right; white-space: nowrap; }
.td-actions form { display: inline; }
.link-more { color: #ff8d86; font-size: 0.82rem; font-weight: 600; }
.link-more:hover { color: #fff; }
.cat-cell { display: flex; align-items: center; gap: 0.6rem; }
.cat-dot { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.inline-form { display: flex; align-items: center; gap: 0.4rem; }
.input-inline { width: 140px; padding: 0.3rem 0.5rem !important; font-size: 0.82rem !important; }
.input-color-sm { width: 34px !important; height: 30px !important; }
.notes-text { white-space: pre-line; }

/* Pagination */
.pagination { display: flex; gap: 0.3rem; justify-content: center; padding: 1.1rem 0 0.2rem; }
.page-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 0.5rem;
    border-radius: 9px;
    border: 1px solid var(--border-2);
    font-size: 0.85rem;
    color: var(--muted);
}
.page-item:hover { border-color: var(--red); color: #fff; }
.page-item.active { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.page-item.disabled { opacity: 0.35; pointer-events: none; }

/* ============ STAT CARDS ============ */
.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
.stat-card { display: flex; align-items: center; gap: 0.9rem; padding: 1.1rem 1.2rem; }
.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px; height: 46px;
    border-radius: 12px;
    flex-shrink: 0;
}
.stat-icon.red { background: rgba(225, 6, 0, 0.15); color: #ff6f68; }
.stat-icon.orange { background: rgba(255, 107, 53, 0.15); color: #ffa176; }
.stat-icon.green { background: rgba(34, 197, 94, 0.13); color: #4ade80; }
.stat-icon.blue { background: rgba(59, 130, 246, 0.15); color: #7db4ff; }
.stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted-2); }
.stat-value { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; line-height: 1.2; }
.stat-value-sm { font-family: var(--font-head); font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.stat-sub { font-size: 0.76rem; color: var(--muted-2); margin-top: 1px; }
.total-card { justify-content: flex-end; text-align: right; }

/* ============ CHARTS ============ */
.chart-row { display: grid; grid-template-columns: 2fr 1fr; gap: 1.3rem; align-items: start; }
.chart-box { position: relative; }
.chart-box.tall { height: 300px; }
.empty-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted-2);
    font-size: 0.9rem;
}

/* ============ TWO COL ============ */
.two-col { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.3rem; align-items: start; }
.col-narrow { max-width: 420px; }

/* ============ PRODUCTS ============ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}
.span-all { grid-column: 1 / -1; }
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.18s, border-color 0.18s; }
.product-card:hover { transform: translateY(-3px); border-color: rgba(225, 6, 0, 0.45); }
.product-card.is-inactive { opacity: 0.55; }
.product-thumb {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--cat-color, #e10600) 28%, #12121a), #12121a 70%);
    border-bottom: 1px solid var(--border);
    position: relative;
}
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.sm { width: 64px; height: 64px; border-radius: 10px; border: 1px solid var(--border); flex-shrink: 0; }
.product-initials {
    font-family: var(--font-head);
    font-size: 2.4rem;
    font-weight: 700;
    color: color-mix(in srgb, var(--cat-color, #e10600) 75%, #fff 10%);
    text-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
}
.product-initials.xl { font-size: 5rem; }
.product-body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.product-meta { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.product-title { font-size: 1.05rem; line-height: 1.3; }
.product-title a:hover { color: #ff8d86; }
.product-desc { color: var(--muted); font-size: 0.84rem; flex: 1; }
.product-tags { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.product-stock { margin-top: 0.1rem; }
.stock-label { font-size: 0.78rem; color: var(--muted); }
.stock-label.ok { color: #4ade80; }
.stock-label.warn { color: #fbbf24; }
.product-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    margin-top: 0.35rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--border-2);
}
.product-price { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: #fff; }
.product-detail-grid { display: grid; grid-template-columns: 420px 1fr; gap: 1.6rem; align-items: start; }
.product-detail-media {
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, color-mix(in srgb, var(--cat-color, #e10600) 25%, #12121a), #12121a 72%);
    overflow: hidden;
}
.product-detail-media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.product-detail-info h1 { font-size: 1.9rem; margin: 0.5rem 0; }
.detail-price { font-family: var(--font-head); font-size: 2.1rem; font-weight: 700; color: #ff8d86; margin: 0.6rem 0 1rem; }
.detail-features { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.4rem; }
.feature-row { display: flex; align-items: center; gap: 0.55rem; color: var(--muted); font-size: 0.9rem; }
.feature-row svg { color: var(--green); flex-shrink: 0; }
.feature-row.warn { color: #fbbf24; }
.secure-note {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    justify-content: center;
    color: var(--muted-2);
    font-size: 0.78rem;
    margin-top: 0.7rem;
}
.secure-note.center { justify-content: center; }
.detail-description { margin-top: 1.6rem; }
.prose { color: var(--muted); line-height: 1.7; white-space: pre-line; }

/* ============ SALE CREATE ============ */
.sale-create-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1.3rem; align-items: start; }
.input-cell {
    width: 100%;
    padding: 0.35rem 0.5rem !important;
    font-size: 0.85rem !important;
    text-align: right;
}
.row-subtotal { text-align: right; font-weight: 600; }
.input-discount { max-width: 110px; }
.sale-totals { margin-top: 1rem; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.28rem 0.15rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.total-row.grand {
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    border-top: 1px dashed var(--border-2);
    margin-top: 0.4rem;
    padding-top: 0.6rem;
}
.total-row.grand span:last-child { color: #ff8d86; }

/* ============ FILES / LICENSES ============ */
.file-row {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.file-row:last-of-type { border-bottom: none; }
.file-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.12);
    color: #7db4ff;
    flex-shrink: 0;
}
.file-info { flex: 1; min-width: 0; }
.file-name { font-size: 0.9rem; font-weight: 600; word-break: break-all; }
.file-meta { font-size: 0.76rem; color: var(--muted-2); margin-top: 0.15rem; }
.file-changelog { font-size: 0.8rem; color: var(--muted); margin-top: 0.3rem; font-style: italic; }
.file-actions { display: flex; gap: 0.4rem; align-items: center; }
.upload-form { padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px dashed var(--border-2); }
.list-head {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted-2);
    margin: 0.6rem 0 0.3rem;
}
.license-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
}
.license-key.big {
    display: block;
    text-align: center;
    font-size: 1.25rem;
    background: rgba(225, 6, 0, 0.1);
    border: 1px dashed rgba(225, 6, 0, 0.5);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #ffb3ae;
    letter-spacing: 1px;
    margin: 0.4rem 0;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--muted-2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.7rem;
}
.empty-state.compact { padding: 1.1rem 0.6rem; }

/* ============ INVOICE (printable) ============ */
.invoice-body {
    background: #0d0d12;
    padding: 1.6rem;
}
.invoice-sheet {
    max-width: 820px;
    margin: 0 auto;
    background: #13131a;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.2rem;
    box-shadow: var(--shadow);
}
.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1.4rem;
    border-bottom: 3px solid var(--red);
    margin-bottom: 1.4rem;
}
.invoice-company { display: flex; gap: 0.9rem; }
.invoice-logo {
    width: 52px; height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red-2), #7a0300);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.invoice-company h2 { font-size: 1.35rem; }
.invoice-company p { color: var(--muted); font-size: 0.82rem; margin: 0.1rem 0; }
.invoice-meta { text-align: right; }
.invoice-meta h3 { font-size: 1.5rem; color: var(--red-2); letter-spacing: 2px; }
.invoice-number { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; margin: 0.2rem 0; }
.invoice-meta p { font-size: 0.84rem; color: var(--muted); margin: 0.15rem 0; }
.invoice-client { display: flex; justify-content: space-between; gap: 2rem; margin-bottom: 1.4rem; }
.invoice-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted-2); margin-bottom: 0.15rem; }
.invoice-client-name { font-weight: 700; font-size: 1.02rem; }
.invoice-client div:not(.invoice-label) { color: var(--muted); font-size: 0.88rem; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.invoice-table th {
    text-align: left;
    font-family: var(--font-head);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.74rem;
    color: var(--muted-2);
    padding: 0.55rem 0.5rem;
    border-bottom: 2px solid var(--border-2);
}
.invoice-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid rgba(255, 255, 255, 0.05); vertical-align: top; }
.invoice-license { font-family: ui-monospace, monospace; font-size: 0.78rem; color: #ff9d96; margin-top: 0.2rem; }
.invoice-totals { margin-left: auto; max-width: 320px; margin-top: 1.2rem; }
.invoice-totals .total-row { font-size: 0.95rem; }
.invoice-foot { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--border); text-align: center; color: var(--muted-2); font-size: 0.78rem; }
.invoice-actions { max-width: 820px; margin: 1.2rem auto 0; display: flex; justify-content: space-between; }

@media print {
    body.invoice-body { background: #fff !important; padding: 0; }
    .invoice-sheet {
        background: #fff !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: none;
        color: #111;
        padding: 1rem;
    }
    .invoice-sheet h2, .invoice-sheet h3, .invoice-sheet .cell-strong, .invoice-table td, .invoice-client-name, .invoice-number { color: #111 !important; }
    .invoice-company p, .invoice-meta p, .invoice-client div:not(.invoice-label), .invoice-label, .invoice-table th, .invoice-foot { color: #444 !important; }
    .invoice-head { border-bottom-color: var(--red) !important; }
    .invoice-logo { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .badge-ok { color: #15803d !important; border-color: #86efac !important; background: #f0fdf4 !important; }
    .badge-danger { color: #b91c1c !important; border-color: #fecaca !important; background: #fef2f2 !important; }
    .no-print { display: none !important; }
}

/* ============ STORE PÚBLICA ============ */
.store-body {
    background:
        radial-gradient(1000px 500px at 90% -5%, rgba(225, 6, 0, 0.1), transparent 55%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.store-body > main { flex: 1; }

.store-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 11, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.store-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.85rem 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.store-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.4px;
}
.store-links { display: flex; align-items: center; gap: 1.4rem; font-size: 0.92rem; }
.store-links a { color: var(--muted); transition: color 0.15s; }
.store-links a:hover { color: #fff; }
.store-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    border: 1px solid rgba(225, 6, 0, 0.5);
    border-radius: 10px;
    color: #ff8d86 !important;
    background: rgba(225, 6, 0, 0.08);
}
.store-login:hover { background: rgba(225, 6, 0, 0.2) !important; }
.store-flash { padding: 1rem 0 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.4rem; }
.section { padding: 2.2rem 1.4rem; }
.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.3rem;
}
.store-search { display: flex; gap: 0.5rem; }
.store-search input { min-width: 260px; }

/* Hero */
.store-hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); }
.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 2rem;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}
.hero-kicker {
    display: inline-block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--red-2);
    font-weight: 700;
    margin-bottom: 0.9rem;
}
.hero-text h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.3rem);
    line-height: 1.08;
    text-transform: uppercase;
}
.hero-text h1 em {
    font-style: normal;
    background: linear-gradient(135deg, var(--red-2), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub { color: var(--muted); font-size: 1.02rem; max-width: 540px; margin-top: 1rem; }
.hero-actions { display: flex; gap: 0.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.hero-art { position: relative; display: flex; align-items: center; justify-content: center; }
.hero-wheel {
    color: rgba(225, 6, 0, 0.55);
    animation: spin 14s linear infinite;
    z-index: 1;
}
.hero-glow {
    position: absolute;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 6, 0, 0.25), transparent 65%);
    filter: blur(10px);
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-checker {
    height: 14px;
    background:
        repeating-conic-gradient(#e10600 0% 25%, transparent 0% 50%) 50% / 28px 14px;
    opacity: 0.35;
}

/* Categorías chips */
.category-chips { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.chip-cat {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.15s;
}
.chip-cat:hover { border-color: var(--cat-color, var(--red)); color: #fff; }
.chip-cat.active {
    background: linear-gradient(135deg, var(--red-2), var(--red));
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.35);
}

/* Beneficios */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.1rem;
}
.benefit { text-align: center; padding: 1.6rem 1.1rem; }
.benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: rgba(225, 6, 0, 0.12);
    color: #ff6f68;
    margin-bottom: 0.8rem;
}
.benefit h3 { font-size: 1.02rem; margin-bottom: 0.3rem; }
.benefit p { color: var(--muted-2); font-size: 0.84rem; }

/* Footer tienda */
.store-footer { border-top: 1px solid var(--border); background: rgba(13, 13, 18, 0.7); margin-top: 2rem; }
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    padding-bottom: 1.4rem;
}
.footer-contact { display: flex; flex-direction: column; gap: 0.25rem; color: var(--muted); font-size: 0.88rem; text-align: right; }
.footer-copy { padding-bottom: 1.4rem; color: var(--muted-2); font-size: 0.78rem; }
.footer-links { margin-top: 0.55rem; font-size: 0.85rem; color: var(--muted); }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.footer-links a:hover { color: var(--accent, #f59e0b); text-decoration: underline; }

/* Checkout */
.checkout-section h1 { margin-bottom: 0.2rem; }
.checkout-sub { color: var(--muted); margin-bottom: 1.6rem; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; align-items: start; }
.order-summary { position: sticky; top: 90px; }
.order-product { display: flex; gap: 0.9rem; align-items: center; margin-bottom: 1rem; }

/* Éxito */
.success-section { display: flex; justify-content: center; }
.success-card { max-width: 620px; width: 100%; text-align: center; padding: 2.4rem 2rem; }
.success-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    color: var(--green);
    border: 2px solid rgba(34, 197, 94, 0.4);
    margin-bottom: 1.1rem;
}
.success-sub { color: var(--muted); margin: 0.6rem 0 1.4rem; }
.license-box, .download-box {
    border: 1px dashed var(--border-2);
    border-radius: var(--radius-sm);
    padding: 1.1rem;
    margin-bottom: 1rem;
    text-align: left;
}
.license-box h3, .download-box h3 { margin-bottom: 0.6rem; font-size: 0.95rem; }
.download-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.download-row:last-of-type { border-bottom: none; }
.license-note { color: var(--muted-2); font-size: 0.8rem; font-style: italic; }
.success-actions { margin-top: 1.2rem; display: flex; justify-content: center; gap: 0.7rem; }
.buy-offline { padding: 1.2rem; margin-top: 0.5rem; }
.buy-offline h3 { margin-bottom: 0.4rem; }
.buy-offline p { color: var(--muted); font-size: 0.9rem; }
.buy-contacts { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.9rem; }

/* ============ AUTH ============ */
.auth-body {
    background:
        radial-gradient(900px 500px at 15% 0%, rgba(225, 6, 0, 0.12), transparent 55%),
        var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.4rem;
    position: relative;
    overflow: hidden;
}
.auth-bg-stripe {
    position: absolute;
    width: 55%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--red), transparent);
    opacity: 0.35;
}
.auth-bg-stripe.stripe-1 { top: 12%; left: -5%; transform: rotate(-24deg); }
.auth-bg-stripe.stripe-2 { bottom: 14%; right: -5%; transform: rotate(-24deg); }
.auth-wrapper { width: 100%; max-width: 420px; z-index: 2; }
.auth-card { padding: 2.2rem 2rem; }
.auth-brand { text-align: center; margin-bottom: 1.6rem; }
.auth-brand h1 { font-size: 1.5rem; margin-top: 0.8rem; }
.auth-brand p { color: var(--muted-2); font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 0.2rem; }
.auth-form .form-group { margin-bottom: 1rem; }
.auth-form .checkbox-row { margin: 0.2rem 0 1.1rem; }
.auth-alt-link {
    display: block;
    text-align: center;
    margin-top: 1.1rem;
    color: var(--muted-2);
    font-size: 0.84rem;
}
.auth-alt-link:hover { color: var(--red-2); }
.auth-copy { color: var(--muted-2); font-size: 0.72rem; margin-top: 1.4rem; text-align: center; }

/* ============ INSTALADOR ============ */
.install-wrapper { width: 100%; max-width: 680px; z-index: 2; }
.install-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.4rem; }
.install-header h1 { font-size: 1.5rem; }
.install-header p { color: var(--muted-2); font-size: 0.82rem; }
.install-steps {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0 0 1.2rem;
    padding: 0;
}
.install-steps li {
    flex: 1;
    text-align: center;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.5rem 0.3rem;
    border-radius: 9px;
    border: 1px solid var(--border);
    color: var(--muted-2);
    background: rgba(255, 255, 255, 0.02);
}
.install-steps li.current {
    background: linear-gradient(135deg, var(--red-2), var(--red));
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 5px 15px rgba(225, 6, 0, 0.35);
}
.install-card { padding: 1.8rem; }
.install-title { margin-bottom: 0.3rem; }
.install-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.3rem; }
.install-form .install-actions, .install-actions {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 1.6rem;
}
.install-actions-center { justify-content: center; }
.check-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; flex-direction: column; gap: 0.45rem; }
.check-item {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
}
.check-item.ok { border-color: rgba(34, 197, 94, 0.25); }
.check-item.fail { border-color: rgba(225, 6, 0, 0.45); background: rgba(225, 6, 0, 0.05); }
.check-icon { margin-top: 2px; flex-shrink: 0; }
.check-item.ok .check-icon { color: var(--green); }
.check-item.fail .check-icon { color: var(--red-2); }
.check-label { font-weight: 500; }
.check-hint { font-size: 0.76rem; color: var(--muted-2); margin-top: 0.1rem; }
.install-success { text-align: center; }
.success-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.14);
    color: var(--green);
    border: 2px solid rgba(34, 197, 94, 0.4);
    margin-bottom: 1.1rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1280px) {
    .stat-cards { grid-template-columns: repeat(2, 1fr); }
    .benefits-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
    .sidebar {
        position: fixed;
        left: -270px;
        transition: left 0.22s ease;
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    }
    .sidebar.is-open { left: 0; }
    .btn-burger { display: inline-flex; }
    .chart-row, .two-col, .sale-create-grid, .checkout-grid { grid-template-columns: 1fr; }
    .product-detail-grid { grid-template-columns: 1fr; }
    .product-detail-media { height: 240px; }
    .order-summary { position: static; }
    .col-narrow { max-width: none; }
}

@media (max-width: 720px) {
    .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
    .form-grid-2.no-gap { grid-template-columns: 90px 1fr; }
    .stat-cards { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr; }
    .hero-inner { grid-template-columns: 1fr; padding-top: 3rem; padding-bottom: 3rem; }
    .hero-art { display: none; }
    .store-links { gap: 0.9rem; font-size: 0.84rem; }
    .store-links a:not(.store-login) { display: none; }
    .app-content { padding: 1.1rem; }
    .topbar { padding: 0.75rem 1.1rem; }
    .chip-date { display: none; }
    .invoice-head, .invoice-client { flex-direction: column; gap: 1rem; }
    .invoice-meta { text-align: left; }
    .invoice-sheet { padding: 1.3rem; }
    .page-head { flex-direction: column; align-items: stretch; }
    .head-actions { justify-content: flex-start; }
}



/* ---- Badge de contador en el menú lateral (pagos manuales) ---- */
.nav-link { position: relative; }
.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--danger, #e10600);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.nav-link .nav-badge { position: static; }

/* ============================================================
   PORTADA — señales de confianza (cinta, pasos, pagos, garantías, FAQ, CTA)
   ============================================================ */

.trust-strip {
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(225, 6, 0, 0.06), transparent);
}
.trust-strip-inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem 2.2rem;
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}
.trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--muted);
}
.trust-item svg { color: var(--green); flex: none; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.step-card { position: relative; padding: 1.5rem 1.4rem 1.4rem; overflow: hidden; }
.step-num {
    display: block;
    font-family: var(--font-head);
    font-size: 2.1rem;
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, var(--red-2), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.7rem;
}
.step-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.step-card p { color: var(--muted); font-size: 0.88rem; margin: 0; }

.pay-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.6rem 1.8rem;
}
.pay-band-text h2 { margin: 0 0 0.25rem; font-size: 1.3rem; }
.pay-band-text p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pay-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.05rem;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    background: var(--panel-2);
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--text);
}
.pay-chip-link { color: var(--red-2); border-color: rgba(255, 45, 32, 0.4); text-decoration: none; }
.pay-chip-link:hover { background: rgba(225, 6, 0, 0.12); }

.guarantee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.guarantee { padding: 1.4rem 1.4rem 1.3rem; }
.guarantee h3 {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1rem;
    margin-bottom: 0.45rem;
}
.guarantee h3 svg { color: var(--red-2); flex: none; }
.guarantee p { color: var(--muted); font-size: 0.86rem; margin: 0; }
.guarantee a { color: var(--red-2); text-decoration: none; }
.guarantee a:hover { text-decoration: underline; }

.faq-list { display: grid; gap: 0.7rem; max-width: 860px; margin: 0 auto; }
.faq-item { padding: 0; overflow: hidden; }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.05rem 1.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding-right: 3rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 1.4rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--font-head);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--red-2);
    transition: transform 0.18s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item summary:hover { background: rgba(255, 255, 255, 0.02); }
.faq-item p {
    margin: 0;
    padding: 0 1.4rem 1.15rem;
    color: var(--muted);
    font-size: 0.88rem;
}
.faq-item a { color: var(--red-2); text-decoration: none; }
.faq-item a:hover { text-decoration: underline; }

.cta-band {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.8rem 2rem;
    border: 1px solid rgba(225, 6, 0, 0.35);
    background:
        linear-gradient(135deg, rgba(225, 6, 0, 0.14), rgba(255, 107, 53, 0.06)),
        var(--glass);
}
.cta-band h2 { margin: 0 0 0.25rem; font-size: 1.45rem; text-transform: uppercase; }
.cta-band p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.cta-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }

@media (max-width: 900px) {
    .steps-grid, .guarantee-grid { grid-template-columns: 1fr; }
    .pay-band, .cta-band { flex-direction: column; align-items: flex-start; }
}

/* ============================================================
   TALLER — kanban, timeline, presupuestos (módulos taller/presupuestos)
   ============================================================ */

.kanban {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 1fr);
    gap: 0.8rem;
    overflow-x: auto;
    padding-bottom: 0.6rem;
}
.kanban-col { min-width: 230px; }
.kanban-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--st-color, var(--text));
    padding: 0.4rem 0.2rem;
}
.kanban-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--st-color, var(--muted)); flex: none; }
.kanban-count {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.05rem 0.55rem;
}
.kanban-cards { display: flex; flex-direction: column; gap: 0.55rem; min-height: 60px; }
.kanban-card {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem 0.85rem;
    border-left: 3px solid var(--st-color, var(--border));
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.kanban-card:hover { transform: translateY(-2px); border-left-color: var(--red-2); }
.kanban-folio { font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; letter-spacing: 0.4px; }
.kanban-vehicle { font-size: 0.86rem; margin-top: 0.15rem; }
.kanban-client { font-size: 0.78rem; color: var(--muted); }
.kanban-meta { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.75rem; color: var(--muted); margin-top: 0.4rem; flex-wrap: wrap; }
.kanban-empty { text-align: center; color: var(--muted-2); padding: 1rem 0; border: 1px dashed var(--border); border-radius: var(--radius-sm); }
.text-warn { color: var(--amber); }

.aging-alert { border-left: 3px solid var(--amber); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.aging-alert ul { margin: 0.5rem 0 0 1.1rem; padding: 0; }
.aging-alert a { color: var(--amber); }

.taller-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 1rem;
}
.taller-info p { margin: 0.25rem 0; }
.taller-info .small { font-size: 0.84rem; }
hr.soft { border: 0; border-top: 1px solid var(--border); margin: 0.7rem 0; }
.section-gap { margin-top: 1.1rem; }

.form-inline-row { display: flex; align-items: flex-end; gap: 0.7rem; flex-wrap: wrap; }
.form-inline-row .grow { flex: 1; min-width: 180px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border);
}
.timeline li { display: flex; gap: 0.9rem; padding: 0.45rem 0 0.45rem 0; position: relative; }
.timeline li:last-child::before { content: none; }
.timeline-dot {
    width: 14px; height: 14px; border-radius: 50%;
    background: var(--muted);
    border: 2px solid var(--bg-2);
    flex: none;
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
}
.timeline-head { font-size: 0.92rem; }

.quote-block { border-top: 1px solid var(--border); padding: 1rem 0; }
.quote-block:first-of-type { border-top: 0; padding-top: 0; }
.quote-head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.7rem; }

.portal-quote h2 { font-size: 1.2rem; margin: 0 0 0.6rem; }

@media (max-width: 900px) {
    .taller-grid { grid-template-columns: 1fr; }
    .kanban { grid-auto-flow: row; grid-auto-columns: auto; }
    .kanban-col { min-width: 0; }
}

/* ══════════════════════════════════════════════════════════════════
   v5 — Carrito de compras (badge en la nav) + alerta de error
   ══════════════════════════════════════════════════════════════════ */
.alert-error { background: rgba(225, 6, 0, 0.1); border-color: rgba(225, 6, 0, 0.35); color: #fca5a5; }

.store-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--text, #e8e8ec);
  font-weight: 600;
  font-size: 0.92rem;
  transition: border-color .15s ease, background .15s ease;
}
.store-cart-link:hover { border-color: #e10600; background: rgba(225, 6, 0, 0.08); }

.store-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e10600;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}
