* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;

    font-family: Arial, Helvetica, sans-serif;

    background: #f1f2f4;

    color: #202124;
}

.app-shell {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 30px 20px 50px;
}

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

.hero {
    text-align: center;
    margin: 0 auto 22px;
    max-width: 760px;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #ffb06b;
    margin-bottom: 10px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(30px, 7vw, 52px);
    line-height: 1.05;
    font-weight: 900;
}

.hero p {
    margin: 14px auto 0;
    max-width: 620px;
    color: #d5cdca;
    font-size: 16px;
    line-height: 1.6;
}

/* =========================
   FORMULARIO
========================= */

.form-card {
    width: 100%;
    max-width: 560px;
    margin: 25px auto 0;
    padding: 30px;
    background: rgba(20, 17, 17, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 26px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.45),
        0 0 35px rgba(255, 80, 30, 0.08);
}/* =========================================
   ÁREA PÚBLICA
========================================= */

body:has(.form-card) {
    background:
        radial-gradient(
            circle at top,
            #49251f 0%,
            #21191a 38%,
            #111111 100%
        );

    color: #ffffff;
}

/* =========================
   FORM
========================= */

.form-card form {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-card label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #f5eeee;
}

.form-card input[type="text"],
.form-card input[type="email"],
.form-card input[type="tel"],
.form-card select {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 13px;
    border: 1px solid #4a4141;
    background: #252020;
    color: #ffffff;
    font-size: 15px;
    outline: none;
    transition: 0.2s ease;
}

.form-card input::placeholder {
    color: #918887;
}

.form-card input[type="text"]:focus,
.form-card input[type="email"]:focus,
.form-card input[type="tel"]:focus,
.form-card select:focus {
    border-color: #ff6a2a;
    box-shadow: 0 0 0 3px rgba(255, 106, 42, 0.12);
}

/* =========================
   CHECKBOXES
========================= */

.form-card .check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 13px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 500;
    color: #d8d0ce;
    cursor: pointer;
}

.form-card .check input {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 1px 0 0;
    accent-color: #ff5b27;
}

/* =========================
   BOTÓN
========================= */

.form-card button {
    width: 100%;
    min-height: 56px;
    margin-top: 18px;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #ff4b22, #ff8b19);
    color: white;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(255, 81, 30, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.form-card button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(255, 81, 30, 0.35);
}

.form-card button:active {
    transform: translateY(0);
}

/* =========================
   ERROR
========================= */

.error {
    margin-bottom: 15px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(190, 40, 40, 0.18);
    border: 1px solid rgba(255, 80, 80, 0.35);
    color: #ffb6b6;
    font-size: 14px;
}

/* =========================
   DASHBOARD
========================= */

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 25px;
}

.card {
    background: rgba(255, 255, 255, 0.96);
    color: #202124;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
}

.card span {
    display: block;
    font-size: 28px;
    margin-bottom: 16px;
}

.card strong {
    display: block;
    font-size: 34px;
}

.card small {
    display: block;
    color: #777;
    margin-top: 7px;
}

.modules {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.module-card {
    min-height: 120px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.96);
    color: #202124;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    font-size: 22px;
}

.module-card b {
    margin-left: 8px;
    font-size: 18px;
}

.module-card small {
    display: block;
    margin-top: 8px;
    color: #777;
    font-size: 13px;
}

/* =========================
   ÉXITO
========================= */

.success {
    max-width: 600px;
    margin-top: 80px;
}

.success a {
    display: inline-block;
    margin-top: 20px;
    padding: 14px 24px;
    border-radius: 12px;
    background: #ff5b27;
    color: white;
    text-decoration: none;
    font-weight: 800;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 700px) {

    .app-shell {
        padding: 22px 14px 40px;
    }

    .hero {
        padding: 10px 8px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 15px;
    }

    .form-card {
        margin-top: 18px;
        padding: 23px 18px;
        border-radius: 22px;
    }

    .form-card input[type="text"],
    .form-card input[type="email"],
    .form-card input[type="tel"],
    .form-card select {
        height: 54px;
        font-size: 16px;
    }

    .form-card button {
        min-height: 58px;
        font-size: 14px;
    }

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .modules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 420px) {

    .app-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .form-card {
        padding: 20px 15px;
    }

    .hero h1 {
        font-size: 29px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}/* =========================
   INSTAGRAM / CAPTACIÓN
========================= */

.instagram-card {
    text-align: center;
}

.instagram-card h2,
.form-card h2 {
    margin: 8px 0 10px;
    font-size: 24px;
}

.instagram-card p,
.form-card > p {
    color: #bdb4b1;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 22px;
}

.step-number {
    width: 38px;
    height: 38px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #ff5b27;
    color: white;
    font-weight: 900;
}

.instagram-button,
.continue-button {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    font-weight: 900;
    font-size: 14px;
    letter-spacing: .5px;
}

.instagram-button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #ffffff;
    color: #151313;
    margin-bottom: 12px;
}

.instagram-button:hover {
    transform: translateY(-1px);
}

.continue-button {
    border: 1px solid #514747;
    background: #292323;
    color: #ffffff;
    cursor: pointer;
}

.continue-button:hover {
    background: #352e2e;
}

#registrationStep {
    animation: appearForm .35s ease;
}

@keyframes appearForm {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}/* =========================================
   CRM INTERNO - CONSUMIDORES
========================================= */

.internal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 28px 32px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .07);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.crm-logo {
    width: 85px;
    height: 85px;
    object-fit: contain;
}

.internal-header h1 {
    margin: 4px 0;
    color: #202124;
    font-size: 34px;
}

.internal-header p {
    margin: 0;
    color: #777;
}

.primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 12px;
    background: #ff5b27;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}


/* ESTADÍSTICAS */

.consumer-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 22px;
}

.internal-stat {
    padding: 22px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .06);
}

.internal-stat span {
    display: block;
    font-size: 25px;
    margin-bottom: 12px;
}

