Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

4.4 KB
Raw Blame
// ============================================
// AUTHENTICATION PAGES (Login, Register)
// ============================================

.auth-container {
    min-height: 100vh;
    @include flex-center();
    padding: $space-5;
}

// Sign-in screens are the one place controls default to the large size.
.auth-container {
    .btn:not(.btn-sm):not(.btn-link):not(.btn-icon),
    .ui-input,
    .ui-select-trigger {
        height: $control-lg;
    }
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: $bg-card;
    border: 1px solid $border-subtle;
    border-radius: $radius-overlay;
    padding: $space-10;
}

.auth-header {
    text-align: center;
    margin-bottom: $space-8;

    .brand-logo {
        width: 48px;
        height: 48px; // geometry: logo
        margin: 0 auto $space-4;
        // ServerKitLogo renders its own gradient tile, so suppress the global
        // .brand-logo tile (_sidebar.scss) here — otherwise the self-tiled logo
        // sits inside a second tile (a purple-in-purple "logo inside a logo").
        background: none;
        box-shadow: none;
        border-radius: 0;
    }

    h1 {
        font-size: $text-xl;
        font-weight: $font-weight-semibold;
        margin-bottom: $space-2;
    }

    p {
        color: $text-secondary;
    }
}

.auth-footer {
    text-align: center;
    margin-top: $space-6;
    color: $text-secondary;

    a {
        color: $accent-primary;
        font-weight: $font-weight-medium;

        &:hover {
            text-decoration: underline;
        }
    }
}

// Login layout variants (the `login_layout` setting selects one).
// `centered` is the default .auth-card above; these two are the alternates.
.auth-minimal {
    .auth-minimal__inner {
        width: 100%;
        max-width: 400px;
    }
}

.auth-split {
    padding: 0;
    align-items: stretch;

    .auth-split__hero {
        display: none;
        flex: 1;
        background: linear-gradient(135deg, var(--accent-primary, #6d7cff), var(--accent-hover, #5a67e8));
        color: #fff;
    }

    .auth-split__brand {
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: $space-4;
    }

    .auth-split__name {
        font-size: $text-xl;
        font-weight: $font-weight-semibold;
    }

    .auth-split__card {
        flex: 1;
        max-width: 480px;
        margin: auto;
        border: none;
    }

    @media (min-width: 900px) {
        .auth-split__hero { display: flex; }
    }
}

// SSO login buttons
.sso-providers {
    display: flex;
    flex-direction: column;
    gap: $space-3;
}

.btn-sso {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: $space-3;
    width: 100%;
    height: $control-lg;
    padding: 0 $space-4;
    border: 1px solid $border-subtle;
    border-radius: $radius-control;
    background: $bg-card;
    color: $text-primary;
    font-size: $text-xs;
    font-weight: $font-weight-medium;
    cursor: pointer;
    transition: all $transition-fast;

    &:hover:not(:disabled) {
        border-color: $border-active;
        background: $bg-hover;
    }

    &:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

    svg {
        flex-shrink: 0;
    }
}

.sso-divider {
    display: flex;
    align-items: center;
    gap: $space-4;
    margin: $space-6 0;
    color: $text-tertiary;
    font-size: $text-xs;

    &::before,
    &::after {
        content: '';
        flex: 1;
        height: 1px;
        background: $border-subtle;
    }
}

.sso-loading {
    display: flex;
    justify-content: center;
    margin-bottom: $space-4;

    .spinning {
        animation: spin 1s linear infinite;
    }
}

// Demo mode hint on the login card
.demo-hint {
    margin-bottom: $space-6;
    padding: $space-4;
    border: 1px solid $border-subtle;
    border-radius: $radius-card;
    background: $bg-hover;
    text-align: center;

    &__title {
        font-size: $text-xs;
        font-weight: $font-weight-medium;
        margin-bottom: $space-2;
    }

    &__creds {
        font-size: $text-xs;
        color: $text-secondary;
        margin-bottom: $space-3;

        code {
            color: $text-primary;
        }
    }

    &__fill {
        background: none;
        border: none;
        padding: 0;
        color: $accent-primary;
        font-size: $text-xs;
        font-weight: $font-weight-medium;
        cursor: pointer;

        &:hover {
            text-decoration: underline;
        }
    }
}