/* ─── Login Page — Professional Redesign ─────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    height: 100%;
    font-family: 'Open Sans', sans-serif;
}

/* ══════════════════════════════════════════════════════════════════════════════
   FULL-PAGE WRAPPER
══════════════════════════════════════════════════════════════════════════════ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
}

/* ══════════════════════════════════════════════════════════════════════════════
   LEFT — BRAND PANEL
══════════════════════════════════════════════════════════════════════════════ */
.login-brand {
    flex: 0 0 48%;
    background: linear-gradient(150deg, #0a5a60 0%, #107980 45%, #0891b2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
}

/* Background blob decorations */
.login-brand::before {
    content: '';
    position: absolute;
    top: -140px; right: -90px;
    width: 440px; height: 440px;
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    pointer-events: none;
}
.login-brand::after {
    content: '';
    position: absolute;
    bottom: -110px; left: -70px;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: rgba(255,255,255,.05);
    pointer-events: none;
}

/* Animated floating circles */
.lp-float { position: absolute; border-radius: 50%; pointer-events: none; animation: lp-float 8s ease-in-out infinite; }
.lp-float--1 { width: 70px; height: 70px; left: 8%;  bottom: 22%; background: rgba(255,255,255,.09); animation-delay: 0s;   animation-duration: 9s; }
.lp-float--2 { width: 44px; height: 44px; left: 28%; bottom: 44%; background: rgba(255,255,255,.07); animation-delay: 1.8s; animation-duration: 11s; }
.lp-float--3 { width: 90px; height: 90px; left: 68%; bottom: 12%; background: rgba(255,255,255,.08); animation-delay: 3.2s; animation-duration: 8s; }
.lp-float--4 { width: 32px; height: 32px; left: 52%; bottom: 58%; background: rgba(255,255,255,.06); animation-delay: 2.1s; animation-duration: 10s; }
.lp-float--5 { width: 56px; height: 56px; left: 80%; bottom: 72%; background: rgba(255,255,255,.05); animation-delay: 0.9s; animation-duration: 13s; }

@keyframes lp-float {
    0%, 100% { transform: translateY(0)   scale(1);    opacity: .65; }
    50%       { transform: translateY(-36px) scale(1.1); opacity: 1;   }
}

/* Grid pattern overlay */
.lp-grid {
    position: absolute; inset: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

.login-brand-content {
    position: relative; z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 380px;
    animation: lp-fadein .8s cubic-bezier(.22,1,.36,1) both;
}
@keyframes lp-fadein {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.lp-logo-wrap {
    width: 84px; height: 84px;
    border-radius: 22px;
    background: #fff;
    border: 2px solid rgba(255,255,255,.40);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 28px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    padding: 10px;
}
.lp-logo-wrap img { width: 100%; height: 100%; object-fit: contain; }
.lp-logo-wrap i   { font-size: 2.2rem; color: #107980; }

.login-brand h1 {
    font-size: 2rem; font-weight: 800; margin: 0 0 12px;
    letter-spacing: -.025em; line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.login-brand .lp-tagline {
    font-size: 0.88rem; color: rgba(255,255,255,.75);
    margin: 0 0 40px; line-height: 1.65;
}

.lp-features { list-style: none; padding: 0; margin: 0; text-align: left; }
.lp-features li {
    display: flex; align-items: center; gap: 14px;
    font-size: 0.83rem; color: rgba(255,255,255,.88);
    margin-bottom: 16px;
    animation: lp-fadein .8s cubic-bezier(.22,1,.36,1) both;
}
.lp-features li:nth-child(1) { animation-delay: .15s; }
.lp-features li:nth-child(2) { animation-delay: .25s; }
.lp-features li:nth-child(3) { animation-delay: .35s; }
.lp-feat-icon {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}

/* ══════════════════════════════════════════════════════════════════════════════
   RIGHT — FORM PANEL
══════════════════════════════════════════════════════════════════════════════ */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    background: #f1f5f9;
    position: relative;
    overflow: hidden;
}
/* Subtle right-side decoration */
.login-form-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(16,121,128,.07) 0%, rgba(8,145,178,.05) 100%);
    pointer-events: none;
}
.login-form-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(16,121,128,.05);
    pointer-events: none;
}

.login-card {
    width: 100%; max-width: 440px;
    background: #fff;
    border-radius: 22px;
    padding: 48px 44px;
    box-shadow:
        0 2px 4px rgba(0,0,0,.04),
        0 8px 24px rgba(0,0,0,.07),
        0 24px 56px rgba(0,0,0,.06);
    position: relative; z-index: 1;
    animation: lp-card-in .65s cubic-bezier(.22,1,.36,1) both;
    animation-delay: .1s;
}
@keyframes lp-card-in {
    from { opacity: 0; transform: translateY(28px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Panel badge (Admin / Vendor) */
.lp-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #107980, #0891b2);
    color: #fff;
    font-size: 0.65rem; font-weight: 800;
    padding: 5px 14px;
    border-radius: 20px;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 22px;
    box-shadow: 0 4px 14px rgba(16,121,128,.30);
}
.lp-panel-badge i { font-size: 0.8rem; }

.login-card h2 {
    font-size: 1.65rem; font-weight: 800;
    color: #0f172a; margin: 0 0 6px;
    letter-spacing: -.025em;
}
.lp-sub {
    font-size: 0.84rem; color: #64748b; margin: 0 0 34px;
}
.lp-sub a { color: #107980; font-weight: 700; text-decoration: none; }
.lp-sub a:hover { text-decoration: underline; }

/* ── Form fields ── */
.lp-field { margin-bottom: 22px; }
.lp-field label {
    display: block;
    font-size: 0.72rem; font-weight: 800;
    color: #374151; margin-bottom: 7px;
    letter-spacing: .06em; text-transform: uppercase;
}
.lp-input-wrap { position: relative; }
.lp-input-wrap .lp-field-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    font-size: 1rem; color: #9ca3af;
    pointer-events: none;
    transition: color .2s ease;
    z-index: 2;
}
.lp-input-wrap .form-control {
    padding-left: 42px !important;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 11px !important;
    height: 50px !important;
    font-size: 0.88rem !important;
    color: #1e293b !important;
    background: #f9fafb !important;
    transition: border-color .22s, box-shadow .22s, background .22s !important;
    width: 100%;
}
.lp-input-wrap input[type="password"] { padding-right: 48px !important; }
.lp-input-wrap .form-control::placeholder { color: #b0bec5 !important; }
.lp-input-wrap .form-control:focus {
    border-color: #107980 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3.5px rgba(16,121,128,.13) !important;
    outline: none !important;
}
.lp-input-wrap:focus-within .lp-field-icon { color: #107980; }

/* Password toggle button position */
.lp-input-wrap .input-group-append {
    position: absolute; right: 0; top: 0; bottom: 0;
    display: flex; align-items: center;
    z-index: 3;
}
.lp-input-wrap .input-group-text {
    background: transparent !important;
    border: none !important;
    padding: 0 14px !important;
    color: #9ca3af !important;
    cursor: pointer;
    transition: color .2s;
    height: 100%;
    display: flex; align-items: center;
}
.lp-input-wrap .input-group-text:hover { color: #107980 !important; }

/* ── Remember me ── */
.lp-remember {
    display: flex; align-items: center;
    margin-bottom: 30px;
}
.lp-remember .custom-control-label {
    font-size: 0.82rem; color: #4b5563; cursor: pointer;
}
.lp-remember .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #107980 !important;
    border-color: #107980 !important;
}
.lp-remember .custom-control-input:focus ~ .custom-control-label::before {
    box-shadow: 0 0 0 3px rgba(16,121,128,.18) !important;
}

/* ── Submit button ── */
.lp-btn {
    display: block; width: 100%; height: 52px;
    background: linear-gradient(135deg, #107980 0%, #0891b2 100%);
    border: none; border-radius: 12px;
    color: #fff; font-size: 0.88rem; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(16,121,128,.38);
    position: relative; overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease;
}
.lp-btn::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.12), transparent);
    opacity: 0;
    transition: opacity .2s ease;
}
.lp-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(16,121,128,.46);
}
.lp-btn:hover::before { opacity: 1; }
.lp-btn:active { transform: translateY(0); box-shadow: 0 4px 14px rgba(16,121,128,.3); }

/* Button loading state */
.lp-btn.loading { pointer-events: none; opacity: .8; }
.lp-btn .lp-btn-text { transition: opacity .2s; }
.lp-btn .lp-spinner {
    display: none; width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: lp-spin .7s linear infinite;
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%,-50%);
}
.lp-btn.loading .lp-btn-text { opacity: 0; }
.lp-btn.loading .lp-spinner { display: block; }
@keyframes lp-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

/* ── Switch link ── */
.lp-switch {
    margin-top: 26px; text-align: center;
    font-size: 0.82rem; color: #6b7280;
}
.lp-switch a {
    color: #107980; font-weight: 700; text-decoration: none;
    transition: color .2s;
}
.lp-switch a:hover { color: #065f46; text-decoration: underline; }

/* ══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .login-brand { flex: 0 0 42%; padding: 40px 32px; }
    .login-brand h1 { font-size: 1.65rem; }
    .lp-features { display: none; }
}
@media (max-width: 640px) {
    .login-brand { display: none; }
    .login-form-panel {
        flex: 0 0 100%;
        min-height: 100vh;
        padding: 30px 16px;
        background: linear-gradient(150deg, #107980 0%, #0891b2 100%);
    }
    .login-form-panel::before,
    .login-form-panel::after { display: none; }
    .login-card {
        padding: 36px 26px;
        border-radius: 20px;
    }
}
@media (max-width: 380px) {
    .login-card { padding: 28px 18px; }
}