.internal-stat strong {
    display: block;
    color: #202124;
    font-size: 30px;
}

.internal-stat small {
    display: block;
    margin-top: 5px;
    color: #777;
}


/* LISTADO */

.consumer-list {
    margin-top: 24px;
    padding: 26px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
}

.list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.list-header h2 {
    margin: 0;
    color: #202124;
}

.list-header p {
    margin: 6px 0 0;
    color: #777;
}

#consumerSearch {
    width: 300px;
    height: 46px;
    padding: 0 15px;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fafafa;
    outline: none;
    font-size: 14px;
}

#consumerSearch:focus {
    border-color: #ff5b27;
}


/* TARJETAS */

.consumer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.consumer-card {
    padding: 22px;
    border: 1px solid #eeeeee;
    border-radius: 18px;
    background: #ffffff;
    transition: .2s ease;
}

.consumer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .07);
}

.consumer-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eeeeee;
}

.avatar {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff0e9;
    color: #ff5b27;
    font-size: 21px;
    font-weight: 900;
}

.consumer-name h3 {
    margin: 0 0 5px;
    color: #202124;
}

.status {
    color: #239b56;
    font-size: 12px;
    font-weight: 700;
}


/* INFORMACIÓN */

.consumer-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding: 20px 0;
}

.consumer-info div {
    min-width: 0;
}

.consumer-info span {
    margin-right: 5px;
}

.consumer-info strong {
    font-size: 12px;
    color: #777;
}

.consumer-info p {
    margin: 5px 0 0;
    color: #202124;
    font-size: 14px;
    word-break: break-word;
}


/* FOOTER */

.consumer-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
    color: #777;
    font-size: 11px;
}

.badge {
    padding: 6px 9px;
    border-radius: 20px;
    background: #f2f2f2;
}

.success-badge {
    background: #eaf8ef;
    color: #218a4d;
}


/* VACÍO */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #777;
}

.empty-state div {
    font-size: 45px;
}

.empty-state h2 {
    color: #202124;
}


/* MOBILE */

@media (max-width: 800px) {

    .internal-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .consumer-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .consumer-grid {
        grid-template-columns: 1fr;
    }

    .list-header {
        flex-direction: column;
        align-items: stretch;
    }

    #consumerSearch {
        width: 100%;
    }
}

@media (max-width: 500px) {

    .internal-header {
        padding: 22px;
    }

    .brand-header {
        align-items: flex-start;
    }

    .crm-logo {
        width: 65px;
        height: 65px;
    }

    .internal-header h1 {
        font-size: 27px;
    }

    .consumer-stats {
        grid-template-columns: 1fr;
    }

    .consumer-list {
        padding: 18px;
    }

    .consumer-info {
        grid-template-columns: 1fr;
    }

    .primary-action {
        width: 100%;
    }
}/* =====================================================
   CRM B2C - PANEL ADMINISTRATIVO
===================================================== */

.crm-page {
    min-height: 100vh;
    padding-bottom: 50px;
}


/* HEADER */

.crm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 28px 32px;

    background: #ffffff;

    border-radius: 22px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, .06);
}


.crm-brand {
    display: flex;
    align-items: center;
    gap: 20px;
}


.crm-logo {
    width: 78px;
    height: 78px;

    object-fit: contain;
}


.crm-eyebrow {
    display: block;

    margin-bottom: 5px;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 2px;

    color: #ff5b27;
}


.crm-header h1 {
    margin: 0;

    color: #202124;

    font-size: 34px;
}


.crm-header p {
    margin: 7px 0 0;

    color: #777;

    font-size: 14px;
}


.crm-primary-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-height: 48px;

    padding: 0 20px;

    border-radius: 12px;

    background: #ff5b27;

    color: #ffffff;

    text-decoration: none;

    font-weight: 800;

    white-space: nowrap;
}


.crm-primary-button:hover {
    background: #e94d1c;
}


/* =====================================================
   ESTADÍSTICAS
===================================================== */

.crm-stats {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-top: 22px;
}


.crm-stat-card {
    display: flex;

    align-items: center;

    gap: 15px;

    padding: 22px;

    background: #ffffff;

    border-radius: 18px;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .05);
}


.stat-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    border-radius: 14px;

    background: #fff0e9;

    font-size: 23px;
}


.crm-stat-card strong {
    display: block;

    color: #202124;

    font-size: 28px;
}


.crm-stat-card span {
    display: block;

    margin-top: 3px;

    color: #777;

    font-size: 12px;
}


/* =====================================================
   PANEL
===================================================== */

.consumers-panel {
    margin-top: 24px;

    padding: 26px;

    background: #ffffff;

    border-radius: 22px;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, .06);
}


.consumers-toolbar {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}


.consumers-toolbar h2 {
    margin: 0;

    color: #202124;

    font-size: 21px;
}


.consumers-toolbar p {
    margin: 6px 0 0;

    color: #777;

    font-size: 13px;
}


.consumer-search {
    display: flex;

    align-items: center;

    gap: 8px;

    width: 310px;

    height: 46px;

    padding: 0 14px;

    background: #f7f7f7;

    border: 1px solid #e4e4e4;

    border-radius: 12px;
}


.consumer-search input {
    width: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: #202124;

    font-size: 14px;
}


/* =====================================================
   ACORDEÓN
===================================================== */

.consumer-list {
    display: flex;

    flex-direction: column;

    gap: 10px;
}


.consumer-accordion {
    overflow: hidden;

    border: 1px solid #e8e8e8;

    border-radius: 15px;

    background: #ffffff;

    transition:
        box-shadow .2s ease,
        border-color .2s ease;
}


.consumer-accordion:hover {
    border-color: #dcdcdc;
}


.consumer-accordion.open {
    border-color: #ffb49a;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, .06);
}


/* CABECERA */

.consumer-summary {
    width: 100%;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    padding: 17px 20px;

    border: none;

    background: #ffffff;

    cursor: pointer;

    text-align: left;
}


