/* EngagePOS Modern Login — login.css */

/* ── Reset & base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand-dark:    #2C1A0E;
    --brand-mid:     #4A2C17;
    --brand-light:   #7C4D2A;
    --brand-accent:  #C8773A;
    --brand-glow:    rgba(200, 119, 58, 0.35);
    --white:         #ffffff;
    --gray-50:       #F9FAFB;
    --gray-100:      #F3F4F6;
    --gray-200:      #E5E7EB;
    --gray-400:      #9CA3AF;
    --gray-500:      #6B7280;
    --gray-700:      #374151;
    --gray-800:      #1F2937;
    --red:           #EF4444;
    --red-bg:        #FEF2F2;
    --green:         #10B981;
    --green-bg:      #ECFDF5;
    --amber:         #F59E0B;
    --amber-bg:      #FFFBEB;
    --radius-sm:     6px;
    --radius:        10px;
    --radius-lg:     16px;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.12);
    --shadow:        0 4px 12px rgba(0,0,0,.10);
    --shadow-lg:     0 12px 32px rgba(0,0,0,.14);
    --transition:    0.2s ease;
}

body.modern-login-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: var(--gray-800);
    background: var(--gray-100);
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ── Layout ──────────────────────────────────────── */
.login-slider-panel {
    flex: 0 0 42%;
    background: linear-gradient(160deg, var(--brand-dark) 0%, var(--brand-mid) 55%, var(--brand-light) 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* decorative circles */
.login-slider-panel::before,
.login-slider-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .08;
    background: var(--white);
}
.login-slider-panel::before {
    width: 420px;
    height: 420px;
    top: -100px;
    left: -140px;
}
.login-slider-panel::after {
    width: 300px;
    height: 300px;
    bottom: -80px;
    right: -80px;
}

.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    overflow-y: auto;
    background: var(--white);
}

/* ── Slider ──────────────────────────────────────── */
.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s ease, transform .55s ease;
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.slide-content {
    text-align: center;
    color: var(--white);
    padding: 0 40px;
    max-width: 360px;
}

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

.slide-content h2 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.3px;
    margin-bottom: 14px;
    line-height: 1.25;
    color: var(--white);
}

.slide-content p {
    font-size: 14.5px;
    line-height: 1.65;
    color: rgba(255,255,255,.78);
    font-weight: 400;
}

.slider-dots {
    position: absolute;
    bottom: 36px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition), width var(--transition);
}
.slider-dot.active {
    background: var(--white);
    width: 24px;
    border-radius: 4px;
}

/* ── Card ────────────────────────────────────────── */
.login-card {
    width: 100%;
    max-width: 420px;
}

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

.logo-container {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.logo-container .logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-mid);
    letter-spacing: 1px;
    background: linear-gradient(135deg, var(--gray-100), var(--white));
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
    letter-spacing: -.4px;
    margin-bottom: 6px;
}

.login-subtitle {
    font-size: 13.5px;
    color: var(--gray-500);
    font-weight: 400;
}

/* ── Section transitions ─────────────────────────── */
.login-form-section {
    animation: fadeSlideIn .25s ease;
}

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

/* ── Form elements ───────────────────────────────── */
.form-group {
    margin-bottom: 18px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: .4px;
    text-transform: uppercase;
    margin-bottom: 7px;
}

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

.input-icon {
    position: absolute;
    left: 13px;
    color: var(--gray-400);
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
    width: 16px;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 11px 42px 11px 40px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
    -webkit-appearance: none;
}

.form-input:focus {
    border-color: var(--brand-accent);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--brand-glow);
}

.form-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    line-height: 1;
    transition: color var(--transition);
    font-size: 13px;
}
.password-toggle:hover { color: var(--gray-700); }

/* ── Checkbox row ────────────────────────────────── */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600, #4B5563);
    user-select: none;
}

.checkbox-container input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-accent);
    cursor: pointer;
    flex-shrink: 0;
}

.forgot-password-link {
    font-size: 13px;
    color: var(--brand-accent);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition);
}
.forgot-password-link:hover { color: var(--brand-mid); }

/* ── Button ──────────────────────────────────────── */
.login-button {
    width: 100%;
    padding: 13px 24px;
    background: linear-gradient(135deg, var(--brand-mid) 0%, var(--brand-accent) 100%);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 14px rgba(200, 119, 58, 0.4);
    letter-spacing: .2px;
}
.login-button:hover {
    opacity: .92;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(200, 119, 58, 0.45);
}
.login-button:active {
    transform: translateY(0);
    opacity: 1;
}

/* ── Alerts ──────────────────────────────────────── */
.modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 18px;
}
.modern-alert i { margin-top: 1px; flex-shrink: 0; }
.modern-alert-error   { background: var(--red-bg);   color: #B91C1C; border: 1px solid #FECACA; }
.modern-alert-success { background: var(--green-bg); color: #065F46; border: 1px solid #A7F3D0; }
.modern-alert-warning { background: var(--amber-bg); color: #92400E; border: 1px solid #FCD34D; }

/* ── Back link / section headings ────────────────── */
.back-to-login {
    margin-bottom: 24px;
}

.back-to-login a,
.back-to-login a:visited {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--gray-500);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--transition);
}
.back-to-login a:hover { color: var(--brand-accent); }

.form-header { margin-bottom: 24px; }
.form-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 6px;
}
.form-header p { font-size: 13.5px; color: var(--gray-500); line-height: 1.55; }

/* ── Register layout ─────────────────────────────── */
.form-row {
    display: flex;
    gap: 14px;
}
.form-half { flex: 1; min-width: 0; }

.form-hint {
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

.register-link {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--gray-500);
}
.register-link a { color: var(--brand-accent); text-decoration: none; font-weight: 600; }

/* ── Footer version ──────────────────────────────── */
.footer-text {
    text-align: center;
    font-size: 11.5px;
    color: var(--gray-400);
    margin-top: 28px;
    letter-spacing: .2px;
}

/* ── Captcha ─────────────────────────────────────── */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.captcha-image img { height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--gray-200); }
.captcha-refresh {
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    cursor: pointer;
    color: var(--gray-500);
    transition: background var(--transition), color var(--transition);
}
.captcha-refresh:hover { background: var(--gray-200); color: var(--gray-800); }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .login-slider-panel { display: none; }
    .login-form-panel { padding: 24px 20px; }
    .form-row { flex-direction: column; gap: 0; }
}
