/* ============================================
   Vendor Login Page — Modern Split Layout
   ============================================ */

/* Page container — full viewport, scrollable */
.vl-page {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hide the site header & footer on this page */
.header,
footer,
.footer { display: none !important; }

/* Main card wrapper */
.vl-wrapper {
    display: flex;
    width: 100%;
    max-width: 1000px;
    min-height: 600px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0,0,0,.04),
        0 20px 50px rgba(0,0,0,.08);
    animation: vlSlideUp .5s cubic-bezier(.22,1,.36,1) both;
    margin: auto; /* centers when content is shorter than viewport */
}

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

/* -----------------------------------------------
   LEFT BRAND PANEL
   ----------------------------------------------- */
.vl-brand-panel {
    position: relative;
    flex: 0 0 420px;
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 50px 40px;
    overflow: hidden;
}

.vl-brand-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(0,123,255,.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0,200,150,.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Floating shapes for visual texture */
.vl-brand-panel::before,
.vl-brand-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: #fff;
}
.vl-brand-panel::before {
    width: 300px;
    height: 300px;
    top: -80px;
    right: -80px;
    animation: vlFloat 8s ease-in-out infinite;
}
.vl-brand-panel::after {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    animation: vlFloat 6s ease-in-out infinite reverse;
}

@keyframes vlFloat {
    0%, 100% { transform: translate(0, 0); }
    50%      { transform: translate(15px, -15px); }
}

.vl-brand-content {
    position: relative;
    z-index: 1;
}

.vl-brand-icon {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 28px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.1);
}

.vl-brand-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
}
.vl-brand-title span {
    display: block;
    font-size: 16px;
    font-weight: 400;
    opacity: .7;
    margin-top: 4px;
}

.vl-brand-tagline {
    font-size: 14px;
    line-height: 1.7;
    opacity: .7;
    margin-bottom: 40px;
}

/* Feature list */
.vl-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vl-feature {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vl-feature-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #7eb8ff;
    border: 1px solid rgba(255,255,255,.06);
}

.vl-feature-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
}
.vl-feature-text span {
    font-size: 12px;
    opacity: .55;
}

/* -----------------------------------------------
   RIGHT FORM PANEL
   ----------------------------------------------- */
.vl-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 48px;
    background: #fff;
}

.vl-form-inner {
    width: 100%;
    max-width: 380px;
}

/* Header */
.vl-form-header {
    margin-bottom: 32px;
}
.vl-form-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.vl-form-header p {
    font-size: 14px;
    color: #7c8db0;
}

/* Alert messages */
.vl-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 24px;
    font-size: 13px;
    line-height: 1.5;
    animation: vlShake .4s ease-in-out;
}
.vl-alert i {
    margin-top: 2px;
    flex-shrink: 0;
}
.vl-alert p {
    margin: 0;
}
.vl-alert p + p {
    margin-top: 4px;
}
.vl-alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
.vl-alert-danger i {
    color: #dc2626;
}

@keyframes vlShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* Form fields */
.vl-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vl-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.vl-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.vl-input-wrapper > i:first-child {
    position: absolute;
    left: 14px;
    font-size: 15px;
    color: #9ca3af;
    pointer-events: none;
    transition: color .2s;
}
.vl-input-wrapper input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a2e;
    background: #f9fafb;
    transition: all .2s;
    outline: none;
}
.vl-input-wrapper input::placeholder {
    color: #b0b7c3;
}
.vl-input-wrapper input:focus {
    border-color: #007bff;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0,123,255,.1);
}
.vl-input-wrapper input:focus ~ i:first-child,
.vl-input-wrapper:focus-within > i:first-child {
    color: #007bff;
}

/* Password toggle */
.vl-toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #9ca3af;
    font-size: 14px;
    transition: color .2s;
}
.vl-toggle-password:hover {
    color: #374151;
}

/* Remember me + Forgot password row */
.vl-form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.vl-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}
.vl-checkbox input {
    display: none;
}
.vl-checkmark {
    width: 18px;
    height: 18px;
    border: 1.5px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}
.vl-checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: #fff;
    opacity: 0;
    transform: scale(0);
    transition: all .2s;
}
.vl-checkbox input:checked + .vl-checkmark {
    background: #007bff;
    border-color: #007bff;
}
.vl-checkbox input:checked + .vl-checkmark::after {
    opacity: 1;
    transform: scale(1);
}

.vl-forgot-link {
    font-size: 13px;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
}
.vl-forgot-link:hover {
    color: #0056b3;
}

/* Submit button */
.vl-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all .25s;
    box-shadow: 0 4px 15px rgba(0,123,255,.3);
    margin-top: 4px;
}
.vl-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,123,255,.4);
    background: linear-gradient(135deg, #0069d9 0%, #004db3 100%);
}
.vl-submit-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0,123,255,.3);
}
.vl-submit-btn i {
    font-size: 13px;
    transition: transform .2s;
}
.vl-submit-btn:hover i {
    transform: translateX(3px);
}

/* Divider */
.vl-form-divider {
    text-align: center;
    margin: 28px 0 20px;
    position: relative;
}
.vl-form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}
.vl-form-divider span {
    position: relative;
    background: #fff;
    padding: 0 16px;
    font-size: 12.5px;
    color: #9ca3af;
    font-weight: 500;
}

/* Register button */
.vl-register-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all .2s;
}
.vl-register-btn:hover {
    border-color: #007bff;
    color: #007bff;
    background: #f0f7ff;
}
.vl-register-btn i {
    font-size: 14px;
}