.consumer-main {
    display: flex;

    align-items: center;

    gap: 14px;

    min-width: 0;
}


.consumer-avatar {
    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 46px;
    height: 46px;

    border-radius: 50%;

    background: #fff0e9;

    color: #ff5b27;

    font-size: 18px;

    font-weight: 900;
}


.consumer-title {
    min-width: 0;
}


.consumer-title h3 {
    display: flex;

    align-items: center;

    gap: 6px;

    margin: 0;

    color: #202124;

    font-size: 16px;
}


.consumer-email {
    display: block;

    margin-top: 4px;

    color: #777;

    font-size: 12px;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.ranking-medal {
    font-size: 20px;

    line-height: 1;
}


.consumer-summary-right {
    display: flex;

    align-items: center;

    gap: 18px;

    flex-shrink: 0;
}


.consumer-status {
    color: #239b56;

    font-size: 11px;

    font-weight: 800;
}


.accordion-arrow {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    border-radius: 50%;

    background: #f4f4f4;

    color: #555;

    font-size: 11px;

    transition:
        transform .25s ease,
        background .2s ease;
}


.consumer-accordion.open
.accordion-arrow {
    transform: rotate(180deg);

    background: #fff0e9;

    color: #ff5b27;
}


/* =====================================================
   FICHA DESPLEGABLE
===================================================== */

.consumer-details {
    display: none;

    padding: 0 20px 22px;

    border-top: 1px solid #eeeeee;

    background: #fafafa;
}


.consumer-accordion.open
.consumer-details {
    display: block;

    animation: consumerOpen .22s ease;
}


@keyframes consumerOpen {

    from {
        opacity: 0;

        transform:
            translateY(-5px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}


/* INFORMACIÓN */

.consumer-details-grid {
    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 1px;

    margin-top: 18px;

    overflow: hidden;

    border: 1px solid #e8e8e8;

    border-radius: 14px;

    background: #e8e8e8;
}


.detail-item {
    display: flex;

    align-items: flex-start;

    gap: 12px;

    padding: 15px;

    background: #ffffff;
}


.detail-icon {
    flex-shrink: 0;

    font-size: 19px;
}


.detail-item small {
    display: block;

    margin-bottom: 4px;

    color: #888;

    font-size: 10px;

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .4px;
}


.detail-item strong {
    display: block;

    color: #202124;

    font-size: 13px;

    word-break: break-word;
}


/* =====================================================
   ETIQUETAS
===================================================== */

.consumer-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;

    margin-top: 16px;
}


.consumer-tag {
    display: inline-flex;

    align-items: center;

    padding: 7px 10px;

    border-radius: 20px;

    background: #eeeeee;

    color: #666;

    font-size: 11px;

    font-weight: 700;
}


.tag-instagram {
    background: #f3ebff;

    color: #733cc4;
}


.tag-consent {
    background: #eaf8ef;

    color: #218a4d;
}


.tag-gold {
    background: #fff4cf;

    color: #946d00;
}


.tag-silver {
    background: #eeeeee;

    color: #626262;
}


.tag-bronze {
    background: #f5e4d8;

    color: #8c5431;
}


/* =====================================================
   ACCIONES
===================================================== */

.consumer-actions {
    display: flex;

    justify-content: flex-end;

    margin-top: 18px;
}


.profile-button {
    padding: 10px 15px;

    border: 1px solid #dddddd;

    border-radius: 10px;

    background: #ffffff;

    color: #555;

    font-size: 12px;

    font-weight: 800;

    cursor: pointer;
}


.profile-button:hover {
    border-color: #ff5b27;

    color: #ff5b27;
}


/* =====================================================
   SIN RESULTADOS
===================================================== */

.no-results {
    padding: 50px 20px;

    text-align: center;

    color: #777;
}


.no-results div {
    font-size: 35px;
}


.no-results h3 {
    margin-bottom: 5px;

    color: #202124;
}


/* =====================================================
   VACÍO
===================================================== */

.empty-state {
    padding: 60px 20px;

    text-align: center;

    color: #777;
}


.empty-state div {
    font-size: 45px;
}


.empty-state h2 {
    margin-bottom: 5px;

    color: #202124;
}


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

@media (max-width: 850px) {

    .crm-header {
        align-items: flex-start;

        flex-direction: column;
    }


    .crm-primary-button {
        width: 100%;
    }


    .crm-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .consumers-toolbar {
        align-items: stretch;

        flex-direction: column;
    }


    .consumer-search {
        width: 100%;
    }

}


@media (max-width: 600px) {

    .crm-header {
        padding: 22px;
    }


    .crm-brand {
        align-items: flex-start;
    }


    .crm-logo {
        width: 60px;
        height: 60px;
    }


    .crm-header h1 {
        font-size: 27px;
    }


    .crm-stats {
        grid-template-columns: 1fr;
    }


    .consumers-panel {
        padding: 17px;
    }


    .consumer-summary {
        padding: 15px;
    }


    .consumer-summary-right {
        gap: 7px;
    }


    .consumer-status {
        display: none;
    }


    .consumer-details {
        padding: 0 15px 18px;
    }


    .consumer-details-grid {
        grid-template-columns: 1fr;
    }


    .consumer-title h3 {
        font-size: 15px;
    }


    .consumer-email {
        max-width: 190px;
    }

}/* =====================================================
   PICACHO SCORE
===================================================== */

.customer-score {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, 1fr);
    gap: 1px;

    margin-top: 18px;

    overflow: hidden;

    border: 1px solid #e8e8e8;
    border-radius: 14px;

    background: #e8e8e8;
}


.score-main,
.score-item {
    padding: 16px;
    background: #ffffff;
}


.score-main {
    display: flex;
    align-items: center;
    gap: 12px;
}


.score-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    border-radius: 12px;

    background: #fff0e9;

    font-size: 21px;
}


.score-main small,
.score-item small {
    display: block;

    margin-bottom: 5px;

    color: #888;

    font-size: 10px;
    font-weight: 700;

    text-transform: uppercase;
}


