/* ============================================================
   ROOT VARIABLES  — matches login_register.css exactly
============================================================ */
:root {
    --green: #649208;
    --green-dark: #21330B;
    --green-light: #EDFFE8;
    --green-mid: #d6e7c4;
    --primary: #649208;
    --primary-dark: #21330B;
    --blue: #0d5fa8;
    --blue-dark: #082f57;
    --dark: #212529;
    --success: #28a745;
    --error: #dc3545;
    --border-radius: 8px;
}

/* ============================================================
   RESET
============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================================
   BODY
============================================================ */
body {
    font-family: "M PLUS 1",'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f2f2f2;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ============================================================
   CARD
============================================================ */
.card {
    width: 100%;
    max-width: 1150px;
    min-height: 640px;
    background: white;
    display: flex;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* ============================================================
   LEFT PANEL
   FIX: align-items: center  (was flex-start → content floated top)
   FIX: removed overflow:hidden so nothing clips
============================================================ */
.left-panel {
    flex: 0 0 54%;
    background: #EDFFE8;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    border: 3px solid yellowgreen;
    border-radius: 20px 0 0 20px;
    /* padding: 40px 30px; */
}

.left-center {
    width: 100%;
    max-width: 380px;
    text-align: center;
}

/* ============================================================
   RIGHT PANEL
============================================================ */
.right-panel {
    flex: 0 0 46%;
    background-color: #d6e7c4;
    background-image: url("../Rectangle3.png");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 33% center;
    border-radius: 0 18px 18px 0;    /* ✅ rounds right side of card */
    border: 3px solid yellowgreen;
}

/* ============================================================
   LOGO
============================================================ */
.logo-block {
    margin-bottom: 24px;
}

.logo-block img {
    max-width: min(200px, 20%);
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ============================================================
   CONTAINER
   FIX: removed margin-top: 20% which caused overflow
============================================================ */
.container {
    width: 100%;
    padding: 0;
    margin-top: 20%;                    /* ✅ was 20% — caused overflow */
}

/* ============================================================
   TYPOGRAPHY
============================================================ */
h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 22px;
    color: var(--dark);
    text-align: center;
}

/* ============================================================
   LABELS
============================================================ */
label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    text-align: left;
    padding-left: 2px;
}

/* ============================================================
   INPUTS
   FIX: width: 100% (was 300px fixed — broke responsive layout)
============================================================ */
input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;                      /* ✅ was fixed 300px */
    height: 48px;
    border-radius: 8px;
    border: 2px solid #1E1E1E;
    background: #FFFFFF;
    padding: 12px 16px;
    box-sizing: border-box;
    box-shadow: 4px 4px 0px 0px #000000;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    margin-bottom: 16px;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
    box-shadow: 2px 2px 0px 0px #000000;
    border-color: var(--green);
}

input::placeholder {
    color: #999;
}

/* ============================================================
   INPUT WRAPPER  (label + input group)
============================================================ */
.input-wrapper {
    margin-bottom: 16px;
    text-align: left;
}

.input-wrapper label {
    margin-bottom: 8px;
}

/* ============================================================
   INPUT WITH ICON
   FIX: width: 100% (was 115% — caused horizontal overflow)
============================================================ */
.input-with-icon {
    position: relative;
    width: 100%;                      /* ✅ was 115% — caused card overflow */
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    pointer-events: none;
    z-index: 2;
}

.input-with-icon input {
    padding-left: 44px;
    margin-bottom: 0;
}

/* ============================================================
   PASSWORD WRAPPER + EYE TOGGLE  (reset password section)
============================================================ */
.password-wrapper {
    position: relative;
    margin-bottom: 16px;
}

.password-wrapper input {
    width: 100%;
    margin-bottom: 0;
    padding-right: 46px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 10;
    display: block;
    color: #555;
    line-height: 1;
}

