:root {
    --brand-navy: #2e4058;
    --brand-navy-strong: #243449;
    --brand-navy-soft: #415975;
    --brand-ink: #1c2a3a;
    --canvas: #ece9e4;
    --canvas-deep: #e2ddd5;
    --paper: #f6f4ef;
    --line: rgba(46, 64, 88, 0.16);
    --shadow-soft: 0 16px 40px rgba(36, 52, 73, 0.12);
    --shadow-card: 0 12px 28px rgba(36, 52, 73, 0.09);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-pill: 999px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--brand-ink);
    font-family: "Manrope", "Segoe UI", sans-serif;
    background:
        linear-gradient(165deg, rgba(236, 233, 228, 0.82) 0%, rgba(234, 230, 222, 0.74) 55%, rgba(226, 221, 213, 0.82) 100%),
        url("../../imagenes/fondopantalla.png");
    background-color: var(--canvas);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    line-height: 1.55;
    min-height: 100vh;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.bg-texture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.32;
    background-image: linear-gradient(transparent 96%, rgba(46, 64, 88, 0.04) 96%),
        linear-gradient(90deg, transparent 96%, rgba(46, 64, 88, 0.04) 96%);
    background-size: 22px 22px;
    z-index: -1;
}

.container {
    width: min(var(--container), calc(100% - 2.5rem));
    margin-inline: auto;
}

.section-block {
    padding: 4.7rem 0;
}

.eyebrow {
    margin: 0 0 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand-navy-soft);
}

h1,
h2,
h3 {
    font-family: "Sora", "Segoe UI", sans-serif;
    letter-spacing: -0.015em;
    margin-top: 0;
    color: var(--brand-navy-strong);
}

h1 {
    font-size: clamp(2.1rem, 4.4vw, 3.8rem);
    line-height: 1.08;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.2;
    margin-bottom: 0.9rem;
}

h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, #2e4058, #243449);
    border-bottom: 1px solid rgba(246, 244, 239, 0.28);
}

.nav-wrap {
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.4rem;
    padding-block: 0.75rem;
}

.brand-mark {
    width: clamp(52px, 5.4vw, 64px);
    height: clamp(52px, 5.4vw, 64px);
    min-width: 52px;
    flex-shrink: 0;
    align-self: center;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(246, 244, 239, 0.72);
    background: rgba(246, 244, 239, 0.95);
    padding: 0;
    box-shadow: 0 6px 14px rgba(17, 25, 36, 0.35);
    filter: none;
}

.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.1rem;
    flex: 1;
}