.score-main strong {
    display: block;

    color: #ff5b27;

    font-size: 23px;
}


.score-item strong {
    display: block;

    color: #202124;

    font-size: 17px;
}


/* =====================================================
   HISTORIAL
===================================================== */

.consumer-history {
    margin-top: 18px;

    padding: 18px;

    border: 1px solid #e8e8e8;

    border-radius: 14px;

    background: #ffffff;
}


.history-title {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 15px;

    color: #202124;

    font-size: 14px;
}


.history-modules {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 10px;
}


.history-modules > div {
    padding: 13px;

    text-align: center;

    border-radius: 12px;

    background: #f7f7f7;
}


.history-modules span {
    display: block;

    margin-bottom: 6px;

    font-size: 19px;
}


.history-modules small {
    display: block;

    color: #888;

    font-size: 10px;
}


.history-modules strong {
    display: block;

    margin-top: 3px;

    color: #202124;

    font-size: 17px;
}


/* =====================================================
   SCORE MOBILE
===================================================== */

@media (max-width: 850px) {

    .customer-score {
        grid-template-columns:
            repeat(2, 1fr);
    }


    .score-main {
        grid-column: span 2;
    }


    .history-modules {
        grid-template-columns:
            repeat(3, 1fr);
    }

}


@media (max-width: 500px) {

    .customer-score {
        grid-template-columns: 1fr;
    }


    .score-main {
        grid-column: span 1;
    }


    .history-modules {
        grid-template-columns:
            repeat(2, 1fr);
    }

}/* =====================================================
   PRODUCTOS - CATÁLOGO ADMINISTRATIVO
===================================================== */

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.product-card {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 20px;
    box-shadow: 0 7px 22px rgba(0, 0, 0, .06);
    transition: .2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .09);
}

.product-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f4f4;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image span {
    font-size: 58px;
}

.product-content {
    padding: 20px;
}

.product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-header h3 {
    margin: 0;
    color: #202124;
    font-size: 18px;
    line-height: 1.3;
}

.product-status {
    flex-shrink: 0;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
}

.product-status.active {
    background: #eaf8ef;
    color: #218a4d;
}

.product-status.inactive {
    background: #eeeeee;
    color: #777777;
}

.product-description {
    min-height: 44px;
    margin: 12px 0 18px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.product-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
}

.product-meta small {
    display: block;
    margin-bottom: 4px;
    color: #999;
    font-size: 10px;
    text-transform: uppercase;
}

.product-meta strong {
    color: #202124;
    font-size: 13px;
}

.product-actions {
    margin-top: 16px;
}

.product-edit-button {
    width: 100%;
    height: 42px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
    color: #555555;
    font-weight: 800;
    cursor: pointer;
}

.product-edit-button:hover {
    border-color: #ff5b27;
    color: #ff5b27;
}


/* =====================================================
   MODAL PRODUCTO
===================================================== */

.product-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .55);
}

.product-modal.show {
    display: flex;
}

.product-modal-card {
    position: relative;

    width: 100%;
    max-width: 500px;
    max-height: 90vh;

    overflow-y: auto;

    padding: 30px;

    background: #ffffff;

    border-radius: 22px;

    box-shadow: 0 25px 70px rgba(0, 0, 0, .25);
}

.product-modal-card h2 {
    margin: 5px 0 8px;
    color: #202124;
}

.product-modal-card p {
    margin-bottom: 22px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 16px;

    width: 35px;
    height: 35px;

    border: none;
    border-radius: 50%;

    background: #f2f2f2;

    color: #555;

    font-size: 23px;

    cursor: pointer;
}

.product-modal-card form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-modal-card label {
    margin-top: 8px;

    color: #555;

    font-size: 12px;
    font-weight: 800;
}

.product-modal-card input,
.product-modal-card textarea {
    width: 100%;

    padding: 13px;

    border: 1px solid #dddddd;
    border-radius: 11px;

    background: #fafafa;

    color: #202124;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}

.product-modal-card textarea {
    min-height: 90px;
    resize: vertical;
}

.product-modal-card input:focus,
.product-modal-card textarea:focus {
    border-color: #ff5b27;
    background: #ffffff;
}

.product-save-button {
    width: 100%;
    margin-top: 15px;
    border: none;
    cursor: pointer;
}


/* =====================================================
   PRODUCTOS EN MÓVIL
===================================================== */

@media (max-width: 900px) {

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 600px) {

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

    .product-image {
        height: 200px;
    }

    .product-modal-card {
        padding: 23px 18px;
    }

}/* =====================================================
   HISTORIAL REAL DE COMPRAS
===================================================== */

.purchase-history {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #eeeeee;
}

.purchase-history h4,
.products-bought-summary h4 {
    margin: 0 0 12px;
    color: #202124;
    font-size: 13px;
}

.purchase-history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.purchase-history-item {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 12px;

    border: 1px solid #eeeeee;
    border-radius: 12px;

    background: #ffffff;
}

.purchase-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    flex-shrink: 0;

    border-radius: 10px;

    background: #fff0e9;

    font-size: 17px;
}

.purchase-product-info {
    flex: 1;
    min-width: 0;
}

.purchase-product-info strong {
    display: block;

    color: #202124;

    font-size: 13px;
}

.purchase-product-info span {
    display: block;

    margin-top: 3px;

    color: #888;

    font-size: 10px;
}

.purchase-product-place {
    text-align: right;
}

.purchase-product-place small {
    display: block;

    color: #999;

    font-size: 9px;
}

.purchase-product-place strong {
    display: block;

    margin-top: 3px;

    color: #555;

    font-size: 11px;
}


/* SIN COMPRAS */

.no-purchases {
    display: flex;

    align-items: center;

    gap: 10px;

    padding: 15px;

    border-radius: 12px;

    background: #f7f7f7;

    color: #777;
}

.no-purchases span {
    font-size: 22px;
}

