/* Login — layout split-screen corporativo */

body.login-page {
    display: block;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.login-page {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
    display: block;
    background: #f4f7fb;
    overflow-x: hidden;
    overflow-y: auto;
}

.login-page::before {
    display: none;
}

.login-split {
    min-height: 100vh;
    height: 100vh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(300px, 42%) 1fr;
}

.login-split-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    height: 100%;
    padding: 3rem 2.5rem;
    color: #fff;
    background:
        linear-gradient(165deg, rgba(255, 255, 255, 0.06) 0%, transparent 45%),
        linear-gradient(160deg, #0f2d6b 0%, #1e4ea8 52%, #12356f 100%);
    overflow: hidden;
}

.login-split-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 90%);
    pointer-events: none;
}

.login-split-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.login-split-logo {
    max-width: 400px;
    max-height: 150px;
    object-fit: contain;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.login-split-logo-fallback {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 2rem;
}

.login-split-title {
    margin: 0 0 1rem;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.15;
    font-weight: 700;
}

.login-split-desc {
    margin: 0 0 1.75rem;
    font-size: 1.02rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
}

.login-split-copy {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
}

.login-split-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    height: 100%;
    padding: 2rem;
    background: #f4f7fb;
    overflow: visible;
}

.login-panel {
    width: min(100%, 440px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    overflow: visible;
}

.login-panel-head {
    padding: 1.75rem 1.75rem 0;
}

.login-panel-head h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    color: #0f172a;
}

.login-panel-head p {
    margin: 0;
    color: #64748b;
    line-height: 1.55;
}

.login-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 1.25rem 1.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    overflow: visible;
}

.login-tab {
    appearance: none;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0.65rem 0.85rem;
    border-radius: 10px 10px 0 0;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.login-tab.is-active {
    color: #1d4ed8;
    background: #f8fbff;
    border-bottom-color: #2563eb;
}

.login-panel-body {
    padding: 1.5rem 1.75rem 1.75rem;
    display: grid;
    grid-template-columns: 1fr;
}

.login-pane {
    grid-column: 1;
    grid-row: 1;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.login-pane.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.login-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
}

.login-input-wrap {
    position: relative;
}

.login-input,
.login-panel select,
.login-panel input[type="password"]:not(.login-input),
.login-panel input[type="text"]:not(.login-input) {
    width: 100%;
    padding: 0.82rem 0.95rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #0f172a;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-input:focus,
.login-panel select:focus,
.login-panel input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-input-wrap .login-input {
    padding-right: 2.8rem;
}

.login-toggle-password {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    transform: translateY(-50%);
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #64748b;
    cursor: pointer;
}

.login-toggle-password svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: currentColor;
}

.login-field-hint {
    display: block;
    margin-top: 0.35rem;
}

.login-form-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.login-link {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.login-link:hover {
    text-decoration: underline;
}

.login-submit {
    min-height: 46px;
    border-radius: 10px;
    font-weight: 700;
}

.login-page .btn-primary {
    background: #2563eb;
    border: none;
}

.login-page .btn-primary:hover {
    background: #1d4ed8;
}

.login-meta {
    margin-top: 0.25rem;
    text-align: center;
    font-size: 0.76rem;
    color: #94a3b8;
}

.login-alert {
    margin: 0 1.75rem;
    margin-top: 1rem;
}

.login-pane-desc {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.92rem;
    line-height: 1.55;
}

.login-pane .form-group {
    margin-bottom: 0.85rem;
}

.login-pane .form-group:last-of-type {
    margin-bottom: 1rem;
}

.ponto-buttons {
    display: flex;
    gap: 0.65rem;
}

.ponto-buttons .btn {
    flex: 1;
}

.login-compact-footer {
    width: min(100%, 440px);
    margin-top: 1rem;
    text-align: center;
}

.login-compact-footer p {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.5;
    color: #64748b;
}

.login-offline-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(155deg, #0c1222 0%, #1a2744 42%, #0f172a 100%);
    text-align: center;
    padding: 2rem;
}

.login-offline-overlay.is-hidden {
    display: none;
}

.login-offline-title {
    margin: 0;
    font-size: clamp(2.5rem, 10vw, 5.5rem);
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #ffffff;
    line-height: 1.05;
}

.login-offline-sub {
    margin: 1rem 0 0;
    font-size: clamp(0.9rem, 2.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.login-offline-unlock {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 72px;
    height: 72px;
    z-index: 5001;
    background: transparent;
    border: none;
    opacity: 0;
}

.login-page--simple .login-split {
    grid-template-columns: 1fr;
}

.login-page--simple .login-split-brand {
    display: none;
}

@media (max-width: 960px) {
    .login-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    .login-split {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
    }

    .login-split-brand {
        min-height: auto;
        height: auto;
    }

    .login-split-main {
        min-height: auto;
        height: auto;
    }

    .login-split-copy {
        display: none;
    }

    .login-split-main {
        padding: 1.25rem 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .login-panel-head,
    .login-tabs,
    .login-panel-body {
        padding-left: 1.15rem;
        padding-right: 1.15rem;
    }

    .login-alert {
        margin-left: 1.15rem;
        margin-right: 1.15rem;
    }
}
