* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #172033;
    background: #ffffff;
}

.contenedor {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* HEADER */

header {
    height: 75px;
    border-bottom: 1px solid #e5e7eb;
    background: white;
}

header .contenedor {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 27px;
    font-weight: 800;
    color: #172033;
}

.logo span {
    color: #1677ff;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

nav a {
    text-decoration: none;
    color: #475569;
    font-size: 15px;
    font-weight: 600;
}

nav a:hover {
    color: #1677ff;
}

.login {
    background: #1677ff;
    color: white !important;
    padding: 11px 20px;
    border-radius: 8px;
}

/* HERO */

.hero {
    min-height: 570px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #eef5ff 100%
        );
}

.hero-contenido {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

.etiqueta {
    display: inline-block;
    background: #e8f2ff;
    color: #1677ff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 25px;
}

.hero h1 {
    max-width: 800px;
    font-size: 58px;
    line-height: 1.08;
    letter-spacing: -2px;
    color: #111827;
}

.hero h1 span {
    color: #1677ff;
}

.hero p {
    max-width: 680px;
    margin-top: 25px;
    font-size: 20px;
    line-height: 1.6;
    color: #64748b;
}

.botones {
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

.botones a {
    text-decoration: none;
    font-weight: 700;
    padding: 15px 25px;
    border-radius: 9px;
}

.btn-principal {
    background: #1677ff;
    color: white;
}

.btn-secundario {
    background: white;
    color: #172033;
    border: 1px solid #dce2ea;
}

/* SECCIONES */

.seccion {
    max-width: 1200px;
    margin: auto;
    padding: 90px 5%;
    text-align: center;
}

.seccion h2 {
    font-size: 38px;
    color: #111827;
}

.subtitulo {
    margin: 15px auto 45px;
    max-width: 650px;
    color: #64748b;
    font-size: 18px;
    line-height: 1.6;
}

/* TARJETAS */

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

.tarjeta {
    text-align: left;
    padding: 30px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: white;
}

.tarjeta h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.tarjeta p {
    color: #64748b;
    line-height: 1.6;
}

/* MÓVIL */

@media (max-width: 800px) {

    nav a:not(.login) {
        display: none;
    }

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

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

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

}
/* =========================
   LOGIN Y REGISTRO
========================= */

.pagina-auth {
    min-height: 100vh;
    background: #f4f8ff;
}

.auth-contenedor {
    width: 90%;
    max-width: 460px;
    margin: auto;
    padding-top: 60px;
}

.auth-logo {
    text-align: center;
    font-size: 30px;
    font-weight: 800;
    margin-bottom: 30px;
}

.auth-logo span {
    color: #1677ff;
}

.auth-card {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.08);
}

.auth-card h1 {
    font-size: 30px;
    margin-bottom: 10px;
}

.auth-card > p {
    color: #64748b;
    margin-bottom: 25px;
    line-height: 1.5;
}

.auth-card form {
    display: flex;
    flex-direction: column;
}

.auth-card label {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: 700;
}

.auth-card input {
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid #d7dde7;
    border-radius: 8px;
    font-size: 15px;
}

.auth-card input:focus {
    outline: none;
    border-color: #1677ff;
}

.auth-card button {
    border: none;
    background: #1677ff;
    color: white;
    padding: 15px;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.auth-card button:hover {
    background: #0965dc;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: #64748b;
}

.auth-footer a {
    color: #1677ff;
    text-decoration: none;
    font-weight: 700;
}

.mensaje {
    background: #eef5ff;
    color: #245a9c;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}


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

.panel {
    max-width: 1200px;
    margin: auto;
    padding: 60px 5%;
}

.panel-bienvenida {
    margin-bottom: 40px;
}

.panel-bienvenida h1 {
    font-size: 38px;
    margin-bottom: 10px;
}

.panel-bienvenida p {
    color: #64748b;
}

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

.panel-card {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 30px;
    border-radius: 14px;
}

.panel-card h3 {
    margin-bottom: 12px;
}

.panel-card p {
    color: #64748b;
    line-height: 1.6;
}

@media (max-width: 800px) {

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

}

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

.dashboard-body {
    background: #f6f8fb;
}

.dashboard-header {
    height: 72px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-header-inner {
    height: 100%;
    padding: 0 35px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.usuario-header {
    font-weight: 700;
    color: #172033;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 72px);
}

.sidebar {
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 30px 18px;
}

.sidebar-link {
    display: block;
    text-decoration: none;
    color: #475569;
    padding: 13px 15px;
    border-radius: 8px;
    margin-bottom: 7px;
    font-weight: 600;
}

.sidebar-link:hover {
    background: #eef5ff;
    color: #1677ff;
}

.sidebar-link.activo {
    background: #e8f2ff;
    color: #1677ff;
}

.sidebar-link.salir {
    color: #b42318;
}

.sidebar-separador {
    height: 1px;
    background: #e5e7eb;
    margin: 25px 0;
}

.dashboard-main {
    padding: 45px;
}

.dashboard-bienvenida {
    margin-bottom: 35px;
}

.dashboard-bienvenida h1 {
    font-size: 36px;
    margin-bottom: 8px;
}

.dashboard-bienvenida p {
    color: #64748b;
}

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

.metrica-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 25px;
}

.metrica-numero {
    display: block;
    font-size: 28px;
    font-weight: 800;
    color: #172033;
}

.metrica-texto {
    display: block;
    margin-top: 8px;
    color: #64748b;
}

.dashboard-seccion {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 30px;
}

.dashboard-seccion-header h2 {
    margin-bottom: 7px;
}

.dashboard-seccion-header p {
    color: #64748b;
}

.estado-vacio {
    margin-top: 30px;
    padding: 45px;
    background: #f8fafc;
    border-radius: 12px;
    text-align: center;
}

.estado-vacio h3 {
    margin-bottom: 10px;
}

.estado-vacio p {
    color: #64748b;
}


/* =========================
   PERFIL
========================= */

.perfil-form {
    max-width: 950px;
}

.perfil-seccion {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 30px;
    margin-bottom: 25px;
}

.perfil-seccion h2 {
    margin-bottom: 20px;
}

.perfil-ayuda {
    color: #64748b;
    margin-top: -10px;
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grupo {
    display: flex;
    flex-direction: column;
}

.form-grupo label {
    margin-bottom: 8px;
    font-weight: 700;
}

.form-grupo input,
.perfil-seccion textarea {
    width: 100%;
    padding: 13px;
    border: 1px solid #d8dee8;
    border-radius: 8px;
    font-size: 15px;
}

.perfil-seccion textarea {
    resize: vertical;
    font-family: Arial, Helvetica, sans-serif;
}

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

.checkbox-item,
.switch-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #475569;
}

.switch-item {
    margin-bottom: 15px;
}

.perfil-acciones {
    margin-bottom: 60px;
}

.perfil-acciones button {
    background: #1677ff;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 9px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.perfil-acciones button:hover {
    background: #0965dc;
}


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

@media (max-width: 850px) {

    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: flex;
        overflow-x: auto;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 10px;
    }

    .sidebar-link {
        white-space: nowrap;
        margin-bottom: 0;
    }

    .sidebar-separador {
        display: none;
    }

    .dashboard-main {
        padding: 25px;
    }

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

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

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

}
/* ==========================================================
   PERFILES COMERCIALES
   ========================================================== */

.perfiles-encabezado {
    margin-bottom: 22px;
}


/* ----------------------------------------------------------
   GRID PRINCIPAL
   ---------------------------------------------------------- */

.perfiles-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 24px;
    width: 100%;
}


/* ----------------------------------------------------------
   TARJETA
   ---------------------------------------------------------- */

.perfil-comercial-card {
    display: flex;
    align-items: center;

    min-height: 58px;

    padding: 12px 16px;

    border: 1px solid #dfe5ec;
    border-radius: 8px;

    background-color: #ffffff;

    cursor: pointer;

    box-sizing: border-box;

    transition:
        border-color 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.1s ease;
}


/* Hover */

.perfil-comercial-card:hover {
    border-color: #9ec5ff;
    background-color: #f8fbff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}


/* ----------------------------------------------------------
   CHECKBOX
   ---------------------------------------------------------- */

.perfil-checkbox {
    flex: 0 0 auto;

    width: 18px;
    height: 18px;

    margin: 0 16px 0 0;

    cursor: pointer;

    accent-color: #1677ff;
}


/* ----------------------------------------------------------
   CONTENIDO
   ---------------------------------------------------------- */

.perfil-comercial-info {
    flex: 1;
    min-width: 0;
}


.perfil-comercial-linea {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    column-gap: 6px;
    row-gap: 2px;

    line-height: 1.35;
}


/* Nombre */

.perfil-comercial-nombre {
    color: #172033;

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

    white-space: nowrap;
}


/* Descripción */

.perfil-comercial-descripcion {
    color: #64748b;

    font-size: 14px;
    font-weight: 400;
}


/* ----------------------------------------------------------
   PERFIL SELECCIONADO
   ---------------------------------------------------------- */

.perfil-comercial-card:has(.perfil-checkbox:checked) {
    border-color: #1677ff;
    background-color: #f4f8ff;
    box-shadow: 0 0 0 1px rgba(22, 119, 255, 0.08);
}


.perfil-comercial-card:has(.perfil-checkbox:checked)
.perfil-comercial-nombre {
    color: #1677ff;
}


/* ----------------------------------------------------------
   RESPONSIVE
   ---------------------------------------------------------- */

@media (max-width: 1000px) {

    .perfiles-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

}


@media (max-width: 600px) {

    .perfil-comercial-card {
        align-items: flex-start;
        padding: 14px;
    }

    .perfil-checkbox {
        margin-top: 2px;
        margin-right: 12px;
    }

    .perfil-comercial-linea {
        display: block;
    }

    .perfil-comercial-nombre {
        display: block;
        white-space: normal;
        margin-bottom: 4px;
    }

    .perfil-comercial-descripcion {
        display: block;
    }

}
