@font-face {
    font-family: 'LeagueSpartan';
    src: url('/assets/fonts/LeagueSpartan-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('/assets/fonts/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

@font-face {
    font-family: 'OpenSans';
    src: url('/assets/fonts/OpenSans-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

:root {
    --bg: #e6e6e6;
    --text: #2f2b34;
    --card: rgba(255, 255, 255, 0.36);
    --card-soft: rgba(255, 255, 255, 0.55);
    --primary: #cb22b8;
    --primary-dark: #a71892;
    --border: rgba(255, 255, 255, 0.4);
    --error: #b4233c;
    --success: #176b49;
    --shadow: 0 16px 36px rgba(34, 18, 38, 0.2);
}

* {
    box-sizing: border-box;
}

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

body {
    font-family: 'LeagueSpartan', 'OpenSans', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.28;
}

p,
li,
label,
legend,
h1,
h2,
h3 {
    overflow-wrap: anywhere;
}

p,
li {
    line-height: 1.34;
}

.page-app {
    background-image: linear-gradient(170deg, rgba(250, 248, 252, 0.62) 0%, rgba(236, 231, 241, 0.55) 100%), url('/assets/img/fondos/Fondo-opaco-cajas-de-texto-formularios.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.page-inicio {
    background-image: linear-gradient(170deg, rgba(247, 244, 251, 0.5) 0%, rgba(206, 181, 223, 0.28) 45%, rgba(187, 156, 210, 0.25) 100%), url('/assets/img/fondos/Pantalla-de-ingreso-1-horizontal.png');
}

.page-encuesta {
    background-image: linear-gradient(170deg, rgba(215, 185, 232, 0.36) 0%, rgba(198, 164, 222, 0.28) 45%, rgba(245, 241, 249, 0.56) 100%), url('/assets/img/fondos/Fondos-4.png');
}

.page-encuesta-estres {
    background-image: linear-gradient(170deg, rgba(199, 156, 224, 0.34) 0%, rgba(183, 139, 213, 0.28) 45%, rgba(240, 233, 246, 0.56) 100%), url('/assets/img/fondos/Fondos-5.png');
}

.page-resultados {
    background-image: linear-gradient(170deg, rgba(250, 248, 252, 0.62) 0%, rgba(236, 231, 241, 0.55) 100%), url('/assets/img/fondos/Fondo-opaco-cajas-de-texto-formularios.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}


.encuesta-ira,
.encuesta-asco {
    background-image: linear-gradient(170deg, rgba(204, 168, 226, 0.34) 0%, rgba(184, 144, 211, 0.25) 45%, rgba(243, 236, 248, 0.54) 100%), url('/assets/img/fondos/Fondos-3.png');
}

.encuesta-tristeza,
.encuesta-miedo {
    background-image: linear-gradient(170deg, rgba(203, 172, 224, 0.34) 0%, rgba(187, 155, 213, 0.26) 45%, rgba(243, 238, 247, 0.54) 100%), url('/assets/img/fondos/Fondos-4.png');
}

.encuesta-ansiedad,
.encuesta-no-se {
    background-image: linear-gradient(170deg, rgba(201, 165, 224, 0.34) 0%, rgba(181, 142, 209, 0.25) 45%, rgba(241, 234, 247, 0.54) 100%), url('/assets/img/fondos/Fondos-5.png');
}

.page-login {
    min-height: 100vh;
    background-image: linear-gradient(90deg, rgba(247, 244, 247, 0.72) 0%, rgba(210, 184, 224, 0.32) 55%, rgba(188, 154, 210, 0.34) 100%), url('/assets/img/fondos/Pantalla-de-ingreso-2-horizontal.png');
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.login-shell {
    width: min(1080px, 100%);
    min-height: 620px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.35);
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(3px);
}

.login-brand {
    padding: 3rem 3.5rem;
    display: grid;
    align-content: center;
    gap: 1.2rem;
}

.logo-main {
    width: min(300px, 76%);
    max-width: 330px;
}

.brand-title {
    margin: 0;
    font-size: clamp(2rem, 3.8vw, 3rem);
    line-height: 1;
    color: #4b4451;
    font-family: 'Lato', 'LeagueSpartan', sans-serif;
}

.brand-copy {
    margin: 0;
    max-width: 500px;
    font-size: clamp(1.2rem, 2vw, 2rem);
    line-height: 1.2;
    color: #524957;
}

.brand-foot {
    margin-top: 2.3rem;
    font-family: 'OpenSans', sans-serif;
    font-size: 1.15rem;
    color: #584f5d;
}

.login-form-wrap {
    padding: 2.2rem 2.2rem;
    background: linear-gradient(180deg, rgba(195, 141, 220, 0.25) 0%, rgba(151, 92, 177, 0.3) 100%);
    display: grid;
    align-content: center;
    gap: 1rem;
}

.security-shell {
    width: min(920px, 100%);
}

.security-card {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    box-shadow: var(--shadow);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.66) 0%, rgba(238, 222, 246, 0.62) 100%);
    backdrop-filter: blur(3px);
    padding: 1.4rem;
}

.security-head h1 {
    margin: 0.5rem 0 0.2rem;
    font-size: clamp(1.5rem, 2.8vw, 2.15rem);
}

.security-head p {
    margin: 0;
    color: #554b5e;
    font-size: 1.02rem;
}

.policy-box {
    margin-top: 0.9rem;
    padding: 0.9rem;
    border: 1px solid rgba(184, 156, 195, 0.58);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.82);
}

.policy-box p {
    margin: 0;
    color: #3f3447;
    text-align: justify;
}

.policy-form {
    margin-top: 0.95rem;
    display: grid;
    gap: 0.7rem;
}

.policy-check {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-family: 'OpenSans', sans-serif;
    color: #3f3547;
}

.policy-check input[type='checkbox'] {
    margin-top: 0.15rem;
    accent-color: #c32ab5;
}

.switch-row {
    display: inline-flex;
    gap: 0.3rem;
    margin-bottom: 0.7rem;
}

.switch-row a,
.switch-row span,
.switch-row button {
    font-family: 'OpenSans', sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.83rem;
    padding: 0.5rem 0.95rem;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.35);
    color: #fdfcff;
    text-decoration: none;
    margin-top: 0;
    border: 0;
    cursor: pointer;
    box-shadow: none;
}

.switch-row .active {
    background: #fff;
    color: var(--primary);
}

.switch-row.single {
    display: block;
}

.switch-row.single .active {
    display: inline-block;
    min-width: 180px;
    text-align: center;
}

.form-title {
    margin: 0;
    font-size: 1.65rem;
    color: #f5f1f7;
}

.input-group {
    position: relative;
}

.input-group img {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    opacity: 0.9;
}

input[type='text'],
input[type='password'],
input[type='email'] {
    width: 100%;
    padding: 0.82rem 0.85rem 0.82rem 2.6rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 3px;
    color: #f3f0f7;
    background: rgba(255, 255, 255, 0.22);
    font-family: 'OpenSans', sans-serif;
    font-size: 1rem;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.85);
}

button,
.button-link {
    margin-top: 1rem;
    border: 0;
    padding: 0.78rem 1.55rem;
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.15) 48%, rgba(255, 255, 255, 0.02) 49%, rgba(255, 255, 255, 0.02) 100%),
        linear-gradient(135deg, #953e8c 0%, #774798 100%);
    color: #fff;
    letter-spacing: 0.03em;
    text-transform: none;
    font-family: 'OpenSans', sans-serif;
    font-size: 1.02rem;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(119, 71, 152, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

button:hover,
.button-link:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 10px 18px rgba(119, 71, 152, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

button:active,
.button-link:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(119, 71, 152, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.alert {
    margin-top: 0.2rem;
    padding: 0.72rem 0.9rem;
    border-radius: 6px;
    font-family: 'OpenSans', sans-serif;
}

.alert.error {
    color: var(--error);
    background: #f9dfe7;
}

.alert.success {
    color: var(--success);
    background: #d8f3e5;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: linear-gradient(90deg, #503a61 0%, #7d4b95 70%, #9f57af 100%);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}


.app-header-inner {
    width: min(1150px, 100%);
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.app-nav a {
    color: #fff;
    text-decoration: none;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.84rem;
    padding: 0.35rem 0.62rem;
    border: 1px solid transparent;
}

.app-nav a.active,
.app-nav a:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
}

.user-pill {
    margin-left: auto;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
}

.container {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.2rem;
    background: transparent;
}

.container.with-header {
    min-height: calc(100vh - 72px);
    padding-top: 2rem;
}

.card {
    width: min(1000px, 100%);
    background: var(--card-soft);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(2px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.link {
    color: #5a2e70;
    text-decoration: none;
    font-family: 'OpenSans', sans-serif;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #4a3f51;
}

.chips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.7rem;
    margin-top: 1rem;
}

.chip {
    margin: 0;
    border: 1px solid #dca9ec;
    background: rgba(255, 255, 255, 0.7);
    color: #533d61;
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.95rem;
}

.checkbox-list {
    display: grid;
    gap: 0.35rem;
}

.checkbox-list.two-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1rem;
}

.checkbox-list.two-columns label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.content-links ul {
    padding-left: 1.1rem;
}

.content-action-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.content-action-btn {
    margin-top: 0;
    border: 1px solid rgba(176, 136, 201, 0.62);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
    color: #4d3f58;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.68rem;
    text-decoration: none;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.89rem;
    line-height: 1.2;
    box-shadow: 0 5px 10px rgba(83, 56, 105, 0.08);
}

.content-action-btn .icon {
    font-size: 1.08rem;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.content-icon-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.content-icon-fallback {
    font-size: 1.08rem;
    line-height: 1;
}

.content-action-btn.disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.history-content-note {
    margin: 0.18rem 0 0.45rem;
    color: #5f5569;
}

.history-content-grid {
    display: grid;
    gap: 0.7rem;
}

.history-content-card {
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
    padding: 0.72rem;
}

.history-content-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.history-content-status {
    margin: 0.35rem 0 0.55rem;
    font-family: 'OpenSans', sans-serif;
}

.history-content-status.ok {
    color: #216742;
}

.history-content-status.off {
    color: #8b5566;
}

.support-now-btn {
    margin-left: 0.5rem;
}

.btn-soft-accent {
    background-image: linear-gradient(135deg, #fcfdfd 0%, #e0e1e7 100%);
    color: #be54bd;
    border: 1px solid rgba(210, 211, 222, 0.95);
    box-shadow: 0 9px 18px rgba(77, 75, 93, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.btn-soft-accent:hover {
    color: #b74bb6;
    filter: none;
    box-shadow: 0 10px 20px rgba(77, 75, 93, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.btn-soft-accent:active {
    box-shadow: 0 6px 12px rgba(77, 75, 93, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.support-floating-btn {
    position: fixed;
    right: 1.05rem;
    bottom: 1.15rem;
    z-index: 35;
    margin: 0;
    padding: 0.62rem 1rem;
    min-height: 44px;
    font-size: 0.92rem;
    line-height: 1.15;
    letter-spacing: 0.01em;
    opacity: 0.94;
    backdrop-filter: blur(1px);
}

.support-floating-btn::before {
    content: '🆘';
    margin-right: 0.36rem;
}

.support-floating-hint {
    position: fixed;
    right: 1.1rem;
    bottom: 4.15rem;
    z-index: 35;
    margin: 0;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.82rem;
    color: #5c4c68;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(208, 204, 221, 0.95);
    border-radius: 999px;
    padding: 0.32rem 0.62rem;
    box-shadow: 0 4px 10px rgba(72, 55, 89, 0.16);
}

#btn-apoyo-inmediato-inicio.support-floating-btn {
    position: absolute;
    right: 1.1rem;
    bottom: 1rem;
}

#support-hint-inicio.support-floating-hint {
    position: absolute;
    right: 1.1rem;
    bottom: 4.05rem;
}

.page-inicio .card {
    position: relative;
    padding-bottom: 6.8rem;
}

fieldset {
    border: 1px solid rgba(159, 122, 182, 0.3);
    border-radius: 12px;
    margin: 1rem 0;
    padding: 1rem 0.9rem 0.9rem;
    background: rgba(255, 255, 255, 0.5);
}

fieldset legend {
    display: block;
    width: calc(100% - 0.6rem);
    margin: 0 0 0.45rem;
    padding: 0.1rem 0.3rem;
    line-height: 1.32;
    background: rgba(255, 255, 255, 0.72);
    border-radius: 6px;
}

.scale {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-top: 0.25rem;
    color: #6a6071;
}

input[type='range'] {
    width: 100%;
    accent-color: #c12cb6;
}

.hint-auto {
    margin: 0.55rem 0 0;
    color: #6a6071;
    font-size: 0.86rem;
    font-family: 'OpenSans', sans-serif;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    background: rgba(255, 255, 255, 0.48);
    min-width: 720px;
}

th,
td {
    border: 1px solid rgba(184, 156, 195, 0.55);
    text-align: left;
    padding: 0.5rem;
    font-size: 0.92rem;
    vertical-align: top;
    line-height: 1.3;
    overflow-wrap: normal;
    word-break: normal;
    white-space: normal;
}

.admin-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
    align-items: start;
    margin-bottom: 1.1rem;
    padding: 1rem;
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
}

.admin-form input[type='text'],
.admin-form input[type='password'],
.admin-form input[type='email'] {
    padding-left: 0.75rem;
    color: #322a38;
    background: #ffffff;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    font-family: 'OpenSans', sans-serif;
}

.admin-form select {
    padding: 0.62rem 0.7rem;
    color: #322a38;
    background: #ffffff;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    font-family: 'OpenSans', sans-serif;
}

.admin-form input[type='text']::placeholder,
.admin-form input[type='password']::placeholder,
.admin-form input[type='email']::placeholder {
    color: #7a6b86;
}

.admin-form label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: 'OpenSans', sans-serif;
    color: #3d3345;
}

.admin-form input[type='checkbox'] {
    accent-color: #bb24b0;
}

.admin-form button {
    margin-top: 0.2rem;
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 240px;
    border-radius: 8px;
}

@media (max-width: 780px) {
    .admin-form button {
        justify-self: stretch;
        min-width: 0;
    }
}

.content-admin-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.content-admin-card {
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.62);
    padding: 1rem;
}


.content-admin-card h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
}

.content-admin-card label {
    font-size: 0.86rem;
    margin: 0.25rem 0 0.2rem;
    color: #4b3f52;
}

.content-admin-card input[type='text'] {
    padding-left: 0.75rem;
    color: #3c3342;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(188, 154, 205, 0.72);
}

.content-admin-card input[type='text']::placeholder {
    color: #85758f;
}

.csv-import-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.66);
    margin-bottom: 0.7rem;
}

.csv-import-form input[type='file'] {
    flex: 1 1 280px;
    padding: 0.45rem;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    background: #fff;
    color: #3c3342;
}

.csv-import-form select {
    flex: 1 1 220px;
    min-height: 40px;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    background: #fff;
    color: #3c3342;
}

.csv-import-form button {
    margin-top: 0;
}

.csv-help {
    margin-top: 0.4rem;
    color: #5c4f66;
}

.admin-layout > h1,
.admin-layout > h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.65rem;
}

.admin-layout > h1:first-child {
    margin-top: 0;
}

.admin-layout > p {
    margin: 0.15rem 0 0.95rem;
}

.admin-layout .table-wrap {
    margin-bottom: 1.15rem;
}

.admin-layout .table-wrap + h1,
.admin-layout .table-wrap + h2 {
    margin-top: 1.3rem;
}

.company-admin-item {
    padding: 0.22rem 0;
    color: #3d3345;
}

.table-action-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin: 0.2rem 0;
}

.table-action-form input[type='password'] {
    max-width: 170px;
    min-height: 34px;
    padding: 0.4rem 0.55rem;
    color: #322a38;
    background: #ffffff;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.9rem;
}

.table-action-form input[type='password']::placeholder {
    color: #7a6b86;
}

.btn-compact {
    margin-top: 0;
    padding: 0.4rem 0.85rem;
    font-size: 0.9rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(119, 71, 152, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.report-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: end;
    margin-bottom: 0.9rem;
}

.report-filter label {
    width: 100%;
    margin: 0;
    font-family: 'OpenSans', sans-serif;
    color: #3d3345;
}

.report-filter select {
    min-width: 260px;
    max-width: 100%;
    padding: 0.62rem 0.7rem;
    border-radius: 8px;
    border: 1px solid rgba(178, 143, 197, 0.85);
    background: #fff;
    color: #352d3d;
    font-family: 'OpenSans', sans-serif;
}

.report-filter button {
    margin-top: 0;
}

.org-report {
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 14px;
    padding: 0.95rem;
    background: rgba(255, 255, 255, 0.64);
}

.org-subtitle {
    margin-top: -0.35rem;
    color: #5f516a;
    font-family: 'OpenSans', sans-serif;
}

.org-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.45rem;
    margin: 0.75rem 0;
}

.org-meta > div {
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.5rem 0.6rem;
}

.org-report-card {
    width: min(1120px, 100%);
}

.org-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.6rem;
    margin: 0.4rem 0 0.9rem;
}

.org-kpi {
    margin: 0;
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 0.65rem 0.75rem;
}

.org-kpi span {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6a5d74;
}

.org-kpi strong {
    font-size: 1.06rem;
    color: #3f3450;
}

.org-dimension-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 0.75rem;
    margin-top: 0.6rem;
}

.org-dimension-card {
    padding: 0.85rem;
}

.org-dimension-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.55rem;
    margin-bottom: 0.45rem;
}

.org-dimension-head h3 {
    margin: 0;
}

.org-predominant-pill {
    flex-shrink: 0;
    border: 1px solid rgba(157, 114, 182, 0.45);
    background: rgba(234, 220, 244, 0.58);
    color: #4b3c59;
    border-radius: 999px;
    padding: 0.22rem 0.6rem;
    font-size: 0.8rem;
    font-family: 'OpenSans', sans-serif;
}

.org-bars {
    margin: 0.55rem 0 0.75rem;
    display: grid;
    gap: 0.42rem;
}

.org-bar-row {
    display: grid;
    grid-template-columns: minmax(130px, 180px) 1fr auto;
    align-items: center;
    gap: 0.45rem;
}

.org-bar-label {
    font-size: 0.85rem;
    color: #463a54;
}

.org-bar-track {
    height: 9px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(123, 74, 179, 0.15);
}

.org-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8c63bc 0%, #c068a8 100%);
}