.main-nav a {
    position: relative;
    padding: 0.45rem 0.2rem;
    font-weight: 600;
    font-size: 0.96rem;
    color: #eff2f6;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.12rem;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
    background: linear-gradient(90deg, #f4f6f8, transparent);
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
    transform: scaleX(1);
}

.nav-auth {
    display: flex;
    gap: 0.65rem;
}

.auth-btn {
    border-radius: var(--radius-pill);
    padding: 0.58rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    transition: transform 0.28s ease, box-shadow 0.28s ease, color 0.28s ease, background-color 0.28s ease;
}

.auth-btn.login {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #f2f4f8;
}

.auth-btn.login:hover,
.auth-btn.login:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.auth-btn.signup {
    background: linear-gradient(145deg, #f6f4ef, #ebe6da);
    color: var(--brand-navy-strong);
    box-shadow: 0 10px 22px rgba(18, 28, 41, 0.35);
}

.auth-btn.signup:hover,
.auth-btn.signup:focus-visible {
    transform: translateY(-3px) scale(1.02);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    align-self: center;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
    padding: 0;
    place-items: center;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    margin: 4px auto;
    background: #f2f4f8;
}

.hero.section-block {
    padding: 0;
}

.hero {
    position: relative;
    min-height: clamp(480px, 72vh, 760px);
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../../imagenes/logo.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(236, 233, 228, 0.9) 8%, rgba(236, 233, 228, 0.62) 48%, rgba(236, 233, 228, 0.38) 100%);
    z-index: -1;
}

.hero-grid {
    width: 100%;
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.hero-copy {
    max-width: 820px;
    padding: 0;
}

.hero-description {
    max-width: 58ch;
    margin-bottom: 1.8rem;
}

.floating-cta {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 111;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.hero-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.55rem;
    align-items: center;
}

.hero-actions .btn {
    min-height: 40px;
    padding: 0.58rem 0.95rem;
    font-size: 0.79rem;
    white-space: nowrap;
    gap: 0.45rem;
}

.hero-actions .btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    border-radius: var(--radius-pill);
    padding: 0.7rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: transform 0.28s ease, box-shadow 0.28s ease, color 0.28s ease, background-color 0.28s ease;
}

.btn-primary {
    color: #f3f0e9;
    background: linear-gradient(155deg, var(--brand-navy) 20%, var(--brand-navy-soft) 100%);
    box-shadow: 0 12px 24px rgba(36, 52, 73, 0.24);
}

.btn-secondary {
    color: var(--brand-navy-strong);
    background: linear-gradient(150deg, #fff9ef, #efe7db);
    border: 1px solid rgba(46, 64, 88, 0.2);
    box-shadow: 0 8px 16px rgba(65, 89, 117, 0.14);
}

.btn-ghost {
    color: var(--brand-navy-strong);
    border: 1px dashed rgba(46, 64, 88, 0.35);
    background: rgba(255, 255, 255, 0.35);
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 28px rgba(36, 52, 73, 0.18);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    transform: none;
    filter: saturate(0.75);
}

.btn:disabled:hover,
.btn[disabled]:hover,
.btn:disabled:focus-visible,
.btn[disabled]:focus-visible {
    transform: none;
    box-shadow: none;
}

.cash-edit-panel {
    display: none;
}

.cash-edit-panel.is-open {
    display: grid;
}

.cash-row.is-editing .cash-cell-value {
    display: none;
}

.cash-cell-editor {
    min-width: 100%;
    display: none;
}

.cash-row.is-editing .cash-cell-editor {
    display: inline-flex;
}

.cash-column {
    vertical-align: top;
}

.cash-column .cash-cell-value {
    display: inline-flex;
    align-items: center;
}

.cash-action-cell {
    flex-wrap: nowrap;
}

.user-edit-panel {
    display: none;
    gap: .65rem;
    margin-top: .75rem;
    padding: .9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: var(--shadow-soft);
}

.user-edit-panel.is-open {
    display: grid;
}

.user-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .65rem;
}

.user-edit-grid > label,
.user-edit-panel label {
    display: grid;
    gap: .35rem;
}

.user-edit-actions {
    margin-top: .25rem;
}

.user-row.is-editing .user-cell-value,
.user-row.is-editing .status-badge[data-user-status-value],
.user-row.is-editing .status-badge[data-user-verified-value] {
    display: none;
}

.user-cell-editor {
    min-width: 100%;
    display: none;
}

.user-row.is-editing .user-cell-editor {
    display: inline-flex;
}

.user-column {
    vertical-align: top;
}

.user-column .user-cell-value,
.user-column .status-badge {
    display: inline-flex;
    align-items: center;
}

.user-action-cell {
    display: flex;
    gap: .5rem;
    flex-wrap: nowrap;
    align-items: center;
}

.user-action-cell .chip-link {
    min-width: 2.4rem;
    width: 2.4rem;
    height: 2.4rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.user-row-icon {
    font-size: 1rem;
    line-height: 1;
}

.user-row-edit-btn {
    background: rgba(165, 214, 167, 0.32);
    border-color: rgba(102, 187, 106, 0.35);
    color: #2f6b36;
}

.user-row-edit-btn:hover,
.user-row-edit-btn:focus-visible {
    background: rgba(165, 214, 167, 0.46);
    border-color: rgba(102, 187, 106, 0.5);
    color: #24552a;
}

.user-row-cancel-btn {
    background: rgba(239, 154, 154, 0.28);
    border-color: rgba(229, 115, 115, 0.35);
    color: #9d3d3d;
}

.user-row-cancel-btn:hover,
.user-row-cancel-btn:focus-visible {
    background: rgba(239, 154, 154, 0.42);
    border-color: rgba(229, 115, 115, 0.5);
    color: #7f2f2f;
}

#btn-finalizar-registro.is-disabled,
#btn-finalizar-registro[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: saturate(0.7);
    box-shadow: none;
}

#btn-finalizar-registro.is-disabled:hover,
#btn-finalizar-registro[aria-disabled="true"]:hover,
#btn-finalizar-registro.is-disabled:focus-visible,
#btn-finalizar-registro[aria-disabled="true"]:focus-visible {
    transform: none;
    box-shadow: none;
}


.section-head {
    max-width: 780px;
    margin-bottom: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.service-card {
    border-radius: var(--radius-md);
    padding: 1.25rem;
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.74), rgba(244, 241, 235, 0.64));
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover,
.service-card:focus-within {
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(36, 52, 73, 0.18);
}

.service-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    margin-bottom: 1rem;
    background: linear-gradient(160deg, var(--brand-navy-soft), var(--brand-navy));
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22), 0 8px 14px rgba(36, 52, 73, 0.22);
}

.service-icon svg {
    width: 25px;
    fill: #eff1f4;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.92fr 1.08fr;
    gap: clamp(1.3rem, 4vw, 3.2rem);
    align-items: center;
}

.about-visual {
    position: relative;
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, rgba(36, 52, 73, 0.92), rgba(65, 89, 117, 0.86));
    box-shadow: 0 22px 40px rgba(23, 33, 47, 0.36);
}

.about-visual img {
    border-radius: 18px;
    border: 1px solid rgba(245, 242, 233, 0.26);
}

.about-badge {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: var(--radius-pill);
    padding: 0.56rem 0.92rem;
    color: var(--paper);
    background: rgba(24, 35, 50, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.82rem;
    font-weight: 700;
}

.about-list {
    margin: 1.3rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.7rem;
}

.about-list li {
    position: relative;
    padding-left: 1.8rem;
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(120deg, var(--brand-navy-soft), var(--brand-navy));
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.testimonial-card {
    padding: 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.8), rgba(242, 238, 231, 0.68));
    box-shadow: var(--shadow-card);
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-bottom: 1rem;
    font-weight: 800;
    color: #f7f4ec;
    background: radial-gradient(circle at 20% 20%, var(--brand-navy-soft), var(--brand-navy));
    box-shadow: 0 10px 20px rgba(36, 52, 73, 0.24);
}

.quote {
    font-size: 0.96rem;
    margin: 0 0 1rem;
}

.role {
    margin: 0;
    color: var(--brand-navy-soft);
    font-size: 0.86rem;
    font-weight: 600;
}

.blog {
    padding-top: 1.3rem;
}

