/* ============================================================================
   LOGIN - PREMIUM NATIVE APP STYLE - BRAND COLORS
   ============================================================================ */
html,
body {
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    background-color: #f7f7f7;

    overflow-x: hidden !important;

    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    /* Safari/Chrome */
    -ms-user-select: none;
    /* IE/Edge */
}

/* Header Link Space */
#header-link {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.login-container {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    position: relative;
    margin: 20px auto;
}

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

.login-header {
    background: linear-gradient(135deg, #f7f772 0%, #fefe57 100%);
    padding: 50px 20px 40px;
    text-align: center;
    color: #1c1c1c;
    position: relative;
    overflow: hidden;
}

.login-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.logo-circle {
    width: 90px;
    height: 90px;
    background: rgba(28, 28, 28, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    border: 3px solid rgba(28, 28, 28, 0.15);
}

.logo-circle i {
    font-size: 45px;
    color: #1c1c1c;
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: 32px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    color: #1c1c1c;
}

.login-header p {
    margin: 0;
    font-size: 15px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
    color: #2b2b2b;
}

/* ============================================================================
   FORM
   ============================================================================ */

#loginForm {
    padding: 0;
}

.form-content {
    padding: 32px 20px 20px;
}

.input-group {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.input-icon {
    width: 40px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 8px;
}

.input-wrapper {
    flex: 1;
    position: relative;
}

.input-wrapper input {
    width: 100%;
    height: 48px;
    padding: 16px 12px 8px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a1a;
    background: #fafafa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #fbff00;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(251, 255, 0, 0.15);
}

.input-wrapper label {
    position: absolute;
    left: 12px;
    top: 14px;
    font-size: 15px;
    color: #999;
    pointer-events: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.input-wrapper input:focus+label,
.input-wrapper input:not(:placeholder-shown)+label {
    top: 6px;
    font-size: 11px;
    color: #1c1c1c;
    font-weight: 600;
}

.input-hint {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding-left: 12px;
}

.input-check {
    width: 24px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 8px;
    opacity: 0;
    transition: all 0.3s ease;
}

.input-group.valid .input-check {
    opacity: 1;
}

.input-check i {
    font-size: 20px;
    color: #4caf50;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 8px;
    font-size: 18px;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #1c1c1c;
}

/* Forgot Password */
.forgot-password {
    text-align: right;
    margin-top: -8px;
    margin-bottom: 24px;
    padding-right: 52px;
}

.forgot-password a {
    font-size: 13px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
}

.forgot-password a:hover {
    color: #1c1c1c;
    text-decoration: underline;
}

/* ============================================================================
   FORM ACTIONS
   ============================================================================ */

.form-actions {
    padding: 20px;
    background: #fafafa;
}

.btn-primary {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    background: #1c1c1c;
    color: #fbff00;
    box-shadow: 0 4px 16px rgba(28, 28, 28, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(28, 28, 28, 0.4);
    transform: translateY(-2px);
    background: #030303;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    font-size: 20px;
}

/* ============================================================================
   FOOTER
   ============================================================================ */

.login-footer {
    padding: 20px;
    text-align: center;
    background: #fafafa;
    border-top: 1px solid #e0e0e0;
}

.login-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.login-footer a {
    color: #1c1c1c;
    font-weight: 700;
    text-decoration: none;
}

.login-footer a:hover {
    text-decoration: underline;
    color: #030303;
}

/* ============================================================================
   LOADING OVERLAY
   ============================================================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(251, 255, 0, 0.2);
    border-top-color: #fbff00;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: #fbff00;
    font-size: 16px;
    font-weight: 600;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 480px) {
    .login-container {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
        margin: 0;
    }

    .form-actions {
        position: sticky;
        bottom: 0;
        z-index: 10;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    }

    #header-link {
        max-width: 100%;
    }
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.input-group.error input {
    border-color: #f44336;
    animation: shake 0.5s;
}

.input-group.error .input-icon {
    color: #f44336;
}
/* ============================================================================
   REGISTER BUTTON IN LOGIN
   ============================================================================ */

.btn-register {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    height: 52px;
    background: linear-gradient(135deg, #f7f772 0%, #fefe57 100%);
    color: #1c1c1c;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(251, 255, 0, 0.3);
    transition: all 0.3s ease;
}

.btn-register:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(251, 255, 0, 0.4);
    background: linear-gradient(135deg, #fefe57 0%, #f7f772 100%);
}

.btn-register i {
    font-size: 20px;
}

/* ============================================================================
   HEADER BUTTON (SMALL)
   ============================================================================ */

.header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 16px;
    background: rgba(28, 28, 28, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(28, 28, 28, 0.2);
    border-radius: 20px;
    color: #1c1c1c;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.header-btn:hover {
    background: rgba(28, 28, 28, 0.25);
    border-color: rgba(28, 28, 28, 0.3);
    transform: translateY(-1px);
}

.header-btn i {
    font-size: 14px;
}

/* ============================================================================
   STEP WIZARD (Restablecer.html)
   ============================================================================ */

.step-container {
    transition: all 0.3s ease;
}

.hidden-step {
    display: none !important;
    opacity: 0;
}

.visible-step {
    display: block !important;
    opacity: 1;
    animation: slideDown 0.5s ease forwards;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}


/* ============================================================================
   OTP INPUTS (WhatsApp Style)
   ============================================================================ */

.otp-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 24px 0;
    max-width: 100%;
}

.otp-box {
    width: 45px;
    height: 55px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    background: #fafafa;
    color: #1c1c1c;
    transition: all 0.3s ease;
    padding: 0;
    outline: none;
    box-sizing: border-box; /* Fix sizing calculation */
    flex: 1; /* Allow shrinking */
    max-width: 45px; /* Don't get too big */
    min-width: 0; /* Allow shrinking below min-content */
}

.otp-box:focus {
    border-color: #fbff00;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(251, 255, 0, 0.15);
    transform: translateY(-2px);
}

@media (max-width: 360px) {
    .otp-inputs {
        gap: 4px; /* Reduce gap on very small screens */
    }
    .otp-box {
        font-size: 20px; /* Smaller font */
        height: 50px;
    }
}

