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.

17.4 KB
Raw Blame
// ============================================
// SETUP WIZARD (Onboarding)
// ============================================

.setup-wizard {
    min-height: 100vh;
    @include flex-center();
    padding: $space-5;
    background: $bg-body;

    // Setup is the other screen (with sign-in) where controls default to the
    // large size.
    .btn:not(.btn-sm):not(.btn-link):not(.btn-icon),
    .btn-wizard-next,
    .btn-wizard-prev,
    .ui-input,
    .ui-select-trigger {
        height: $control-lg;
    }

    .btn-wizard-next,
    .btn-wizard-prev {
        padding-block: 0;
        border-radius: $radius-control;
    }
}

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

// --------------------------------------------
// Header (logo + title)
// --------------------------------------------
.wizard-header {
    text-align: center;
    margin-bottom: $space-8;

    .wizard-logo {
        width: 48px;
        height: 48px; // geometry: logo
        margin: 0 auto $space-4;
    }

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

    p {
        color: $text-secondary;
    }
}

// --------------------------------------------
// Progress bar
// --------------------------------------------
.wizard-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: $space-3;
    margin-bottom: $space-8;
}

.wizard-progress-step {
    @include flex-center();
    width: 32px;
    height: 32px; // geometry: stepper dot
    border-radius: $radius-full;
    font-size: $text-xs;
    font-weight: $font-weight-semibold;
    border: 2px solid $border-default;
    color: $text-tertiary;
    background: transparent;
    @include transition();

    &.active {
        border-color: $accent-primary;
        background: $accent-primary;
        color: #fff;
    }

    &.completed {
        border-color: $accent-primary;
        background: fade($accent-primary-raw, 15%);
        color: $accent-primary;
    }
}

.wizard-progress-line {
    width: 40px;
    height: 2px;
    background: $border-default;
    @include transition(background);

    &.active {
        background: $accent-primary;
    }
}

// --------------------------------------------
// Step content
// --------------------------------------------
.wizard-step {
    animation: wizardFadeIn 0.3s ease;
}

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

.wizard-step-title {
    font-size: $text-lg;
    font-weight: $font-weight-semibold;
    margin-bottom: $space-2;
}

.wizard-step-description {
    color: $text-secondary;
    font-size: $text-base;
    margin-bottom: $space-6;
}

// --------------------------------------------
// Option grid (Step 2 — use cases)
// --------------------------------------------
.option-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: $space-4;
    margin-bottom: $space-6;

    @media (max-width: $breakpoint-sm) {
        grid-template-columns: 1fr;
    }
}

.option-card {
    display: flex;
    flex-direction: column;
    gap: $space-3;
    padding: $space-5;
    background: $bg-elevated;
    border: 2px solid $border-default;
    border-radius: $radius-overlay;
    cursor: pointer;
    @include transition();
    position: relative;

    &:hover {
        border-color: $border-active;
    }

    &.selected {
        border-color: $accent-primary;
        background: fade($accent-primary-raw, 8%);
    }

    .option-card-icon {
        @include icon-box(40px);
        background: $bg-secondary;
        color: $text-secondary;
        border-radius: $radius-card;
    }

    .option-card-label {
        font-weight: $font-weight-semibold;
        font-size: $text-base;
    }

    .option-card-desc {
        font-size: $text-xs;
        color: $text-secondary;
        line-height: $line-height-normal;
    }

    .option-card-check {
        position: absolute;
        top: $space-3;
        right: $space-3;
        width: 22px;
        height: 22px; // geometry: check badge icon
        border-radius: $radius-full;
        @include flex-center();
        background: $accent-primary;
        color: #fff;
        opacity: 0;
        transform: scale(0.5);
        @include transition();
    }

    &.selected .option-card-check {
        opacity: 1;
        transform: scale(1);
    }
}

// --------------------------------------------
// Tier grid (Step 3)
// --------------------------------------------
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: $space-4;
    margin-bottom: $space-6;

    @media (max-width: $breakpoint-md) {
        grid-template-columns: 1fr;
    }
}

.tier-card {
    display: flex;
    flex-direction: column;
    padding: $space-5;
    background: $bg-elevated;
    border: 2px solid $border-default;
    border-radius: $radius-overlay;
    @include transition();

    &.detected {
        border-color: $accent-primary;
        background: fade($accent-primary-raw, 8%);
    }

    .tier-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: $space-4;
    }

    .tier-card-name {
        font-weight: $font-weight-semibold;
        font-size: $text-md;
    }

    .tier-card-badge {
        display: inline-flex;
        align-items: center;
        height: 20px; // geometry: badge height (20px badge spec)
        font-size: $text-xs;
        padding: 0 $space-tight;
        background: $accent-primary;
        color: #fff;
        border-radius: $radius-badge;
        font-weight: $font-weight-medium;
    }

    .tier-card-specs {
        font-size: $text-xs;
        color: $text-secondary;
        margin-bottom: $space-4;
        padding-bottom: $space-4;
        border-bottom: 1px solid $border-default;
    }

    .tier-features {
        display: flex;
        flex-direction: column;
        gap: $space-2;
        flex: 1;
    }

    .tier-feature {
        display: flex;
        align-items: center;
        gap: $space-2;
        font-size: $text-xs;

        .feature-icon {
            flex-shrink: 0;
            width: 16px;
            height: 16px;
        }

        &.available .feature-icon {
            color: $success;
        }

        &.unavailable {
            color: $text-tertiary;

            .feature-icon {
                color: $text-tertiary;
            }
        }
    }
}

