@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand-primary: #1e3a5f;
    --brand-secondary: #2d5a87;
    --brand-accent: #00b4d8;
    --brand-light: #90e0ef;
    --panel-bg: #0f2744;
    --panel-bg2: #1a3a6b;
    --card-bg: #ffffff;
    --text-dark: #111827;
    --text-mid: #4b5563;
    --text-soft: #9ca3af;
    --border: #e5e7eb;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-card: 28px;
    --radius-btn: 12px;
    --radius-input: 12px;
    --shadow-card: 0 32px 80px rgba(0,0,0,0.14);
    --transition: 0.22s cubic-bezier(.4,0,.2,1);
}

html, body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    background: #f0f4f8;
    overflow-x: hidden;
}

.biv-auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
                url('/filesystems/login-assets/login-bg-1.jpg') center/cover no-repeat;
}

.biv-auth-wrap {
    display: flex;
    width: 100%;
    max-width: 960px;
    min-height: 580px;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.15),
                0 32px 80px rgba(0,0,0,0.4),
                0 0 60px rgba(0,212,255,0.35),
                0 0 120px rgba(0,212,255,0.15);
    background: var(--card-bg);
}

.biv-panel {
    position: relative;
    width: 42%;
    flex-shrink: 0;
    background: linear-gradient(160deg, #0f2744 0%, #1a3a6b 45%, #0e4d7a 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px 40px;
    overflow: hidden;
}

.biv-panel::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0,180,216,.35) 0%, transparent 70%);
    pointer-events: none;
}

.biv-panel::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(144,224,239,.2) 0%, transparent 70%);
    pointer-events: none;
}

.biv-panel-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.biv-panel-logo img {
    height: 36px;
    filter: brightness(0) invert(1);
    opacity: .92;
}

.biv-panel-logo-text {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: #fff;
    opacity: .9;
    letter-spacing: -.3px;
}

.biv-panel-mid {
    position: relative;
    z-index: 2;
}

.biv-panel-eyebrow {
    font-size: 1.38rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--brand-light);
    margin-bottom: 14px;
    opacity: .85;
}

.biv-panel-headline {
    font-family: 'Sora', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 20px;
    letter-spacing: -.5px;
}
.biv-panel-headline span { color: var(--brand-light); }

.biv-panel-desc {
    font-size: 1.23rem;
    color: rgba(255,255,255,.65);
    line-height: 1.7;
    max-width: 260px;
}

.biv-panel-features {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.biv-panel-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.27rem;
    color: rgba(255,255,255,.75);
}

.biv-panel-feat-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.biv-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 52px;
    overflow-y: auto;
}

.biv-form-header { margin-bottom: 24px; }

.biv-form-header h1 {
    font-family: 'Sora', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -.5px;
    margin-bottom: 6px;
}

.biv-form-header p {
    font-size: 1.2rem;
    color: var(--text-mid);
    line-height: 1.6;
}

