/* =========================
   PÁGINA
========================= */

.demo-page {
    min-height: 100vh;

    background:
        linear-gradient(
            135deg,
            #F6FAFA,
            #EDF6F6
        );
}


/* =========================
   HEADER
========================= */

.demo-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    min-height: 74px;

    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 24px;

    padding: 10px 28px;

    border-bottom: 1px solid rgba(11, 93, 104, 0.09);

    background-color: rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(14px);
}

.demo-brand {
    display: inline-flex;
    align-items: center;
}

.demo-brand img {
    width: 140px;
}

.demo-header-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.demo-header-info span {
    color: var(--color-text-secondary);
    font-size: 11px;
}

.demo-header-info strong {
    padding: 5px 9px;

    border-radius: 999px;

    background-color: var(--color-mint);
    color: var(--color-primary);

    font-size: 10px;
}

.demo-header-links {
    display: flex;
    align-items: center;
    gap: 14px;
}

.demo-header-links a {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;

    transition:
        color var(--transition-fast);
}

.demo-header-links a:hover {
    color: var(--color-primary);
}

.demo-header-links .demo-back {
    margin-left: 8px;
    color: var(--color-primary);
    font-weight: 600;
}


/* =========================
   APP
========================= */

.demo-app {
    min-height: calc(100vh - 74px);

    display: grid;
    grid-template-columns: 300px 1fr;
}


/* =========================
   SIDEBAR
========================= */

.demo-flow-sidebar {
    position: sticky;
    top: 74px;

    height: calc(100vh - 74px);

    display: flex;
    flex-direction: column;

    padding: 32px 22px 22px;

    background:
        linear-gradient(
            180deg,
            var(--color-primary-dark),
            var(--color-primary)
        );

    color: white;
}

.demo-flow-intro {
    margin-bottom: 32px;
}

.demo-flow-intro h1 {
    margin-bottom: 10px;
    color: white;
    font-size: 25px;
}

.demo-flow-intro p {
    color: #B7D0D2;
    font-size: 12px;
    line-height: 1.7;
}


/* =========================
   FLOW NAV
========================= */

.flow-navigation {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 10px;
}

.flow-navigation::before {
    content: "";
    position: absolute;

    left: 20px;
    top: 20px;
    bottom: 20px;

    width: 2px;

    background-color: rgba(255, 255, 255, 0.10);
}

.flow-step {
    position: relative;
    z-index: 2;

    width: 100%;

    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 12px;

    padding: 11px;

    cursor: pointer;
    text-align: left;

    border: 1px solid transparent;
    border-radius: 12px;

    background-color: transparent;
    color: white;

    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast),
        border-color var(--transition-fast);
}

.flow-step:hover {
    transform: translateX(3px);
    background-color: rgba(255, 255, 255, 0.06);
}

.flow-step.ativo {
    background-color: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.09);
}

.flow-step > span {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background-color: rgba(255, 255, 255, 0.11);
    color: #D1E3E4;

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

.flow-step.ativo > span {
    background-color: white;
    color: var(--color-primary);
}

.flow-step div {
    display: flex;
    flex-direction: column;
}

.flow-step strong {
    margin-bottom: 2px;
    font-size: 12px;
}

.flow-step small {
    color: #AAC7C9;
    font-size: 9px;
}


/* =========================
   DISCLAIMER
========================= */

.demo-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: auto;
    padding: 13px;

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 11px;

    background-color: rgba(255, 255, 255, 0.045);
}

.demo-disclaimer > span {
    display: flex;
    width: 23px;
    height: 23px;
    flex-shrink: 0;

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

    border-radius: 50%;

    background-color: rgba(114, 209, 203, 0.12);
    color: #72D1CB;

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

.demo-disclaimer p {
    color: #A9C6C8;
    font-size: 9px;
    line-height: 1.55;
}


/* =========================
   WORKSPACE
========================= */

.demo-workspace {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 40px 5% 60px;
}

.workspace-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 25px;
}

.workspace-header h2 {
    margin-bottom: 7px;
    font-size: 31px;
}

.workspace-header p {
    max-width: 620px;
    font-size: 13px;
    line-height: 1.65;
}

.status-badge {
    padding: 7px 12px;

    border-radius: 999px;

    background-color: var(--color-mint);
    color: var(--color-primary);

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


/* =========================
   PROGRESS
========================= */

.demo-progress {
    margin-bottom: 22px;
    padding: 17px;

    border: 1px solid var(--color-border);
    border-radius: 13px;

    background-color: rgba(255, 255, 255, 0.80);
}

.demo-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 9px;
}

.demo-progress-header span,
.demo-progress-header strong {
    font-size: 10px;
}

.demo-progress-header span {
    color: var(--color-text-secondary);
}

.demo-progress-header strong {
    color: var(--color-primary);
}

.progress-track {
    height: 7px;
    overflow: hidden;

    border-radius: 999px;

    background-color: rgba(11, 93, 104, 0.10);
}

.progress-bar {
    width: 25%;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            var(--color-primary),
            var(--color-primary-light)
        );

    transition: width 0.4s ease;
}


/* =========================
   PACIENTE
========================= */