.toggle-password i { font-size: 18px; color: #555; }
.toggle-password:hover i { color: var(--green); }

/* ============================================================
   PRIMARY BUTTON  — Send Reset Link
   FIX: width: 100% (was 300px fixed)
============================================================ */
.buttom-send-link,
.button-primary,
button[type="submit"] {
    width: 100%;                      /* ✅ was 300px fixed */
    height: 56px;
    border-radius: 40px;
    padding: 0 24px;
    border: none;
    background: #649208;
    box-shadow: 4px 4px 0px 0px #21330B;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.buttom-send-link:hover,
.button-primary:hover,
button[type="submit"]:hover {
    box-shadow: none;
    transform: translate(4px, 4px);
}

.buttom-send-link:disabled,
button[type="submit"]:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* ============================================================
   BACK TO LOGIN LINK
============================================================ */
.back-login {
    margin-top: 16px;
    text-align: center;
}

.back-to-login {
    display: inline-flex;
    align-items: center;

    width: 176px;
    height: 30px;

    padding-left: 8px;
    padding-right: 8px;
    gap: 16px;

    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    color: black;
    white-space: nowrap;

    transition: gap .35s cubic-bezier(.2,.8,.2,1);
}

.back-arrow{
    width:16px;
    height:16px;
    transition: transform .5s cubic-bezier(.2,.8,.2,1);
}


.back-to-login:hover{
    gap:4px;
}

.back-to-login:hover .back-arrow{
    transform: translateX(-6px);
}

.back-to-login{
    cursor:pointer;
}
/* ============================================================
   MESSAGE / ERROR
============================================================ */
.message {
    color: var(--success);
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    font-size: 14px;
}

.error {
    color: var(--error);
    text-align: center;
    margin-top: 12px;
    font-weight: 500;
    font-size: 14px;
}

/* ============================================================
   PASSWORD RULES BOX
============================================================ */
.reset-pass-rules-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1010;
    padding: 15px;
    width: min(280px, 90vw);
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    color: #333;
}

.reset-pass-rules-box ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.reset-pass-rules-box li {
    padding: 4px 0;
    font-size: 13px;
}

.reset-pass-rules-box li::before {
    content: "✘ ";
    color: var(--error);
}

.reset-pass-rules-box li.valid {
    color: var(--primary);
}

.reset-pass-rules-box li.valid::before {
    content: "✔ ";
    color: var(--primary);
}

.reset-pass-rules-box li.invalid {
    color: var(--error);
}

/* ============================================================
   OVERLAY
============================================================ */
.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(5px);
}

/* ============================================================
   EMAIL SENT SUCCESS POPUP
   FIX: was overflowing outside card because card had overflow:hidden
        This is position:fixed so it's fine — card overflow removed
============================================================ */
.success-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #dff0d8;
    color: #3c763d;
    padding: 30px 40px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    max-width: min(400px, 90vw);
    width: 90%;
    animation: fadeIn 0.5s ease-out;
    border-left: 5px solid #28a745;
}

.success-popup::before {
    content: "✓";
    display: inline-block;
    margin-right: 10px;
    font-size: 32px;
    vertical-align: middle;
    color: #28a745;
}

.success-popup-content {
    display: inline-block;
    vertical-align: middle;
}

.success-popup-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
}

.success-popup-content p {
    margin: 0;
    font-size: 16px;
}

/* ============================================================
   PASSWORD RESET SUCCESS POPUP  (small modal)
============================================================ */
.reset-success-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    text-align: center;
    max-width: min(380px, 92vw);
    width: 90%;
    animation: fadeIn 0.4s ease-out;
    border-top: 4px solid var(--primary);
}

.reset-success-content {
    padding: 10px;
}

.reset-success-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 12px;
}

.reset-success-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary);
}

.reset-success-message {
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    font-size: 15px;
}

.reset-continue-btn {
    width: 100%;
    height: 52px;
    border-radius: 40px;
    padding: 0 24px;
    background: #649208;
    box-shadow: 4px 4px 0px 0px #21330B;
    color: white;
    border: none;
    font-size: 15px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.reset-continue-btn:hover {
    box-shadow: none;
    transform: translate(4px, 4px);
}

/* ============================================================
   PASSWORD RESET SUCCESS CARD  (large card overlay)
============================================================ */
.password-reset-success-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(700px, 92vw);
    max-height: 90vh;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    padding: 28px 24px;
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    overflow: auto;
}