.biv-alert,
.modern-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: .87rem;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
    animation: fadeSlideIn .3s ease-out;
}
.biv-alert i, .modern-alert i { margin-top: 1px; flex-shrink: 0; }
.biv-alert-danger,  .modern-alert-danger  { background: #fef2f2; color: #991b1b; border-left: 3px solid var(--danger); }
.biv-alert-success, .modern-alert-success { background: #f0fdf4; color: #065f46; border-left: 3px solid var(--success); }
.biv-alert-warning, .modern-alert-warning { background: #fffbeb; color: #92400e; border-left: 3px solid var(--warning); }

.biv-social-row {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 20px;
}

.biv-social-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 18px;
    border-radius: var(--radius-btn);
    font-size: 1.2rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    border: 1.5px solid var(--border);
    background: #d8eedd;
    color: var(--text-dark);
    font-family: 'DM Sans', sans-serif;
    position: relative;
    overflow: hidden;
}
.biv-social-btn svg,
.biv-social-btn img { width: 20px; height: 20px; flex-shrink: 0; }
.biv-social-btn span { flex: 1; text-align: center; }

.biv-social-btn:hover {
    border-color: #c7d2dc;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    color: var(--text-dark);
    text-decoration: none;
}

.biv-social-btn.google  { border-color: #e5e7eb; }
.biv-social-btn.facebook { background: #1877f2; border-color: #1877f2; color: #fff; }
.biv-social-btn.facebook:hover { background: #1565d8; border-color: #1565d8; color: #fff; }
.biv-social-btn.apple   { background: #000; border-color: #000; color: #fff; }
.biv-social-btn.apple:hover { background: #1a1a1a; color: #fff; }
.biv-social-btn.email-btn {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
}
.biv-social-btn.email-btn:hover {
    background: var(--brand-secondary);
    border-color: var(--brand-secondary);
    color: #fff;
}

.biv-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    color: var(--text-soft);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .5px;
}
.biv-divider::before,
.biv-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.biv-email-form { display: none; animation: fadeSlideIn .22s ease-out; }
.biv-email-form.active { display: block; }

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.biv-field { margin-bottom: 14px; }

.biv-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.biv-input-wrap { position: relative; }

.biv-input {
    width: 100%;
    padding: 11px 40px 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-input);
    font-size: .93rem;
    font-family: 'DM Sans', sans-serif;
    color: var(--text-dark);
    background: #fafafa;
    transition: all var(--transition);
    outline: none;
    -webkit-appearance: none;
}
.biv-input:focus {
    border-color: var(--brand-secondary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(45,90,135,.1);
}
.biv-input.valid   { border-color: var(--success); }
.biv-input.invalid { border-color: var(--danger); }

.biv-input-icon {
    position: absolute;
    right: 13px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-soft);
    font-size: 11px;
    cursor: pointer;
    transition: color var(--transition);
}
.biv-input-icon:hover { color: var(--text-mid); }

.biv-submit-btn {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: .97rem;
    font-weight: 700;
    font-family: 'Sora', sans-serif;
    cursor: pointer;
    transition: all var(--transition);
    margin-top: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.biv-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30,58,95,.35);
}
.biv-submit-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

.biv-loading {
    display: inline-block;
    width: 17px; height: 17px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.biv-form-footer {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.biv-extra-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.biv-extra-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: var(--radius-btn);
    font-size: 1.27rem;
    font-weight: 600;
    text-decoration: none;
    border: 1.5px solid var(--border);
    color: var(--brand-primary);
    background: #fff;
    transition: all var(--transition);
}
.biv-extra-link:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    transform: translateY(-1px);
    text-decoration: none;
}
.biv-extra-link i { font-size: 11px; }

.biv-footer-bottom {
    text-align: center;
    font-size: .85rem;
    color: var(--text-mid);
    margin-top: 10px;
}
.biv-footer-bottom a {
    color: var(--brand-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition);
}
.biv-footer-bottom a:hover { color: var(--brand-primary); text-decoration: underline; }

.biv-terms {
    margin-top: 10px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 1.18rem;
    color: var(--text-soft);
    line-height: 1.6;
    text-align: center;
    border: 1px solid var(--border);
}
.biv-terms a { color: var(--brand-secondary); text-decoration: none; font-weight: 500; }
.biv-terms a:hover { text-decoration: underline; }

@media (max-width: 780px) {

    .biv-panel { display: none !important; }

    .biv-auth-wrap {
        flex-direction: column;
        max-width: 480px;
        min-height: auto;
        border-radius: 20px;
    }

    .biv-form-side {
        padding: 36px 28px 28px;
        justify-content: flex-start;
    }

    .biv-form-header h1 { font-size: 1.4rem; }
    .biv-form-header p  { font-size: 1.2rem; }
}

@media (max-width: 480px) {
    .biv-auth-page  { padding: 14px 10px; }
    .biv-auth-wrap  { border-radius: 16px; }
    .biv-form-side  { padding: 28px 18px 22px; }
    .biv-input      { font-size: 16px; }
}