// Profile cards are buttons in the capacity step, so undo the UA button
// styling that would otherwise centre the text and shrink the type.
.tier-card--selectable {
    width: 100%;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;

    &:hover {
        border-color: $accent-primary;
    }
}

.tier-card-badge--muted {
    background: $bg-tertiary;
    color: $text-secondary;
}

// --------------------------------------------
// Capacity step (Step 3)
// --------------------------------------------
.capacity-headline {
    padding: $space-5;
    margin-bottom: $space-5;
    background: $bg-elevated;
    border: 1px solid $border-default;
    border-radius: $radius-overlay;

    &__summary {
        font-size: $text-lg;
        font-weight: $font-weight-semibold;
        color: $text-primary;
        line-height: $line-height-tight;
    }
}

.capacity-specs {
    display: flex;
    flex-wrap: wrap;
    gap: $space-4;
    margin-top: $space-3;
}

.capacity-spec {
    display: inline-flex;
    align-items: center;
    gap: $space-2;
    font-size: $text-xs;
    color: $text-secondary;

    &--muted {
        color: $text-tertiary;
        text-transform: capitalize;
    }
}

.tier-warning {
    display: flex;
    align-items: flex-start;
    gap: $space-3;
    padding: $space-4;
    background: $warning-bg;
    border: 1px solid $warning-border;
    border-radius: $radius-card;
    margin-bottom: $space-6;

    code {
        font-family: $font-mono;
        font-size: $text-xs;
        padding: 1px $space-tight;
        background: $bg-tertiary;
        border-radius: $radius-badge;
    }

    .tier-warning-icon {
        flex-shrink: 0;
        color: $warning;
    }

    .tier-warning-text {
        font-size: $text-xs;
        color: $text-secondary;
        line-height: $line-height-normal;
    }
}

// --------------------------------------------
// Security step (Step 4) — optional 2FA enrolment
// --------------------------------------------
.security-offer {
    display: flex;
    align-items: flex-start;
    gap: $space-4;
    padding: $space-5;
    margin-bottom: $space-6;
    background: $bg-elevated;
    border: 1px solid $border-default;
    border-radius: $radius-overlay;

    &__icon {
        flex-shrink: 0;
        color: $accent-primary;
    }

    &__title {
        font-weight: $font-weight-semibold;
        margin-bottom: $space-2;
    }

    &__desc {
        font-size: $text-xs;
        color: $text-secondary;
        line-height: $line-height-normal;
        margin: 0;
    }
}

.security-enroll {
    display: flex;
    align-items: center;
    gap: $space-5;
    padding: $space-5;
    margin-bottom: $space-5;
    background: $bg-elevated;
    border: 1px solid $border-default;
    border-radius: $radius-overlay;

    @media (max-width: $breakpoint-md) {
        flex-direction: column;
        text-align: center;
    }

    &__qr {
        flex-shrink: 0;
        width: 160px;
        height: 160px;
        border-radius: $radius-card;
        // QR codes render as dark-on-transparent; a white plate keeps them
        // scannable in dark mode.
        background: #fff;
        padding: $space-2;

        &--empty {
            @include flex-center();
            background: $bg-tertiary;
        }
    }

    &__manual-label {
        font-size: $text-xs;
        color: $text-secondary;
        margin-bottom: $space-2;
    }

    &__verify {
        margin-bottom: $space-5;
    }

    &__input {
        font-family: $font-mono;
        font-size: $text-lg;
        text-align: center;
        max-width: 220px;
    }
}

.security-codes {
    &__list {
        margin-bottom: $space-4;
    }

    &__actions {
        display: flex;
        align-items: center;
        gap: $space-3;
        margin-bottom: $space-6;
    }

    &__saved {
        display: inline-flex;
        align-items: center;
        gap: $space-2;
        font-size: $text-xs;
        color: $success;
    }
}

// --------------------------------------------
// Summary panel (Step 5)
// --------------------------------------------
.summary-panel {
    background: $bg-elevated;
    border: 1px solid $border-default;
    border-radius: $radius-overlay;
    padding: $space-6;
    margin-bottom: $space-6;
}

.summary-section {
    &:not(:last-child) {
        margin-bottom: $space-5;
        padding-bottom: $space-5;
        border-bottom: 1px solid $border-default;
    }
}

.summary-section-title {
    font-size: $text-xs;
    font-weight: $font-weight-semibold;
    color: $text-tertiary;
    margin-bottom: $space-3;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: $space-2 0;

    .summary-label {
        color: $text-secondary;
        font-size: $text-xs;
    }

    .summary-value {
        font-weight: $font-weight-medium;
        font-size: $text-xs;
    }

    // Sidebar-profile row: label, item count, and the "Change" toggle that
    // expands the preset picker inline.
    .summary-value--action {
        display: flex;
        align-items: center;
        gap: $space-3;
    }

    .summary-value-note {
        color: $text-tertiary;
        font-weight: $font-weight-normal;
    }
}