.password-reset-success-card .reset-success-icon {
    font-size: 60px;
    background: #52c41a;
    color: white;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.password-reset-success-card .reset-success-content h3 {
    margin: 0 0 8px;
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 600;
}

.password-reset-success-card .reset-success-content p {
    margin: 0;
    font-size: clamp(14px, 2vw, 22px);
    color: #595959;
}

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeIn {
    from { opacity: 0; transform: translate(-50%, -60%); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* ============================================================
   ████████  RESPONSIVE BREAKPOINTS  ████████
   Matches login_register.css breakpoints exactly
============================================================ */

/* ── ≤ 1100px: stack panels vertically ── */
@media (max-width: 1100px) {
    .card {
        flex-direction: column;
        max-width: 580px;
        min-height: unset;
        margin: 0 auto;
        border-radius: 18px;
    }

    .left-panel {
        flex: none;
        width: 100%;
        border-radius: 18px 18px 0 0;
        padding: 0px 36px 28px 30px;
        align-items: flex-start;
    }

    .right-panel {
        flex: none;
        width: 100%;
        min-height: 260px;
        border-radius: 0 0 18px 18px;
        background-position: center top;
    }

    .left-center {
        width: 100%;
        max-width: 480px;
    }
}

/* ── ≤ 768px: tablet ── */
@media (max-width: 768px) {
    body {
        padding: 12px;
        align-items: flex-start;
    }

    .card {
        max-width: 100%;
        border-radius: 14px;
    }

    .left-panel {
        padding:  0px 28px 20px 24px;
        border-radius: 12px 12px 0 0;
    }

    .right-panel {
        min-height: 200px;
        border-radius: 0 0 12px 12px;
    }

    h2 { font-size: 21px; margin-bottom: 18px; }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        height: 46px;
        font-size: 14px;
        margin-bottom: 12px;
    }

    .buttom-send-link,
    .button-primary,
    button[type="submit"] {
        height: 50px;
        font-size: 15px;
    }

    .reset-continue-btn { height: 48px; font-size: 14px; }

    .back-to-login { font-size: 14px; }
}

/* ── ≤ 600px: large phone ── */
@media (max-width: 600px) {
    .left-panel  { padding: 0px 24px 16px 20px; }
    .right-panel { min-height: 180px; }
    h2           { font-size: 20px; }
}

/* ── ≤ 480px: phone ── */
@media (max-width: 480px) {
    body { padding: 8px; }

    .card { border-radius: 12px; }

    .left-panel {
        padding: 0px 20px 12px 18px;
        border-radius: 10px 10px 0 0;
    }

    .right-panel {
        min-height: 150px;
        border-radius: 0 0 10px 10px;
    }

    h2 { font-size: 19px; margin-bottom: 16px; }

    .logo-block { margin-bottom: 18px; }

    .logo-block img { max-width: min(160px, 25%); }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        height: 44px;
        font-size: 13px;
        padding: 10px 12px;
        margin-bottom: 11px;
        box-shadow: 3px 3px 0 #000;
    }

    .input-with-icon input { padding-left: 40px; }
    .input-icon { width: 16px; height: 16px; left: 12px; }

    .password-wrapper input { padding-right: 40px; }

    .buttom-send-link,
    .button-primary,
    button[type="submit"] {
        height: 48px;
        font-size: 14px;
        padding: 0 14px;
        box-shadow: 3px 3px 0 #21330B;
    }

    .reset-continue-btn {
        height: 46px;
        font-size: 13px;
        box-shadow: 3px 3px 0 #21330B;
    }

    .back-to-login { font-size: 13px; }

    .password-reset-success-card .reset-success-icon {
        width: 72px;
        height: 72px;
        font-size: 40px;
    }
}

/* ── ≤ 400px: small phone ── */
@media (max-width: 400px) {
    body { padding: 6px; }

    .left-panel  { padding: 0px 16px 10px 14px; }
    .right-panel { min-height: 120px; }

    h2 { font-size: 17px; margin-bottom: 14px; }

    .logo-block img { max-width: min(140px, 10%); }

    input[type="text"],
    input[type="email"],
    input[type="password"] {
        height: 42px;
        font-size: 12px;
        padding: 8px 10px;
        box-shadow: 2px 2px 0 #000;
    }

    .buttom-send-link,
    .button-primary,
    button[type="submit"] {
        height: 46px;
        font-size: 13px;
        box-shadow: 2px 2px 0 #21330B;
    }

    .reset-continue-btn {
        height: 43px;
        font-size: 13px;
        box-shadow: 2px 2px 0 #21330B;
    }

    .back-to-login { font-size: 12px; }

    .password-reset-success-card .reset-success-icon {
        width: 60px;
        height: 60px;
        font-size: 32px;
    }
}

/* ── ≤ 360px: very small ── */
@media (max-width: 360px) {
    .left-panel { padding:  0px 14px 8px 12px; }

    h2 { font-size: 16px; }

    input[type="text"],
    input[type="email"],
    input[type="password"] { height: 40px; font-size: 12px; }

    .buttom-send-link,
    .button-primary,
    button[type="submit"],
    .reset-continue-btn { height: 43px; font-size: 12px; }
}