.blog .container {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(160deg, rgba(46, 64, 88, 0.98), rgba(65, 89, 117, 0.96));
    color: #f2efe8;
    box-shadow: 0 26px 44px rgba(23, 33, 47, 0.42);
    padding: 2.2rem;
}

.blog h2,
.blog .eyebrow {
    color: #f2efe8;
}

.blog-text {
    margin: 0;
    max-width: 60ch;
}

.final-cta .cta-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    background: linear-gradient(130deg, rgba(255, 255, 255, 0.82), rgba(239, 233, 222, 0.86));
    box-shadow: var(--shadow-soft);
    padding: 2.3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-footer {
    margin-top: 2rem;
    background: linear-gradient(165deg, var(--brand-navy-strong), #1f3044);
    color: #e6e3dc;
    padding: 3.2rem 0 1.4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 1rem;
}

.footer-brand img {
    width: min(320px, 100%);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.footer-brand p {
    margin: 0.8rem 0;
}

.socials {
    display: flex;
    gap: 0.6rem;
}

.socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.06);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.socials a:hover,
.socials a:focus-visible {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.18);
}

.socials svg {
    width: 18px;
    fill: #f4f2ea;
}

.footer-column h3 {
    color: #f5f2e8;
}

.footer-column p,
.footer-column li,
.footer-column a {
    font-size: 0.92rem;
    color: #ddd7ce;
}

.footer-column ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.44rem;
}

.footer-column a:hover,
.footer-column a:focus-visible {
    color: #fff;
}

.copyright {
    margin: 2rem auto 0;
    width: min(var(--container), calc(100% - 2.5rem));
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    color: #cfc8be;
    font-size: 0.86rem;
}

.whatsapp-float {
    position: relative;
    right: auto;
    bottom: auto;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius-pill);
    padding: 0.6rem 0.95rem 0.6rem 0.58rem;
    background: linear-gradient(140deg, #25d366 0%, #16ad52 100%);
    color: #f6fff8;
    box-shadow: 0 18px 28px rgba(20, 117, 57, 0.42),
                inset 0 1px 1px rgba(255, 255, 255, 0.36),
                inset 0 -5px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(0) scale(1);
    opacity: 1;
    animation: waPulseIntro 0.45s ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 24px 35px rgba(20, 117, 57, 0.52),
                inset 0 1px 1px rgba(255, 255, 255, 0.42),
                inset 0 -5px 8px rgba(0, 0, 0, 0.19);
}

.whatsapp-float svg {
    width: 28px;
    fill: #ffffff;
    position: relative;
    z-index: 1;
}

.wa-label {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
}

.wa-pulse {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    animation: waPulse 2.5s ease-out infinite;
    z-index: 0;
}

.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

