@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --jt-ink: #102a5f;
    --jt-blue: #2155ed;
    --jt-blue-hover: #1742c7;
    --jt-teal: #14b8a6;
    --jt-bg: #edf4ff;
    --jt-line: #dfe8f5;
    --jt-muted: #5f718d;
    --jt-footer: #101e35;
    --jt-lime: #d3f86a;
}

body.juritest-public {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--jt-ink);
    font-family: 'Inter', Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

.jt-wrap {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

/* Header — mismas proporciones y reparto que el index público */
.jt-header {
    position: sticky;
    top: 0;
    z-index: 1035;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid #e8eef8;
}

.jt-header .jt-wrap {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

.jt-nav {
    height: 88px;
    min-height: 88px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.jt-brand {
    display: inline-flex;
    flex: 0 0 auto;
}

.jt-brand img {
    width: auto;
    height: 44px;
    display: block;
}

.jt-nav-links {
    display: flex;
    align-items: center;
    gap: 23px;
    margin-left: 0;
}

.jt-nav-links a {
    color: #455b78;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    white-space: nowrap;
}

.jt-login-link {
    color: var(--jt-ink);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 10px 0;
}

.jt-nav-links a:hover,
.jt-login-link:hover,
.jt-login-link.is-active {
    color: var(--jt-blue);
}

.jt-nav-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.jt-primary-button,
.jt-secondary-button {
    border-radius: 12px;
    min-height: 46px;
    padding: 11px 19px;
    font-family: inherit;
    font-size: .9rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: .18s ease;
    cursor: pointer;
}

.jt-primary-button {
    border: 1px solid var(--jt-blue);
    background: var(--jt-blue);
    color: #fff !important;
}

.jt-primary-button:hover {
    background: var(--jt-blue-hover);
    border-color: var(--jt-blue-hover);
    transform: translateY(-1px);
}

.jt-secondary-button {
    border: 1px solid #cbd7e8;
    background: #fff;
    color: var(--jt-ink);
}

.jt-secondary-button:hover {
    border-color: var(--jt-ink);
}

.jt-menu-toggle,
.jt-mobile-login {
    display: none;
}

.jt-menu-toggle {
    width: 44px;
    height: 44px;
    border: 1px solid var(--jt-line);
    border-radius: 8px;
    background: #fff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
}

.jt-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--jt-ink);
    border-radius: 10px;
}

/* Login */
.jt-auth-main {
    flex: 1 0 auto;
    background: var(--jt-bg);
    padding: 78px 0 84px;
}

.jt-auth-grid {
    display: grid;
    grid-template-columns: 1fr 470px;
    align-items: center;
    gap: 92px;
}

.jt-auth-copy {
    max-width: 610px;
}

.jt-eyebrow {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--jt-blue);
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.jt-auth-copy h1 {
    margin: 0 0 23px;
    color: var(--jt-ink);
    font-size: clamp(3rem, 5vw, 4.55rem);
    line-height: 1.02;
    letter-spacing: -.055em;
    font-weight: 800;
}

.jt-auth-copy h1 span {
    color: var(--jt-blue);
}

.jt-auth-copy > p {
    max-width: 570px;
    color: #536985;
    font-size: 1.05rem;
    line-height: 1.75;
}

.jt-auth-points {
    margin: 30px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 13px;
    color: #334d70;
    font-weight: 600;
}

.jt-auth-points li {
    display: flex;
    align-items: center;
    gap: 11px;
}

.jt-auth-points li span {
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #dff7f3;
    color: #087f72;
    font-size: .8rem;
}

.jt-auth-card {
    background: #fff;
    border: 1px solid #dce7f5;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(16,42,95,.11);
    padding: 38px 40px 34px;
}

.jt-auth-card-head {
    text-align: center;
    margin-bottom: 28px;
}

.jt-auth-logo {
    height: 42px;
    width: auto;
    display: block;
    margin: 0 auto 26px;
}

.jt-auth-card h2 {
    margin: 0 0 8px;
    color: var(--jt-ink);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.025em;
}

.jt-auth-card-head p,
.jt-modal-copy {
    margin: 0;
    color: var(--jt-muted);
    font-size: .92rem;
    line-height: 1.6;
}

.jt-field {
    margin-bottom: 18px;
}

.jt-field label,
.jt-modal-content .form-label {
    display: block;
    margin-bottom: 8px;
    color: #304867;
    font-size: .84rem;
    font-weight: 700;
}

.juritest-public .form-control,
.jt-modal-content .form-control {
    min-height: 50px;
    border: 1px solid #cad7e9 !important;
    border-radius: 9px !important;
    padding: 12px 14px !important;
    font-size: .95rem !important;
    color: var(--jt-ink);
    box-shadow: none !important;
}

.juritest-public .form-control:focus,
.jt-modal-content .form-control:focus {
    border-color: var(--jt-blue) !important;
    box-shadow: 0 0 0 3px rgba(33,85,237,.11) !important;
}

.jt-password-wrap {
    position: relative;
}

.jt-password-wrap .form-control {
    padding-right: 52px !important;
}

.jt-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #6a7e99;
}

