.client-hub {
    --hub-primary: #002f42;
    --hub-primary-hover: #00445f;
    --hub-success: #16a34a;
    --hub-success-hover: #15803d;
    --hub-border: #d9e0e5;
    --hub-text: #0b2735;
    --hub-text-muted: #6b7280;
    --hub-bg: rgba(255, 255, 255, 0.98);
    --hub-bg-soft: #f8fafc;
    --hub-radius: 14px;
    --hub-shadow:
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 18px 45px rgba(0, 0, 0, 0.14);

    width: 100%;
    max-width: 500px;
    margin: 50px auto;
    padding: 32px;

    box-sizing: border-box;

    border: 1px solid var(--hub-border);
    border-radius: var(--hub-radius);
    box-shadow: var(--hub-shadow);

    background: var(--hub-bg);
    color: var(--hub-text);

    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Inter,
        sans-serif;
}

/*
 * Cartão da tela de login.
 *
 * Não possui imagem ou cor de fundo externa.
 * O fundo continuará sendo o próprio fundo do site.
 */
.client-hub-login-card {
    max-width: 385px;
    padding: 34px 32px;
}

.client-hub h2 {
    margin: 0 0 30px;

    color: var(--hub-text);

    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.client-hub-welcome {
    margin-bottom: 26px;
}

.client-hub-group {
    margin-bottom: 24px;
}

.client-hub-group label {
    display: block;
    margin-bottom: 8px;

    color: var(--hub-text);

    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
}

.client-hub-group input {
    width: 100%;
    height: 55px;
    padding: 0 14px;

    box-sizing: border-box;

    border: 1px solid #cbd5e1;
    border-radius: 5px;

    background: #fff;
    color: var(--hub-text);

    font-size: 1rem;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease;
}

.client-hub-group input::placeholder {
    color: #8a929a;
}

.client-hub-group input:hover {
    border-color: #94a3b8;
}

.client-hub-group input:focus {
    outline: none;
    border-color: var(--hub-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 47, 66, 0.14);
}

.client-hub #client-hub-login button {
    width: 100%;
    height: 58px;
    padding: 0 16px;

    border: 0;
    border-radius: 5px;

    background: var(--hub-primary);
    color: #fff;

    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.02em;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.1s ease,
        opacity 0.15s ease;
}

.client-hub #client-hub-login button:hover {
    background: var(--hub-primary-hover);
}

.client-hub #client-hub-login button:active {
    transform: scale(0.98);
}

.client-hub #client-hub-login button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 47, 66, 0.2);
}

.client-hub #client-hub-login button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.client-hub hr {
    margin: 32px 0;

    border: 0;
    border-top: 1px solid var(--hub-border);
}

.client-hub-orcamento h3,
.client-hub-estudos h3 {
    margin: 0 0 16px;

    color: var(--hub-text);

    font-size: 1.05rem;
    font-weight: 700;
}

.client-hub-estudos-lista {
    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
}

.client-hub-estudo-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    width: 100%;
    padding: 16px;

    box-sizing: border-box;

    border: 1px solid var(--hub-border);
    border-radius: 10px;

    background: var(--hub-bg-soft);

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

.client-hub-estudo-item:hover {
    border-color: #c8d0d8;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.client-hub-estudo-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;

    min-width: 0;
}

.client-hub-estudo-nome {
    display: block;

    overflow-wrap: anywhere;
    word-break: break-word;

    color: var(--hub-text);
    font-weight: 600;
}

.client-hub-estudo-data {
    color: var(--hub-text-muted);
    font-size: 0.8rem;
}