@keyframes waPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45);
    }
    70% {
        box-shadow: 0 0 0 24px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes waPulseIntro {
    0% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 1080px) {
    .main-nav {
        gap: 0.75rem;
    }

    .services-grid,
    .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .menu-toggle {
        display: inline-grid;
        flex-shrink: 0;
        align-self: center;
    }

    .nav-wrap {
        flex-wrap: wrap;
        row-gap: 0;
    }

    .main-nav {
        order: 4;
        flex: 0 0 100%;
        display: grid;
        gap: 0;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
        background: rgba(255, 255, 255, 0.35);
        border-radius: 14px;
    }

    .main-nav a {
        padding: 0.8rem 1rem;
        border-bottom: 1px solid rgba(46, 64, 88, 0.12);
    }

    .main-nav a:last-child {
        border-bottom: 0;
    }

    .main-nav.open {
        max-height: 380px;
    }

    .nav-auth {
        order: 5;
        flex: 0 0 100%;
        display: flex;
        gap: 0.55rem;
        width: 100%;
        padding-top: 0.6rem;
        margin-top: 0.2rem;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .nav-auth .auth-btn {
        flex: 1 1 0;
        text-align: center;
        padding-inline: 0.8rem;
    }

    .final-cta .cta-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .floating-cta {
        right: 14px;
        bottom: 14px;
        gap: 0.45rem;
        flex-direction: column;
        align-items: flex-end;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.45rem;
    }

    .hero-actions .btn .btn-label {
        display: none;
    }

    .hero-actions .btn {
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
    }

    .hero-actions .btn svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 640px) {
    .section-block {
        padding: 3.5rem 0;
    }

    .container {
        width: min(var(--container), calc(100% - 1.4rem));
    }

    .services-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .btn {
        width: 100%;
    }

    .hero-actions {
        width: auto;
    }

    .floating-cta {
        right: 10px;
        bottom: 10px;
        gap: 0.4rem;
    }

    .floating-cta .btn {
        width: auto;
    }

    .hero-actions .btn {
        width: 58px;
        height: 58px;
        min-height: 58px;
        min-width: 58px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
    }

    .hero {
        min-height: 560px;
    }

    .hero::before {
        background-size: contain;
        background-color: var(--canvas);
        background-repeat: no-repeat;
    }

    .hero::after {
        background: linear-gradient(180deg, rgba(236, 233, 228, 0.88) 0%, rgba(236, 233, 228, 0.72) 55%, rgba(236, 233, 228, 0.58) 100%);
    }

    .hero-copy {
        padding: 0.4rem;
    }

    .brand-mark {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .wa-label {
        display: none;
    }

    .whatsapp-float {
        border-radius: 50%;
        width: 58px;
        height: 58px;
        padding: 0;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

.platform-body {
    background:
        linear-gradient(160deg, rgba(236, 233, 228, 0.84) 0%, rgba(235, 230, 221, 0.76) 50%, rgba(226, 221, 213, 0.86) 100%),
        url("../../imagenes/fondopantalla.png");
    background-color: var(--canvas);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.platform-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.28;
    background-image:
        linear-gradient(transparent 95%, rgba(46, 64, 88, 0.05) 95%),
        linear-gradient(90deg, transparent 95%, rgba(46, 64, 88, 0.05) 95%);
    background-size: 28px 28px;
}

.app-shell {
    width: min(1280px, calc(100% - 2.2rem));
    margin-inline: auto;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 120;
    border-bottom: 1px solid rgba(246, 244, 239, 0.32);
    backdrop-filter: blur(12px);
    background: linear-gradient(180deg, rgba(36, 52, 73, 0.95), rgba(46, 64, 88, 0.92));
}

.app-topbar {
    min-height: 84px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.9rem;
    align-items: center;
    padding: 0.8rem 0;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f4f1e9;
}

.app-brand img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(246, 244, 239, 0.5);
}

.app-brand strong {
    display: block;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
}

.app-brand span {
    display: block;
    font-size: 0.72rem;
    color: rgba(244, 241, 233, 0.84);
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
}

.app-nav-link {
    white-space: nowrap;
    color: #e5e9ef;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 0.5rem 0.72rem;
    border-radius: var(--radius-pill);
    border: 1px solid transparent;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.app-nav-link:hover,
.app-nav-link.is-active {
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.28);
}

.app-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #f2eee7;
}

.app-user strong {
    font-size: 0.8rem;
    display: block;
}

.app-user span {
    font-size: 0.68rem;
    display: block;
    color: rgba(242, 238, 231, 0.78);
}

.app-main {
    padding: 1.4rem 0 2.6rem;
}

.flash {
    border-radius: 14px;
    padding: 0.72rem 0.9rem;
    margin-bottom: 0.9rem;
    border: 1px solid transparent;
    font-weight: 600;
}

.flash-ok {
    background: rgba(41, 132, 89, 0.12);
    color: #1c6242;
    border-color: rgba(41, 132, 89, 0.24);
}

.flash-error {
    background: rgba(148, 50, 44, 0.11);
    color: #792a27;
    border-color: rgba(148, 50, 44, 0.24);
}

.section-grid {
    display: grid;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
}

.metric-card {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.82), rgba(243, 239, 233, 0.72));
    box-shadow: var(--shadow-card);
    padding: 1rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card p {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-navy-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-card h3 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 1.15;
    color: var(--brand-navy-strong);
}

.metric-card span {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-navy-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.metric-card strong {
    font-size: 1.35rem;
    color: var(--brand-navy-strong);
}

.dual-grid {
    grid-template-columns: 1.2fr 1fr;
}

.panel-card {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.84), rgba(243, 239, 233, 0.74));
    box-shadow: var(--shadow-card);
    padding: 1.1rem;
    margin-bottom: 1rem;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.8rem;
}

.badge {
    border-radius: var(--radius-pill);
    border: 1px solid rgba(46, 64, 88, 0.25);
    background: rgba(255, 255, 255, 0.58);
    color: var(--brand-navy-strong);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.33rem 0.62rem;
}

.priority-alta {
    border-color: rgba(174, 67, 56, 0.3);
    color: #8d2d29;
}

.priority-media {
    border-color: rgba(181, 129, 45, 0.35);
    color: #7b5820;
}

.calendar-grid {
    display: grid;
    gap: 0.6rem;
}

.calendar-item {
    border-radius: 12px;
    padding: 0.65rem 0.7rem;
    border: 1px solid rgba(46, 64, 88, 0.16);
    background: rgba(255, 255, 255, 0.7);
}

.calendar-item strong {
    display: block;
}

.task-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.4rem;
}

.form-grid {
    display: grid;
    gap: 0.72rem;
}

.form-two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form {
    max-width: 540px;
}

label {
    display: grid;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-navy-strong);
}

input,
select,
textarea {
    border-radius: 12px;
    border: 1px solid rgba(46, 64, 88, 0.2);
    background: rgba(255, 255, 255, 0.84);
    color: var(--brand-ink);
    font: inherit;
    font-size: 0.92rem;
    padding: 0.62rem 0.7rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(46, 64, 88, 0.52);
    box-shadow: 0 0 0 3px rgba(65, 89, 117, 0.12);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

th,
td {
    padding: 0.64rem 0.55rem;
    border-bottom: 1px solid rgba(46, 64, 88, 0.14);
    font-size: 0.84rem;
    text-align: left;
}

th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-navy-soft);
}

