﻿:root {
    --ideco-blue: #0758d9;
    --ideco-blue-dark: #0347b8;
    --ideco-blue-light: #edf5ff;
    --ideco-navy: #102142;
    --ideco-text: #65758f;
    --ideco-border: #d8e2ef;
    --ideco-bg: #f4f8fd;
    --ideco-danger: #dc3545;
    --ideco-success: #178957;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    font-family: "Tajawal", sans-serif;
    color: var(--ideco-navy);
    background: var(--ideco-bg);
}

/* =========================
   Main page
========================= */

.recovery-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient( 180deg, rgba(255, 255, 255, 0.96) 0%, rgba(244, 248, 253, 0.95) 100% );
}

    .recovery-page::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient( 180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.72) ), url("/images/electricity-towers.jpg") center top / cover no-repeat;
        opacity: 0.13;
        pointer-events: none;
    }

    .recovery-page::after {
        content: "";
        position: absolute;
        top: 105px;
        left: -5%;
        width: 110%;
        height: 180px;
        background: radial-gradient( ellipse at center, rgba(7, 88, 217, 0.08), transparent 68% );
        pointer-events: none;
    }

.recovery-shell {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 790px;
    margin: 0 auto;
    padding: 25px 24px 45px;
}

/* =========================
   Header
========================= */

.recovery-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 105px;
    margin-bottom: 22px;
}

.brand-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

/*.brand-logo {
    width: 76px;
    height: 76px;
    object-fit: contain;
}*/

.brand-content {
    text-align: right;
}

.brand-name {
    margin: 0 0 5px;
    color: var(--ideco-navy);
    font-size: 24px;
    font-weight: 800;
}

.brand-slogan {
    margin: 0;
    color: var(--ideco-blue);
    font-size: 13px;
    font-weight: 700;
}

/* =========================
   Card
========================= */

.recovery-card {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
    padding: 40px 48px;
    border: 1px solid rgba(7, 88, 217, 0.12);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 28px 75px rgba(18, 45, 83, 0.12), 0 8px 24px rgba(18, 45, 83, 0.06);
    backdrop-filter: blur(12px);
}

.recovery-icon {
    position: relative;
    width: 105px;
    height: 105px;
    margin: 0 auto 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--ideco-blue);
    font-size: 43px;
    background: linear-gradient( 145deg, #ffffff, #eaf3ff );
    box-shadow: inset 0 0 0 12px rgba(7, 88, 217, 0.04), 0 12px 35px rgba(7, 88, 217, 0.12);
}

.recovery-icon-badge {
    position: absolute;
    top: -2px;
    left: 4px;
    width: 35px;
    height: 35px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: var(--ideco-blue);
    font-size: 19px;
    font-weight: 800;
    background: #dceaff;
}

.recovery-title {
    margin: 0 0 10px;
    color: var(--ideco-navy);
    font-size: 29px;
    font-weight: 800;
    text-align: center;
}

.recovery-description {
    max-width: 470px;
    margin: 0 auto 29px;
    color: var(--ideco-text);
    font-size: 15px;
    line-height: 1.9;
    text-align: center;
}

/* =========================
   Steps
========================= */

.steps-wrapper {
    display: flex;
    align-items: flex-start;
    margin: 10px 0 35px;
    direction: rtl;
}

.step-item {
    position: relative;
    flex: 1;
    text-align: center;
}

.step-circle {
    position: relative;
    z-index: 2;
    width: 39px;
    height: 39px;
    margin: 0 auto 8px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #8b99ad;
    font-size: 15px;
    font-weight: 800;
    background: #edf1f6;
}

.step-item.active .step-circle,
.step-item.completed .step-circle {
    color: #ffffff;
    background: linear-gradient( 135deg, var(--ideco-blue), var(--ideco-blue-dark) );
    box-shadow: 0 8px 18px rgba(7, 88, 217, 0.23);
}

.step-title {
    color: #8b99ad;
    font-size: 12px;
    font-weight: 700;
}

.step-item.active .step-title,
.step-item.completed .step-title {
    color: var(--ideco-blue);
}