.jt-password-toggle:hover {
    background: #f1f5fb;
    color: var(--jt-blue);
}

.jt-auth-tools {
    display: flex;
    justify-content: flex-end;
    margin: -2px 0 22px;
}

.jt-link-button {
    border: 0;
    padding: 0;
    background: none;
    color: #536985;
    font: inherit;
    font-size: .82rem;
    cursor: pointer;
}

.jt-link-button:hover {
    color: var(--jt-blue);
    text-decoration: underline;
}

.jt-login-submit {
    width: 100%;
}

.jt-auth-register {
    margin-top: 27px;
    padding-top: 24px;
    border-top: 1px solid #e5ecf6;
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--jt-muted);
    font-size: .86rem;
}

.jt-auth-register a {
    color: var(--jt-blue);
    font-weight: 800;
    text-decoration: none;
}

.jt-auth-register a:hover {
    text-decoration: underline;
}

.jt-modal-content {
    border: 0 !important;
    border-radius: 16px !important;
    box-shadow: 0 24px 70px rgba(16,42,95,.2);
}

.jt-modal-submit {
    min-height: 42px;
}

/* Footer */
.jt-footer {
    flex-shrink: 0;
    width: 100%;
    padding: 57px 0 27px;
    background: var(--jt-footer) !important;
    color: #dbe4f4;
}

.jt-footer-main {
    display: grid;
    grid-template-columns: 1.1fr 1.05fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.jt-footer-brand {
    max-width: 270px;
}

.jt-footer-logo {
    width: auto;
    height: 44px;
    display: block;
}

.jt-footer-brand p {
    margin: 17px 0 0;
    color: #becde3;
    font-size: .93rem;
    line-height: 1.8;
}

.jt-footer-col {
    display: flex;
    flex-direction: column;
    gap: 9px;
    color: #b7d0ff;
    font-size: .875rem;
}

.jt-footer-col strong {
    margin: 5px 0 12px;
    color: #fff;
    font-size: .9375rem;
    line-height: 1.5;
}

.jt-footer-col a,
.jt-footer-col button,
.jt-footer-col span {
    color: #b7d0ff;
    text-decoration: none;
    font: inherit;
    line-height: 1.6;
}

.jt-footer-col button {
    border: 0;
    padding: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}

.jt-footer-col a:hover,
.jt-footer-col button:hover {
    color: var(--jt-lime);
}

.jt-footer-bottom {
    padding-top: 26px;
    border-top: 1px solid #53627b;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: #bdcce1;
    font-size: .8125rem;
    line-height: 1.7;
}

/* Consent modal: scroll internally on short and narrow screens. */
.jt-cookie-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-width: 0;
    padding: 16px;
    padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
             max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: rgba(4, 14, 31, .72);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.jt-cookie-overlay.d-none { display: none !important; }

.jt-cookie-banner {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    width: min(700px, 100%);
    min-width: 0;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    margin: auto;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    color: var(--jt-ink);
    box-shadow: 0 24px 90px rgba(0, 0, 0, .28);
}

.jt-cookie-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex: 0 0 auto;
    padding: 24px 26px 12px;
}

