/* Color Theme */

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    /* 🔒 prevent page scroll */
}

:root {
    --color-primary: #2f52a0;
    --color-secondary: #e73368;
    --color-text-primary: #101828;
    --color-text-secondary: #0f1728;
    --color-text-muted: #8285a5;
    --color-border: #ececf4;
    --color-background: #ffffff;
    --color-background-light: #f8f9fb;
    --color-blue: #3366ff;
    --color-dark-blue: #00175a;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 12px;
    --spacing-lg: 16px;
    --spacing-xl: 20px;
    --spacing-xxl: 24px;
    --spacing-xxxl: 32px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--color-background-light);
    margin: 0;
    padding: 0;
}


/* Layout */

.auth-container {
    display: flex;
    height: 100vh;
    /* 🔒 fixed height */
    width: 100%;
}


/* Side Banner for Desktop */

.side-banner {
    position: relative;
    width: 496px;
    min-width: 320px;
    height: 100vh;
    overflow: hidden;
    border-top-right-radius: 64px;
    border-bottom-right-radius: 64px;
    box-shadow: 6px 0 15px rgba(0, 0, 0, 0.1);
    background-color: #001f3f;
    color: white;
    background-size: cover;
    background-position: center;
    background-blend-mode: overlay;
}

.side-banner-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.side-banner-slides .slide:nth-child(1) {
    background-image: url("/images/sideBanner1.png");
}

.side-banner-slides .slide:nth-child(2) {
    background-image: url("/images/sideBanner2.png");
}

.side-banner-slides .slide:nth-child(3) {
    background-image: url("/images/sideBanner3.png");
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-right-radius: 64px;
    border-bottom-right-radius: 64px;
}

.slide-text {
    position: absolute;
    bottom: 20%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    text-shadow: 0 6px 16px rgba(0, 0, 0, .45);
    color: white;
    font-family: FONT-bold, sans-serif;
    /* replace with your actual bold font */
    font-weight: 800;
    font-size: 32px;
    line-height: 40px;
    text-align: center;
    color: #ffffff;
    width: 100%;
}

.slide-dots {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

.slide-text,
.side-banner-logo,
.slide-dots {
    pointer-events: auto;
    isolation: isolate;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient( rgb(51, 102, 255), rgba(0, 0, 0, 0) 46.5%, rgb(0, 23, 90) 100%);
    pointer-events: none;
    z-index: 2;
}

.dot.active {
    width: 12px;
    height: 12px;
    background-color: white;
}

.side-banner-logo {
    position: absolute;
    top: var(--spacing-xxl);
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 80px;
    z-index: 3;
}

.side-banner-content {
    position: absolute;
    bottom: 10%;
    left: 0;
    right: 0;
    text-align: center;
    padding: 0 var(--spacing-xxxl);
}

.side-banner-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 40px;
    color: var(--color-background);
    margin-bottom: var(--spacing-xxl);
}


/* Main Content Area */

.auth-main {
    flex: 1;
    height: 100vh;
    overflow-y: auto;
    background-color: var(--color-background);
    background-image: url('/images/background.png');
    background-size: cover;
    background-position: center;
    display: grid;
    place-items: center;
    /* 👈 magic */
    padding: 40px 16px;
}

fieldset {
    border: 0;
}


/* Remove old login styles */

section.login {
    background: transparent;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.login .container {
    max-width: 450px;
    padding: 0;
    margin: 0 auto;
}

.login .row {
    margin: 0;
}

.login .col {
    padding: 0;
}

.login .login-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
}

.login-box {
    display: flex;
    flex-direction: column;
    gap: 18px;
}


/* Logo */

.auth-logo {
    width: 200px;
    height: 100px;
    margin: 0 auto 32px;
    object-fit: contain;
    display: block;
}

.merchant-logo {
    max-width: 200px;
    max-height: 80px;
    margin: 0 auto 32px;
    display: block;
    border-radius: 8px;
}


/* Header */

.auth-header {
    text-align: center;
}

.auth-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.auth-subtitle {
    font-size: 16px;
    color: rgb(130, 133, 165);
    margin-top: 0px;
}


/* Form Styles */

.form-label {
    display: block;
    font-size: 14px;
    color: rgb(16, 24, 40);
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    /* More rounded corners to match image */
    border: 1px solid #d1d5db;
    font-size: 14px;
    outline: none;
    background-color: #f9fafb;
    color: #6b7280;
    /* Slightly muted placeholder/text color */
    box-sizing: border-box;
    /* Ensure padding included in width */
}

.form-control::placeholder {
    color: #6b7280;
    /* Placeholder color like in the image */
    font-weight: 400;
}

