/* ═══════════════════════════════════════════════════════════════
   Login Page — Modern Split Layout
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ── Container ──────────────────────────────────────────────────
   RTL flex-direction:row → first child = RIGHT, second = LEFT   */
.login-container {
    display: flex;
    min-height: 100vh;
}

/* ══════════════════════════════════════════════════════════════
   FORM PANEL  (Right side — RTL primary)
   ══════════════════════════════════════════════════════════════ */
.login-form-panel {
    flex: 0 0 460px;
    width: 460px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, #00A8AE 10%, #2172B9 55%, #7D7D7D 100%);
    position: relative;
    z-index: 2;
    box-shadow: -8px 0 50px rgba(0, 0, 0, .18);
}

/* Gold accent bar at top */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #C9A84C 0%, #8B6914 50%, #C9A84C 100%);
    z-index: 1;
}

.form-panel-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 52px 48px 40px;
    animation: formSlideIn .5s cubic-bezier(.25, .46, .45, .94) both;
}

@keyframes formSlideIn {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0);    }
}

/* ── Logo ────────────────────────────────────────────────────── */
.form-logo {
    text-align: center;
    margin-bottom: 28px;
}

.form-logo img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(201,168,76,.25));
}

/* ── Title ───────────────────────────────────────────────────── */
.form-title {
    text-align: center;
    margin-bottom: 32px;
}

.form-title h2 {
    font-size: 26px;
    font-weight: 700;
    color: #F5E6B2;
    margin: 0 0 6px;
}

.form-title p {
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
    margin: 0;
}

/* ── Divider ─────────────────────────────────────────────────── */
.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
    color: #D1D5DB;
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

/* ── Validation Alert ────────────────────────────────────────── */
.lf-alert {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    border-radius: 10px;
    font-size: 13px;
    padding: 10px 14px;
    margin-bottom: 20px;
    display: none; /* hidden when empty — shown via Bootstrap's validation */
}

.lf-alert:not(:empty) { display: block; }

/* ── Input Group ─────────────────────────────────────────────── */
.lf-group {
    position: relative;
    margin-bottom: 20px;
}

.lf-input {
    width: 100%;
    height: 58px;
    padding: 22px 52px 8px 16px;
    border: 1.5px solid rgba(255, 255, 255, .15);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    font-size: 15px;
    color: #fff;
    direction: rtl;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.lf-input::placeholder { color: transparent; }

.lf-input:focus {
    border-color: #C9A84C;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, .2);
    background: rgba(255, 255, 255, .13);
}

/* Icon */
.lf-icon {
    position: absolute;
    top: 50%;
    right: 17px;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, .4);
    font-size: 16px;
    pointer-events: none;
    transition: color .2s ease;
    z-index: 3;
}

.lf-input:focus ~ .lf-icon { color: #C9A84C; }

/* Floating Label */
.lf-label {
    position: absolute;
    top: 50%;
    right: 48px;
    left: 16px;
    transform: translateY(-50%);
    font-size: 14px;
    color: rgba(255, 255, 255, .45);
    pointer-events: none;
    transition: top .18s ease, font-size .18s ease, color .18s ease, transform .18s ease;
    transform-origin: right top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Float up when focused or has value */
.lf-input:focus + .lf-label,
.lf-input:not(:placeholder-shown) + .lf-label {
    top: 10px;
    transform: translateY(0);
    font-size: 11px;
    color: #C9A84C;
}

/* Validation error text */
.lf-error {
    display: block;
    color: #EF4444;
    font-size: 12px;
    margin-top: 5px;
    padding-right: 4px;
}

/* Input invalid state */
.lf-input.input-validation-error {
    border-color: #EF4444;
    background: rgba(239, 68, 68, .12);
}

/* ── Password Toggle ─────────────────────────────────────────── */
.lf-toggle {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 15px;
    cursor: pointer;
    z-index: 3;
    transition: color .2s;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.lf-toggle:hover { color: #C9A84C; }

/* ── Remember Me ─────────────────────────────────────────────── */
.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    direction: rtl;
}

.remember-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 1.5px solid #D1D5DB;
    border-radius: 5px;
    accent-color: #C9A84C;
    cursor: pointer;
    flex-shrink: 0;
}

.remember-row label {
    font-size: 14px;
    color: rgba(255, 255, 255, .65);
    cursor: pointer;
    user-select: none;
}

/* ── Submit Button ───────────────────────────────────────────── */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    background: linear-gradient(135deg, #5C4510 0%, #8B6914 50%, #C9A84C 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .4px;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
    box-shadow: 0 4px 16px rgba(140, 105, 20, .35);
    position: relative;
    overflow: hidden;
}

/* Shine sweep on hover */
.btn-login::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    transition: left .4s ease;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(140, 105, 20, .45);
}

.btn-login:hover::after { left: 150%; }

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 16px rgba(140, 105, 20, .35);
}

.btn-login:disabled {
    opacity: .7;
    cursor: not-allowed;
    transform: none;
}

/* ── Footer ──────────────────────────────────────────────────── */
.form-footer {
    padding: 18px 48px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .35);
    font-size: 12px;
    background: transparent;
}

/* ══════════════════════════════════════════════════════════════
   VISUAL PANEL  (Left side — decorative image)
   ══════════════════════════════════════════════════════════════ */
.login-visual {
    flex: 1;
    position: relative;
    background: url('/img/Master/Login.jpg') center center / cover no-repeat;
    overflow: hidden;
}

/* Dark gradient overlay */
.login-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        145deg,
        rgba(10, 38, 75, .88) 0%,
        rgba(80, 58, 10, .65) 55%,
        rgba(10, 38, 75, .92) 100%
    );
    z-index: 1;
}

/* Decorative radial glow */
.login-visual::after {
    content: '';
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(201,168,76,.15) 0%, transparent 70%);
    z-index: 1;
    pointer-events: none;
}

.visual-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px 48px;
    text-align: center;
    color: #fff;
}

/* Logo with float animation */
.visual-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 28px;
    filter: drop-shadow(0 6px 28px rgba(201, 168, 76, .55));
    animation: floatY 4s ease-in-out infinite;
}

@keyframes floatY {
    0%, 100% { transform: translateY(0);    }
    50%       { transform: translateY(-14px); }
}

.visual-content h1 {
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 12px;
    letter-spacing: .5px;
    text-shadow: 0 2px 20px rgba(0,0,0,.35);
}

.visual-tagline {
    font-size: 15px;
    opacity: .82;
    margin: 0 0 44px;
    max-width: 300px;
    line-height: 1.85;
}

/* Feature cards (glassmorphism) */
.visual-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 320px;
}

.visual-feature {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, .1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 14px;
    padding: 13px 18px;
    text-align: right;
    transition: background .2s, transform .2s;
}

.visual-feature:hover {
    background: rgba(255, 255, 255, .16);
    transform: translateX(-4px);
}

.visual-feature i {
    color: #C9A84C;
    font-size: 22px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(201,168,76,.4));
}

.visual-feature span {
    font-size: 13px;
    opacity: .92;
    font-weight: 400;
    line-height: 1.4;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .login-visual { display: none; }

    .login-form-panel {
        flex: 1;
        width: 100%;
        box-shadow: none;
    }

    .form-panel-inner { padding: 48px 36px 36px; }
    .form-footer      { padding: 18px 36px; }
}

@media (max-width: 480px) {
    .form-panel-inner { padding: 40px 24px 32px; }
    .form-footer      { padding: 16px 24px; }
    .form-title h2    { font-size: 22px; }
}
