/* Login page: split layout, brand panel left, form right. Colors follow the sb-admin-2 primary palette. */

:root {
    --login-primary: #4e73df;
    --login-primary-hover: #2e59d9;
    --login-panel: #224abe;
    --login-panel-text-muted: #d4ddf7;
    --login-pulse: #36b9cc;
    --login-accent: #e74a3b;
    --login-text: #1f2a44;
    --login-text-muted: #5a6478;
    --login-border: #d1d8e6;
}

body.login-page {
    margin: 0;
    background: #ffffff;
    font-family: 'Nunito', system-ui, sans-serif;
    color: var(--login-text);
}

.login-shell {
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
}

.login-brand {
    flex: 1 1 520px;
    position: relative;
    overflow: hidden;
    background: var(--login-panel);
    color: #ffffff;
    padding: 56px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
}

.login-brand > *:not(.login-fiber) {
    position: relative;
}

.login-fiber {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.login-fiber .fiber-base {
    fill: none;
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2;
}

.login-fiber .fiber-pulse {
    fill: none;
    stroke: var(--login-pulse);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 10 90;
    stroke-dashoffset: 100;
    animation: login-fiber-flow 5s linear infinite;
}

.login-fiber .fiber-pulse.pulse-2 { animation-duration: 6s; animation-delay: -2s; }
.login-fiber .fiber-pulse.pulse-3 { animation-duration: 7s; animation-delay: -4s; }
.login-fiber .fiber-pulse.pulse-4 { animation-duration: 4.5s; animation-delay: -1s; }
.login-fiber .fiber-pulse.pulse-5 { animation-duration: 5.5s; animation-delay: -3s; }

.login-fiber .fiber-node {
    fill: var(--login-pulse);
    transform-box: fill-box;
    transform-origin: center;
    animation: login-node-beat 3s ease-in-out infinite;
}

.login-fiber .fiber-node.node-2 { animation-delay: -1s; }
.login-fiber .fiber-node.node-3 { animation-delay: -2s; }
.login-fiber .fiber-node.node-accent { fill: var(--login-accent); }

@keyframes login-fiber-flow {
    to { stroke-dashoffset: 0; }
}

@keyframes login-node-beat {
    0%, 100% { transform: scale(1); opacity: 0.9; }
    50% { transform: scale(1.6); opacity: 0.45; }
}

.login-identity {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}

/* Tenants upload logos of any shape: a white rounded box that grows with the logo's width, so a round logo
   sits in a square and a wide wordmark keeps its height instead of shrinking into a circle */
.login-logo {
    height: 64px;
    min-width: 64px;
    max-width: 240px;
    padding: 6px;
    box-sizing: border-box;
    border-radius: 14px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-logo img {
    height: 52px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.login-app-name {
    font-size: 20px;
    font-weight: 800;
}

.login-headline {
    max-width: 460px;
}

.login-headline h1 {
    margin: 0 0 16px;
    font-size: 40px;
    line-height: 1.15;
    font-weight: 800;
    color: #ffffff;
}

.login-headline p,
.login-company {
    margin: 0;
    color: var(--login-panel-text-muted);
}

.login-headline p {
    font-size: 17px;
    line-height: 1.6;
}

.login-company {
    font-size: 13px;
}

.login-main {
    flex: 1 1 440px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px;
    box-sizing: border-box;
}

.login-form {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.login-form h2 {
    margin: 0 0 8px;
    font-size: 30px;
    font-weight: 800;
    color: var(--login-text);
}

.login-form .login-subtitle,
.login-form .login-help {
    margin: 0;
    font-size: 15px;
    color: var(--login-text-muted);
}

.login-form .login-help {
    font-size: 14px;
    text-align: center;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-field label {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--login-text);
}

.login-field .form-control {
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--login-border);
    border-radius: 10px;
    font-size: 15px;
    color: var(--login-text);
}

.login-field .form-control:focus {
    border-color: var(--login-primary);
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.login-password {
    position: relative;
    display: flex;
}

.login-password .form-control {
    flex: 1 1 auto;
    padding-right: 52px;
}

.login-password-toggle {
    position: absolute;
    right: 2px;
    top: 2px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border: 0;
    background: transparent;
    color: var(--login-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.login-password-toggle:hover {
    color: var(--login-primary);
}

.login-submit {
    height: 50px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
}

.login-company-mobile {
    display: none;
}

/* Phones and small tablets: a short brand header, then the form as a card pulled up over it, so the
   form is on the first screen instead of below a full-height panel */
@media (max-width: 991.98px) {
    .login-shell {
        flex-direction: column;
        flex-wrap: nowrap;
        background: #f3f5fa;
    }

    .login-brand {
        flex: 0 0 auto;
        padding: 28px 24px 72px;
        gap: 18px;
    }

    .login-logo {
        height: 52px;
        min-width: 52px;
        border-radius: 12px;
    }

    .login-logo img {
        height: 40px;
    }

    .login-app-name {
        font-size: 18px;
    }

    .login-headline h1 {
        margin: 0;
        font-size: 22px;
        line-height: 1.3;
    }

    .login-headline p,
    .login-brand .login-company {
        display: none;
    }

    .login-main {
        flex: 1 0 auto;
        align-items: flex-start;
        padding: 0 16px 32px;
        margin-top: -48px;
    }

    .login-form {
        max-width: 440px;
        gap: 18px;
        padding: 28px 22px;
        background: #ffffff;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(31, 42, 68, 0.12);
    }

    .login-form h2 {
        font-size: 24px;
        margin-bottom: 4px;
    }

    .login-company-mobile {
        display: block;
        margin: 4px 0 0;
        font-size: 12px;
        text-align: center;
        color: var(--login-text-muted);
    }
}

@media (prefers-reduced-motion: reduce) {
    .login-fiber .fiber-pulse,
    .login-fiber .fiber-node {
        animation: none;
    }
}