.traffic {
    border-radius: 999px;
    padding: 0.23rem 0.62rem;
    border: 1px solid transparent;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.traffic.verde {
    color: #1f6f4e;
    background: rgba(33, 145, 92, 0.12);
    border-color: rgba(33, 145, 92, 0.26);
}

.traffic.amarillo {
    color: #8d6b1e;
    background: rgba(181, 143, 44, 0.15);
    border-color: rgba(181, 143, 44, 0.3);
}

.traffic.rojo {
    color: #8a2e2a;
    background: rgba(156, 51, 46, 0.15);
    border-color: rgba(156, 51, 46, 0.28);
}

.stack-list {
    display: grid;
    gap: 0.62rem;
}

.stack-item {
    border-radius: 14px;
    border: 1px solid rgba(46, 64, 88, 0.15);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.72rem;
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
    align-items: center;
}

.stack-item p,
.stack-item small {
    margin: 0;
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.patient-actions {
    display: grid;
    gap: 0.5rem;
    justify-items: start;
}

.appointment-modal {
    position: fixed;
    inset: 0;
    z-index: 2200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.appointment-modal.is-open {
    display: flex;
}

.appointment-modal[hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.appointment-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(12, 20, 30, 0.58);
    backdrop-filter: blur(3px);
}

.appointment-modal__panel {
    position: relative;
    width: min(620px, 100%);
    max-height: min(86vh, 760px);
    overflow: auto;
    border-radius: 24px;
    border: 1px solid rgba(46, 64, 88, 0.18);
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(243, 239, 231, 0.94));
    box-shadow: 0 22px 40px rgba(24, 35, 50, 0.26);
    padding: 1.2rem;
    z-index: 1;
}

.appointment-modal__header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.appointment-modal__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.appointment-modal__grid label {
    display: grid;
    gap: 0.35rem;
}

.appointment-modal__grid label:last-child {
    grid-column: 1 / -1;
}

.appointment-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    margin-top: 1rem;
}

.schedule-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.schedule-list article {
    border-radius: 12px;
    border: 1px solid rgba(46, 64, 88, 0.16);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.7rem;
}

.schedule-list p {
    margin: 0.35rem 0 0;
}

.status-note {
    border-radius: 12px;
    border: 1px dashed rgba(46, 64, 88, 0.3);
    background: rgba(255, 255, 255, 0.58);
    padding: 0.85rem;
}

.status-note ul {
    margin: 0.45rem 0 0;
    padding-left: 1rem;
}

.doc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem;
    margin-bottom: 0.8rem;
}

.hero-client {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.9rem;
}

.progress-ring {
    min-width: 108px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    border: 8px solid rgba(65, 89, 117, 0.2);
    display: grid;
    place-items: center;
    text-align: center;
    background: radial-gradient(circle at 45% 30%, rgba(255, 255, 255, 0.9), rgba(234, 229, 220, 0.82));
}

.progress-ring strong {
    display: block;
    font-size: 1.2rem;
}

.progress-ring span {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
}

.timeline li {
    border-left: 3px solid rgba(46, 64, 88, 0.42);
    border-radius: 4px;
    padding: 0.1rem 0 0.1rem 0.7rem;
}

.timeline strong,
.timeline span {
    display: block;
}

.doc-cards {
    display: grid;
    gap: 0.62rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-card {
    border-radius: 13px;
    border: 1px solid rgba(46, 64, 88, 0.14);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.7rem;
}

.doc-card p,
.doc-card small {
    margin: 0;
}

.motivation-box {
    margin-top: 0.65rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(46, 64, 88, 0.94), rgba(65, 89, 117, 0.92));
    color: #f4f0e8;
    padding: 0.8rem;
}

.hint {
    font-size: 0.8rem;
    color: var(--brand-navy-soft);
}

.auth-wrap {
    min-height: calc(100vh - 64px);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(560px, 100%);
    border-radius: 26px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.84), rgba(241, 237, 230, 0.78));
    box-shadow: var(--shadow-soft);
    padding: 1.4rem;
}

.auth-card.compact {
    width: min(460px, 100%);
}

.auth-logo {
    width: min(240px, 100%);
    border-radius: 14px;
    margin-bottom: 1rem;
}

.auth-login-logo {
    width: min(420px, 100%);
    max-height: 120px;
    object-fit: contain;
    display: block;
    margin: 0.2rem auto 0.9rem;
}

.auth-links {
    margin-top: 0.9rem;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.78rem;
}

.auth-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 34px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(46, 64, 88, 0.25);
    background: rgba(255, 255, 255, 0.62);
    color: var(--brand-navy-strong);
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.28rem 0.62rem;
}

.auth-home-btn:hover,
.auth-home-btn:focus-visible {
    background: rgba(255, 255, 255, 0.84);
}

@media (max-width: 1160px) {
    .app-topbar {
        grid-template-columns: 1fr;
        row-gap: 0.52rem;
    }

    .app-user {
        justify-content: space-between;
    }

    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dual-grid,
    .form-two-col,
    .doc-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .app-shell {
        width: min(1280px, calc(100% - 1rem));
    }

    .app-nav {
        padding-bottom: 0;
    }

    .app-user {
        flex-direction: column;
        align-items: flex-start;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .hero-client {
        flex-direction: column;
        align-items: flex-start;
    }

    table {
        min-width: 460px;
    }

    body,
    .platform-body {
        background-attachment: scroll;
        background-position: center top;
    }
}

.workspace-layout {
    width: min(1360px, calc(100% - 2rem));
    margin: 1rem auto;
    display: grid;
    grid-template-columns: 286px 1fr;
    gap: 1rem;
    align-items: start;
}

.workspace-sidebar {
    position: sticky;
    top: 12px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(36, 52, 73, 0.95), rgba(46, 64, 88, 0.93));
    box-shadow: 0 18px 36px rgba(24, 35, 50, 0.36);
    padding: 1rem;
    min-height: calc(100vh - 24px);
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.workspace-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    color: #f2eee7;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.workspace-brand img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.workspace-brand strong {
    display: block;
    font-family: "Sora", "Segoe UI", sans-serif;
    font-size: 0.94rem;
}

