/* =============================================
   AUTH PAGES - Shared Styles
   NusaMart Authentication Pages
   ============================================= */

/* --- Animations --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(209, 0, 36, 0.2); }
    50% { box-shadow: 0 0 35px rgba(209, 0, 36, 0.4); }
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #0f1017 0%, #1a1b2e 50%, #15161d 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(209, 0, 36, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(209, 0, 36, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(100, 100, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* --- Shared Form Elements --- */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e1f29;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

label i {
    color: #D10024;
    margin-right: 5px;
    font-size: 12px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', sans-serif;
    background: #f8f9fa;
    color: #333;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
    outline: none;
    border-color: #D10024;
    box-shadow: 0 0 0 4px rgba(209, 0, 36, 0.08), 0 4px 12px rgba(209, 0, 36, 0.05);
    background: #fff;
    transform: translateY(-1px);
}

input[type="email"][readonly] {
    background: #eee;
    color: #666;
    cursor: not-allowed;
}

select:disabled {
    background: #f0f0f0;
    color: #aaa;
    cursor: not-allowed;
    opacity: 0.7;
}

input::placeholder {
    color: #b0b0b0;
    font-weight: 400;
}

.password-requirements {
    font-size: 11px;
    color: #999;
    margin-top: 6px;
    padding-left: 2px;
}

/* --- Error & Success Boxes --- */
.error-box {
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    border: 1px solid rgba(209, 0, 36, 0.2);
    border-left: 4px solid #D10024;
    color: #721c24;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    animation: fadeInUp 0.3s ease;
}

.error-box ul {
    margin-left: 20px;
    margin-top: 6px;
}

