/* BCC Coffee - Split Login Page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    overflow-x: hidden;
}

/* ===================== SPLIT LAYOUT ===================== */
.modern-login-page {
    min-height: 100vh;
    display: flex;
    background: #f8f5f0;
}

/* ===================== LEFT SLIDER PANEL ===================== */
.login-slider-panel {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.slide.active {
    opacity: 1;
}

.slide-1 {
    background: linear-gradient(135deg, #3c1810 0%, #6b3a2a 40%, #8b5e3c 100%);
}

.slide-2 {
    background: linear-gradient(135deg, #1a0f0a 0%, #4a2c17 40%, #7a4b2e 100%);
}

.slide-3 {
    background: linear-gradient(135deg, #2d1b0e 0%, #5c3d2e 40%, #a0785a 100%);
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255,255,255,0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 460px;
    animation: fadeSlideUp 0.8s ease-out;
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-icon {
    font-size: 56px;
    margin-bottom: 28px;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

.slide-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.slide-content p {
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    font-weight: 400;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.slider-dot:hover {
    background: rgba(255,255,255,0.7);
}

/* ===================== RIGHT FORM PANEL ===================== */
.login-form-panel {
    width: 520px;
    min-width: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
    position: relative;
    overflow-y: auto;
}

.login-card {
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===================== HEADER ===================== */
.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 180px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
    letter-spacing: -0.02em;
}

.login-subtitle {
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
}

/* Form Header (forgot password / register) */
.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.form-header p {
    font-size: 15px;
    color: #64748b;
    font-weight: 400;
}

/* ===================== FORM STYLES ===================== */
.modern-login-form {
    width: 100%;
}

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

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 22px;
}

.form-half {
    flex: 1;
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 7px;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: #9ca3af;
    font-size: 15px;
    z-index: 2;
    transition: color 0.2s ease;
}

.form-input {
    width: 100%;
    padding: 14px 14px 14px 44px;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.2s ease;
    font-weight: 400;
    color: #374151;
}

.form-input:focus {
    outline: none;
    border-color: #6b3a2a;
    box-shadow: 0 0 0 3px rgba(107, 58, 42, 0.1);
    background: #ffffff;
}

.form-input:focus + .input-icon,
.input-container:focus-within .input-icon {
    color: #6b3a2a;
}

.form-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color 0.2s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #6b7280;
    background: #f9fafb;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #6b7280;
    margin-top: 6px;
    font-weight: 400;
}

/* ===================== CAPTCHA ===================== */
.captcha-group {
    margin-bottom: 22px;
}

.captcha-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #faf8f5;
}

.captcha-image {
    flex: 1;
}

.captcha-image img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.captcha-refresh {
    background: #6b3a2a;
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.captcha-refresh:hover {
    background: #4a2517;
}

.fa-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===================== FORM OPTIONS ===================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    position: relative;
    padding-left: 28px;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #6b3a2a;
    background-color: #fdf8f5;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #6b3a2a;
    border-color: #6b3a2a;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password-link {
    font-size: 13px;
    color: #6b3a2a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #4a2517;
    text-decoration: underline;
}

/* ===================== LOGIN BUTTON ===================== */
.login-button {
    width: 100%;
    background: linear-gradient(135deg, #6b3a2a 0%, #4a2517 100%);
    border: none;
    color: white;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: none;
    letter-spacing: 0.01em;
    position: relative;
    overflow: hidden;
}

.login-button::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;
}

.login-button:hover::before {
    left: 100%;
}

.login-button:hover {
    background: linear-gradient(135deg, #7d4a38 0%, #5c3020 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -5px rgba(107, 58, 42, 0.4);
}

.login-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px -3px rgba(107, 58, 42, 0.4);
}

/* ===================== REGISTER LINK ===================== */
.register-link {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b7280;
}

.register-link a {
    color: #6b3a2a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.register-link a:hover {
    color: #4a2517;
    text-decoration: underline;
}

/* ===================== BACK TO LOGIN ===================== */
.back-to-login {
    margin-bottom: 24px;
}

.back-to-login a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.back-to-login a:hover {
    color: #374151;
}

/* ===================== FOOTER ===================== */
.footer-text {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #9ca3af;
}

.footer-text a {
    color: #6b3a2a;
    text-decoration: none;
    font-weight: 500;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* ===================== ALERTS ===================== */
.modern-alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modern-alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.modern-alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.modern-alert-warning {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fed7aa;
}

.modern-alert i {
    font-size: 16px;
    flex-shrink: 0;
}

/* ===================== FORM SECTIONS ===================== */
.login-form-section {
    display: none;
}

.login-form-section:first-child,
#login {
    display: block;
}

/* ===================== RESPONSIVE ===================== */

/* Tablet */
@media (max-width: 1024px) {
    .login-slider-panel {
        flex: 0 0 45%;
    }

    .login-form-panel {
        flex: 1;
        min-width: 0;
        width: auto;
        padding: 32px;
    }

    .slide {
        padding: 40px;
    }

    .slide-content h2 {
        font-size: 26px;
    }
}

/* Mobile — slider hidden, form only */
@media (max-width: 768px) {
    .modern-login-page {
        flex-direction: column;
    }

    .login-slider-panel {
        display: none;
    }

    .login-form-panel {
        width: 100%;
        min-width: 0;
        min-height: 100vh;
        padding: 24px;
        background: linear-gradient(180deg, #faf8f5 0%, #ffffff 30%);
    }

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

    .login-title {
        font-size: 24px;
    }

    .form-header h2 {
        font-size: 22px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-half {
        margin-bottom: 22px;
    }

    .form-options {
        flex-direction: column;
        gap: 14px;
        align-items: flex-start;
    }

    .captcha-container {
        flex-direction: column;
        gap: 10px;
    }

    .captcha-image {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 20px 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .form-input {
        padding: 12px 12px 12px 40px;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .login-button {
        padding: 13px 20px;
        font-size: 14px;
    }
}

/* ===================== ACCESSIBILITY ===================== */
.login-button:focus-visible,
.form-input:focus-visible,
.checkbox-container:focus-visible,
.forgot-password-link:focus-visible {
    outline: 2px solid #6b3a2a;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .login-card,
    .modern-alert,
    .login-button,
    .form-input,
    .password-toggle,
    .captcha-refresh,
    .checkmark,
    .slide,
    .slide-content {
        animation: none;
        transition: none;
    }

    .login-button:hover {
        transform: none;
    }
}

/* ===================== LEGACY COMPAT ===================== */
.bdred { background-color: #dc2626 !important; }
.bdwhite { background-color: #ffffff !important; }
.logintxt { font-weight: 700; }
.bthin { border: 1px solid #e5e7eb; }