.workspace-brand span {
    display: block;
    font-size: 0.7rem;
    color: rgba(242, 238, 231, 0.82);
}

.sidebar-toggle {
    display: none;
}

.workspace-nav {
    display: grid;
    gap: 0.35rem;
}

.workspace-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    border-radius: 12px;
    padding: 0.63rem 0.72rem;
    color: #e2e8ef;
    border: 1px solid transparent;
    font-size: 0.84rem;
    font-weight: 700;
    transition: transform 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
}

.workspace-nav-link:hover {
    transform: translateX(2px);
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.1);
}

.workspace-nav-link.is-active {
    border-color: rgba(255, 255, 255, 0.31);
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.08));
    color: #ffffff;
}

.workspace-nav-group {
    display: grid;
    gap: 0.3rem;
}

.workspace-nav-group-toggle {
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.workspace-nav-group.is-open .workspace-nav-group-toggle {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #f5f7fa;
}

.workspace-nav-caret {
    transition: transform 0.24s ease;
}

.workspace-nav-group.is-open .workspace-nav-caret {
    transform: rotate(180deg);
}

.workspace-subnav {
    display: grid;
    gap: 0.22rem;
    padding-left: 0.75rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: max-height 0.28s ease, opacity 0.22s ease, transform 0.22s ease, margin-top 0.22s ease;
    margin-top: 0;
}

.workspace-nav-group.is-open .workspace-subnav {
    max-height: 240px;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
    margin-top: 0.2rem;
}

.workspace-subnav-link {
    display: block;
    border-radius: 10px;
    padding: 0.5rem 0.7rem;
    color: rgba(226, 232, 239, 0.88);
    font-size: 0.8rem;
    font-weight: 600;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
    transition: background-color 0.24s ease, border-color 0.24s ease, color 0.24s ease, transform 0.24s ease;
}

.workspace-subnav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateX(2px);
}

.workspace-subnav-link.is-active {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-left-color: rgba(255, 255, 255, 0.42);
}

.workspace-sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 0.45rem;
}

.chip-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(46, 64, 88, 0.24);
    background: rgba(255, 255, 255, 0.74);
    color: var(--brand-navy-strong);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.8rem;
    cursor: pointer;
}

.workspace-sidebar-footer .chip-link {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #f4f0e8;
}

.workspace-main {
    position: relative;
    min-height: calc(100vh - 24px);
}

.workspace-topbar {
    border-radius: 20px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.8), rgba(243, 239, 231, 0.72));
    box-shadow: var(--shadow-card);
    padding: 0.72rem 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.workspace-user strong {
    display: block;
    font-size: 0.86rem;
    color: var(--brand-navy-strong);
}

.workspace-user span {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--brand-navy-soft);
}

.workspace-top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-btn {
    min-height: 40px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(46, 64, 88, 0.25);
    background: rgba(255, 255, 255, 0.74);
    color: var(--brand-navy-strong);
    font-weight: 800;
    font-size: 0.78rem;
    padding: 0.43rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    cursor: pointer;
}

.notification-count {
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--brand-navy);
    color: #f8f5ef;
    font-size: 0.68rem;
}

.notification-panel {
    position: absolute;
    right: 0;
    top: 62px;
    width: min(360px, 94vw);
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.92), rgba(242, 238, 231, 0.84));
    box-shadow: 0 22px 42px rgba(24, 35, 50, 0.26);
    padding: 0.85rem;
    z-index: 70;
}

.notification-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.notification-list li {
    border-radius: 12px;
    border: 1px solid rgba(46, 64, 88, 0.18);
    background: rgba(255, 255, 255, 0.75);
    padding: 0.58rem 0.62rem;
}

.notification-list strong,
.notification-list span {
    display: block;
}

.platform-main {
    padding-top: 0.95rem;
}

.platform-main-auth {
    min-height: 100vh;
}

.section-card {
    border-radius: 24px;
    border: 1px solid var(--line);
    background: linear-gradient(170deg, rgba(255, 255, 255, 0.84), rgba(244, 240, 233, 0.74));
    box-shadow: var(--shadow-card);
    padding: 1.1rem;
    margin-bottom: 1rem;
}

.platform-main .section-card h2 {
    text-transform: uppercase;
}

.section-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.smart-list {
    margin: 0;
    padding-left: 1rem;
    display: grid;
    gap: 0.42rem;
}

.platform-alert {
    border-radius: 12px;
    border: 1px solid transparent;
    padding: 0.62rem 0.72rem;
    font-size: 0.83rem;
    margin-bottom: 0.6rem;
    font-weight: 700;
}

.alert-success {
    background: rgba(31, 120, 84, 0.11);
    border-color: rgba(31, 120, 84, 0.25);
    color: #215f44;
}

.alert-error {
    background: rgba(156, 51, 46, 0.1);
    border-color: rgba(156, 51, 46, 0.24);
    color: #7d2f2b;
}

.alert-info {
    background: rgba(65, 89, 117, 0.11);
    border-color: rgba(65, 89, 117, 0.24);
    color: #33495f;
}

.auth-screen {
    min-height: calc(100vh - 2rem);
    display: grid;
    place-items: center;
}

.auth-form {
    display: grid;
    gap: 0.68rem;
}