.org-bar-value {
    font-size: 0.82rem;
    color: #514460;
    min-width: 76px;
    text-align: right;
}

.org-reading {
    margin-top: 0.1rem;
}

.hallazgos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}

.hallazgo-card {
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    padding: 0.68rem;
}

.hallazgo-card h4 {
    margin: 0 0 0.45rem;
}

.hallazgo-card p {
    margin: 0.2rem 0;
}

.emo-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.26rem 0.5rem;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--emo-color) 40%, #fff 60%);
    background: color-mix(in srgb, var(--emo-color) 14%, #fff 86%);
    color: #3e3346;
    font-family: 'OpenSans', sans-serif;
    font-size: 0.85rem;
}

.emotion-line-wrap {
    margin-top: 0.55rem;
    overflow: auto;
}

.emotion-line-canvas {
    display: block;
    width: 100%;
    min-width: 820px;
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.64);
}

.report-notes-form {
    margin-top: 0.85rem;
    border: 1px solid rgba(184, 156, 195, 0.55);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.68);
    padding: 0.8rem;
    display: grid;
    gap: 0.4rem;
}

.report-notes-form label {
    font-family: 'OpenSans', sans-serif;
    color: #4b3f55;
    margin-top: 0.2rem;
}

.report-notes-form textarea {
    width: 100%;
    border: 1px solid rgba(178, 143, 197, 0.85);
    border-radius: 8px;
    background: #fff;
    color: #342c3a;
    padding: 0.65rem 0.7rem;
    font-family: 'OpenSans', sans-serif;
    resize: vertical;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.report-actions button {
    margin-top: 0;
}

@media print {
    .app-header,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff !important;
    }

    .container,
    .container.with-header {
        min-height: 0 !important;
        padding: 0 !important;
    }

    .card {
        border: 0;
        box-shadow: none;
        padding: 0;
        background: #fff;
    }

    .org-report {
        border: 0;
        background: #fff;
        padding: 0;
    }
}