.no-purchases p {
    margin: 0;

    font-size: 12px;
}


/* VARIEDAD */

.products-bought-summary {
    margin-top: 18px;
}

.product-pills {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.product-pill {
    display: inline-flex;

    align-items: center;

    padding: 7px 10px;

    border-radius: 20px;

    background: #fff0e9;

    color: #c9481e;

    font-size: 10px;

    font-weight: 700;
}


/* MOBILE */

@media (max-width: 600px) {

    .purchase-history-item {
        align-items: flex-start;
    }

    .purchase-product-place {
        display: none;
    }

}/* =========================================================
   PERFIL INDIVIDUAL DEL CONSUMIDOR
   PICACHO B2C CRM
========================================================= */


/* =========================================================
   CONTENEDOR GENERAL
========================================================= */

.crm-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}


/* =========================================================
   HEADER DEL PERFIL
========================================================= */

.crm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    padding: 32px;

    margin-bottom: 22px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 22px;

    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}


.crm-brand {
    display: flex;
    align-items: center;
    gap: 18px;

    min-width: 0;
}


.crm-brand h1 {
    margin: 4px 0 4px;

    color: #171717;

    font-size: 32px;
    font-weight: 800;

    line-height: 1.15;
}


.crm-brand p {
    margin: 0;

    color: #777;

    font-size: 14px;
}


.crm-eyebrow {
    display: block;

    color: #ff572f;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
}


.profile-avatar {
    width: 62px;
    height: 62px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff0e9;

    color: #ff572f;

    font-size: 24px;
    font-weight: 800;
}


/* =========================================================
   BOTONES
========================================================= */

.crm-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 18px;

    border: 1px solid #dddddd;

    border-radius: 10px;

    background: #ffffff;

    color: #333;

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition: all 0.2s ease;
}


.crm-secondary-button:hover {
    border-color: #ff572f;

    color: #ff572f;

    background: #fff7f4;
}


.profile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 11px 18px;

    border: 0;

    border-radius: 10px;

    background: #ff572f;

    color: white;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;

    transition: all 0.2s ease;
}


.profile-button:hover {
    transform: translateY(-1px);

    background: #e94b27;
}


/* =========================================================
   RESUMEN / SCORE
========================================================= */

.profile-score {
    display: grid;

    grid-template-columns:
        1.5fr
        1fr
        1fr
        1fr
        1fr;

    margin-bottom: 22px;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e5e5e5;

    border-radius: 18px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}


.profile-score-main,
.profile-stat {
    min-height: 90px;

    display: flex;
    align-items: center;

    padding: 20px;

    border-right: 1px solid #eeeeee;
}


.profile-score-main {
    gap: 14px;
}


.profile-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}


.profile-score-main:last-child,
.profile-stat:last-child {
    border-right: none;
}


.profile-score-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: #fff0e9;

    font-size: 25px;
}


.profile-score-main small,
.profile-stat small {
    display: block;

    color: #777;

    font-size: 10px;
    font-weight: 600;

    text-transform: uppercase;
}


.profile-score-main strong {
    display: block;

    margin-top: 3px;

    color: #ff572f;

    font-size: 27px;
    font-weight: 800;
}


.profile-stat strong {
    display: block;

    color: #181818;

    font-size: 20px;
    font-weight: 800;
}


/* =========================================================
   NIVEL DEL CLIENTE
========================================================= */

.profile-level {
    display: flex;
    align-items: center;
    gap: 15px;

    margin-bottom: 22px;

    padding: 18px 22px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 16px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}


.level-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #fff0e9;

    font-size: 23px;
}


.profile-level strong {
    display: block;

    color: #222;

    font-size: 16px;
}


.profile-level small {
    display: block;

    margin-top: 3px;

    color: #888;

    font-size: 11px;
}


/* =========================================================
   PANELES
========================================================= */

.profile-panel {
    margin-bottom: 22px;

    padding: 24px;

    background: #ffffff;

    border: 1px solid #eeeeee;

    border-radius: 18px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
}


.profile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 20px;

    padding-bottom: 16px;

    border-bottom: 1px solid #eeeeee;
}


.profile-panel-header h2 {
    margin: 0;

    color: #202020;

    font-size: 18px;
    font-weight: 800;
}


.profile-panel-header p {
    margin: 5px 0 0;

    color: #888;

    font-size: 12px;
}


/* =========================================================
   INFORMACIÓN DEL CONSUMIDOR
========================================================= */

.profile-info-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    overflow: hidden;

    border: 1px solid #eeeeee;

    border-radius: 14px;
}


.profile-info-item {
    display: flex;
    align-items: center;

    gap: 13px;

    min-height: 72px;

    padding: 14px 17px;

    border-bottom: 1px solid #eeeeee;

    background: #ffffff;
}


.profile-info-item:nth-child(odd) {
    border-right: 1px solid #eeeeee;
}


.profile-info-item:nth-last-child(-n + 2) {
    border-bottom: none;
}


.profile-info-item > span {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #fff5f1;

    font-size: 17px;
}


.profile-info-item small {
    display: block;

    margin-bottom: 3px;

    color: #999;

    font-size: 9px;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: .5px;
}


.profile-info-item strong {
    display: block;

    color: #222;

    font-size: 12px;

    word-break: break-word;
}


/* =========================================================
   ETIQUETAS
========================================================= */

.profile-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 18px;
}


.consumer-tag {
    display: inline-flex;
    align-items: center;

    padding: 7px 11px;

    border-radius: 20px;

    background: #f5f5f5;

    color: #555;

    font-size: 10px;
    font-weight: 700;
}


.tag-instagram {
    background: #f2eaff;

    color: #673ab7;
}


.tag-consent {
    background: #eaf8ef;

    color: #16853b;
}


/* =========================================================
   HISTORIAL DE COMPRAS
========================================================= */

.profile-purchases {
    display: flex;
    flex-direction: column;

    gap: 10px;
}