.input-group {
    width: 100%;
    display: flex;
    align-items: center;
    border-radius: 13px;
    border: 1px solid rgba(46, 64, 88, 0.2);
    background: rgba(255, 255, 255, 0.86);
    min-height: 46px;
    overflow: hidden;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.input-group:focus-within {
    border-color: rgba(46, 64, 88, 0.52);
    box-shadow: 0 0 0 3px rgba(65, 89, 117, 0.12);
}

.input-group-text {
    min-width: 44px;
    height: 100%;
    display: grid;
    place-items: center;
    border-right: 1px solid rgba(46, 64, 88, 0.15);
    background: rgba(46, 64, 88, 0.06);
    color: var(--brand-navy-soft);
    font-weight: 800;
    font-size: 0.88rem;
}

.form-control {
    flex: 1;
    border: 0;
    background: transparent;
    box-shadow: none;
    padding: 0.72rem 0.72rem;
    width: 100%;
    min-width: 0;
}

.form-control:focus {
    box-shadow: none;
    border-color: transparent;
}

.input-password-group {
    position: relative;
}

.form-control-password {
    padding-right: 2.7rem;
}

.password-toggle {
    position: absolute;
    right: 0.28rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: var(--brand-navy-strong);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    border-radius: 8px;
    z-index: 2;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: rgba(46, 64, 88, 0.1);
}

.demo-box {
    margin-top: 0.72rem;
    border-radius: 12px;
    border: 1px dashed rgba(46, 64, 88, 0.25);
    background: rgba(255, 255, 255, 0.58);
    padding: 0.62rem;
}

.demo-box p {
    margin: 0.22rem 0;
    font-size: 0.79rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.24rem 0.56rem;
    font-size: 0.7rem;
    border: 1px solid transparent;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.status-confirmada,
.status-activo,
.status-pagado,
.status-completado {
    color: #1f6f4e;
    background: rgba(31, 120, 84, 0.12);
    border-color: rgba(31, 120, 84, 0.28);
}

.status-pendiente,
.status-parcial,
.status-pendiente-registro,
.status-reprogramada {
    color: #8a651d;
    background: rgba(181, 143, 44, 0.15);
    border-color: rgba(181, 143, 44, 0.3);
}

.status-cancelada,
.status-inactivo {
    color: #8a2e2a;
    background: rgba(156, 51, 46, 0.14);
    border-color: rgba(156, 51, 46, 0.28);
}

.grid-form {
    display: grid;
    gap: 0.7rem;
}

.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card-grid,
.availability-grid,
.semaphore-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.program-card,
.availability-card,
.semaphore-card {
    border-radius: 14px;
    border: 1px solid rgba(46, 64, 88, 0.14);
    background: rgba(255, 255, 255, 0.72);
    padding: 0.72rem;
}

.semaphore-card.state-verde {
    border-left: 4px solid #2d8b5e;
}

.semaphore-card.state-amarillo {
    border-left: 4px solid #b3912f;
}

.semaphore-card.state-rojo {
    border-left: 4px solid #9b3f38;
}

.followup-confirmations {
    margin-top: 0.82rem;
    display: grid;
    gap: 0.55rem;
}

.followup-item {
    border-radius: 12px;
    border: 1px solid rgba(46, 64, 88, 0.16);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.6rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.55rem;
}

.timeline-item {
    border-left: 3px solid rgba(46, 64, 88, 0.4);
    padding-left: 0.7rem;
}

.timeline-item strong,
.timeline-item span {
    display: block;
}

.progress-card {
    border-radius: 16px;
    border: 1px solid rgba(46, 64, 88, 0.15);
    background: rgba(255, 255, 255, 0.68);
    padding: 0.85rem;
    margin-top: 0.7rem;
}

.progress-track {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: rgba(46, 64, 88, 0.14);
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-track span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--brand-navy-soft), var(--brand-navy));
}

.client-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.motivation-card {
    margin-top: 0.65rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(36, 52, 73, 0.93), rgba(65, 89, 117, 0.9));
    color: #f3efe8;
    padding: 0.78rem;
}

.permissions-box {
    grid-column: 1 / -1;
    border-radius: 12px;
    border: 1px solid rgba(46, 64, 88, 0.14);
    background: rgba(255, 255, 255, 0.66);
    padding: 0.7rem;
}

.permissions-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.permissions-search {
    max-width: 280px;
}

.permissions-grid {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 0.42rem;
    font-size: 0.82rem;
    color: var(--brand-ink);
}

.permission-item input {
    width: 16px;
    height: 16px;
    padding: 0;
}

.users-form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 0.85rem;
    padding-top: 0.35rem;
}

.users-form-actions .btn {
    width: auto;
    min-width: 190px;
}

@media (max-width: 1180px) {
    .workspace-layout {
        grid-template-columns: 1fr;
    }

    .workspace-sidebar {
        min-height: auto;
        position: static;
    }

    .sidebar-toggle {
        display: inline-flex;
        min-height: 38px;
        border-radius: var(--radius-pill);
        border: 1px solid rgba(255, 255, 255, 0.28);
        background: rgba(255, 255, 255, 0.08);
        color: #f0ece4;
        font-weight: 700;
        font-size: 0.8rem;
        padding: 0.42rem 0.75rem;
        cursor: pointer;
    }

    .workspace-nav {
        display: none;
    }

    .workspace-nav.is-open {
        display: grid;
    }

    .section-split,
    .three-cols,
    .two-cols,
    .card-grid,
    .availability-grid,
    .semaphore-grid,
    .client-hero-grid {
        grid-template-columns: 1fr;
    }

    .permissions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .permissions-head {
        flex-direction: column;
        align-items: stretch;
    }

    .permissions-search {
        max-width: 100%;
    }
}