.tips-grid {
    margin: 1rem 0 0.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.8rem;
}

.tips-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tip-card {
    border: 1px solid rgba(184, 156, 195, 0.55);
    background: rgba(255, 255, 255, 0.58);
    border-radius: 12px;
    padding: 0.8rem;
}

.tip-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}

.tip-featured {
    margin: 0 0 0.55rem;
    font-size: 0.92rem;
    color: #4b3e54;
}

.tip-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.24rem;
}

.tip-list li {
    font-size: 0.9rem;
    color: #4f4457;
}

.tip-list li.is-selected {
    color: #951f8a;
    font-family: 'OpenSans', sans-serif;
}

.result-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.72);
}

.bienestar-report {
    padding: 1.2rem;
}

.report-head {
    margin-bottom: 1.2rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e4e7ec;
}

.report-subhead {
    margin: 0.4rem 0 0;
    color: #4b5563;
}

.report-section {
    margin-top: 1rem;
    padding: 0.95rem;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fcfcfd;
}

.report-section h2 {
    margin-bottom: 0.4rem;
}

.focus-grid {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.65rem;
}

.focus-card {
    border: 1px solid #dde3ea;
    border-radius: 12px;
    background: #fff;
    padding: 0.7rem;
}

.focus-card h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    color: #364152;
}

