/* =========================
   RINCON UI - COMMON STYLES
   ========================= */

:root {
    --rv2-pink: #f8bbd0;
    --rv2-pink-strong: #e83e6f;
    --rv2-pink-deep: #c72c5a;
    --rv2-blush: #fff1f5;
    --rv2-gray: #b0b0b0;
    --rv2-ink: #302c32;
    --rv2-muted: #777078;
    --rv2-line: #eadde2;
    --rv2-white: #ffffff;
    --rv2-shadow: 0 18px 45px rgba(103, 69, 82, .10);
}

html {
    position: relative;
    min-height: 100%;
    font-size: 14px;
}

body {
    min-height: 100vh;
    margin-bottom: 0;
    background:
        radial-gradient(circle at 4% 8%, rgba(248, 187, 208, .45) 0 9rem, transparent 9.2rem),
        radial-gradient(circle at 96% 88%, rgba(248, 187, 208, .32) 0 12rem, transparent 12.2rem),
        #fffafa;
    color: #353238;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.rincon-page,
.admin-page,
.cart-page {
    color: var(--rv2-ink);
}

/* HERO / HEADER */

.rincon-hero,
.admin-hero,
.cart-hero {
    background: linear-gradient(135deg, #fff8fa 0%, var(--rv2-blush) 100%);
    border: 1px solid var(--rv2-line);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--rv2-shadow);
}

.admin-hero-toolbar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.rincon-hero-icon,
.admin-hero-icon,
.cart-hero-icon,
.action-icon,
.checkout-icon,
.empty-illustration {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.rincon-eyebrow,
.admin-eyebrow,
.cart-eyebrow,
.section-kicker,
.auth-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--rv2-pink-strong);
    margin-bottom: 2px;
}

.rincon-title,
.admin-title,
.cart-title,
.auth-title {
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--rv2-ink);
}

.rincon-subtitle,
.admin-subtitle,
.cart-subtitle,
.action-description,
.checkout-description,
.auth-subtitle,
.auth-copy {
    color: var(--rv2-muted);
}

/* CARDS */

.content-card,
.form-card,
.action-card,
.checkout-card,
.checkout-option-card {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.section-title,
.action-title,
.checkout-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--rv2-ink);
    letter-spacing: -0.02em;
}

body > header {
    position: relative;
    z-index: 1030;
}

body > header .navbar {
    background: rgba(255,255,255,.92) !important;
    border: 0 !important;
    box-shadow: 0 8px 30px rgba(103,69,82,.09) !important;
    backdrop-filter: blur(14px);
    padding-block: .8rem;
    overflow: visible;
}