.error-message {
    color: #D10024;
    font-size: 12px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

.success-box {
    background: linear-gradient(135deg, #f0fff4, #e8f5e9);
    border: 1px solid rgba(39, 174, 96, 0.2);
    border-left: 4px solid #27ae60;
    color: #155724;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
    animation: fadeInUp 0.3s ease;
}

/* --- Shared Brand Section --- */
.auth-brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.auth-brand-logo .logo-icon {
    width: 50px;
    height: 50px;
    background: #D10024;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.auth-brand-logo .logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.auth-brand-logo .logo-text span {
    color: #D10024;
}

/* --- Shared Links --- */
.back-link,
.signup-link,
.login-link {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #8d8d8d;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.back-link a,
.signup-link a,
.login-link a {
    color: #D10024;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.back-link a::after,
.signup-link a::after,
.login-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #D10024;
    transition: width 0.3s ease;
}

.back-link a:hover::after,
.signup-link a:hover::after,
.login-link a:hover::after {
    width: 100%;
}

.back-link a:hover,
.signup-link a:hover,
.login-link a:hover {
    color: #a30020;
}

/* --- Shared Brand Icon --- */
.brand-icon {
    width: 100px;
    height: 100px;
    background: rgba(209, 0, 36, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    animation: float 3s ease-in-out infinite;
    border: 2px solid rgba(209, 0, 36, 0.15);
}

.brand-icon i {
    font-size: 40px;
    color: #D10024;
}

/* --- Shared Logo Styles --- */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
}

.logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #D10024, #ff1744);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    box-shadow: 0 4px 15px rgba(209, 0, 36, 0.3);
    animation: pulse-glow 3s ease-in-out infinite;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
}

.logo-text span {
    color: #D10024;
}

/* --- Shared Brand Panel --- */
.login-brand,
.register-brand,
.forgot-brand,
.reset-brand {
    background: linear-gradient(160deg, #1e1f29 0%, #252736 40%, #1e1f29 100%);
    position: relative;
    overflow: hidden;
}

.login-brand::before,
.register-brand::before,
.forgot-brand::before,
.reset-brand::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(209, 0, 36, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(209, 0, 36, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.login-brand::after,
.register-brand::after,
.forgot-brand::after,
.reset-brand::after {
    content: '';
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border: 2px solid rgba(209, 0, 36, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.login-brand > *,
.register-brand > *,
.forgot-brand > *,
.reset-brand > * {
    position: relative;
    z-index: 1;
}

/* --- Shared Brand Features --- */
.brand-features {
    list-style: none;
    text-align: left;
    width: 100%;
}

.brand-features li {
    color: #bbb;
    font-size: 13px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.brand-features li:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
    color: #ddd;
}

.brand-features li i {
    color: #D10024;
    font-size: 14px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* --- Brand Description --- */
.login-brand p,
.register-brand p,
.forgot-brand p {
    color: #999;
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* --- Shared Button Base --- */
.btn-login,
.btn-register,
.btn-submit,
.btn-resend {
    background: linear-gradient(135deg, #D10024, #e5002a, #D10024);
    background-size: 200% auto;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.btn-login::before,
.btn-register::before,
.btn-submit::before,
.btn-resend::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-login:hover::before,
.btn-register:hover::before,
.btn-submit:hover::before,
.btn-resend:hover::before {
    left: 100%;
}

.btn-login:hover,
.btn-register:hover,
.btn-submit:hover,
.btn-resend:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(209, 0, 36, 0.35);
}

.btn-login:active,
.btn-register:active,
.btn-submit:active,
.btn-resend:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(209, 0, 36, 0.25);
}

/* =============================================
   LOGIN PAGE
   ============================================= */
.login-wrapper {
    display: flex;
    max-width: 920px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.login-brand {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 390px;
    text-align: center;
}

.login-form-section {
    background: #fff;
    padding: 50px 45px;
    flex: 1;
}

.header-login {
    margin-bottom: 32px;
}

.header-login h1 {
    color: #1e1f29;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

.header-login p {
    color: #8d8d8d;
    font-size: 14px;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    font-size: 13px;
}

.remember-forgot a {
    color: #D10024;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.remember-forgot a:hover {
    color: #a30020;
}

.remember-me {
    display: flex;
    align-items: center;
}

.remember-me input {
    margin-right: 6px;
    cursor: pointer;
    accent-color: #D10024;
}

.remember-me label {
    margin: 0;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    font-weight: 400;
    font-size: 13px;
    color: #666;
}

.btn-login {
    width: 100%;
    padding: 15px;
    font-size: 14px;
}

/* =============================================
   REGISTER PAGE
   ============================================= */
.register-wrapper {
    display: flex;
    max-width: 1020px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.register-brand {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 370px;
    min-width: 370px;
    text-align: center;
}

.register-form-section {
    background: #fff;
    padding: 40px 45px;
    flex: 1;
    /* overflow-y: auto; */
    /* max-height: 95vh; */
}

.header-register {
    margin-bottom: 25px;
}

.header-register h1 {
    color: #1e1f29;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

.header-register p {
    color: #8d8d8d;
    font-size: 14px;
}

.register-form-section .form-group {
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.role-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 8px;
}

.role-option {
    position: relative;
}

.role-option input[type="radio"] {
    display: none;
}

.role-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 13px;
    color: #666;
    background: #f8f9fa;
}

.role-option input[type="radio"]:checked + .role-label {
    border-color: #D10024;
    background: linear-gradient(135deg, #fff5f5, #ffe8ec);
    color: #D10024;
    box-shadow: 0 4px 12px rgba(209, 0, 36, 0.1);
    transform: translateY(-1px);
}

.role-option input[type="radio"]:hover + .role-label {
    border-color: #D10024;
    transform: translateY(-1px);
}

.btn-register {
    width: 100%;
    padding: 15px;
    font-size: 14px;
    margin-top: 10px;
}

/* =============================================
   FORGOT PASSWORD PAGE
   ============================================= */
.forgot-wrapper {
    display: flex;
    max-width: 920px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.forgot-brand {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 390px;
    text-align: center;
}

.forgot-brand .steps {
    list-style: none;
    text-align: left;
    width: 100%;
}

.forgot-brand .steps li {
    color: #bbb;
    font-size: 13px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.forgot-brand .steps li:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateX(4px);
}

.forgot-brand .steps li .step-num {
    width: 26px;
    height: 26px;
    background: linear-gradient(135deg, #D10024, #ff1744);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(209, 0, 36, 0.3);
}

.forgot-form-section {
    background: #fff;
    padding: 50px 45px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-forgot {
    margin-bottom: 30px;
}

.header-forgot h1 {
    color: #1e1f29;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

.header-forgot p {
    color: #8d8d8d;
    font-size: 14px;
    line-height: 1.6;
}

.btn-submit {
    width: 100%;
    padding: 15px;
    font-size: 14px;
}

/* =============================================
   RESET PASSWORD PAGE
   ============================================= */
.reset-wrapper {
    display: flex;
    max-width: 920px;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.reset-brand {
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 390px;
    text-align: center;
}

.reset-brand p {
    color: #999;
    font-size: 14px;
    line-height: 1.8;
}

.reset-form-section {
    background: #fff;
    padding: 50px 45px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-reset {
    margin-bottom: 30px;
}

.header-reset h1 {
    color: #1e1f29;
    font-size: 28px;
    margin-bottom: 8px;
    font-weight: 800;
}

.header-reset p {
    color: #8d8d8d;
    font-size: 14px;
    line-height: 1.6;
}

/* =============================================
   VERIFY EMAIL PAGE
   ============================================= */
.verify-wrapper {
    max-width: 560px;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
    text-align: center;
    animation: fadeInUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.verify-header {
    background: linear-gradient(160deg, #1e1f29 0%, #252736 40%, #1e1f29 100%);
    padding: 40px 30px 30px;
    position: relative;
    overflow: hidden;
}

.verify-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(209, 0, 36, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.verify-header > * {
    position: relative;
    z-index: 1;
}

.verify-body {
    padding: 40px 35px;
}

.verify-icon {
    width: 85px;
    height: 85px;
    background: linear-gradient(135deg, #fff5f5, #ffe8ec);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: float 3s ease-in-out infinite;
    border: 2px solid rgba(209, 0, 36, 0.1);
}

.verify-icon i {
    font-size: 36px;
    color: #D10024;
}

.verify-body h2 {
    color: #1e1f29;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 12px;
}

.verify-body p {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 8px;
}

.verify-body .email-highlight {
    color: #D10024;
    font-weight: 600;
}

.success-message {
    background: linear-gradient(135deg, #e8f5e9, #f0fff4);
    border: 1px solid rgba(76, 175, 80, 0.2);
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    padding: 14px 18px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 13px;
    animation: fadeInUp 0.3s ease;
}

.success-message i {
    margin-right: 6px;
}

.btn-resend {
    display: inline-block;
    padding: 15px 40px;
    font-size: 14px;
    margin-top: 20px;
}

.verify-footer {
    padding: 0 35px 35px;
}

.verify-footer .divider {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-top: 10px;
}

.verify-footer p {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.btn-logout {
    background: none;
    border: none;
    color: #D10024;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px dashed #D10024;
}

.btn-logout:hover {
    color: #a30020;
    border-bottom-color: #a30020;
}

.tips-list {
    text-align: left;
    background: linear-gradient(135deg, #f8f9fa, #f0f2f5);
    border-radius: 10px;
    padding: 18px 22px;
    margin: 20px 0 0;
    border: 1px solid #eee;
}

.tips-list h4 {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #1e1f29;
    margin-bottom: 12px;
    font-weight: 700;
}

.tips-list li {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
    list-style: none;
    padding-left: 22px;
    position: relative;
    line-height: 1.5;
}

.tips-list li:before {
    content: "\f105";
    font-family: FontAwesome;
    position: absolute;
    left: 0;
    color: #D10024;
    font-weight: 700;
}

/* =============================================
   RESPONSIVE - All Auth Pages
   ============================================= */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    /* Login */
    .login-wrapper {
        flex-direction: column;
    }
    .login-brand {
        width: 100%;
        padding: 30px 25px;
    }
    .login-brand .brand-features {
        display: none;
    }
    .login-form-section {
        padding: 30px 25px;
    }
    .header-login h1 {
        font-size: 22px;
    }

    /* Register */
    .register-wrapper {
        flex-direction: column;
    }
    .register-brand {
        width: 100%;
        min-width: unset;
        padding: 30px 25px;
    }
    .register-brand .brand-features {
        display: none;
    }
    .register-form-section {
        padding: 30px 25px;
        max-height: unset;
    }
    .header-register h1 {
        font-size: 22px;
    }
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Forgot Password */
    .forgot-wrapper {
        flex-direction: column;
    }
    .forgot-brand {
        width: 100%;
        padding: 30px 25px;
    }
    .forgot-brand .steps {
        display: none;
    }
    .forgot-brand .brand-icon,
    .brand-icon {
        width: 70px;
        height: 70px;
    }
    .forgot-brand .brand-icon i,
    .brand-icon i {
        font-size: 28px;
    }
    .forgot-form-section {
        padding: 30px 25px;
    }
    .header-forgot h1 {
        font-size: 22px;
    }

    /* Reset Password */
    .reset-wrapper {
        flex-direction: column;
    }
    .reset-brand {
        width: 100%;
        padding: 30px 25px;
    }
    .reset-form-section {
        padding: 30px 25px;
    }
    .header-reset h1 {
        font-size: 22px;
    }
}