.step-connector {
    flex: 0.65;
    height: 2px;
    margin-top: 19px;
    background: repeating-linear-gradient( to left, #d2dce8 0, #d2dce8 6px, transparent 6px, transparent 11px );
}

/* =========================
   Form
========================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    color: var(--ideco-navy);
    font-size: 15px;
    font-weight: 800;
}

.phone-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 59px;
    overflow: hidden;
    border: 1px solid var(--ideco-border);
    border-radius: 13px;
    background: #ffffff;
    transition: 0.25s ease;
}

    .phone-input-wrapper:focus-within {
        border-color: var(--ideco-blue);
        box-shadow: 0 0 0 4px rgba(7, 88, 217, 0.08);
    }

.phone-prefix {
    min-width: 115px;
    height: 59px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    direction: ltr;
    border-left: 1px solid var(--ideco-border);
    color: var(--ideco-navy);
    font-size: 15px;
    font-weight: 700;
    background: #f9fbfe;
}

    .phone-prefix img {
        width: 24px;
        height: 18px;
        object-fit: cover;
        border-radius: 3px;
    }

.phone-input {
    flex: 1;
    height: 57px;
    min-width: 0;
    padding: 10px 17px 10px 47px;
    direction: ltr;
    border: 0;
    outline: none;
    color: var(--ideco-navy);
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    background: transparent;
    border: 1px solid #ceddea;
}

    .phone-input::placeholder {
        color: #a4afbe;
        font-weight: 500;
    }

.phone-icon {
    position: absolute;
    left: 18px;
    color: var(--ideco-blue);
    font-size: 18px;
}

.field-note {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 9px;
    color: #8795a9;
    font-size: 12px;
}

    .field-note i {
        color: #7890ae;
    }

.validation-message {
    display: block;
    margin-top: 8px;
    color: var(--ideco-danger);
    font-size: 12px;
    font-weight: 700;
}

.validation-summary-valid {
    display: none;
}

.validation-summary-errors {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid rgba(220, 53, 69, 0.18);
    border-radius: 11px;
    color: #b52b39;
    font-size: 13px;
    font-weight: 600;
    background: #fff4f5;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-right: 18px;
    }

/* =========================
   Buttons
========================= */

.primary-button {
    width: 100%;
    height: 59px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 800;
    background: linear-gradient( 100deg, var(--ideco-blue), var(--ideco-blue-dark) );
    box-shadow: 0 14px 28px rgba(7, 88, 217, 0.22);
    cursor: pointer;
    transition: 0.25s ease;
}

    .primary-button:hover {
        transform: translateY(-2px);
        box-shadow: 0 17px 32px rgba(7, 88, 217, 0.28);
    }

    .primary-button:disabled {
        cursor: not-allowed;
        opacity: 0.7;
        transform: none;
    }

.button-spinner {
    width: 20px;
    height: 20px;
    display: none;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.primary-button.loading .button-spinner {
    display: inline-block;
}

.primary-button.loading .button-main-icon {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================
   Security note
========================= */

.security-note {
    margin-top: 24px;
    padding: 15px 17px;
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(7, 88, 217, 0.13);
    border-radius: 11px;
    color: var(--ideco-blue-dark);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.7;
    background: #eef5ff;
}

    .security-note i {
        flex-shrink: 0;
        font-size: 17px;
    }

.bottom-link-wrapper {
    margin-top: 27px;
    text-align: center;
}

.bottom-link {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--ideco-blue);
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
}

    .bottom-link:hover {
        color: var(--ideco-blue-dark);
    }

/* =========================
   OTP
========================= */

.otp-phone {
    margin: -19px 0 28px;
    direction: ltr;
    color: var(--ideco-blue);
    font-size: 16px;
    font-weight: 800;
    text-align: center;
}

.success-message {
    margin-bottom: 19px;
    padding: 13px 16px;
    border: 1px solid rgba(23, 137, 87, 0.15);
    border-radius: 11px;
    color: var(--ideco-success);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    background: #effcf6;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 13px;
    margin: 30px 0 18px;
    direction: ltr;
}

.otp-box {
    width: 68px;
    height: 70px;
    border: 1px solid var(--ideco-border);
    border-radius: 11px;
    outline: none;
    color: var(--ideco-navy);
    font-family: inherit;
    font-size: 25px;
    font-weight: 800;
    text-align: center;
    background: #ffffff;
    transition: 0.2s ease;
}

    .otp-box:focus,
    .otp-box.filled {
        border-color: var(--ideco-blue);
        box-shadow: 0 0 0 4px rgba(7, 88, 217, 0.08);
    }

.otp-error {
    min-height: 20px;
    text-align: center;
}

.resend-area {
    margin: 24px 0 5px;
    color: #7b899e;
    font-size: 14px;
    text-align: center;
}

.timer-text {
    direction: ltr;
    color: var(--ideco-blue);
    font-weight: 800;
}

.resend-divider {
    height: 1px;
    margin: 25px 0 19px;
    background: #e4eaf1;
}

.resend-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: auto;
    padding: 5px;
    border: 0;
    color: var(--ideco-blue);
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    background: transparent;
    cursor: pointer;
}

    .resend-button:disabled {
        color: #a2adbc;
        cursor: not-allowed;
    }

/* =========================
   Responsive
========================= */

@media (max-width: 700px) {
    .recovery-shell {
        padding: 18px 14px 35px;
    }

    .recovery-header {
        min-height: 90px;
        margin-bottom: 15px;
    }

/*    .brand-logo {
        width: 62px;
        height: 62px;
    }*/

    .brand-name {
        font-size: 19px;
    }

    .brand-slogan {
        font-size: 11px;
    }

    .recovery-card {
        padding: 32px 22px;
        border-radius: 20px;
    }

    .recovery-icon {
        width: 88px;
        height: 88px;
        font-size: 36px;
    }

    .recovery-title {
        font-size: 25px;
    }

    .recovery-description {
        font-size: 14px;
    }

    .step-title {
        font-size: 10px;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-box {
        width: 53px;
        height: 59px;
        font-size: 22px;
    }
}

@media (max-width: 390px) {
    .recovery-card {
        padding: 29px 16px;
    }

    .phone-prefix {
        min-width: 98px;
    }

    .otp-box {
        width: 47px;
        height: 56px;
    }
}

.otp-form-group {
    margin-top: 28px;
}

.otp-label {
    display: block;
    margin-bottom: 14px;
    text-align: right;
}

.otp-inputs-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 8px 0 12px;
}

.otp-box {
    width: 58px;
    height: 62px;
    border: 1.5px solid #d7e0ec;
    border-radius: 14px;
    background: #ffffff;
    color: #10254a;
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    outline: none;
    caret-color: #0b58d5;
    box-shadow: 0 5px 14px rgba(23, 57, 111, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

    .otp-box:hover {
        border-color: #aabbd3;
    }

    .otp-box:focus {
        border-color: #0759d6;
        background: #f8fbff;
        box-shadow: 0 0 0 4px rgba(7, 89, 214, 0.10), 0 8px 20px rgba(7, 89, 214, 0.10);
        transform: translateY(-2px);
    }

    .otp-box:not(:placeholder-shown) {
        border-color: #0759d6;
    }

.otp-box-error {
    border-color: #dc3545 !important;
    background: #fff9fa;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.08);
}

.otp-custom-error,
.otp-validation-message {
    display: block;
    min-height: 20px;
    margin-top: 7px;
    color: #dc3545;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.validation-summary-errors {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #ffd1d5;
    border-radius: 12px;
    background: #fff5f6;
    color: #b42332;
    font-size: 13px;
}

    .validation-summary-errors:empty,
    .validation-summary-valid {
        display: none;
    }

@media (max-width: 480px) {
    .otp-inputs-wrapper {
        gap: 8px;
    }

    .otp-box {
        width: 48px;
        height: 56px;
        border-radius: 12px;
        font-size: 21px;
    }
}

@media (max-width: 360px) {
    .otp-inputs-wrapper {
        gap: 6px;
    }

    .otp-box {
        width: 43px;
        height: 52px;
    }
}

.password-field-group {
    margin-bottom: 22px;
}

.password-input-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    height: 58px;
    padding-right: 52px;
    padding-left: 52px;
    border: 1.5px solid #d8e2ef;
    border-radius: 15px;
    background: #ffffff;
    color: #10254a;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    text-align: right;
    direction: rtl;
    outline: none;
    box-shadow: 0 5px 16px rgba(28, 62, 111, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    text-align: left;
}

    .password-input::placeholder {
        color: #9ba9bd;
        font-size: 14px;
        font-weight: 400;
    }

    .password-input:hover {
        border-color: #b7c7dc;
    }

    .password-input:focus {
        border-color: #075bd8;
        background: #fbfdff;
        box-shadow: 0 0 0 4px rgba(7, 91, 216, 0.09), 0 8px 22px rgba(7, 91, 216, 0.08);
    }

.password-start-icon {
    position: absolute;
    right: 18px;
    z-index: 2;
    color: #7486a1;
    font-size: 16px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.password-input-container:focus-within
.password-start-icon {
    color: #075bd8;
}

.password-toggle-button {
    position: absolute;
    left: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #7486a1;
    font-size: 17px;
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease;
}

    .password-toggle-button:hover {
        color: #075bd8;
        background: #edf4ff;
    }

    .password-toggle-button:focus {
        outline: none;
        color: #075bd8;
        background: #edf4ff;
    }

.password-input.input-validation-error {
    border-color: #dc3545;
    background: #fffafb;
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.07);
}

.validation-message {
    display: block;
    min-height: 20px;
    margin-top: 7px;
    color: #dc3545;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
}

.password-rules-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 2px;
    margin-bottom: 22px;
    padding: 12px 14px;
    border: 1px solid #e1e9f4;
    border-radius: 13px;
    background: #f7faff;
    color: #7789a3;
    font-size: 12px;
    line-height: 1.8;
}

    .password-rules-box i {
        margin-top: 4px;
        color: #075bd8;
        font-size: 14px;
    }

.validation-summary-errors {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #ffd1d5;
    border-radius: 12px;
    background: #fff5f6;
    color: #b42332;
    font-size: 13px;
}

    .validation-summary-errors:empty,
    .validation-summary-valid {
        display: none;
    }

@media (max-width: 480px) {

    .password-input {
        height: 55px;
        padding-right: 48px;
        padding-left: 48px;
        border-radius: 13px;
    }

    .password-start-icon {
        right: 16px;
    }

    .password-toggle-button {
        left: 8px;
        width: 38px;
        height: 38px;
    }
}