.focus-title {
    margin: 0 0 0.2rem;
    font-family: 'OpenSans', sans-serif;
    color: #111827;
}

.dimension-report-grid {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.7rem;
}

.dimension-report-card {
    border-color: #dde3ea;
    background: #fff;
}

.plan-objective {
    border-left: 3px solid #9ca3af;
    padding-left: 0.65rem;
}

.plan-list.plan-list-columns {
    margin-top: 0.55rem;
    column-count: 2;
    column-gap: 1rem;
}

.plan-list.plan-list-columns li {
    break-inside: avoid;
    margin-bottom: 0.55rem;
}


.result-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 0.5rem 0 0.8rem;
}

.kpi {
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 8px;
    border: 1px solid rgba(188, 154, 205, 0.72);
    background: rgba(255, 255, 255, 0.75);
    min-width: 170px;
}

.kpi span {
    display: block;
    font-size: 0.75rem;
    color: #6a5d74;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.kpi strong {
    font-size: 1.03rem;
}

.result-desc {
    margin-top: 0.2rem;
    text-align: justify;
    text-justify: inter-word;
}

.result-card h2 {
    font-weight: 900;
    font-family: 'Lato', 'LeagueSpartan', sans-serif;
}

.tip-card.single {
    min-height: 150px;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .login-brand {
        padding: 1.6rem 1.6rem 0.4rem;
    }

    .login-form-wrap {
        padding: 1.3rem 1.6rem 1.8rem;
    }

    .brand-copy {
        font-size: 1.25rem;
    }

    .security-card {
        padding: 1.05rem;
    }
}