.summary-change-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: $primary-color;
    font-size: $text-xs;
    font-weight: $font-weight-medium;

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

.summary-preset-picker {
    margin-top: $space-3;
}

.summary-preset-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: $space-2;
    margin-top: $space-3;
}

.summary-preset-card {
    display: flex;
    flex-direction: column;
    gap: $space-1;
    text-align: left;
    padding: $space-3;
    border: 1px solid $border-default;
    border-radius: $radius-control;
    background: $bg-card;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease;

    &:hover {
        border-color: $primary-color;
    }

    &.active {
        border-color: $primary-color;
        background: fade($accent-primary-raw, 8%);
    }

    &__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: $space-2;
        color: $text-primary;
        font-size: $text-xs;
        font-weight: $font-weight-medium;
    }

    &__desc {
        color: $text-tertiary;
        font-size: $text-xs;
        line-height: 1.4;
    }
}

.summary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: $space-2;
}

.summary-tag {
    display: inline-flex;
    align-items: center;
    height: 20px; // geometry: badge height (20px badge spec)
    padding: 0 $space-tight;
    background: fade($accent-primary-raw, 12%);
    color: $accent-primary;
    border-radius: $radius-badge;
    font-size: $text-xs;
    font-weight: $font-weight-medium;
}

.recommendation-chips {
    display: flex;
    flex-wrap: wrap;
    gap: $space-2;
}

.recommendation-chip {
    display: inline-flex;
    align-items: center;
    gap: $space-2;
    padding: $space-2 $space-4;
    background: $bg-secondary;
    border: 1px solid $border-default;
    border-radius: $radius-card;
    font-size: $text-xs;
    color: $text-primary;
}

// --------------------------------------------
// Recommended extensions — install checkboxes
// --------------------------------------------
.recommendation-hint {
    margin: 0 0 $space-3;
    font-size: $text-xs;
    color: $text-secondary;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: $space-2;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: $space-3;
    padding: $space-3 $space-4;
    background: $bg-secondary;
    border: 1px solid $border-default;
    border-radius: $radius-card;
    cursor: pointer;

    &:hover {
        border-color: $primary-color;
    }

    &__check {
        margin-top: $space-1;
        flex-shrink: 0;
        cursor: pointer;
    }

    &__body {
        display: flex;
        flex-direction: column;
        gap: $space-hair;
        flex: 1;
        min-width: 0;
    }

    &__name {
        font-size: $text-xs;
        font-weight: $font-weight-medium;
        color: $text-primary;
    }

    &__desc {
        font-size: $text-xs;
        color: $text-secondary;
    }

    &__spinner {
        color: $text-secondary;
        animation: spin 1s linear infinite;
        flex-shrink: 0;
    }

    &__status {
        font-size: $text-xs;
        flex-shrink: 0;

        &--installed {
            color: $text-secondary;
        }

        &--done {
            color: $success-color;
            flex-shrink: 0;
        }

        &--error {
            color: $danger-color;
            flex-shrink: 0;
        }
    }
}

.recommendation-error {
    margin: $space-3 0 0;
    font-size: $text-xs;
    color: $danger-color;

    a {
        color: $primary-color;
        text-decoration: underline;
    }
}

// --------------------------------------------
// Navigation buttons
// --------------------------------------------
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: $space-8;
    padding-top: $space-6;
    border-top: 1px solid $border-default;
}

// Steps whose content already ends on a divider carry no chrome of their own.
.wizard-nav--flush {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

// Full-width step submit button.
.btn-wizard-next--block {
    width: 100%;
    justify-content: center;
}

.summary-rec-ico {
    display: inline;
    vertical-align: middle;
    margin-right: $space-tight;
}

.btn-wizard-prev {
    @include button-base();
    color: $text-secondary;
    border-color: $border-default;
    background: transparent;

    &:hover {
        background: $bg-hover;
        color: $text-primary;
    }
}

.btn-wizard-next {
    @include button-base();
    background: $accent-primary;
    color: #fff;
    margin-left: auto;

    &:hover {
        background: $accent-hover;
    }

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

// --------------------------------------------
// Setup info banner (reused in step 1)
// --------------------------------------------
.wizard-info-banner {
    display: flex;
    gap: $space-4;
    padding: $space-4;
    background: fade($accent-primary-raw, 10%);
    border-radius: $radius-control;
    margin-bottom: $space-6;

    .wizard-info-icon {
        flex-shrink: 0;
        color: $accent-primary;
    }

    p {
        margin: 0;
        font-size: $text-xs;
        color: $text-secondary;
        line-height: $line-height-normal;
    }
}

// --------------------------------------------
// Loading state
// --------------------------------------------
.wizard-loading {
    @include flex-center();
    padding: $space-10;
    color: $text-secondary;
}

// Semantic layouts and controls; declarations preserved from the legacy compatibility layer.
.setup-back-action { margin-bottom: 1rem; }