@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    background: linear-gradient(135deg, #f3f4f1 0%, #eef5e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-wrapper {
    width: min(1050px, 100%);
    min-height: 620px;
    background: #ffffff;
    border-radius: 22px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.14);
    border: 1px solid #d7e5cc;
}

.register-wrapper {
    min-height: 720px;
}

.auth-left {
    background: linear-gradient(135deg, rgba(49, 85, 22, 0.95), rgba(69, 107, 31, 0.92)),
    url("../images/Resto.webp");
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.brand-box h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 6px;
}

.brand-box p {
    font-size: 15px;
    opacity: 0.9;
}

.auth-left-content h2 {
    font-size: 38px;
    line-height: 1.2;
    margin-bottom: 14px;
}

.auth-left-content p {
    max-width: 430px;
    line-height: 1.6;
    opacity: 0.9;
}

.feature-list {
    margin-top: 28px;
    display: grid;
    gap: 12px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}

.feature-item i {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-right {
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    margin-bottom: 24px;
}

.form-header span {
    display: inline-block;
    background: #eef5e8;
    color: #315516;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.form-header h2 {
    color: #315516;
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
}

.form-header p {
    color: #666666;
    font-size: 14px;
}

.auth-alert {
    padding: 13px 15px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.auth-alert.error {
    background: #ffe5e5;
    color: #b00020;
    border: 1px solid #ff9e9e;
}

.auth-alert.success {
    background: #e9f8e4;
    color: #216b21;
    border: 1px solid #a9dda2;
}

.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-weight: 800;
    color: #315516;
    margin-bottom: 8px;
    font-size: 14px;
}

.input-box {
    height: 50px;
    border: 1px solid #dddddd;
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: #ffffff;
    transition: 0.2s ease;
}

.input-box:focus-within {
    border-color: #456b1f;
    box-shadow: 0 0 0 4px rgba(69, 107, 31, 0.12);
}

.input-box i {
    color: #456b1f;
    margin-right: 10px;
}

.input-box input {
    border: none;
    outline: none;
    width: 100%;
    height: 100%;
    font-size: 15px;
    color: #111111;
}


/* Password visibility button */


.input-box .toggle-password {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #456b1f;
    cursor: pointer;
    font-size: 18px;
}

.input-box .toggle-password i {
    margin: 0;
    padding: 0;
    color: #456b1f;
    font-size: 18px;
    line-height: 1;
}

.input-box .toggle-password:hover i {
    color: #315516;
}

/* Remove built-in password eye icon in Edge */
input[type="password"]::-ms-clear,
input[type="password"]::-ms-reveal {
    display: none;
}



.auth-submit {
    width: 100%;
    border: none;
    background: #456b1f;
    color: #ffffff;
    height: 52px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: 0.2s ease;
    margin-top: 8px;
}

.auth-submit:hover {
    background: #315516;
    transform: translateY(-1px);
}

.switch-text {
    margin-top: 24px;
    text-align: center;
    color: #666666;
    font-size: 14px;
}

.switch-text a {
    color: #456b1f;
    font-weight: 800;
    text-decoration: none;
}

.switch-text a:hover {
    text-decoration: underline;
}

.footer-note {
    margin-top: 26px;
    text-align: center;
    font-size: 12px;
    color: #888888;
}

@media (max-width: 900px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
    }

    .auth-left {
        min-height: 300px;
    }
}

@media (max-width: 560px) {
    body {
        padding: 14px;
    }

    .auth-left,
    .auth-right {
        padding: 30px 24px;
    }

    .auth-left-content h2,
    .form-header h2 {
        font-size: 28px;
    }
}

/* ==========================
   RESPONSIVE AUTH PAGES
========================== */