@media (max-width: 760px) {
    .app-header-inner {
        flex-wrap: wrap;
        gap: 0.55rem;
        padding: 0.6rem 0.75rem;
    }

    .app-header-inner > strong {
        font-size: 1.05rem;
    }

    .user-pill {
        margin-left: auto;
        font-size: 0.78rem;
        padding: 0.3rem 0.62rem;
    }

    .app-nav {
        order: 3;
        width: 100%;
        flex-wrap: nowrap;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.2rem;
    }

    .app-nav a {
        font-size: 0.8rem;
        padding: 0.32rem 0.52rem;
    }

    .container {
        padding: 0.8rem;
        align-items: start;
    }

    .container.with-header {
        min-height: calc(100vh - 110px);
        padding-top: 0.8rem;
    }

    .card {
        width: 100%;
        border-radius: 12px;
        padding: 0.85rem;
    }

    h1 {
        font-size: 1.65rem;
        line-height: 1.15;
    }

    h2 {
        font-size: 1.25rem;
        line-height: 1.15;
    }

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

    .chip {
        padding: 0.58rem 0.45rem;
        font-size: 0.95rem;
    }

    fieldset {
        padding: 0.72rem;
    }

    legend {
        font-size: 1.08rem;
        line-height: 1.25;
        margin-bottom: 0.38rem;
    }

    .tips-grid,
    .tips-grid.compact {
        grid-template-columns: 1fr;
    }

    .result-kpis {
        flex-direction: column;
    }

    .kpi {
        min-width: 0;
        width: 100%;
    }

    .admin-form {
        grid-template-columns: 1fr;
        padding: 0.7rem;
    }

    .admin-form button {
        width: 100%;
    }

    .content-admin-grid {
        grid-template-columns: 1fr;
    }

    .content-action-grid {
        grid-template-columns: 1fr;
    }

    .support-now-btn {
        margin-left: 0;
        display: block;
    }

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

    .support-floating-btn {
        right: 0.62rem;
        bottom: 0.72rem;
        max-width: calc(100vw - 1.2rem);
        padding: 0.58rem 0.86rem;
        font-size: 0.86rem;
        border-radius: 999px;
    }

    .support-floating-hint {
        right: 0.62rem;
        bottom: 3.66rem;
        max-width: calc(100vw - 1.2rem);
        font-size: 0.74rem;
        padding: 0.28rem 0.5rem;
    }

    #btn-apoyo-inmediato-inicio.support-floating-btn {
        right: 0.62rem;
        bottom: 0.62rem;
        max-width: calc(100% - 1.2rem);
    }

    #support-hint-inicio.support-floating-hint {
        right: 0.62rem;
        bottom: 3.5rem;
        max-width: calc(100% - 1.2rem);
    }

    .page-inicio .card {
        padding-bottom: 6.2rem;
    }

    .content-admin-card {
        padding: 0.68rem;
    }

    .csv-import-form {
        padding: 0.6rem;
    }

    .csv-import-form button {
        width: 100%;
    }

    .report-filter select,
    .report-filter button {
        width: 100%;
    }

    .org-bar-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .org-bar-value {
        text-align: left;
    }

    .table-wrap table {
        min-width: 0;
    }

    .emotion-line-canvas {
        min-width: 720px;
    }

    .table-wrap table thead {
        display: none;
    }

    .table-wrap table,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap td {
        display: block;
        width: 100%;
    }

    .table-wrap tr {
        margin-bottom: 0.65rem;
        border: 1px solid rgba(184, 156, 195, 0.55);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.72);
        padding: 0.28rem 0;
    }

    .table-wrap td {
        border: 0;
        border-bottom: 1px dashed rgba(184, 156, 195, 0.42);
        padding: 0.45rem 0.62rem;
        font-size: 0.9rem;
    }

    .table-wrap td:last-child {
        border-bottom: 0;
    }

    .table-wrap td::before {
        content: attr(data-label);
        display: block;
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: #6e5f78;
        margin-bottom: 0.18rem;
    }
}

