html {
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body.saas-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Manrope", sans-serif;
    color: #edf3ff;
    background:
        radial-gradient(circle at top left, rgba(72, 196, 255, 0.16), transparent 34%),
        radial-gradient(circle at top right, rgba(157, 91, 255, 0.16), transparent 28%),
        linear-gradient(180deg, #07101f 0%, #0b1021 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.saas-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.saas-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    overflow: hidden;
    backdrop-filter: blur(20px);
    background: linear-gradient(180deg, rgba(7, 12, 25, 0.84) 0%, rgba(7, 12, 25, 0.62) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow: 0 18px 40px rgba(2, 6, 15, 0.22);
}

.saas-topbar__glow {
    position: absolute;
    top: -40px;
    width: 240px;
    height: 140px;
    border-radius: 999px;
    filter: blur(48px);
    pointer-events: none;
    opacity: 0.38;
}

.saas-topbar__glow--left {
    left: 4%;
    background: rgba(68, 208, 255, 0.24);
}

.saas-topbar__glow--right {
    right: 4%;
    background: rgba(126, 98, 255, 0.24);
}

.saas-topbar__inner,
.saas-container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.saas-topbar__inner {
    position: relative;
    min-height: 78px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.saas-topbar__cluster {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.saas-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px 10px 10px;
    border-radius: 999px;
    font-family: "Oxanium", sans-serif;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.saas-brand__mark {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #68f7db 0%, #8aa1ff 55%, #7f6dff 100%);
    box-shadow: 0 0 28px rgba(104, 247, 219, 0.48);
}

.saas-brand small {
    display: block;
    color: #9eb3d8;
    font-family: "Manrope", sans-serif;
}

.saas-nav,
.saas-auth-links,
.saas-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.saas-nav a,
.saas-auth-links a,
.saas-lang-switch a,
.saas-link-button {
    padding: 10px 14px;
    border-radius: 999px;
    color: #c8d8f6;
    border: 1px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.saas-nav a:hover,
.saas-auth-links a:hover,
.saas-lang-switch a:hover,
.saas-link-button:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.saas-lang-switch {
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.saas-lang-switch a {
    min-width: 44px;
    text-align: center;
    padding: 8px 12px;
}

.saas-lang-switch a.is-active {
    color: #07101f;
    background: linear-gradient(135deg, #68f7db 0%, #76a4ff 100%);
    border-color: transparent;
    font-weight: 800;
}

.saas-auth-links__primary {
    background: linear-gradient(135deg, #5fe6c2 0%, #71a8ff 100%);
    color: #07101f !important;
    font-weight: 700;
}

.saas-auth-links__user {
    color: #96a9cd;
    font-size: 14px;
}

.saas-link-button {
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.saas-main {
    flex: 1;
    padding: 42px 0 28px;
}

.saas-hero,
.saas-card,
.saas-panel,
.saas-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 18, 34, 0.82);
    box-shadow: 0 28px 64px rgba(2, 5, 15, 0.48);
    backdrop-filter: blur(18px);
}

.saas-hero {
    border-radius: 32px;
    padding: 28px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 0% 0%, rgba(72, 196, 255, 0.12), transparent 28%),
        radial-gradient(circle at 100% 0%, rgba(157, 91, 255, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(10, 18, 34, 0.88) 0%, rgba(8, 15, 29, 0.92) 100%);
}

.saas-card,
.saas-panel,
.saas-table-wrap {
    border-radius: 24px;
    padding: 24px;
}

.saas-panel--nested {
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: none;
}

.saas-grid {
    display: grid;
    gap: 20px;
}

.saas-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saas-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saas-title {
    margin: 0 0 10px;
    font-family: "Oxanium", sans-serif;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.02;
}

.saas-lead,
.saas-copy {
    margin: 0;
    color: #acc1e4;
    line-height: 1.7;
}

.saas-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #d7f8ed;
    background: rgba(95, 230, 194, 0.12);
}

.saas-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #68f7db;
    box-shadow: 0 0 14px rgba(104, 247, 219, 0.65);
}

.saas-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 22px;
}

.saas-panel code,
.saas-card code,
.saas-note code {
    color: #dff3ff;
}

.saas-button,
.saas-button--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    font-weight: 700;
}

.saas-button--small {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    font-size: 13px;
}

.saas-button {
    border: 0;
    cursor: pointer;
    color: #06101d;
    background: linear-gradient(135deg, #68f7db 0%, #76a4ff 100%);
}

.saas-button[disabled] {
    cursor: not-allowed;
    opacity: 0.45;
}

.saas-button--ghost {
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #edf3ff;
    background: rgba(255, 255, 255, 0.04);
}

.saas-form {
    display: grid;
    gap: 16px;
}

.saas-form__row {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saas-field {
    display: grid;
    gap: 8px;
}

.saas-field label {
    color: #a6badf;
    font-size: 14px;
}

.saas-field input,
.saas-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 10, 22, 0.72);
    color: #f5f8ff;
    font: inherit;
}

.saas-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.saas-field textarea {
    width: 100%;
    min-height: 96px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 10, 22, 0.72);
    color: #f5f8ff;
    font: inherit;
    resize: vertical;
}

.saas-note,
.saas-alert,
.saas-status {
    border-radius: 18px;
    padding: 14px 16px;
}

.saas-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.saas-mode-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.saas-mode-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.saas-mode-card:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 232, 214, 0.24);
}