.btn-primary {
    margin-top: 10px;
    width: 100%;
    padding: 12px 0;
    /* Vertical padding only, consistent height */
    border: none;
    border-radius: 8px;
    /* Rounded corners matching input */
    background-color: #3b5998;
    /* Facebook-blue shade similar to image */
    color: #ffffff;
    font-weight: 600;
    font-size: 16px;
    /* Slightly bigger font */
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn-primary:hover {
    background-color: #355089;
    /* Slightly darker on hover */
}

.auth-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* already defined earlier, kept for clarity */

.auth-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.auth-label {
    font-size: 14px;
    color: rgb(16, 24, 40);
}

.create-account {
    position: relative;
    background: transparent;
    border: none;
    color: rgb(47, 82, 160);
    font-size: 14px;
    cursor: pointer;
    align-self: center;
}

.create-account:hover {
    text-decoration: underline;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: #f5f5fa;
    box-shadow: none;
}

.form-control::placeholder {
    color: #a0a0b0;
    opacity: 1;
}

.form-group {
    margin-bottom: 25px;
}

.error-container {
    color: rgb(130, 133, 165);
    font-size: 12px;
}

.error-container-hidden {
    margin-top: 5px;
    font-size: 14px;
    color: red;
}


/* Password Criteria */

.password-criteria {
    display: none;
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

.password-criteria span {
    margin-right: 4px;
}


/* Checkbox */

.custom-control {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.custom-control-input {
    margin-top: 4px;
    margin-right: 8px;
    width: 20px;
    height: 20px;
}

.custom-control-label {
    font-size: 16px;
    color: #1a1a1a;
    cursor: pointer;
    user-select: none;
}

.privacy-link {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: rgb(47, 82, 160);
    text-decoration: underline;
    cursor: pointer;
}

.privacy-link:hover {
    text-decoration: underline;
}


/* Links */

.auth-link-container {
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
}

.auth-link-container span {
    color: #1a1a1a;
}

.auth-main-inner {
    width: 400px;
    max-width: 100%;
}

.auth-link-container a {
    background: transparent;
    border: none;
    color: rgb(47, 82, 160);
    font-size: 16px;
    cursor: pointer;
    align-self: center;
}

.auth-link-container a:hover {
    text-decoration: underline;
}

.remember-forgot-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: rgb(52, 64, 84);
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: rgb(47, 82, 160);
    cursor: pointer;
}

.forgot-link {
    font-size: 14px;
    color: rgb(47, 82, 160);
    text-decoration: none;
    cursor: pointer;
}

.forgot-link:hover {
    text-decoration: underline;
}

.no-account-label {
    color: rgb(47, 82, 160);
    font-size: 14px;
}


/* Success Message */

.success-message {
    text-align: center;
}

.btn-linklike {
    display: inline-block;
    text-decoration: none;
    color: #fff;
    /* same as btn-primary text color */
    background-color: #3b5998;
    /* same as btn-primary */
    border: 1px solid #3b5998;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    text-align: center;
}

.btn-linklike:hover {
    background-color: #3b5998;
    border-color: #3b5998;
    color: #fff;
}

.success-icon {
    font-size: 48px;
    color: #28a745;
    margin-bottom: 16px;
}

.success-text {
    /* semi-bold weight; optional */
    font-size: 16px;
    /* example for FONT_SIZES.md */
    color: #6c757d;
    /* COLORS.textMuted */
    text-align: center;
    /* add for consistent centering */
    margin-bottom: 24px;
}

.btn-success {
    display: inline-block;
    background-color: #4a5fc1;
    color: #ffffff;
    padding: 14px 40px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-success:hover {
    background-color: #3d4fa3;
    text-decoration: none;
    color: #ffffff;
}


/* Error Messages */

.error-wrapper {
    background-color: #f8d7da;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    color: #842029;
}

.error-wrapper ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-wrapper li {
    margin: 4px 0;
}

.text-danger {
    color: #dc3545;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}


/* Alert */

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
}

.alert-warning {
    background-color: #fff3cd;
    border: 1px solid #ffecb5;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}


/* Responsive */

@media (max-width: 768px) {
    .side-banner {
        display: none;
    }
    .auth-main {
        padding: 16px;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .auth-main-inner {
        min-height: 100%;
        display: flex;
        max-width: 100%;
        align-items: center;
    }
    section.login {
        width: 100%;
        max-width: 100%;
    }
    .login .container {
        max-width: 100%;
    }
    .auth-title {
        font-size: 18px;
    }
    .auth-subtitle {
        font-size: 13px;
    }
}


/* =========================
   FORM WIDTH FIX (MOBILE SAFE)
   ========================= */


/* Ensure box sizing everywhere */

*,
*::before,
*::after {
    box-sizing: border-box;
}


/* Login form container */

.login .login-panel {
    width: 100%;
    max-width: 100%;
}


/* Form groups */

.form-group {
    width: 100%;
}


/* Inputs */

.form-control {
    width: 100%;
    max-width: 100%;
    display: block;
    height: 48px;
}


/* Login button */

.btn-primary {
    width: 100%;
    max-width: 100%;
}


/* Extra mobile safety */

@media (max-width: 480px) {
    section.login {
        width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }
    .login .login-panel {
        width: 100%;
    }
    .form-control,
    .btn-primary {
        width: 100%;
        min-width: 0;
    }
}


/* =========================
   SMS VERIFICATION
   ========================= */

.sms-code-container {
    margin: 24px 0;
}

.sms-code-inputs {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.sms-digit {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}

.sms-digit:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.sms-resend-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.btn-link {
    background: none;
    border: none;
    color: #3b5998;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    text-decoration: underline;
}

.btn-link:disabled {
    color: #6c757d;
    cursor: default;
}

.btn-link:not(:disabled):hover {
    text-decoration: underline;
}

.sms-resend-message {
    font-size: 13px;
}

.sms-resend-success {
    color: #198754;
}

.sms-resend-error {
    color: #dc3545;
}

.request-sms-btn {
    width: 100%;
    font-size: 16px;
    padding: 8px 0;
}

@media (max-width: 480px) {
    .sms-digit {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }
    .sms-code-inputs {
        gap: 6px;
    }
}