@media (max-width: 900px) and (orientation: portrait) {
    .page-inicio {
        background-image: linear-gradient(170deg, rgba(247, 244, 251, 0.54) 0%, rgba(207, 183, 223, 0.32) 45%, rgba(190, 163, 212, 0.3) 100%), url('/assets/img/fondos/Pantalla-de-ingreso-1-vertical.png');
        background-position: center top;
    }

    .page-login {
        background-image: linear-gradient(90deg, rgba(247, 244, 247, 0.76) 0%, rgba(212, 189, 224, 0.34) 55%, rgba(190, 160, 211, 0.36) 100%), url('/assets/img/fondos/Pantalla-de-ingreso-2-vertical.png');
        background-position: center top;
    }

    .page-encuesta {
        background-image: linear-gradient(170deg, rgba(214, 184, 232, 0.38) 0%, rgba(197, 165, 221, 0.3) 45%, rgba(245, 241, 249, 0.58) 100%), url('/assets/img/fondos/Fondos-4-vertical.png');
        background-position: center top;
    }

    .page-encuesta-estres {
        background-image: linear-gradient(170deg, rgba(198, 157, 224, 0.36) 0%, rgba(183, 143, 211, 0.3) 45%, rgba(242, 235, 247, 0.58) 100%), url('/assets/img/fondos/Fondos-5-vertical.png');
        background-position: center top;
    }

    .encuesta-ira,
    .encuesta-asco {
        background-image: linear-gradient(170deg, rgba(204, 168, 226, 0.36) 0%, rgba(184, 146, 211, 0.28) 45%, rgba(243, 237, 248, 0.56) 100%), url('/assets/img/fondos/Fondos-3-vertical.png');
        background-position: center top;
    }

    .encuesta-tristeza,
    .encuesta-miedo {
        background-image: linear-gradient(170deg, rgba(203, 172, 224, 0.36) 0%, rgba(187, 156, 213, 0.28) 45%, rgba(243, 238, 247, 0.56) 100%), url('/assets/img/fondos/Fondos-4-vertical.png');
        background-position: center top;
    }

    .encuesta-ansiedad,
    .encuesta-no-se {
        background-image: linear-gradient(170deg, rgba(201, 166, 224, 0.36) 0%, rgba(182, 143, 209, 0.28) 45%, rgba(241, 234, 247, 0.56) 100%), url('/assets/img/fondos/Fondos-5-vertical.png');
        background-position: center top;
    }
}