.jt-cookie-banner h3 {
    min-width: 0;
    margin: 0;
    font-size: clamp(1.15rem, 3.2vw, 1.4rem);
    line-height: 1.3;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.jt-cookie-close {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border: 1px solid #cbd7e8;
    border-radius: 10px;
    background: #fff;
    color: var(--jt-ink);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.jt-cookie-close.d-none { display: none !important; }

.jt-cookie-scroll {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 26px 12px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
}

.jt-cookie-scroll > p {
    margin: 0 0 18px;
    color: var(--jt-muted);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.jt-cookie-banner a { color: var(--jt-blue); }

.jt-cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 14px 0;
    border-top: 1px solid #e5ecf6;
}

.jt-cookie-option label {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.jt-cookie-option span {
    color: var(--jt-muted);
    font-size: .86rem;
}

.jt-cookie-option input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--jt-blue);
    cursor: pointer;
}
.jt-cookie-option input[type="checkbox"]:disabled { cursor: not-allowed; }

.jt-cookie-actions {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    flex: 0 0 auto;
    width: 100%;
    padding: 16px 26px 24px;
    border-top: 1px solid #e5ecf6;
    background: #fff;
}

.jt-cookie-actions > button {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 12px;
    white-space: normal;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.jt-cookie-actions .jt-consent-major { font-weight: 800; }
.jt-cookie-actions #rejectAllBtn { border: 2px solid #1d4ed8; color: #173b8f; background: #fff; }
.jt-cookie-actions #acceptAllBtn { border: 2px solid #2563eb; }
.jt-cookie-banner :is(button, input, a):focus-visible {
    outline: 3px solid #14b8a6;
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .jt-cookie-overlay {
        padding: 10px;
        padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right))
                 max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    }
    .jt-cookie-banner {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - max(10px, env(safe-area-inset-top)) - max(10px, env(safe-area-inset-bottom)));
        border-radius: 14px;
    }
    .jt-cookie-header { padding: 18px 16px 10px; }
    .jt-cookie-scroll { padding: 0 16px 8px; }
    .jt-cookie-scroll > p { font-size: .9rem; line-height: 1.5; margin-bottom: 12px; }
    .jt-cookie-option { padding: 10px 0; }
    .jt-cookie-actions {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
        padding: 12px 16px 16px;
    }
    .jt-cookie-actions > button { min-height: 44px; }
}

@media (max-height: 450px) and (min-width: 601px) {
    .jt-cookie-header { padding-top: 12px; padding-bottom: 6px; }
    .jt-cookie-actions { padding-top: 10px; padding-bottom: 12px; }
    .jt-cookie-scroll > p { margin-bottom: 10px; }
}

@media (max-width: 1000px) {
    .jt-nav-links {
        position: absolute;
        top: 88px;
        left: 20px;
        right: 20px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px 20px;
        border: 1px solid var(--jt-line);
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 18px 40px rgba(16,42,95,.13);
    }

    .jt-nav-links.is-open { display: flex; }

    .jt-nav-links a {
        padding: 13px 0;
        border-bottom: 1px solid #edf1f7;
    }

    .jt-nav-links a:last-child { border-bottom: 0; }
    .jt-mobile-login { display: block; }
    .jt-login-link { display: none; }
    .jt-menu-toggle { display: inline-flex; }

    .jt-auth-grid {
        grid-template-columns: 1fr 430px;
        gap: 45px;
    }

    .jt-footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 780px) {
    .jt-header .jt-wrap { padding: 0 20px; }
    .jt-nav { height: 76px; min-height: 76px; }
    .jt-brand img { height: 36px; }
    .jt-nav-links { top: 76px; }
    .jt-nav-cta { display: none; }

    .jt-auth-main { padding: 50px 0 58px; }
    .jt-auth-grid { grid-template-columns: 1fr; gap: 36px; }
    .jt-auth-copy { text-align: center; margin: 0 auto; }
    .jt-auth-copy h1 { font-size: clamp(2.5rem, 11vw, 3.6rem); }
    .jt-auth-copy > p { margin-left: auto; margin-right: auto; }
    .jt-auth-points { display: none; }
    .jt-auth-card { width: min(100%, 480px); margin: 0 auto; }

    .jt-footer-main { grid-template-columns: 1fr 1fr; gap: 34px 26px; }
    .jt-footer-brand { grid-column: 1 / -1; max-width: 390px; }
}

@media (max-width: 520px) {
    .jt-wrap { width: min(100% - 28px, 1180px); }
    .jt-header .jt-wrap { width: 100%; padding: 0 14px; }
    .jt-auth-main { padding: 38px 0 48px; }
    .jt-auth-copy h1 { font-size: 2.6rem; }
    .jt-auth-card { padding: 30px 22px 27px; border-radius: 14px; }
    .jt-auth-logo { height: 36px; }
    .jt-footer { padding-top: 44px; }
    .jt-footer-main { grid-template-columns: 1fr; }
    .jt-footer-brand { grid-column: auto; }
    .jt-footer-bottom { flex-direction: column; gap: 4px; }
}