/* Footer link — back to store */
.vl-form-footer {
    text-align: center;
    margin-top: 24px;
}
.vl-form-footer a {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    transition: color .2s;
}
.vl-form-footer a:hover {
    color: #007bff;
}
.vl-form-footer a i {
    margin-right: 4px;
    font-size: 11px;
}

/* -----------------------------------------------
   RESPONSIVE
   ----------------------------------------------- */

/* Tablet — stack vertically */
@media (max-width: 860px) {
    .vl-page {
        padding: 0;
        align-items: flex-start;
    }
    .vl-wrapper {
        flex-direction: column;
        border-radius: 0;
        min-height: auto;
        max-width: 100%;
        box-shadow: none;
    }
    .vl-brand-panel {
        flex: 0 0 auto;
        padding: 36px 28px;
    }
    .vl-brand-tagline {
        margin-bottom: 24px;
    }
    .vl-features {
        flex-direction: row;
        gap: 16px;
        flex-wrap: wrap;
    }
    .vl-feature {
        flex: 1;
        min-width: 140px;
    }
    .vl-form-panel {
        padding: 36px 28px;
        flex: 0 0 auto;
    }
    .vl-form-inner {
        max-width: 440px;
    }
}

/* Mobile — compact brand, prioritize form */
@media (max-width: 600px) {
    .vl-page {
        padding: 0;
        align-items: flex-start;
    }
    .vl-wrapper {
        flex-direction: column;
        border-radius: 0;
        min-height: auto;
        max-width: 100%;
        box-shadow: none;
    }

    /* Compact brand panel — just logo, title, and tagline */
    .vl-brand-panel {
        padding: 28px 20px 24px;
        text-align: center;
        align-items: center;
    }
    .vl-brand-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .vl-brand-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
        border-radius: 12px;
        margin-bottom: 14px;
    }
    .vl-brand-title {
        font-size: 20px;
        text-align: center;
    }
    .vl-brand-title span {
        font-size: 13px;
        margin-top: 2px;
    }
    .vl-brand-tagline {
        font-size: 12.5px;
        margin-bottom: 0;
        text-align: center;
        max-width: 280px;
    }

    /* Hide features on mobile — save space for form */
    .vl-features {
        display: none;
    }

    /* Hide floating circles on mobile */
    .vl-brand-panel::before,
    .vl-brand-panel::after {
        display: none;
    }

    /* Form panel — fills remaining space */
    .vl-form-panel {
        padding: 28px 20px;
        padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px));
        flex: 0 0 auto;
    }
    .vl-form-inner {
        max-width: 100%;
    }
    .vl-form-header {
        margin-bottom: 24px;
    }
    .vl-form-header h1 {
        font-size: 24px;
    }
    .vl-form-header p {
        font-size: 13px;
    }

    /* Larger touch targets for inputs */
    .vl-input-wrapper input {
        padding: 14px 14px 14px 42px;
        font-size: 16px; /* prevents iOS zoom on focus */
        border-radius: 12px;
    }
    .vl-input-wrapper > i:first-child {
        left: 14px;
        font-size: 16px;
    }
    .vl-toggle-password {
        padding: 10px;
        right: 8px;
        font-size: 16px;
    }

    /* Remember / Forgot row */
    .vl-form-options {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .vl-checkbox {
        font-size: 13px;
    }
    .vl-checkmark {
        width: 20px;
        height: 20px;
    }
    .vl-forgot-link {
        font-size: 13px;
    }

    /* Submit button — big touch target */
    .vl-submit-btn {
        padding: 15px;
        font-size: 15px;
        border-radius: 12px;
        min-height: 50px;
    }

    /* Divider */
    .vl-form-divider {
        margin: 24px 0 16px;
    }

    /* Register button */
    .vl-register-btn {
        padding: 14px;
        border-radius: 12px;
        min-height: 48px;
        font-size: 14px;
    }

    /* Footer */
    .vl-form-footer {
        margin-top: 20px;
    }

    /* Alert */
    .vl-alert {
        font-size: 13px;
        padding: 12px 14px;
        border-radius: 12px;
    }

    /* Form gap slightly smaller */
    .vl-form {
        gap: 16px;
    }
    .vl-input-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }
}

/* Very small screens (iPhone SE, etc.) */
@media (max-width: 380px) {
    .vl-brand-panel {
        padding: 22px 16px 20px;
    }
    .vl-brand-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
        margin-bottom: 12px;
    }
    .vl-brand-title {
        font-size: 18px;
    }
    .vl-brand-tagline {
        font-size: 12px;
    }
    .vl-form-panel {
        padding: 24px 16px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    }
    .vl-form-header h1 {
        font-size: 22px;
    }
    .vl-input-wrapper input {
        padding: 13px 14px 13px 40px;
    }
    .vl-submit-btn {
        padding: 14px;
        min-height: 48px;
    }
    .vl-register-btn {
        padding: 13px;
        min-height: 46px;
    }

    /* Stack remember/forgot vertically on very small screens */
    .vl-form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Landscape mobile — side-by-side but scrollable */
@media (max-height: 500px) and (orientation: landscape) {
    .vl-page {
        align-items: flex-start;
    }
    .vl-wrapper {
        flex-direction: row;
        min-height: auto;
        border-radius: 0;
    }
    .vl-brand-panel {
        flex: 0 0 280px;
        padding: 24px 20px;
    }
    .vl-features { display: none; }
    .vl-brand-tagline { margin-bottom: 0; }
    .vl-form-panel {
        padding: 24px 28px;
    }
}