.patient-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;

    margin-bottom: 18px;
    padding: 18px;

    border: 1px solid var(--color-border);
    border-radius: 15px;

    background-color: rgba(255, 255, 255, 0.94);

    box-shadow: var(--shadow-small);
}

.patient-summary-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.patient-avatar {
    display: flex;

    width: 50px;
    height: 50px;

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

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            var(--color-primary),
            var(--color-primary-light)
        );

    color: white;
    font-size: 13px;
    font-weight: 700;
}

.card-label {
    display: block;
    margin-bottom: 3px;

    color: var(--color-primary);

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

    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.patient-summary h3 {
    margin-bottom: 2px;
    font-size: 17px;
}

.patient-summary p {
    font-size: 10px;
}

.patient-code {
    text-align: right;
}

.patient-code span,
.patient-code strong {
    display: block;
}

.patient-code span {
    color: var(--color-text-secondary);
    font-size: 9px;
}

.patient-code strong {
    margin-top: 3px;
    color: var(--color-primary);
    font-size: 11px;
}


/* =========================
   INFO GRID
========================= */

.demo-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 18px;
}

.demo-info-card {
    min-height: 145px;
    padding: 17px;

    border: 1px solid var(--color-border);
    border-radius: 14px;

    background-color: rgba(255, 255, 255, 0.94);

    box-shadow:
        0 7px 20px rgba(11, 93, 104, 0.045);
}

.demo-info-card > span {
    display: block;
    margin-bottom: 15px;

    color: var(--color-text-secondary);

    font-size: 9px;

    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.demo-info-card > strong {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
}

.demo-info-card > p {
    font-size: 10px;
    line-height: 1.55;
}


/* =========================
   PAINEL DINÂMICO
========================= */

.demo-dynamic-panel {
    padding: 23px;

    border: 1px solid var(--color-border);
    border-radius: 16px;

    background-color: rgba(255, 255, 255, 0.96);

    box-shadow: var(--shadow-medium);
}

.demo-dynamic-panel header {
    margin-bottom: 12px;
}

.demo-dynamic-panel h3 {
    font-size: 18px;
}

.demo-dynamic-panel > p {
    max-width: 780px;
    margin-bottom: 20px;
    font-size: 12px;
    line-height: 1.7;
}

.demo-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.demo-details > div {
    padding: 13px;

    border: 1px solid #E5EEEE;
    border-radius: 10px;

    background-color: #F7FAFA;
}

.demo-details span,
.demo-details strong {
    display: block;
}

.demo-details span {
    margin-bottom: 5px;
    color: var(--color-text-secondary);
    font-size: 9px;
}

.demo-details strong {
    font-size: 11px;
}


/* =========================
   CONTROLES
========================= */

.demo-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 14px;
    margin-top: 22px;
}

.btn-demo-back,
.btn-demo-next {
    min-height: 42px;
    padding: 9px 15px;

    cursor: pointer;

    border-radius: 9px;

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

    transition:
        transform var(--transition-fast),
        background-color var(--transition-fast),
        opacity var(--transition-fast);
}

.btn-demo-back {
    justify-self: start;

    border: 1px solid #D6E3E4;

    background-color: white;
    color: var(--color-text-secondary);
}

.btn-demo-back:hover:not(:disabled) {
    transform: translateX(-2px);
}

.btn-demo-back:disabled {
    cursor: default;
    opacity: 0.4;
}

.btn-demo-next {
    justify-self: end;

    background-color: var(--color-primary);
    color: white;
}

.btn-demo-next:hover {
    transform: translateX(2px);
    background-color: var(--color-primary-dark);
}

#controle-etapa {
    color: var(--color-text-secondary);
    font-size: 10px;
    font-weight: 600;
}


/* =========================
   RESPONSIVO
========================= */

@media (max-width: 1100px) {
    .demo-app {
        grid-template-columns: 250px 1fr;
    }

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

    .demo-header-links a:not(.demo-back) {
        display: none;
    }
}

@media (max-width: 820px) {
    .demo-header {
        grid-template-columns: 1fr auto;
        padding: 10px 16px;
    }

    .demo-header-info {
        display: none;
    }

    .demo-app {
        display: block;
    }

    .demo-flow-sidebar {
        position: relative;
        top: 0;
        height: auto;

        border-radius: 0 0 18px 18px;
    }

    .flow-navigation {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
    }

    .flow-navigation::before {
        display: none;
    }

    .flow-step {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .flow-step small {
        display: none;
    }

    .demo-disclaimer {
        display: none;
    }
}

@media (max-width: 560px) {
    .demo-brand img {
        width: 120px;
    }

    .workspace-header {
        flex-direction: column;
    }

    .demo-info-grid,
    .demo-details {
        grid-template-columns: 1fr;
    }

    .patient-summary {
        flex-direction: column;
        align-items: flex-start;
    }

    .patient-code {
        text-align: left;
    }

    .demo-controls {
        grid-template-columns: 1fr;
    }

    #controle-etapa {
        order: -1;
        text-align: center;
    }

    .btn-demo-back,
    .btn-demo-next {
        width: 100%;
        justify-self: stretch;
    }
}