.navbar-brand { color: var(--rv2-ink) !important; font-size: 1.22rem; letter-spacing: -.03em; }
.navbar-brand i { color: var(--rv2-pink-strong); }
.navbar .nav-link { border-radius: 999px; color: #615b62 !important; font-weight: 700; padding-inline: .9rem !important; transition: .2s ease; }
.navbar .nav-link:hover, .navbar .nav-link:focus { background: var(--rv2-blush); color: var(--rv2-pink-deep) !important; }
.dropdown-menu { z-index: 1050; border: 1px solid var(--rv2-line); border-radius: 16px; box-shadow: var(--rv2-shadow); padding: .55rem; }
.dropdown-item { border-radius: 11px; font-weight: 650; padding: .65rem .8rem; }
.dropdown-item:hover { background: var(--rv2-blush); color: var(--rv2-pink-deep); }

.rincon-hero::after, .admin-hero::after {
    content: ""; display: block; width: 64px; height: 5px; border-radius: 99px;
    background: linear-gradient(90deg, var(--rv2-pink-strong), var(--rv2-pink)); margin-top: 14px;
}

.admin-hero {
    position: relative;
}

.admin-hero::after {
    position: absolute;
    right: 24px;
    bottom: 18px;
    margin-top: 0;
    pointer-events: none;
}

.content-card:hover, .detail-metric-card:hover { border-color: var(--rv2-pink); }
.form-label { color: #5b535b; font-weight: 700; }
.form-control, .form-select { min-height: 46px; border: 1px solid #ddd3d7; border-radius: 13px; background-color: #fffdfd; }
.form-control:focus, .form-select:focus { border-color: var(--rv2-pink-strong); box-shadow: 0 0 0 .2rem rgba(232,62,111,.13); }
.form-check-input:checked { background-color: var(--rv2-pink-strong); border-color: var(--rv2-pink-strong); }

.btn { border-radius: 13px; font-weight: 750; transition: transform .18s ease, box-shadow .18s ease, background .18s ease; }
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus { box-shadow: 0 0 0 .2rem rgba(232,62,111,.18); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--rv2-pink-strong), #d92f62); border-color: var(--rv2-pink-strong); box-shadow: 0 10px 22px rgba(232,62,111,.22); }
.btn-primary:hover, .btn-primary:focus { background: var(--rv2-pink-deep); border-color: var(--rv2-pink-deep); }
.btn-outline-primary { color: var(--rv2-pink-deep); border-color: var(--rv2-pink); }
.btn-outline-primary:hover { background: var(--rv2-pink-strong); border-color: var(--rv2-pink-strong); }
.btn-soft-secondary { background: #f3f1f2; color: #5d575d; }

.text-primary,
.link-primary {
    color: var(--rv2-pink-deep) !important;
}

.border-primary {
    border-color: var(--rv2-pink-strong) !important;
}

.bg-primary,
.text-bg-primary {
    background-color: var(--rv2-pink-strong) !important;
    color: #ffffff !important;
}

.custom-table-wrapper, .table-responsive { border-radius: 17px; }
.custom-table thead th, .table thead th { background: #fff1f5; color: #765562; border-color: #f2dce4; font-weight: 800; }
.custom-table tbody tr:hover, .table tbody tr:hover { background: #fff8fa; }
.custom-table tbody td, .table tbody td { border-color: #f2eaed; }
.dataTables_wrapper input:focus, .dataTables_wrapper select:focus { border-color: var(--rv2-pink-strong) !important; outline: 0; }
.dataTables_wrapper .paginate_button.current { background: var(--rv2-pink) !important; border-color: var(--rv2-pink) !important; border-radius: 9px !important; }

.dt-container,
.dt-container .dt-info,
.dt-container .dt-length,
.dt-container .dt-search {
    color: var(--rv2-ink) !important;
}

.dt-container .dt-length select,
.dt-container .dt-search input {
    color: var(--rv2-ink) !important;
    background: #ffffff !important;
    border: 1px solid #ddd3d7 !important;
    border-radius: 10px !important;
}

.dt-container .dt-length select:focus,
.dt-container .dt-search input:focus {
    border-color: var(--rv2-pink-strong) !important;
    box-shadow: 0 0 0 .2rem rgba(232, 62, 111, .13) !important;
    outline: 0;
}

.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover {
    color: var(--rv2-pink-deep) !important;
    background: var(--rv2-blush) !important;
    border-color: var(--rv2-pink) !important;
    border-radius: 9px !important;
}

.status-active, .role-admin { background: #fff0f5; color: var(--rv2-pink-deep); border-color: var(--rv2-pink); }
.product-img-sm { border-radius: 14px; border: 3px solid #fff; box-shadow: 0 6px 16px rgba(103,69,82,.16); }

.auth-page { min-height: 100vh; padding: 42px 18px; }
.auth-visual { background: linear-gradient(145deg, #fff 0%, #fff2f6 58%, #f8bbd0 155%); border-color: var(--rv2-pink); }
.auth-visual::before { border-color: rgba(232,62,111,.15); background-image: linear-gradient(rgba(232,62,111,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(232,62,111,.06) 1px,transparent 1px); }
.auth-card { border-color: var(--rv2-line); }
.auth-icon { background: var(--rv2-blush); color: var(--rv2-pink-strong); box-shadow: inset 0 0 0 1px var(--rv2-pink); }
.auth-metric { border-color: var(--rv2-pink); background: rgba(255,255,255,.85); color: #5f4b53; }
.auth-metric i, .auth-link { color: var(--rv2-pink-strong); }
.custom-alert-info { background: var(--rv2-blush); color: var(--rv2-pink-deep); }

@media (max-width: 768px) {
    body { background: #fffafa; }
    .admin-page { padding-top: .5rem !important; }
    .admin-hero { align-items: stretch !important; }
    .admin-hero::after { display: none; }
    .admin-hero .btn { width: 100%; }
    .content-card, .form-card { border-radius: 19px; }
}

@media (min-width: 768px) {
    .admin-hero-toolbar {
        flex-direction: row;
        align-items: center;
    }

    .admin-hero-actions {
        justify-content: flex-end;
    }
}

.action-title,
.checkout-title {
    font-size: 1rem;
}

/* SCREEN HELP */

.screen-help-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--rv2-pink);
    border-radius: 12px;
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

    .screen-help-button:hover {
        background: var(--rv2-pink-strong);
        color: #ffffff;
        transform: translateY(-1px);
    }

.screen-help-content {
    border: 1px solid var(--rv2-line);
    border-radius: 24px;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.14);
    overflow: hidden;
}

.screen-help-header,
.screen-help-footer {
    border-color: #f2eaed;
    background: #fff8fa;
}

.screen-help-title {
    color: var(--rv2-ink);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.screen-help-description {
    color: #765562;
    font-weight: 600;
    margin-bottom: 14px;
}

.screen-help-list {
    color: #5d575d;
    margin: 0;
    padding-left: 1.15rem;
}

    .screen-help-list li {
        margin-bottom: 9px;
    }

        .screen-help-list li:last-child {
            margin-bottom: 0;
        }

/* INPUTS */

.input-group-modern .form-control,
.input-group-modern .input-group-text {
    border-color: #ddd3d7;
    min-height: 44px;
}

.input-group-modern .input-group-text {
    background: #fff8fa;
    color: var(--rv2-muted);
}

.form-control,
.form-select {
    border-color: #ddd3d7;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--rv2-pink-strong);
        box-shadow: 0 0 0 0.2rem rgba(232, 62, 111, 0.12);
    }

/* BUTTONS */

.rincon-navbar-logo {
    max-width: 130px;
}

.cart-floating-button {
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 1050;
    background-color: #523500;
}

.cart-floating-icon {
    color: #ebd2a5;
}

.btn-modern,
.btn-confirm-sale {
    border-radius: 12px;
    font-weight: 700;
    min-height: 42px;
    padding-inline: 18px;
    box-shadow: 0 8px 18px rgba(232, 62, 111, .16);
}

.btn-confirm-sale {
    min-width: 260px;
    box-shadow: 0 8px 18px rgba(25, 135, 84, 0.2);
}

.btn-modern-sm {
    border-radius: 10px;
    font-weight: 700;
}

.product-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-icon-search {
    min-width: 48px;
    border-radius: 0 12px 12px 0;
}

.btn-soft-secondary,
.btn-soft-danger,
.btn-soft-success,
.btn-soft-warning,
.btn-soft-box {
    border-radius: 12px;
    font-weight: 700;
    border: 1px solid transparent;
}

.btn-soft-secondary {
    background: #f3f1f2;
    color: #5d575d;
}

    .btn-soft-secondary:hover {
        background: #e6dce0;
        color: var(--rv2-ink);
    }

.btn-soft-danger {
    background: #fff1f2;
    color: #dc3545;
    border-color: #ffe4e6;
}

    .btn-soft-danger:hover {
        background: #dc3545;
        color: #ffffff;
    }

.btn-soft-success {
    background: #ecfdf5;
    color: #198754;
    border-color: #bbf7d0;
}

    .btn-soft-success:hover {
        background: #198754;
        color: #ffffff;
    }

.btn-soft-warning {
    background: #fffbeb;
    color: #92400e;
    border-color: #fde68a;
}

    .btn-soft-warning:hover {
        background: #f59e0b;
        color: #ffffff;
        border-color: #f59e0b;
    }

.btn-check:checked + .btn-soft-secondary,
.btn-check:checked + .btn-soft-warning {
    border-color: var(--rv2-pink-strong);
    box-shadow: 0 0 0 0.2rem rgba(232, 62, 111, 0.14);
}

.btn-soft-box {
    background: #fff7ed;
    color: #8a4b12;
    border-color: #fed7aa;
}

    .btn-soft-box:hover {
        background: #f3c27b;
        color: #3b220d;
        border-color: #eab56f;
    }

/* TABLES */

.custom-table-wrapper {
    border: 1px solid var(--rv2-line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
}

.custom-table {
    color: var(--rv2-ink);
}

    .custom-table thead th {
        background: #fff8fa;
        color: #765562;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        border-bottom: 1px solid var(--rv2-line);
        padding: 14px 16px;
    }

    .custom-table tbody td {
        padding: 16px;
        border-color: #f2eaed;
        color: var(--rv2-ink);
        vertical-align: middle;
    }

    .custom-table tbody tr:hover {
        background: #fff8fa;
    }

/* DATATABLES FIX */

.dataTables_wrapper,
.dataTables_wrapper label,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    color: var(--rv2-ink) !important;
}

    .dataTables_wrapper select,
    .dataTables_wrapper input {
        color: var(--rv2-ink) !important;
        background-color: #ffffff !important;
        border: 1px solid #ddd3d7 !important;
        border-radius: 10px !important;
        padding: 6px 10px !important;
    }

    .dataTables_wrapper .paginate_button {
        color: var(--rv2-ink) !important;
    }

table.dataTable tbody td {
    color: var(--rv2-ink) !important;
}

/* ADMIN FORMS */

.admin-form-grid {
    row-gap: 1rem;
}

.admin-switch {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

    .admin-switch:checked {
        background-color: #198754;
        border-color: #198754;
    }

    .admin-switch:not(:checked) {
        background-color: #dc3545;
        border-color: #dc3545;
    }

.admin-switch-label {
    margin-left: 0.5rem;
}

.article-sale-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    width: min(430px, 100%);
    padding: 4px;
    border: 1px solid var(--rv2-pink);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.article-sale-mode-option {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #5d575d;
    font-size: 0.9rem;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.1;
    padding: 9px 14px;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.article-sale-mode-option:hover {
    background: rgba(255, 255, 255, 0.72);
}

.article-sale-mode-option.active {
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    box-shadow: inset 0 0 0 1px var(--rv2-pink);
}

.article-sale-mode-option:focus-visible {
    outline: 3px solid rgba(232, 62, 111, 0.24);
    outline-offset: 2px;
}

.article-preview-img {
    max-width: 220px;
    max-height: 220px;
    object-fit: contain;
    border-radius: 14px;
    border: 1px solid #ddd3d7;
    padding: 8px;
    background-color: #ffffff;
}

.image-empty-state {
    border: 1px dashed #ddd3d7;
    border-radius: 16px;
    padding: 32px 18px;
    color: var(--rv2-muted);
    background: #fff8fa;
}

.datatable-action-group {
    display: inline-flex;
    justify-content: center;
    gap: 8px;
}

/* DETAIL PANELS */

.detail-metric-card {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 20px;
    padding: 16px 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    height: 100%;
    min-height: 104px;
}

.detail-metric-label {
    color: var(--rv2-pink-deep);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.balance-payment-breakdown {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--rv2-line);
    font-size: 0.82rem;
}

.balance-metric-card {
    min-width: 0;
    overflow: hidden;
}

.balance-metric-value {
    width: 100%;
    color: var(--rv2-ink);
    font-size: 1.75rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.035em;
    line-height: 1.2;
    white-space: nowrap;
}

.balance-metric-value-primary {
    margin-top: 0.2rem;
    font-size: 2.5rem;
    font-weight: 800;
}

.balance-payment-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.balance-payment-breakdown span {
    color: var(--rv2-muted);
}

.sale-product-summary {
    display: block;
    max-width: 300px;
    overflow: hidden;
    color: var(--rv2-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sale-detail-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.sale-detail-meta > div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.sale-detail-meta span {
    color: var(--rv2-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.sale-detail-meta strong {
    overflow-wrap: anywhere;
}

.sale-void-note {
    border-color: #f4b4c6;
    background: #fff8fa;
}

.detail-metric-value {
    color: var(--rv2-ink);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.detail-metric-value.success {
    color: #198754;
    font-size: 1.75rem;
}

.cash-priority-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 108px;
}

.metric-breakdown {
    display: grid;
    gap: 4px;
    color: var(--rv2-muted);
    font-size: 0.82rem;
    line-height: 1.35;
}

.cash-overview {
    display: grid;
    grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(180px, 1fr));
    gap: 14px;
}

.cash-summary-card {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 20px;
    padding: 18px 20px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
    display: grid;
    align-content: center;
    min-height: 104px;
}

.cash-summary-card span,
.cash-breakdown-item span,
.cash-note span {
    color: var(--rv2-muted);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cash-summary-card strong {
    color: var(--rv2-ink);
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.cash-summary-card-primary strong {
    color: #198754;
    font-size: 1.9rem;
}

.cash-overview-detail {
    grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(150px, 1fr));
}

.cash-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.cash-breakdown-grid-detail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.cash-breakdown-item {
    background: #fff8fa;
    border: 1px solid #f2eaed;
    border-radius: 16px;
    padding: 14px 16px;
    display: grid;
    gap: 2px;
    min-height: 86px;
}

.cash-breakdown-item strong {
    color: var(--rv2-ink);
    font-size: 1.1rem;
    font-weight: 900;
}

.cash-breakdown-item small,
.cash-note p {
    color: var(--rv2-muted);
}

.cash-note {
    background: #fff8fa;
    border: 1px solid #f2eaed;
    border-radius: 16px;
    padding: 14px 16px;
}

/* STATISTICS */

.stats-filter-bar {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 20px;
    padding: 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.stats-filter-label {
    color: #765562;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.batch-hero-search {
    width: min(560px, 100%);
}

.batch-hero-search-row {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.stats-chart-card {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--rv2-shadow);
    height: 100%;
}

.stats-low-stock-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.stats-chart-box {
    position: relative;
    min-height: 290px;
}

.stats-chart-box.tall {
    min-height: 360px;
}

.stats-product-card {
    padding: 0;
    overflow: hidden;
}

    .stats-product-card > .d-flex {
        padding: 20px 20px 14px;
        border-bottom: 1px solid #f2eaed;
    }

.stats-product-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rv2-pink-strong);
    color: #ffffff;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stats-product-subtitle {
    color: var(--rv2-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.stats-product-control {
    width: auto;
    min-width: 140px;
    border-radius: 10px;
    font-weight: 700;
}

.stats-product-ranking {
    display: flex;
    flex-direction: column;
}

.stats-product-ranking.scrollable {
    max-height: 720px;
    overflow-y: auto;
}

.stats-product-row {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) minmax(160px, 2.2fr) minmax(90px, auto);
    align-items: center;
    gap: 14px;
    min-height: 48px;
    padding: 10px 20px;
    border-bottom: 1px solid #f2eaed;
}

.stats-product-header {
    min-height: 42px;
    color: var(--rv2-muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #fff8fa;
}

.stats-product-header span:last-child {
    grid-column: 3;
    text-align: right;
}

.stats-product-name {
    color: var(--rv2-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.stats-product-bar-track {
    height: 28px;
    border-radius: 5px;
    background: var(--rv2-blush);
    overflow: hidden;
}

.stats-product-bar {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(90deg, var(--rv2-pink-strong) 0%, #f48aaa 100%);
}

.stats-product-row:nth-child(n+5) .stats-product-bar {
    background: linear-gradient(90deg, #f48aaa 0%, var(--rv2-blush) 100%);
}

.stats-product-value {
    color: #5d575d;
    font-size: 0.9rem;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.stats-segmented {
    display: inline-flex;
    border: 1px solid #ddd3d7;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.stats-segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.stats-segmented label {
    margin: 0;
    padding: 10px 18px;
    color: #5d575d;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
}

.stats-segmented input:checked + label {
    color: #ffffff;
    background: var(--rv2-pink-strong);
}

.stats-low-stock-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 6px;
}

.stats-low-stock-card .stats-low-stock-list {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
}

.stats-low-stock-card .empty-state {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-low-stock-footer {
    margin-top: auto !important;
}

.stats-low-stock-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #f2eaed;
    padding-bottom: 12px;
}

.stats-low-stock-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.stock-alert-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 7px 10px;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.stock-alert-badge.warning {
    background: #fff8e1;
    color: #8a6500;
    border: 1px solid #ffe69c;
}

.stock-alert-badge.danger {
    background: #fff1f2;
    color: #dc3545;
    border: 1px solid #fecdd3;
}

/* SELECT2 */

.select2-container--bootstrap-5 .select2-selection {
    border-color: #ddd3d7;
    border-radius: 12px;
    min-height: 38px;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--rv2-ink);
    font-weight: 600;
    line-height: 1.5;
}

.select2-container--bootstrap-5 .select2-dropdown {
    border-color: #ddd3d7;
    border-radius: 14px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.select2-container--bootstrap-5 .select2-search__field {
    border-color: #ddd3d7 !important;
    border-radius: 10px !important;
}

.select2-container--bootstrap-5 .select2-results__option {
    font-weight: 700;
    padding: 9px 12px;
}

.select2-container--bootstrap-5 .select2-results__option--highlighted {
    background-color: var(--rv2-pink-strong);
}

/* AUTOCOMPLETE SEARCHES */

.personal-account-search-box {
    position: relative;
}

.personal-account-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1060;
    max-height: 230px;
    overflow-y: auto;
    border: 1px solid #ddd3d7;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
    padding: 6px;
}

.personal-account-result {
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--rv2-ink);
    display: flex;
    align-items: center;
    padding: 10px 12px;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 750;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.personal-account-result:hover,
.personal-account-result:focus {
    background: var(--rv2-blush);
    color: var(--rv2-pink-deep);
    outline: none;
}

.personal-account-result-message {
    color: var(--rv2-muted);
    padding: 10px 12px;
    font-weight: 700;
}

/* SALES */

.sales-hero-filters {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(160px, 0.85fr) auto;
    align-items: end;
    gap: 12px;
    width: min(620px, 100%);
}

.sales-filter-field label {
    color: #765562;
    display: block;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.sales-filter-field .form-control,
.sales-filter-field .form-select {
    min-height: 44px;
    border-radius: 12px;
}

/* CASH REGISTER */

.cash-inline-form,
.cash-close-form {
    display: grid;
    gap: 10px;
}

.cash-inline-form {
    grid-template-columns: minmax(180px, 240px) auto;
}

.cash-close-form {
    grid-template-columns: minmax(170px, 220px) minmax(220px, 1fr) auto;
    width: min(720px, 100%);
}

.cash-close-form-stacked {
    grid-template-columns: 1fr;
    width: 100%;
}

.cash-inline-form .form-control,
.cash-close-form .form-control,
.cash-inline-form .input-group-text,
.cash-close-form .input-group-text {
    min-height: 44px;
    border-radius: 12px;
}

.personal-account-settle-form {
    display: grid;
    grid-template-columns: 1fr minmax(150px, 200px) minmax(170px, 220px) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

/* BADGES */

.role-badge,
.status-badge,
.stock-badge,
.expiration-badge,
.payment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.role-admin {
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    border: 1px solid var(--rv2-pink);
}

.role-employee {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.role-empty {
    background: #fff8fa;
    color: var(--rv2-muted);
    border: 1px solid #e6dce0;
}

.status-active,
.stock-ok,
.expiration-ok {
    background: #ecfdf5;
    color: #198754;
    border: 1px solid #bbf7d0;
}

.status-inactive,
.status-blocked,
.expiration-danger {
    background: #fff1f2;
    color: #dc3545;
    border: 1px solid #fecdd3;
}

.stock-low,
.status-warning,
.expiration-warning {
    background: #fff8e1;
    color: #8a6500;
    border: 1px solid #ffe69c;
}

.status-neutral {
    background: #fff8fa;
    color: var(--rv2-muted);
    border: 1px solid #e6dce0;
}

.expiration-empty {
    background: #fff8fa;
    color: var(--rv2-muted);
    border: 1px solid #e6dce0;
}

.payment-cash {
    background: #ecfdf5;
    color: #198754;
    border: 1px solid #bbf7d0;
}

.payment-transfer {
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    border: 1px solid var(--rv2-pink);
}

/* EMPTY STATES */

.empty-state {
    background: #ffffff;
    border: 1px solid var(--rv2-line);
    border-radius: 26px;
    padding: 42px 24px;
    text-align: center;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

    .empty-state.compact {
        padding: 34px 20px;
        box-shadow: none;
        background: linear-gradient(180deg, #ffffff 0%, #fff8fa 100%);
    }

.empty-illustration {
    width: 96px;
    height: 96px;
    border-radius: 30px;
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin: 0 auto 20px;
    position: relative;
}

    .empty-illustration::after {
        content: "";
        position: absolute;
        width: 112px;
        height: 112px;
        border-radius: 34px;
        border: 1px dashed var(--rv2-pink);
    }

.empty-state h2,
.empty-state h3 {
    font-weight: 900;
    color: var(--rv2-ink);
    letter-spacing: -0.03em;
}

.empty-state p {
    color: #6b7280;
    max-width: 520px;
    margin: 0 auto 22px;
}

/* ALERTS */

.custom-alert-danger,
.custom-alert-warning,
.custom-alert-info {
    border: 0;
    border-radius: 18px;
    padding: 14px 16px;
    font-weight: 600;
}

.custom-alert-danger {
    background: #fff1f2;
    color: #b02a37;
}

.custom-alert-warning {
    background: #fff8e1;
    color: #8a6500;
}

.custom-alert-info {
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
}

.validation-summary-valid.custom-alert-danger {
    display: none;
}

/* AUTH */

.auth-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 0;
    color: var(--rv2-ink);
}

.auth-shell {
    width: min(1040px, 100%);
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 24px;
    align-items: stretch;
}

.auth-visual,
.auth-card,
.auth-status-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff4f7 55%, #f8bbd0 160%);
    border: 1px solid var(--rv2-pink);
    border-radius: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    position: relative;
    overflow: hidden;
}

.auth-visual {
    padding: 32px;
    min-height: 470px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .auth-visual::before {
        content: "";
        position: absolute;
        inset: 18px;
        border: 1px solid rgba(232, 62, 111, 0.16);
        border-radius: 22px;
        background-image: linear-gradient(rgba(232, 62, 111, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(232, 62, 111, 0.08) 1px, transparent 1px);
        background-size: 28px 28px;
        mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent);
        pointer-events: none;
    }

.auth-visual-content,
.auth-visual-footer {
    position: relative;
    z-index: 1;
}

.auth-visual-image {
    position: relative;
    z-index: 1;
    display: block;
    width: min(320px, 72%);
    max-height: 320px;
    object-fit: contain;
    margin: 22px auto;
    filter: drop-shadow(0 18px 28px rgba(15, 23, 42, 0.12));
    opacity: 0.94;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rv2-pink-strong);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-title {
    color: var(--rv2-ink);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.auth-subtitle,
.auth-copy {
    color: var(--rv2-muted);
}

.auth-card {
    padding: 28px;
    background: #ffffff;
    animation: authPanelIn 0.48s ease-out both;
}

.auth-card-header {
    margin-bottom: 22px;
}

.auth-icon,
.auth-status-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    font-size: 1.55rem;
    box-shadow: inset 0 0 0 1px var(--rv2-pink);
}

.auth-icon {
    animation: authPulse 2.8s ease-in-out infinite;
}

.auth-field .form-control {
    min-height: 52px;
    border-radius: 14px;
}

.auth-field label {
    color: var(--rv2-muted);
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-link {
    color: var(--rv2-pink-strong);
    font-weight: 700;
    text-decoration: none;
}

    .auth-link:hover {
        text-decoration: underline;
    }

.auth-metric {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--rv2-blush);
    color: #5d575d;
    font-weight: 800;
    padding: 8px 12px;
}

.auth-status-page {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 0;
}

.auth-status-card {
    width: min(640px, 100%);
    padding: 36px;
    text-align: center;
    background: #ffffff;
    animation: authPanelIn 0.48s ease-out both;
}

.auth-status-icon {
    width: 86px;
    height: 86px;
    border-radius: 28px;
    font-size: 2.2rem;
    margin: 0 auto 22px;
}

.auth-status-icon.danger {
    background: #fff1f2;
    color: #dc3545;
    box-shadow: inset 0 0 0 1px #fecdd3;
    animation: authDeniedPulse 1.7s ease-in-out infinite;
}

.auth-status-icon.warning {
    background: #fff8e1;
    color: #8a6500;
    box-shadow: inset 0 0 0 1px #ffe69c;
    animation: authLockShake 2.6s ease-in-out infinite;
}

.auth-status-title {
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--rv2-ink);
}

.auth-status-text {
    max-width: 460px;
    margin: 0 auto 24px;
    color: var(--rv2-muted);
}

@keyframes authPanelIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes authPulse {
    0%,
    100% {
        box-shadow: inset 0 0 0 1px var(--rv2-pink), 0 0 0 0 rgba(232, 62, 111, 0.22);
    }

    50% {
        box-shadow: inset 0 0 0 1px var(--rv2-pink), 0 0 0 12px rgba(232, 62, 111, 0);
    }
}

@keyframes authDeniedPulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

@keyframes authLockShake {
    0%,
    82%,
    100% {
        transform: translateX(0);
    }

    86% {
        transform: translateX(-4px);
    }

    90% {
        transform: translateX(4px);
    }

    94% {
        transform: translateX(-2px);
    }
}

/* SWEETALERT CONFIRMATIONS */

.swal2-popup.rincon-swal-popup {
    border-radius: 22px;
    padding: 26px;
    border: 1px solid var(--rv2-line);
    background: linear-gradient(145deg, var(--rv2-white), #fff9fb);
    box-shadow: var(--rv2-shadow);
}

.swal2-popup .rincon-swal-title {
    color: var(--rv2-ink);
    font-weight: 900;
    letter-spacing: -0.02em;
}

.swal2-popup .rincon-swal-text {
    color: var(--rv2-muted) !important;
}

.swal2-actions.rincon-swal-actions {
    gap: 0.65rem;
    margin-top: 1.5rem;
}

.rincon-swal-confirm,
.rincon-swal-cancel {
    min-height: 42px;
    padding: 0.65rem 1.15rem;
    border: 1px solid transparent;
    border-radius: 12px !important;
    font-weight: 800 !important;
    min-width: 120px;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.rincon-swal-confirm {
    color: var(--rv2-white);
    border-color: var(--rv2-pink-strong);
    background: linear-gradient(135deg, var(--rv2-pink-strong), #d92f62);
    box-shadow: 0 10px 22px rgba(232, 62, 111, .22);
}

.rincon-swal-confirm:hover {
    color: var(--rv2-white);
    border-color: var(--rv2-pink-deep);
    background: var(--rv2-pink-deep);
    transform: translateY(-1px);
}

.rincon-swal-cancel {
    color: #5d575d;
    border-color: var(--rv2-line);
    background: #f3f1f2;
    box-shadow: none;
}

.rincon-swal-cancel:hover {
    color: var(--rv2-ink);
    border-color: var(--rv2-pink);
    background: var(--rv2-blush);
    transform: translateY(-1px);
}

.rincon-swal-confirm:focus-visible,
.rincon-swal-cancel:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .22rem rgba(232, 62, 111, .2);
}

.swal2-popup .rincon-swal-icon.swal2-question,
.swal2-popup .rincon-swal-icon.swal2-info {
    color: var(--rv2-pink-strong);
    border-color: var(--rv2-pink);
}

.rincon-swal-popup .swal2-close:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 .22rem rgba(232, 62, 111, .2);
}

/* CART */

.quantity-short {
    max-width: 130px;
}

.quantity-editor {
    width: 158px;
}

.quantity-result-input {
    width: 82px;
    text-align: center;
}

.btn-quantity {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid #ddd3d7;
    background: #ffffff;
    color: #765562;
}

    .btn-quantity:hover {
        background: #f3f1f2;
        color: var(--rv2-ink);
    }

.btn-remove {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 12px;
    border: 0;
    background: #fff1f2;
    color: #dc3545;
}

    .btn-remove:hover {
        background: #dc3545;
        color: #ffffff;
    }

.stock-text,
.line-total {
    font-weight: 800;
}

.cart-count-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: var(--rv2-blush);
    color: var(--rv2-pink-strong);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 8px 12px;
}

.change-result {
    font-weight: 800;
    color: var(--rv2-muted);
}

.mini-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: 0.9rem;
}

.main-empty {
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 20% 20%, rgba(232, 62, 111, 0.08), transparent 28%), radial-gradient(circle at 80% 30%, rgba(25, 135, 84, 0.08), transparent 26%), #ffffff;
}

.cart-empty {
    background: #ecfdf5;
    color: #198754;
}

    .cart-empty::after {
        border-color: #b7ebcd;
    }

.empty-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* TOTAL */

.total-panel-compact {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: #fff8fa;
    border: 1px solid var(--rv2-line);
    border-radius: 14px;
    padding: 12px 18px;
    min-width: auto;
    text-align: right;
}

.total-label {
    color: var(--rv2-muted);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.total-amount-compact {
    font-size: 1.55rem;
    font-weight: 900;
    color: #198754;
    letter-spacing: -0.03em;
    line-height: 1;
}

/* SUCCESS MODAL */

.sale-success-modal {
    overflow: hidden;
}

.success-check-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #198754;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.45s ease-out;
}

.success-check-icon {
    color: #fff;
    font-size: 3rem;
    animation: checkBounce 0.65s ease-out;
}

@keyframes successPop {
    0% {
        transform: scale(0.4);
        opacity: 0;
    }

    70% {
        transform: scale(1.12);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

@keyframes checkBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.25);
        opacity: 1;
    }

    100% {
        transform: scale(1);
    }
}

/* PRODUCT IMAGES */

.product-img-sm,
.cart-product-img,
.cart-product-placeholder {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    object-fit: cover;
    flex-shrink: 0;
}

.product-card-img {
    object-fit: cover;
}

.cart-product-placeholder,
.product-img-placeholder {
    background: #f3f1f2;
    border: 1px solid #e6dce0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--rv2-gray);
}

/* DIRECT SALE FORM */

.sale-form-card {
    width: 100%;
    padding: 28px;
}

.sale-form-content {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
}

.compact-form-card {
    width: 100%;
    padding: 28px;
}

.compact-form-content {
    width: 100%;
    max-width: 980px;
    margin-inline: auto;
}

.compact-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--rv2-line);
}

.compact-form-action {
    width: auto;
    min-width: 170px;
}

.product-status-control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    margin: 0;
    padding: 0 14px;
    background: #fff8fa;
    border: 1px solid var(--rv2-line);
    border-radius: 12px;
}

.product-status-control .form-check-input {
    float: none;
    flex-shrink: 0;
    margin: 0;
}

.product-status-control .form-check-label {
    font-weight: 700;
}

.product-media-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 20px;
    align-items: start;
    max-width: 840px;
}

.product-preview-field {
    min-width: 0;
}

.product-image-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 190px;
    height: 160px;
    padding: 10px;
    background: #fff8fa;
    border: 1px solid var(--rv2-line);
    border-radius: 16px;
    overflow: hidden;
}

.product-preview-placeholder {
    display: grid;
    justify-items: center;
    gap: 6px;
    color: var(--rv2-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.product-preview-placeholder i {
    color: var(--rv2-pink-strong);
    font-size: 1.75rem;
}

.sale-meta-grid {
    display: grid;
    grid-template-columns: minmax(240px, 285px) 210px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-bottom: 28px;
}

.sale-field {
    min-width: 0;
}

.sale-combined-payment-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
    min-width: 0;
}

.sale-combined-payment-fields[hidden] {
    display: none;
}

.sale-payment-method-field {
    width: 210px;
}

.sale-payment-detail {
    min-width: 0;
}

.sale-combined-payment-feedback {
    grid-column: 1 / -1;
    color: var(--rv2-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.sale-combined-payment-feedback:empty {
    display: none;
}

.sale-combined-payment-feedback.is-valid {
    color: var(--bs-success);
}

.sale-combined-payment-feedback.is-invalid {
    color: var(--bs-danger);
}

.sale-lines-header,
.sale-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px 112px;
    gap: 12px;
    align-items: center;
}

.sale-lines-header {
    margin-bottom: 8px;
    padding-inline: 2px;
    color: var(--rv2-muted);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

#lines {
    display: grid;
    gap: 10px;
}

.sale-line {
    padding: 10px;
    background: #fff8fa;
    border: 1px solid var(--rv2-line);
    border-radius: 16px;
}

.sale-product-field,
.sale-quantity-field,
.sale-remove-action {
    min-width: 0;
}

.sale-form-card .form-control,
.sale-form-card .form-select,
.sale-form-card .select2-container--bootstrap-5 .select2-selection {
    min-height: 44px;
}

.sale-quantity-field .form-control {
    text-align: center;
    font-weight: 800;
}

.sale-remove-button {
    width: 112px;
    min-height: 42px;
}

.sale-add-button {
    width: auto;
    margin-top: 14px;
}

.sale-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-block: 24px 20px;
    padding-top: 20px;
    border-top: 1px solid var(--rv2-line);
}

.sale-total-row .h3 {
    margin-bottom: 0;
}

.sale-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.sale-action-button {
    width: auto;
    min-width: 160px;
}

/* RESPONSIVE */

@media (max-width: 1200px) {
    .sale-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sale-payment-detail {
        grid-column: 1 / -1;
    }

    .cash-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cash-overview-detail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cash-breakdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sale-form-card {
        padding: 18px;
    }

    .sale-meta-grid {
        grid-template-columns: 1fr;
    }

    .sale-combined-payment-fields {
        grid-template-columns: 1fr;
    }

    .sale-payment-method-field {
        width: 100%;
    }

    .sale-payment-detail {
        grid-column: auto;
    }

    .sale-lines-header {
        display: none;
    }

    .sale-line {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .sale-product-field {
        grid-column: 1 / -1;
    }

    .sale-quantity-field {
        max-width: 120px;
    }

    .sale-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .sale-action-button {
        width: 100%;
    }

    .compact-form-card {
        padding: 18px;
    }

    .compact-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .compact-form-action {
        width: 100%;
    }

    .product-media-grid {
        grid-template-columns: 1fr;
    }

    .product-image-preview {
        width: 190px;
    }

    .sales-hero-filters {
        grid-template-columns: 1fr;
    }

    .cash-inline-form,
    .cash-close-form,
    .personal-account-settle-form {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .auth-page,
    .auth-status-page {
        min-height: auto;
        padding: 20px 0;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        min-height: 260px;
        padding: 22px;
    }

    .auth-visual-image {
        width: min(240px, 68%);
        max-height: 240px;
        margin: 16px auto;
    }

    .auth-card,
    .auth-status-card {
        border-radius: 20px;
        padding: 22px;
    }

    .rincon-hero,
    .admin-hero,
    .cart-hero,
    .action-card,
    .content-card,
    .form-card,
    .checkout-card,
    .checkout-option-card {
        border-radius: 18px;
        padding: 16px;
    }

    .total-panel-compact {
        width: 100%;
        justify-content: space-between;
    }

    .cash-overview,
    .cash-breakdown-grid {
        grid-template-columns: 1fr;
    }

    .sale-detail-meta {
        grid-template-columns: 1fr;
    }

    .cash-summary-card-primary strong {
        font-size: 1.6rem;
    }

    .input-group-modern {
        flex-wrap: nowrap;
    }

    .quantity-short {
        max-width: 110px;
    }

    .article-sale-mode-toggle {
        width: 100%;
    }

    .article-sale-mode-option {
        font-size: 0.76rem;
        min-height: 48px;
        padding-inline: 8px;
    }

    .total-panel {
        width: 100%;
        text-align: left;
    }

    .btn-confirm-sale {
        width: 100%;
    }
}