.plan-list {
    display: grid;
    gap: 0.45rem;
}

.mt-20 {
    margin-top: 1.25rem;
}

.button-link.disabled {
    pointer-events: none;
    opacity: 0.65;
}

.wellbeing-bars {
    display: grid;
    gap: 0.65rem;
    margin: 0.7rem 0 1rem;
}

.wellbeing-bar-row {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr auto;
    gap: 0.55rem;
    align-items: center;
}

.wellbeing-bar-label {
    font-weight: 700;
    color: #3e3250;
}

.wellbeing-bar-track {
    height: 10px;
    border-radius: 999px;
    background: rgba(123, 74, 179, 0.16);
    overflow: hidden;
}

.wellbeing-bar-fill {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #8f62bf 0%, #c16ca5 100%);
}

.wellbeing-bar-value {
    font-weight: 700;
    color: #3e3250;
    min-width: 52px;
    text-align: right;
}

.wellbeing-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.wellbeing-option-btn {
    border: 1px solid rgba(126, 96, 152, 0.32);
    border-radius: 10px;
    padding: 0.6rem 0.45rem;
    background: rgba(255, 255, 255, 0.9);
    color: #483d56;
    font-weight: 700;
    cursor: pointer;
}

.wellbeing-option-btn:hover {
    border-color: rgba(126, 96, 152, 0.62);
}