.client-hub-estudo-acoes {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.client-hub-estudo-ver,
.client-hub-open-pdf {
    display: inline-block;
    padding: 8px 16px;

    border-radius: 7px;

    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    transition:
        background 0.15s ease,
        transform 0.1s ease;
}

.client-hub-estudo-ver,
.client-hub-open-pdf {
    background: var(--hub-primary);
    color: #fff;
}

.client-hub-estudo-baixar {
    background: var(--hub-success);
    color: #fff;
}

.client-hub-estudo-ver:hover,
.client-hub-estudo-ver:focus,
.client-hub-open-pdf:hover,
.client-hub-open-pdf:focus {
    background: var(--hub-primary-hover);
    color: #fff;
    text-decoration: none;
}

.client-hub-estudo-baixar:hover,
.client-hub-estudo-baixar:focus {
    background: var(--hub-success-hover);
    color: #fff;
    text-decoration: none;
}

.client-hub-estudo-ver:active,
.client-hub-estudo-baixar:active,
.client-hub-open-pdf:active {
    transform: scale(0.96);
}

.client-hub-empty {
    padding: 24px;

    color: var(--hub-text-muted);

    font-size: 0.9rem;
    text-align: center;
}

.client-hub-logout {
    margin-top: 30px;
    padding-top: 20px;

    border-top: 1px solid var(--hub-border);
}

.client-hub .client-hub-logout-button {
    display: block;

    width: 100%;
    padding: 11px 16px;

    box-sizing: border-box;

    border: 1px solid var(--hub-border);
    border-radius: 8px;

    background: #fff;
    color: var(--hub-text);

    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;

    cursor: pointer;

    transition:
        background 0.15s ease,
        border-color 0.15s ease,
        transform 0.1s ease;
}

.client-hub .client-hub-logout-button:hover,
.client-hub .client-hub-logout-button:focus {
    border-color: #cbd5e1;

    background: var(--hub-bg-soft);
    color: var(--hub-text);
}

.client-hub .client-hub-logout-button:active {
    transform: scale(0.98);
}

.client-hub .client-hub-logout-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 47, 66, 0.14);
}

@media (max-width: 600px) {
    .client-hub {
        max-width: calc(100% - 32px);
        margin: 25px auto;
        padding: 25px 20px;

        border-radius: 12px;
    }

    .client-hub-login-card {
        max-width: calc(100% - 32px);
        padding: 28px 22px;
    }

    .client-hub-estudo-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .client-hub-estudo-acoes {
        width: 100%;
    }

    .client-hub-estudo-ver,
    .client-hub-estudo-baixar {
        flex: 1;
        text-align: center;
    }
    
}

/* =========================================================
   BOTÃO VISUALIZAR PDF
========================================================= */

.client-hub-view-pdf {
    display: inline-block;
    padding: 8px 16px;

    border: 0;
    border-radius: 7px;

    background: var(--hub-primary);
    color: #fff;

    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background 0.15s ease,
        transform 0.1s ease;
}

.client-hub-view-pdf:hover,
.client-hub-view-pdf:focus {
    background: var(--hub-primary-hover);
    color: #fff;
}

.client-hub-view-pdf:active {
    transform: scale(0.96);
}


/* =========================================================
   MODAL PDF
========================================================= */

body.client-hub-modal-open {
    overflow: hidden;
}

.client-hub-pdf-modal {
    position: fixed;
    inset: 0;

    z-index: 999999;

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

    padding: 24px;
}

.client-hub-pdf-modal.is-open {
    display: flex;
}

.client-hub-pdf-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0.72);

    backdrop-filter: blur(2px);
}

.client-hub-pdf-dialog {
    position: relative;
    z-index: 1;

    width: calc(100vw - 60px);
    max-width: 1400px;

    height: calc(100vh - 60px);

    background: #fff;

    border-radius: 14px;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35);
}

.client-hub-pdf-header {
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    min-height: 64px;
    padding: 14px 20px;

    border-bottom: 1px solid rgba(0, 0, 0, 0.10);

    background: #fff;
}

.client-hub-pdf-header h3 {
    margin: 0;
    padding: 0;

    font-size: 18px;
    line-height: 1.3;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.client-hub-pdf-close {
    appearance: none;

    flex: 0 0 auto;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    font-size: 32px;
    line-height: 42px;
    text-align: center;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.client-hub-pdf-close:hover {
    background: rgba(0, 0, 0, 0.07);

    transform: scale(1.05);
}

.client-hub-pdf-body {
    position: relative;

    flex: 1 1 auto;
    min-height: 0;

    background: #f3f3f3;
}

.client-hub-pdf-loading {
    position: absolute;
    inset: 0;

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

    font-size: 16px;

    background: #f3f3f3;
}

#client-hub-pdf-frame {
    display: none;

    width: 100%;
    height: 100%;

    border: 0;

    background: #fff;
}


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

@media (max-width: 768px) {

    .client-hub-pdf-modal {
        padding: 8px;
    }

    .client-hub-pdf-dialog {
        width: 100%;
        height: 96vh;

        border-radius: 10px;
    }

    .client-hub-pdf-header {
        min-height: 56px;
        padding: 10px 14px;
    }

    .client-hub-pdf-header h3 {
        font-size: 16px;
    }

    .client-hub-pdf-close {
        width: 38px;
        height: 38px;

        font-size: 28px;
        line-height: 38px;
    }
}