.profile-purchase {
    display: grid;

    grid-template-columns:
        50px
        1fr
        180px
        130px;

    align-items: center;

    gap: 15px;

    padding: 15px;

    border: 1px solid #eeeeee;

    border-radius: 13px;

    background: #ffffff;

    transition: all .2s ease;
}


.profile-purchase:hover {
    border-color: #ffcabd;

    background: #fffaf8;
}


.profile-purchase-icon {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #fff0e9;

    font-size: 20px;
}


.profile-purchase-main strong {
    display: block;

    color: #222;

    font-size: 13px;
}


.profile-purchase-main span {
    display: block;

    margin-top: 4px;

    color: #888;

    font-size: 10px;
}


.profile-purchase-place small,
.profile-purchase-price small {
    display: block;

    color: #999;

    font-size: 9px;

    text-transform: uppercase;
}


.profile-purchase-place strong,
.profile-purchase-price strong {
    display: block;

    margin-top: 3px;

    color: #333;

    font-size: 11px;
}


.profile-purchase-price {
    text-align: right;
}


/* =========================================================
   PRODUCTOS
========================================================= */

.profile-product-list {
    display: flex;

    flex-wrap: wrap;

    gap: 9px;
}


.profile-product-pill {
    display: inline-flex;
    align-items: center;

    padding: 10px 14px;

    border-radius: 20px;

    background: #fff0e9;

    color: #e84d28;

    font-size: 11px;
    font-weight: 700;
}


.profile-muted {
    margin: 0;

    color: #999;

    font-size: 12px;
}


/* =========================================================
   PERFIL VACÍO
========================================================= */

.profile-empty {
    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 40px 20px;

    text-align: center;

    border: 1px dashed #dddddd;

    border-radius: 14px;

    background: #fafafa;
}


.profile-empty span {
    font-size: 35px;
}


.profile-empty strong {
    margin-top: 10px;

    color: #333;

    font-size: 14px;
}


.profile-empty p {
    margin: 5px 0 0;

    color: #999;

    font-size: 11px;
}


/* =========================================================
   PRÓXIMAMENTE
========================================================= */

.profile-coming {
    margin-bottom: 30px;

    padding: 22px;

    border: 1px dashed #ffb6a4;

    border-radius: 16px;

    background: #fff8f5;
}


.profile-coming > div {
    display: flex;
    align-items: center;

    gap: 15px;
}


.profile-coming > div > span {
    width: 45px;
    height: 45px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 12px;

    background: #ffffff;

    font-size: 22px;
}


.profile-coming strong {
    display: block;

    color: #333;

    font-size: 13px;
}


.profile-coming p {
    margin: 4px 0 0;

    color: #888;

    font-size: 11px;

    line-height: 1.5;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {

    .profile-score {
        grid-template-columns: 1fr 1fr;
    }


    .profile-score-main,
    .profile-stat {
        border-bottom: 1px solid #eeeeee;
    }


    .profile-score-main {
        border-right: 1px solid #eeeeee;
    }


    .profile-purchase {
        grid-template-columns:
            50px
            1fr
            150px;
    }


    .profile-purchase-price {
        display: none;
    }

}


/* =========================================================
   RESPONSIVE — CELULAR
========================================================= */

@media (max-width: 650px) {

    .crm-page {
        padding: 0 12px;
    }


    .crm-header {
        flex-direction: column;

        align-items: flex-start;

        padding: 22px;

        border-radius: 18px;
    }


    .crm-brand {
        width: 100%;
    }


    .crm-brand h1 {
        font-size: 25px;
    }


    .crm-secondary-button {
        width: 100%;
    }


    .profile-score {
        grid-template-columns: 1fr 1fr;

        border-radius: 15px;
    }


    .profile-score-main {
        grid-column: 1 / -1;

        border-right: none;
    }


    .profile-stat {
        min-height: 75px;
    }


    .profile-stat:nth-child(odd) {
        border-right: 1px solid #eeeeee;
    }


    .profile-score-main,
    .profile-stat {
        padding: 15px;
    }


    .profile-panel {
        padding: 17px;

        border-radius: 15px;
    }


    .profile-info-grid {
        grid-template-columns: 1fr;
    }


    .profile-info-item {
        border-right: none !important;

        border-bottom: 1px solid #eeeeee !important;
    }


    .profile-info-item:last-child {
        border-bottom: none !important;
    }


    .profile-purchase {
        grid-template-columns: 42px 1fr;

        gap: 10px;
    }


    .profile-purchase-icon {
        width: 42px;
        height: 42px;
    }


    .profile-purchase-place {
        display: none;
    }


    .profile-purchase-main strong {
        font-size: 12px;
    }


    .profile-coming {
        padding: 17px;
    }

}/* =========================================================
   ACCIONES DEL PERFIL DEL CONSUMIDOR
========================================================= */

.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* =========================================================
   BOTÓN EDITAR
========================================================= */

.profile-edit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 17px;

    border: 1px solid #ff572f;

    border-radius: 10px;

    background: #ff572f;

    color: #ffffff;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    transition: all .2s ease;
}

.profile-edit-button:hover {
    background: #e94b27;

    border-color: #e94b27;

    transform: translateY(-1px);
}


/* =========================================================
   FOTO DEL CONSUMIDOR EN EL PERFIL
========================================================= */

.profile-consumer-photo {
    width: 62px;
    height: 62px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 50%;

    border: 4px solid #ffffff;

    background: #fff0e9;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, .08);
}


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

@media (max-width: 650px) {

    .profile-header-actions {
        width: 100%;

        flex-direction: column;

        align-items: stretch;
    }

    .profile-edit-button,
    .profile-header-actions .crm-secondary-button {
        width: 100%;

        box-sizing: border-box;
    }

}/* =========================================================
   FOTO EN LISTA DE CONSUMIDORES
========================================================= */

