:root {
    --panel-bg: #ffffff;
    --radius-xl: 24px;
    --shadow-soft: 0 12px 24px rgba(15, 23, 42, 0.08);
    --accent: #8b5cf6;
    --accent-hover: #7c3aed;
    --transition-fast: 0.15s ease;
}

.forgot-wrapper {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    padding: 32px 22px;
    display: grid;
    grid-template-columns: 1.4fr 1.1fr;
    /* same ratio as design */
    gap: 32px;
}

/* left content */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-header {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-top: 8px;
}

.logo {
    font-size: 22px;
    font-weight: 600;
    color: #f9fafb;
}

.hero-text {
    max-width: 360px;
    font-size: 18px;
    line-height: 1.5;
    margin-bottom: 70px;
    color: #f9fafb;
}

/* right card */
.panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* container holding back link and card */
.panel-shell {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    /* space between link and card */
}

.back-link {
    position: relative !important;
    /* Override absolute from style.css */
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: inline-flex !important;
    align-items: center;
    font-size: 13px;
    color: #e5e7eb !important;
    /* Brighter white-gray for visibility */
    text-decoration: none;
    cursor: pointer;
    margin-top: 14px;
  
}

.back-link:hover {
    color: #ffffff !important;
    transform: translateX(-3px) !important;
}

.back-link svg {
    transition: transform var(--transition-fast);
    stroke: currentColor;
    width: 14px;
    /* Slightly smaller to match Figma proportions */
    height: 14px;
}



/* desktop: taller form card matching screenshot */
.panel-inner {
    width: 100%;
    max-width: 500px;
    min-height: 590px;
    background: var(--panel-bg);
    color: #0f172a;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-soft);
    padding: 52px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.panel-inner h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 600;
    color: #111827;
}

.panel-inner p {
    margin: 0 0 26px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* form */
.forgot-form {
    margin-top: 8px;
}

.forgot-form label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    color: #374151;
    font-weight: 500;
}

.input-wrap {
    position: relative;
    margin-bottom: 26px;
}

.input-wrap .leading-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.input-wrap input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    font-size: 14px;
    outline: none;
    transition: border-color var(--transition-fast),
        box-shadow var(--transition-fast);
    font-family: inherit;
}

.input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px #895eff;
}

.input-wrap input.is-invalid {
    border-color: #dc3545;
}

.input-wrap .invalid-feedback {
    display: block;
    color: #dc3545;
    font-size: 12px;
    margin-top: 6px;
}

.btn-primary {
    width: 100%;
    margin-top: 0px;
    padding: 13px 20px;
    border-radius: 10px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
    font-family: inherit;
}

.btn-primary:hover {
    background: #895eff;
    transform: translateY(-1px);
}

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

}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alert styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.btn-close {
    float: right;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    padding: 0;
    margin-left: 12px;
}

.btn-close:hover {
    opacity: 1;
}

/* RESPONSIVE BREAKPOINTS */
/* tablet and small laptop: stack hero above card but keep spacing */
@media (max-width: 1024px) {
    .forgot-wrapper {
        grid-template-columns: 1fr;
        padding: 24px 24px 32px;
    }

    .hero {
        align-items: center;
        text-align: center;
    }

    .hero-text {
        max-width: 520px;
        margin-bottom: 40px;
    }

    .panel {
        justify-content: center;
    }

    .panel-shell {
        flex-direction: column;
        /* link above card on smaller screens */
        align-items: flex-start;
    }

    .back-link {
        margin-bottom: 12px;
        margin-top: 0;
    }

    .panel-inner {
        max-width: 520px;
        min-height: 380px;
        /* slightly smaller but still tall */
        padding: 40px 36px;
    }

}


@media (max-width: 1024px) and (min-width: 769px) {
    .back-link {
        margin-bottom: 12px;
        margin-top: 0;
    }
}

/* mobile: full-width card, tighter paddings */
@media (max-width: 640px) {
    .forgot-wrapper {
        padding: 16px 16px 24px;
    }

    .hero-header {
        width: 100%;
        font-size: 13px;
    }

    .hero-text {
        font-size: 16px;
    }

    .panel-inner {
        max-width: 100%;
        min-height: 360px;
        padding: 26px 20px 30px;
        border-radius: 20px;
    }

    .panel-inner h1 {
        font-size: 22px;
    }

    .back-link {
        margin-bottom: 12px;
        margin-top: 0;
    }
}

/* iPad Mini / similar tablet portrait: bigger text + better alignment  */
@media (min-width: 700px) and (max-width: 900px) and (orientation: portrait) {
    .forgot-wrapper {
        max-width: 900px;
        padding: 32px 40px 40px;
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hero {
        align-items: center;
        text-align: center;
    }

    .hero-header {
        font-size: 15px;
    }

    .hero-text {
        max-width: 460px;
        margin-top: 40px;
        margin-bottom: 36px;
        font-size: 20px;
        /* bigger hero text */
        line-height: 1.6;
    }

    .panel {
        justify-content: center;
    }

    .panel-shell {
        width: 100%;
        max-width: 540px;
        flex-direction: column;
        /* link above card */
        align-items: flex-start;
    }

    .back-link {
        margin-bottom: 12px;
        margin-top: 0;
        font-size: 15px;
    }

    .panel-inner {
        width: 100%;
        max-width: 540px;
        min-height: 400px;
        padding: 44px 36px;
    }

    .panel-inner h1 {
        font-size: 28px;
        /* bigger title */
    }

    .panel-inner p {
        font-size: 15px;
    }

    .forgot-form label {
        font-size: 14px;
    }

    .input-wrap input {
        font-size: 15px;
        padding: 12px 18px 12px 46px;
    }

    .btn-primary {
        font-size: 16px;
        padding: 14px 22px;
    }
}