.saas-mode-card.is-selected {
    border-color: rgba(111, 232, 214, 0.38);
    box-shadow: 0 0 0 1px rgba(111, 232, 214, 0.14) inset;
    background: linear-gradient(180deg, rgba(13, 23, 41, 0.9) 0%, rgba(8, 17, 33, 0.96) 100%);
}

.saas-mode-card input {
    margin-top: 4px;
}

.saas-mode-card strong {
    display: block;
    color: #f6fbff;
    font-size: 14px;
}

.saas-mode-card small {
    display: block;
    margin-top: 4px;
    color: #93a8cb;
    line-height: 1.35;
    font-size: 12px;
}

.saas-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
}

.saas-checkbox-card input {
    margin-top: 3px;
}

.saas-checkbox-card strong {
    display: block;
    color: #f6fbff;
}

.saas-checkbox-card small {
    display: block;
    margin-top: 6px;
    color: #93a8cb;
}

.saas-note {
    color: #b5c8e8;
    background: rgba(255, 255, 255, 0.04);
}

.saas-alert {
    margin-bottom: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.saas-alert--success {
    color: #dff9ed;
    background: rgba(56, 173, 103, 0.16);
}

.saas-alert--error {
    color: #ffe1e1;
    background: rgba(196, 72, 88, 0.18);
}

.saas-status {
    color: #edf3ff;
    background: rgba(255, 255, 255, 0.05);
}

.saas-status--good {
    background: rgba(56, 173, 103, 0.14);
}

.saas-status--bad {
    background: rgba(196, 72, 88, 0.18);
}

.saas-metrics {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saas-metric strong {
    display: block;
    font-size: 13px;
    color: #9eb3d8;
    margin-bottom: 8px;
}

.saas-metric span,
.saas-metric a {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    word-break: break-word;
}

.saas-table-wrap {
    overflow-x: auto;
}

.saas-table-wrap--compact {
    border-radius: 18px;
    background: rgba(6, 12, 24, 0.56);
}

.saas-table-wrap--scroll-y {
    max-height: 420px;
    overflow: auto;
}

.saas-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.saas-table--compact {
    min-width: 1040px;
}

.saas-table th,
.saas-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
    vertical-align: top;
}

.saas-table--compact th,
.saas-table--compact td {
    padding: 10px 10px;
    font-size: 13px;
}

.saas-table th {
    color: #9eb3d8;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.saas-inline-form {
    display: contents;
}

.saas-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.saas-search {
    display: grid;
    gap: 8px;
    min-width: min(100%, 360px);
}

.saas-search label {
    color: #a6badf;
    font-size: 13px;
}

.saas-search__row {
    display: flex;
    gap: 10px;
}

.saas-search__row input {
    flex: 1;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(3, 10, 22, 0.72);
    color: #f5f8ff;
    font: inherit;
}

.saas-admin-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr 0.9fr 1fr 0.75fr 0.75fr auto;
    gap: 10px;
    align-items: center;
}

.saas-admin-row input,
.saas-admin-row select {
    width: 100%;
    min-height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(3, 10, 22, 0.72);
    color: #f5f8ff;
    font: inherit;
}