.consumer-list-photo {
    width: 50px;
    height: 50px;

    flex-shrink: 0;

    object-fit: cover;

    border-radius: 50%;

    border: 3px solid #ffffff;

    background: #fff0e9;

    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
}/* =========================================================
   FOTOS EN HISTORIAL DE COMPRAS
========================================================= */

.profile-purchase-consumer-photo,
.profile-purchase-product-photo {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff0eb;
    border: 1px solid #f1e0db;
}


/* FOTO DEL CONSUMIDOR */

.profile-purchase-consumer-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-purchase-consumer-initial {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    color: #ff5438;
}


/* FOTO DEL PRODUCTO */

.profile-purchase-product-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px;
    display: block;
}

.profile-purchase-product-photo span {
    font-size: 30px;
}


/* AJUSTE DEL CONTENIDO */

.profile-purchase {
    display: grid;
    grid-template-columns: 58px 58px minmax(220px, 1fr) 150px 170px;
    align-items: center;
    gap: 16px;
}


/* PRECIO */

.profile-purchase-price strong {
    color: #ff5438;
    font-size: 14px;
}


/* RESPONSIVE */

@media (max-width: 850px) {

    .profile-purchase {
        grid-template-columns: 50px 50px 1fr;
    }

    .profile-purchase-consumer-photo,
    .profile-purchase-product-photo {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .profile-purchase-place,
    .profile-purchase-price {
        grid-column: 3;
    }

}

/* =========================================================
   AUTENTICACION Y USUARIOS · V1
   Agregado sin alterar los estilos existentes.
========================================================= */
.auth-page { min-height: 100vh; display:flex; align-items:center; justify-content:center; padding:30px 15px; }
.auth-card { width:100%; max-width:460px; background:#fff; border:1px solid #e8e8e8; border-radius:24px; padding:34px; box-shadow:0 18px 55px rgba(0,0,0,.10); }
.auth-logo { display:block; width:150px; max-width:70%; margin:0 auto 20px; object-fit:contain; }
.auth-card h1 { margin:0; text-align:center; color:#202124; font-size:30px; }
.auth-card > p { margin:9px 0 24px; text-align:center; color:#777; font-size:13px; line-height:1.5; }
.auth-form { display:flex; flex-direction:column; gap:8px; }
.auth-form label { margin-top:7px; color:#555; font-size:12px; font-weight:800; }
.auth-form input, .auth-form select { width:100%; box-sizing:border-box; height:48px; padding:0 14px; border:1px solid #ddd; border-radius:11px; background:#fafafa; color:#202124; font:inherit; outline:none; }
.auth-form input:focus, .auth-form select:focus { border-color:#ff5b27; background:#fff; box-shadow:0 0 0 3px rgba(255,91,39,.10); }
.auth-button { width:100%; min-height:50px; margin-top:15px; border:0; border-radius:12px; background:#ff5b27; color:#fff; font-weight:900; cursor:pointer; }
.auth-error { margin-bottom:14px; padding:12px 14px; border-radius:11px; background:#fff0f0; border:1px solid #ffd0d0; color:#b42318; font-size:13px; }
.auth-note { margin-top:15px; padding:12px; border-radius:11px; background:#fff8f4; color:#777; font-size:11px; line-height:1.5; }
.user-toolbar { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-bottom:20px; }
.user-table-wrap { overflow:auto; background:#fff; border:1px solid #e8e8e8; border-radius:18px; }
.user-table { width:100%; border-collapse:collapse; min-width:760px; }
.user-table th, .user-table td { padding:14px 16px; border-bottom:1px solid #eee; text-align:left; font-size:12px; }
.user-table th { color:#777; font-size:10px; text-transform:uppercase; letter-spacing:.5px; background:#fafafa; }
.user-table tr:last-child td { border-bottom:0; }
.user-role, .user-status { display:inline-block; padding:6px 9px; border-radius:20px; font-size:10px; font-weight:800; }
.user-role { background:#fff0e9; color:#c9481e; }
.user-status.active { background:#eaf8ef; color:#218a4d; }
.user-status.inactive { background:#eee; color:#777; }
.user-actions { display:flex; gap:7px; flex-wrap:wrap; }
.user-action { display:inline-flex; align-items:center; justify-content:center; padding:8px 10px; border:1px solid #ddd; border-radius:9px; background:#fff; color:#555; text-decoration:none; font-size:10px; font-weight:800; cursor:pointer; }
.user-action:hover { border-color:#ff5b27; color:#ff5b27; }
.user-action-danger:hover { border-color:#d92d20; color:#d92d20; }
@media(max-width:600px){ .auth-card{padding:25px 19px;border-radius:20px;} .user-toolbar{align-items:stretch;flex-direction:column;} }


/* =========================================================
   AUTENTICACION · V2 FINAL
   Diseño tipo app móvil + interacción segura de formularios.
========================================================= */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    box-sizing: border-box;
    background: #ffffff;
}

.auth-card {
    position: relative;
    z-index: 1;
    width: min(100%, 470px);
    box-sizing: border-box;
    padding: 34px 32px 30px;
    background: #f1f2f4;
    border: 1px solid #e1e3e6;
    border-radius: 28px;
    box-shadow: 0 20px 55px rgba(0,0,0,.12);
}

.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-logo {
    display: block;
    width: 88px;
    height: 88px;
    margin: 0 auto 8px;
    object-fit: contain;
}
.auth-brand-name {
    color: #111111;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -1px;
}
.auth-brand-name span { color: #ef302f; }
.auth-tagline {
    margin-top: 7px;
    color: #555b63;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2px;
}
.auth-card h1 {
    margin: 18px 0 7px;
    text-align: center;
    color: #17191c;
    font-size: 30px;
    line-height: 1.15;
}
.auth-card > p {
    margin: 0 0 22px;
    text-align: center;
    color: #6b7077;
    font-size: 13px;
    line-height: 1.5;
}
.auth-form {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
}
.auth-field { position: relative; z-index: 2; }
.auth-form label {
    display: block;
    margin: 0 0 6px 2px;
    color: #26282c;
    font-size: 12px;
    font-weight: 800;
}
.auth-input-wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    box-sizing: border-box;
    background: #ffffff;
    border: 1px solid #d6d8dc;
    border-radius: 14px;
    overflow: hidden;
}
.auth-input-wrap:focus-within {
    border-color: #ef302f;
    box-shadow: 0 0 0 3px rgba(239,48,47,.10);
}
.auth-icon {
    flex: 0 0 42px;
    text-align: center;
    color: #555b63;
    font-size: 16px;
    pointer-events: none;
}
.auth-form input {
    position: relative;
    z-index: 3;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: 52px;
    box-sizing: border-box;
    padding: 0 12px 0 0;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    color: #17191c;
    font: inherit;
    pointer-events: auto !important;
}
.auth-form input::placeholder { color: #9a9da3; }
.password-toggle {
    position: relative;
    z-index: 4;
    flex: 0 0 48px;
    width: 48px;
    height: 52px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #555b63;
    cursor: pointer;
}
.auth-button {
    position: relative;
    z-index: 3;
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(90deg, #ef302f, #ff5736);
    color: #ffffff;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .2px;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(239,48,47,.18);
}
.auth-button:hover { transform: translateY(-1px); }
.auth-message {
    position: relative;
    z-index: 2;
    margin: 0 0 12px;
    padding: 11px 13px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.4;
}
.auth-message.error { background:#fff0f0; border:1px solid #ffcaca; color:#b42318; }
.auth-message.success { background:#eefaf2; border:1px solid #c4ead1; color:#18794e; }
.auth-message.warning { background:#fff8e8; border:1px solid #f2dfad; color:#8a6200; }
.auth-security {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #dfe1e4;
    text-align: center;
    color: #737880;
    font-size: 10px;
    line-height: 1.5;
}
.auth-security strong { display:block; margin-bottom:5px; color:#34373c; font-size:10px; letter-spacing:2px; }
.auth-security span { display:block; }

@media (max-width: 600px) {
    .auth-page { padding: 14px 10px; align-items: flex-start; }
    .auth-card { margin-top: 12px; padding: 26px 20px 24px; border-radius: 22px; }
    .auth-logo { width: 76px; height: 76px; }
    .auth-brand-name { font-size: 26px; }
    .auth-card h1 { font-size: 26px; }
}
/* =========================================================
   CRM B2C PICACHO SWEET
   MODULO USUARIOS — FORMULARIO
   ========================================================= */

.users-page .user-form-card {
    background: #ffffff;
    border: 1px solid #e7e7e7;
    border-radius: 22px;
    padding: 32px;
    margin-top: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.users-page .user-form {
    width: 100%;
}

.users-page .user-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.users-page .user-form-grid > div {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.users-page .user-form-grid label {
    font-size: 13px;
    font-weight: 700;
    color: #333333;
    letter-spacing: 0.2px;
}

.users-page .user-form-grid input,
.users-page .user-form-grid select {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    padding: 11px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: #ffffff;
    color: #222222;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease,
                background 0.2s ease;
}

.users-page .user-form-grid input:hover,
.users-page .user-form-grid select:hover {
    border-color: #bcbcbc;
}

.users-page .user-form-grid input:focus,
.users-page .user-form-grid select:focus {
    border-color: #ff4b32;
    box-shadow: 0 0 0 3px rgba(255, 75, 50, 0.12);
    background: #ffffff;
}

.users-page .user-form-grid select {
    cursor: pointer;
}

/* Texto de ayuda / seguridad */

.users-page .user-form-footer {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #eeeeee;
}

.users-page .user-form-footer p {
    margin: 0 0 22px;
    color: #666666;
    font-size: 13px;
    line-height: 1.5;
}

/* Botón principal */

.users-page .user-form-footer .auth-button {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #ff3b30, #ff5a2f);
    color: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform 0.15s ease,
                box-shadow 0.2s ease,
                opacity 0.2s ease;
}

.users-page .user-form-footer .auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(255, 75, 50, 0.22);
}

.users-page .user-form-footer .auth-button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Mensaje de error */

.users-page .user-message.error {
    margin-bottom: 24px;
    padding: 13px 15px;
    border-radius: 10px;
    border: 1px solid #ffd1cc;
    background: #fff3f1;
    color: #c62828;
    font-size: 14px;
    font-weight: 600;
}

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

@media (max-width: 760px) {

    .users-page .user-form-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .users-page .user-form-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .users-page .user-form-footer {
        margin-top: 22px;
        padding-top: 18px;
    }

    .users-page .user-form-footer .auth-button {
        min-height: 50px;
    }
}

/* =========================================================
   PICACHO B2C · RESPONSIVE FINAL
   Corrección de ancho del contenido en móviles.
   No modifica lógica ni rutas.
   ========================================================= */

@media (max-width: 700px) {
    html body:has(.crm-global-navigation) > main.app-shell {
        width: calc(100vw - 24px) !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-top: 0 !important;
        margin-right: 12px !important;
        margin-bottom: 40px !important;
        margin-left: 12px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    html body:has(.crm-global-navigation) > main.app-shell .dashboard-page {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    html body:has(.crm-global-navigation) > main.app-shell .crm-global-topbar {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    html body:has(.crm-global-navigation) > main.app-shell .dashboard-hero,
    html body:has(.crm-global-navigation) > main.app-shell .new-customers-card,
    html body:has(.crm-global-navigation) > main.app-shell .dashboard-kpis,
    html body:has(.crm-global-navigation) > main.app-shell .customer-intelligence,
    html body:has(.crm-global-navigation) > main.app-shell .dashboard-toolbar,
    html body:has(.crm-global-navigation) > main.app-shell .charts-grid,
    html body:has(.crm-global-navigation) > main.app-shell .dashboard-summary {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
}

@media (max-width: 420px) {
    html body:has(.crm-global-navigation) > main.app-shell {
        width: calc(100vw - 20px) !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
    }
}