@media (max-width: 760px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Toast / Overlay Global Notification System ─────────────────────────── */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 48px);
}

.toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px 14px 18px;
    border-radius: 14px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.12),
        0 16px 32px -4px rgba(36, 52, 73, 0.22);
    font-size: 0.845rem;
    font-weight: 600;
    line-height: 1.45;
    pointer-events: auto;
    overflow: hidden;
    animation: toastSlideIn 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.toast-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.toast-title {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.8;
}

.toast-message {
    word-break: break-word;
}

.toast-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
    margin-top: 1px;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.55;
    transition: opacity 0.15s, background 0.15s;
    color: inherit;
    margin-top: 2px;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    transform-origin: left;
    animation: toastProgress linear forwards;
}

/* success */
.toast.toast-success {
    background: linear-gradient(135deg, #0f7a50 0%, #1a9962 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.toast.toast-success .toast-icon {
    background: rgba(255, 255, 255, 0.18);
}
.toast.toast-success .toast-icon::before { content: '✓'; }
.toast.toast-success .toast-progress { background: rgba(255, 255, 255, 0.55); }

/* error */
.toast.toast-error {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.toast.toast-error .toast-icon {
    background: rgba(255, 255, 255, 0.18);
}
.toast.toast-error .toast-icon::before { content: '✕'; }
.toast.toast-error .toast-progress { background: rgba(255, 255, 255, 0.5); }

/* warning */
.toast.toast-warning {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.toast.toast-warning .toast-icon {
    background: rgba(255, 255, 255, 0.18);
}
.toast.toast-warning .toast-icon::before { content: '⚠'; }
.toast.toast-warning .toast-progress { background: rgba(255, 255, 255, 0.5); }

/* info */
.toast.toast-info {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.toast.toast-info .toast-icon {
    background: rgba(255, 255, 255, 0.18);
}
.toast.toast-info .toast-icon::before { content: 'ℹ'; }
.toast.toast-info .toast-progress { background: rgba(255, 255, 255, 0.5); }

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(calc(100% + 32px)) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 120px;
        margin-bottom: 0;
    }
    to {
        opacity: 0;
        transform: translateX(calc(100% + 32px)) scale(0.88);
        max-height: 0;
        margin-bottom: -10px;
    }
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

@media (max-width: 480px) {
    .toast-container {
        bottom: 16px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: 100%;
    }
}
/* ── End Toast System ────────────────────────────────────────────────────── */

.patient-profile-modal {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: none;
}

.patient-profile-modal.is-open {
    display: block;
}

.patient-profile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 17, 26, 0.62);
    backdrop-filter: blur(4px);
    z-index: 0;
}

.patient-profile-panel {
    position: relative;
    z-index: 1;
    margin: 1.2rem;
    height: calc(100vh - 2.4rem);
    border-radius: 24px;
    border: 1px solid rgba(46, 64, 88, 0.18);
    background: linear-gradient(160deg, rgba(250, 248, 244, 0.98), rgba(243, 239, 231, 0.95));
    box-shadow: 0 24px 48px rgba(24, 35, 50, 0.32);
    display: grid;
    grid-template-rows: auto auto 1fr;
    overflow: hidden;
}

.appointment-confirm-modal {
    z-index: 2600;
}

.appointment-confirm-modal .patient-profile-panel {
    width: min(520px, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    height: auto;
    margin: 1rem auto;
    grid-template-rows: auto 1fr;
}

.patient-profile-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid rgba(46, 64, 88, 0.12);
    background: rgba(255, 255, 255, 0.7);
}

.patient-profile-tabs {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(46, 64, 88, 0.12);
    background: rgba(255, 255, 255, 0.58);
}

.patient-profile-tab {
    border: 1px solid rgba(46, 64, 88, 0.2);
    background: rgba(255, 255, 255, 0.86);
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-navy-strong);
    cursor: pointer;
    white-space: nowrap;
}

.patient-profile-tab.is-active {
    background: linear-gradient(145deg, #2e4058, #243449);
    color: #fff;
    border-color: rgba(36, 52, 73, 0.72);
}

.patient-profile-content {
    overflow: auto;
    padding: 1rem;
}

.patient-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    border-radius: 18px;
    border: 1px solid rgba(46, 64, 88, 0.16);
    background: rgba(255, 255, 255, 0.8);
    padding: 0.9rem;
}

.patient-profile-id {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.patient-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(46, 64, 88, 0.2);
    display: grid;
    place-items: center;
    font-weight: 800;
    background: linear-gradient(145deg, rgba(46, 64, 88, 0.18), rgba(65, 89, 117, 0.15));
}

.patient-profile-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
}

.patient-semaphore {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(28, 42, 58, 0.35);
    display: inline-block;
}

.patient-semaphore-green {
    background: #1f9d63;
}

.patient-semaphore-yellow {
    background: #f1b541;
}

.patient-semaphore-red {
    background: #d64949;
}

.patient-row {
    cursor: pointer;
}

.patient-row:hover {
    background: rgba(46, 64, 88, 0.05);
}

@media (max-width: 780px) {
    .patient-profile-panel {
        margin: 0.5rem;
        height: calc(100vh - 1rem);
        border-radius: 18px;
    }

    .patient-profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-profile-metrics {
        justify-content: flex-start;
    }
}