.saas-pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.saas-billing-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.saas-billing-mini {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(129, 159, 255, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.saas-billing-mini strong {
    color: #f5f8ff;
    font-size: 13px;
}

.saas-billing-mini span,
.saas-billing-mini code {
    color: #9eb8df;
    word-break: break-word;
}

.saas-pricing-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(129, 159, 255, 0.16);
    background: linear-gradient(180deg, rgba(12, 19, 36, 0.92), rgba(9, 15, 30, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.saas-pricing-card form {
    display: grid;
    gap: 10px;
}

.saas-pricing-inline-form .saas-field input {
    min-height: 44px;
}

.saas-pricing-card.is-current {
    border-color: rgba(104, 247, 219, 0.36);
    box-shadow: 0 0 0 1px rgba(104, 247, 219, 0.10) inset, 0 16px 36px rgba(27, 118, 103, 0.16);
}

.saas-pricing-card h3 {
    margin: 0;
    font-size: 22px;
    font-family: "Oxanium", sans-serif;
}

.saas-pricing-price {
    font-size: 32px;
    font-weight: 800;
    color: #ffffff;
}

.saas-pricing-subprice {
    font-size: 15px;
    font-weight: 700;
    color: #9fd9ff;
}

.saas-pricing-badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(104, 247, 219, 0.14);
    color: #cffff3;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.saas-footer {
    padding: 0 0 26px;
    text-align: center;
    color: #8ca1c6;
}

.saas-panel__split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.saas-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 118px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(10, 16, 30, 0.72);
    color: #d7e4ff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.saas-status-chip--connected {
    border-color: rgba(124, 252, 152, 0.35);
    box-shadow: 0 0 24px rgba(124, 252, 152, 0.18);
    color: #a8ffb8;
}

.saas-status-chip--disconnected,
.saas-status-chip--muted {
    color: #d7e4ff;
}

.saas-status-chip--error {
    border-color: rgba(255, 123, 123, 0.35);
    box-shadow: 0 0 24px rgba(255, 123, 123, 0.18);
    color: #ffb5b5;
}

.saas-tikfinity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.saas-tikfinity-card {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(129, 159, 255, 0.16);
    background: linear-gradient(180deg, rgba(12, 19, 36, 0.92), rgba(9, 15, 30, 0.82));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.saas-tikfinity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.saas-tikfinity-row:last-child {
    border-bottom: 0;
}

.saas-tikfinity-row strong {
    color: #8ca1c6;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.saas-tikfinity-row span,
.saas-tikfinity-row code {
    color: #f4f7ff;
    text-align: right;
    word-break: break-word;
}

.saas-steps {
    margin: 0;
    padding-left: 18px;
    color: #d7e4ff;
}

.saas-steps li + li {
    margin-top: 10px;
}

.saas-hidden-bridge {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    border: 0;
}

.saas-remote-grid {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    margin-top: 18px;
}

.saas-remote-card {
    display: flex;
    align-items: center;
    justify-content: center;
}

.saas-remote-qr {
    width: min(220px, 100%);
    height: auto;
    border-radius: 22px;
    background: #ffffff;
    padding: 12px;
}

@media (max-width: 900px) {
    .saas-grid--2,
    .saas-grid--3,
    .saas-form__row,
    .saas-mode-grid,
    .saas-metrics,
    .saas-checkbox-grid,
    .saas-tikfinity-grid,
    .saas-remote-grid,
    .saas-billing-strip,
    .saas-pricing-grid {
        grid-template-columns: 1fr;
    }

    .saas-topbar__inner,
    .saas-topbar__cluster {
        align-items: flex-start;
    }

    .saas-topbar__inner {
        flex-direction: column;
        padding: 14px 0;
    }

    .saas-topbar__cluster {
        width: 100%;
        flex-direction: column;
    }

    .saas-nav,
    .saas-auth-links,
    .saas-lang-switch {
        width: 100%;
        flex-wrap: wrap;
    }

    .saas-brand {
        width: 100%;
        justify-content: flex-start;
    }

    .saas-panel__split,
    .saas-tikfinity-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .saas-tikfinity-row span,
    .saas-tikfinity-row code {
        text-align: left;
    }

    .saas-search {
        width: 100%;
    }

    .saas-search__row {
        flex-direction: column;
    }
}