.wellbeing-option-btn.active {
    background: #7b4ab3;
    color: #fff;
    border-color: #7b4ab3;
}

@media (max-width: 768px) {
    .wellbeing-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.lotus-step-layout {
    display: grid;
    grid-template-columns: 1.08fr 1fr;
    gap: 1rem;
    align-items: stretch;
}

.lotus-question-panel {
    border-radius: 20px;
    border: 1px solid rgba(205, 190, 219, 0.7);
    background: rgba(255, 255, 255, 0.65);
    box-shadow: 0 8px 18px rgba(45, 31, 57, 0.14);
    padding: 1.4rem 1.55rem;
    display: flex;
    align-items: center;
}

.lotus-question-text {
    margin: 0;
    font-size: 1.48rem;
    line-height: 1.2;
    color: #2d2538;
    font-family: 'Lato', 'OpenSans', sans-serif;
}

.lotus-response-panel {
    --lotus-level: 0;
    border-radius: 20px;
    border: 1px solid rgba(205, 190, 219, 0.7);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 8px 18px rgba(45, 31, 57, 0.14);
    padding: 0.9rem 1rem 1rem;
    display: grid;
    align-items: end;
}

.lotus-media-wrap {
    min-height: 205px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lotus-media {
    width: 100%;
    max-width: 355px;
    object-fit: contain;
    transform: scale(calc(0.85 + (var(--lotus-level) * 0.2)));
    opacity: calc(0.65 + (var(--lotus-level) * 0.35));
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.lotus-scale-line {
    height: 4px;
    border-radius: 999px;
    background: rgba(119, 92, 144, 0.24);
    margin: 0.2rem 0 0.55rem;
}

.lotus-options {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
}

.lotus-option-btn {
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #2e2337;
    font-size: 1.02rem;
    padding: 0.35rem 0.2rem;
    cursor: pointer;
}

.lotus-option-btn:hover {
    background: rgba(123, 74, 179, 0.11);
}

.lotus-option-btn.active {
    background: #7b4ab3;
    color: #fff;
}

.lotus-hint {
    margin: 0;
}

.lotus-range {
    width: 100%;
    accent-color: #7b4ab3;
    margin: 0 0 0.35rem;
}

.lotus-range-labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    color: #2e2337;
    font-size: 0.98rem;
    text-align: center;
}

.lotus-range-labels.with-zero {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.lotus-media-stack {
    position: relative;
    width: min(100%, 355px);
    aspect-ratio: 4 / 3;
}

.lotus-media-state {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.2s linear;
    transform: scale(calc(0.85 + (var(--lotus-level) * 0.2)));
}

.lotus-actions {
    margin-top: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.lotus-back-btn {
    margin-top: 0;
    padding: 0.45rem 0.95rem;
    font-size: 0.9rem;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .lotus-step-layout {
        grid-template-columns: 1fr;
    }

    .lotus-question-text {
        font-size: 1.24rem;
    }

    .lotus-media-wrap {
        min-height: 170px;
    }

    .lotus-media-stack {
        width: min(100%, 320px);
    }

    .lotus-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .wellbeing-bar-row {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .wellbeing-bar-value {
        text-align: left;
    }

    .plan-list.plan-list-columns {
        column-count: 1;
    }
}