@media (max-width: 1024px) {
    .auth-wrapper {
        width: 95%;
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-left {
        min-height: 320px;
        padding: 36px;
    }

    .auth-right {
        padding: 42px 36px;
    }

    .auth-left-content h2 {
        font-size: 34px;
    }
}

@media (max-width: 768px) {
    body {
        align-items: flex-start;
        padding: 18px;
    }

    .auth-wrapper {
        width: 100%;
        border-radius: 18px;
    }

    .auth-left {
        min-height: 280px;
        padding: 30px;
    }

    .brand-box h1 {
        font-size: 28px;
    }

    .brand-box p {
        font-size: 13px;
    }

    .auth-left-content h2 {
        font-size: 30px;
    }

    .auth-left-content p {
        font-size: 14px;
    }

    .feature-list {
        gap: 10px;
    }

    .feature-item {
        font-size: 14px;
    }

    .auth-right {
        padding: 34px 28px;
    }

    .form-header h2 {
        font-size: 29px;
    }
}

@media (max-width: 560px) {
    body {
        padding: 12px;
    }

    .auth-wrapper {
        border-radius: 16px;
        box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    }

    .auth-left {
        min-height: auto;
        padding: 26px 22px;
    }

    .brand-box h1 {
        font-size: 24px;
    }

    .auth-left-content {
        margin-top: 38px;
    }

    .auth-left-content h2 {
        font-size: 26px;
    }

    .auth-left-content p {
        font-size: 13px;
        line-height: 1.5;
    }

    .feature-list {
        margin-top: 20px;
    }

    .feature-item {
        font-size: 13px;
    }

    .feature-item i {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .auth-right {
        padding: 28px 20px;
    }

    .form-header {
        margin-bottom: 20px;
    }

    .form-header h2 {
        font-size: 26px;
    }   

    .form-header p {
        font-size: 13px;
    }

    .input-group {
        margin-bottom: 14px;
    }

    .input-box {
        height: 48px;
        border-radius: 10px;
    }

    .login-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .auth-submit {
        height: 50px;
        border-radius: 10px;
    }

    .switch-text,
    .footer-note {
        font-size: 12px;
    }
}

@media (max-width: 380px) {
    .auth-left,
    .auth-right {
        padding-left: 16px;
        padding-right: 16px;
    }

    .brand-box h1 {
        font-size: 22px;
    }

    .auth-left-content h2,
    .form-header h2 {
        font-size: 24px;
    }

    .input-box input {
        font-size: 14px;
    }

    .auth-submit {
        font-size: 14px;
    }
}

/* ==========================
   LOGIN CHECKBOX / TERMS STYLE
========================== */

.login-extra-options {
    margin: 4px 0 20px;
}

.remember-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.remember-box {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #555555;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.remember-box input,
.terms-box input {
    width: 14px;
    height: 14px;
    accent-color: #456b1f;
    cursor: pointer;
}

.forgot-link {
    color: #b36b2c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

.forgot-link:hover {
    color: #8a4f1f;
}

.terms-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #555555;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.terms-box input {
    margin-top: 3px;
    flex-shrink: 0;
}

.terms-link {
    border: none;
    background: transparent;
    color: #456b1f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
}

.terms-link:hover {
    color: #315516;
}

@media (max-width: 560px) {
    .remember-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .terms-box {
        font-size: 11.5px;
    }

    .terms-link {
        font-size: 11.5px;
    }
}

/* terms and condition  */

/* ==========================
   TERMS MODAL
========================== */

.terms-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
}

.terms-modal-overlay.show {
    display: flex;
}

.terms-modal-box {
    width: min(540px, 95%);
    background: #ffffff;
    border-radius: 18px;
    padding: 34px 28px 28px;
    text-align: center;
    position: relative;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
}

.terms-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: transparent;
    color: #333333;
    font-size: 18px;
    cursor: pointer;
}

.terms-modal-icon {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: #eef5e8;
    color: #315516;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 14px;
}

.terms-modal-box h2 {
    color: #315516;
    margin-bottom: 16px;
    font-size: 26px;
}

.terms-content {
    max-height: 270px;
    overflow-y: auto;
    text-align: left;
    color: #555555;
    line-height: 1.6;
    font-size: 14px;
    padding-right: 8px;
}

.terms-content p {
    margin-bottom: 12px;
}

.terms-content::-webkit-scrollbar {
    width: 7px;
}

.terms-content::-webkit-scrollbar-track {
    background: #eef5e8;
    border-radius: 999px;
}

.terms-content::-webkit-scrollbar-thumb {
    background: #456b1f;
    border-radius: 999px;
}

.terms-accept-btn {
    width: 100%;
    border: none;
    background: #456b1f;
    color: #ffffff;
    padding: 13px 18px;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.terms-accept-btn:hover {
    background: #315516;
}

.terms-list {
    padding-left: 22px;
    margin-top: 10px;
}

.terms-list li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 
no account */


.register-text {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: #555555;
    font-weight: 500;
}

.register-text a {
    color: #315516;
    font-weight: 800;
    text-decoration: none;
    margin-left: 4px;
}

.register-text a:hover {
    color: #456b1f;
    text-decoration: underline;
}

/* ==========================
   REGISTRATION VALIDATION
========================== */

#registerForm .input-box input {
    min-width: 0;
}

/* Required field asterisk */
#registerForm .required-mark {
    color: #dc2626;
}

/* Invalid field */
#registerForm .input-group.has-error .input-box {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.09);
}

#registerForm .input-group.has-error .input-box:focus-within {
    border-color: #dc2626;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

#registerForm .input-group.has-error > label {
    color: #b91c1c;
}

/* Field error messages */
#registerForm .field-error {
    display: block;
    margin-top: 6px;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.5;
}

#registerForm .field-error:empty {
    display: none;
}

/* Phone number instruction */
#registerForm .phone-hint {
    display: block;
    margin-top: 5px;
    color: #666666;
    font-size: 12px;
    line-height: 1.5;
}

/* ==========================
   PASSWORD STRENGTH
========================== */

#registerForm .password-strength {
    margin-top: 10px;
}

#registerForm .password-strength[hidden] {
    display: none;
}

#registerForm .strength-track {
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

#registerForm .strength-fill {
    width: 0;
    height: 100%;
    border-radius: inherit;
    transition: width 0.2s ease, background-color 0.2s ease;
}

#registerForm .strength-label {
    margin-top: 5px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

/* ==========================
   PASSWORD REQUIREMENTS
========================== */

#registerForm .password-rules {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #d7e5cc;
    border-radius: 10px;
    background: #f5f8f1;
}

#registerForm .password-rules > p {
    margin-bottom: 7px;
    color: #315516;
    font-size: 12px;
    font-weight: 600;
}

#registerForm .password-rules ul {
    display: grid;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

#registerForm .password-rules li {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: #666666;
    font-size: 12px;
    line-height: 1.5;
}

#registerForm .password-rules li i {
    width: 14px;
    flex-shrink: 0;
}

#registerForm .password-rules li.met {
    color: #15803d;
}

/* Keyboard focus for show/hide password */
#registerForm .toggle-password:focus-visible {
    outline: 2px solid #456b1f;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile adjustments */
@media (max-width: 560px) {
    #registerForm .password-rules {
        padding: 10px;
    }

    #registerForm .password-rules li,
    #registerForm .password-rules > p,
    #registerForm .strength-label,
    #registerForm .field-error,
    #registerForm .phone-hint {
        font-size: 11.5px;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    #registerForm .input-box,
    #registerForm .strength-fill {
        transition: none;
    }
}

.auth-alert[hidden] {
    display: none;
}

#registerForm .password-strength[hidden],
#registerForm .password-rules[hidden] {
    display: none !important;
}