:root {
    --tenant-primary: #0f766e;
    --tenant-secondary: #0f172a;
    --tenant-accent: #14b8a6;
    --tenant-sidebar-bg: #0f172a;
    --tenant-page-bg: #f3f6fb;
    --tenant-card-bg: #ffffff;
    --tenant-text: #0f172a;
    --tenant-muted: #64748b;
    --tenant-login-bg: #f3f6fb;
}

body.tenant-themed-page,
.saas-admin-body.tenant-themed-page {
    background: var(--tenant-page-bg);
    color: var(--tenant-text);
}

.tenant-themed-page .saas-admin-sidebar {
    background: var(--tenant-sidebar-bg);
}

.tenant-themed-page .saas-admin-brand-mark,
.tenant-themed-page .saas-admin-button-primary,
.tenant-themed-page .tenant-theme-preview button {
    background: var(--tenant-primary);
}

.tenant-themed-page .saas-admin-eyebrow,
.tenant-themed-page .saas-admin-nav-link.is-active {
    color: var(--tenant-accent);
}

.tenant-theme-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr);
    gap: 18px;
    align-items: start;
}

.tenant-theme-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.tenant-theme-form label span,
.tenant-theme-checkbox span {
    display: block;
    margin-bottom: 6px;
    color: var(--tenant-muted);
    font-size: 13px;
    font-weight: 700;
}

.tenant-theme-color-field > div {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 8px;
    align-items: center;
}

.tenant-theme-color-field input[type="color"] {
    width: 48px;
    height: 42px;
    border: 1px solid #dbe3ef;
    border-radius: 12px;
    padding: 3px;
    background: #fff;
}

.tenant-theme-checkbox {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 8px 0 18px;
}

.tenant-theme-checkbox input {
    width: 18px;
    height: 18px;
}

.tenant-theme-actions {
    justify-content: flex-start;
    margin-bottom: 14px;
}

.tenant-theme-preview {
    border: 1px solid #dbe3ef;
    border-radius: 24px;
    overflow: hidden;
    background: var(--tenant-page-bg);
    display: grid;
    grid-template-columns: 150px 1fr;
    min-height: 320px;
}

.tenant-theme-preview-sidebar {
    background: var(--tenant-sidebar-bg);
    color: #fff;
    padding: 18px;
}

.tenant-theme-preview-brand {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 24px;
}

.tenant-theme-preview-brand span,
.tenant-theme-preview-brand img {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    object-fit: cover;
    background: var(--tenant-primary);
    color: #fff;
    font-weight: 900;
}

.tenant-theme-preview-sidebar a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: rgba(255,255,255,.72);
    font-weight: 700;
    margin-bottom: 6px;
}

.tenant-theme-preview-sidebar a.is-active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.tenant-theme-preview-content {
    padding: 28px;
    color: var(--tenant-text);
}

.tenant-theme-preview-content h3 {
    margin: 6px 0 8px;
    font-size: 28px;
}

.tenant-theme-preview-content p {
    color: var(--tenant-muted);
}

.tenant-theme-preview-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 22px 0;
}

.tenant-theme-preview-cards span {
    background: var(--tenant-card-bg);
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    padding: 14px;
    font-weight: 800;
}

.tenant-theme-preview button {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    color: #fff;
    font-weight: 800;
}

@media (max-width: 1100px) {
    .tenant-theme-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tenant-theme-form-grid,
    .tenant-theme-preview {
        grid-template-columns: 1fr;
    }
}
