/* Login – member login. Body: Google Sans; headings / CTAs / links: Clash Display (Fontshare), same split as AdminPal home. */

:root {
    --login-font-display: "Clash Display", system-ui, sans-serif;
    --login-font-body: "Google Sans", system-ui, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--login-font-body);
    background: #f3f2f2;
}

.customer-login-form-panel h1,
.customer-login-btn,
.customer-login-forgot a,
.customer-login-register a,
.customer-login-social button,
.customer-login-social a.social-btn,
.customer-login-tagline,
.customer-login-toggle-password {
    font-family: var(--login-font-display);
}

body.login-page-simple .login-container .btn,
body.login-page-simple .login-container .logo h1 {
    font-family: var(--login-font-display);
}

/* ----- CustomLogin / simple login container ----- */
body.login-page-simple {
    background: linear-gradient(135deg, #2b38e9 0%, #1e2bb8 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

body.login-page-simple::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    pointer-events: none;
}

#main-logo {
    width: 235px;
    margin-bottom: 15px;
}

.login-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
}

.login-container .logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-container .logo h1 {
    color: #2b38e9;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-container .logo p {
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.login-container .form-group {
    margin-bottom: 20px;
}

.login-container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.login-container .form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.login-container .form-control:focus {
    outline: none;
    border-color: #2b38e9;
    box-shadow: 0 0 0 0.2rem rgba(43, 56, 233, 0.25);
    background: #fff;
}

.login-container .btn {
    width: 100%;
    padding: 15px 30px;
    background: #2b38e9;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-container .btn:hover {
    background: #1e2bb8;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(43, 56, 233, 0.3);
}

.login-container .btn:active {
    transform: translateY(0);
}

.login-container .footer {
    text-align: center;
    margin-top: 30px;
    font-size: 12px;
    color: #999;
}

@media (max-width: 480px) {
    .login-container {
        margin: 20px;
        padding: 30px 20px;
    }
    .login-container .logo h1 {
        font-size: 28px;
    }
}

/* ----- Customer Login (member login macro) ----- */
.customer-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.customer-login-card {
    display: flex;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    min-height: 600px;
}

.customer-login-form-panel {
    flex: 1;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.customer-login-form-panel h1 {
    font-size: 26px;
    font-weight: 500;
    color: #111;
    margin: 0 0 15px 0;
    letter-spacing: -0.02em;
}

.customer-login-form-panel .subtitle {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    margin-bottom: 28px;
}

.customer-login-form-panel .form-group {
    margin-bottom: 18px;
}

.customer-login-form-panel .form-group label {
    display: none;
}

.customer-login-form-panel .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s;
}

.customer-login-form-panel .form-control:focus {
    outline: none;
    border-color: #111;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.customer-login-form-panel .form-control::placeholder {
    color: #9ca3af;
}

.customer-login-password-wrap {
    position: relative;
}

.customer-login-password-wrap .form-control {
    padding-right: 44px;
}

.customer-login-toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
}

.customer-login-toggle-password:hover {
    color: #111;
}

.customer-login-forgot {
    text-align: right;
    margin-top: 6px;
    margin-bottom: 20px;
}

.customer-login-forgot a {
    font-size: 13px;
    color: #4b5563;
    text-decoration: none;
}

.customer-login-forgot a:hover {
    text-decoration: underline;
}

.customer-login-btn {
    width: 100%;
    padding: 14px 24px;
    background: #2B38E9;
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.customer-login-btn:hover {
    background: #333;
}

.customer-login-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.customer-login-divider::before,
.customer-login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.customer-login-divider span {
    font-size: 15px;
    color: #6b7280;
}

.customer-login-social {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.customer-login-social button,
.customer-login-social a.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid #d1d5db;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #374151;
    font-size: 18px;
    text-decoration: none;
    transition: border-color 0.2s, background 0.2s;
}

.customer-login-social button:hover,
.customer-login-social a.social-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.customer-login-register {
    text-align: center;
    margin-top: 28px;
    font-size: 16px;
    color: #6b7280;
}

.customer-login-register a {
    color: #111;
    font-weight: 600;
    text-decoration: none;
}

.customer-login-register a:hover {
    text-decoration: underline;
}

.customer-login-illustration-panel {
    width: 42%;
    min-width: 320px;
    background: url(/assets/jpg/login-image.jpg) center / cover no-repeat;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.customer-login-illustration-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 100%);
    opacity: 0.65;
}

.customer-login-tagline {
    font-size: 1.97em;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    line-height: 1.4;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.customer-login-validation {
    font-size: 13px;
    color: #dc2626;
    margin-bottom: 12px;
}

.customer-register-title {
    font-family: var(--login-font-display);
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px;
    letter-spacing: -0.02em;
}

.customer-register-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
    margin: 0 0 14px;
}

.customer-register-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
}

.customer-register-trust span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef4ff;
    color: #1e3a8a;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
}

.customer-register-trust span::before {
    content: "✓";
    font-size: 11px;
    color: #2563eb;
}

.customer-register-plan-group .form-label {
    display: block !important;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.customer-register-plan-select {
    border: 1px solid #bfdbfe !important;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%) !important;
    box-shadow: 0 1px 0 rgba(148, 163, 184, 0.16);
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
}

.customer-register-plan-select:focus {
    border-color: #261ffc !important;
    box-shadow: 0 0 0 3px rgba(38, 31, 252, 0.2) !important;
}

.customer-login-remember {
    margin-bottom: 16px;
}

.customer-login-remember label {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4b5563;
    cursor: pointer;
}

.customer-login-remember .form-check-input {
    width: 18px;
    height: 18px;
}

@media (max-width: 1024px) {
    .customer-login-form-panel {
        padding: 40px 36px;
    }
    .customer-login-illustration-panel {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .customer-login-wrapper {
        padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        align-items: flex-start;
    }
    .customer-login-card {
        flex-direction: column;
        min-height: 0;
        border-radius: 20px;
    }
    .customer-login-illustration-panel {
        width: 100%;
        min-width: 0;
        min-height: min(200px, 36vh);
        padding: 24px 20px 28px;
    }
    .customer-login-form-panel {
        padding: 28px 22px 36px;
    }
    .customer-login-form-panel h1 {
        font-size: 22px;
    }
    #main-logo {
        max-width: min(200px, 70vw);
        height: auto;
    }
    .customer-login-tagline {
        font-size: clamp(1.1rem, 4.2vw, 1.75rem);
    }
}

@media (max-width: 480px) {
    .customer-login-wrapper {
        padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    }
    .customer-login-form-panel {
        padding: 22px 16px 28px;
    }
    .customer-login-illustration-panel {
        min-height: min(180px, 32vh);
    }
    .customer-login-btn {
        padding: 14px 20px;
        font-size: 16px;
        min-height: 48px;
    }
    .customer-login-social button,
    .customer-login-social a.social-btn {
        min-width: 48px;
        min-height: 48px;
    }
}

/* Overlays (forgot / register / reset) use inline padding — tighten on small screens */
@media (max-width: 768px) {
    #customer-login-forgot-overlay,
    #customer-login-reset-overlay,
    #customer-login-register-overlay {
        padding: 28px 18px 32px !important;
    }
}

@media (max-width: 480px) {
    #customer-login-forgot-overlay,
    #customer-login-reset-overlay,
    #customer-login-register-overlay {
        padding: 20px 14px 24px !important;
    }
}
