/* ==========================================================================
   Projektökonomie — SaaS Theme (Redesign v2)
   Preview: ?theme=saas  —  Startseite: /?theme=saas
   Nicht als Standard aktiv.
   ========================================================================== */

.theme-saas {
    color-scheme: light;

    /* Grundflächen — warmes Mint/Off-White */
    --saas-bg: #EEF3EF;
    --saas-bg-app: #E8EEE9;
    --saas-bg-subtle: #F2F5F1;
    --saas-widget: #F6F8F4;
    --saas-widget-inner: rgba(255, 255, 255, 0.72);
    --saas-widget-mint: #D9EBE2;
    --saas-widget-mint-deep: #C5DFD4;
    --saas-widget-blue: #E4ECF5;
    --saas-widget-lemon: #F0EB9A;
    --saas-widget-lemon-soft: #F7F4C8;
    --saas-surface: #FAFBF8;
    --saas-surface-muted: #ECEEE9;
    --saas-ink: #15181D;
    --saas-ink-secondary: #5A6169;
    --saas-ink-tertiary: #8B9299;
    --saas-ink-inverse: #F6F7F5;
    --saas-ink-pill: #111318;
    --saas-accent: #3A7A5C;
    --saas-accent-hover: #2F664C;
    --saas-accent-soft: #E0EFE6;
    --saas-highlight: #EDE887;
    --saas-highlight-soft: #F5F2C4;
    --saas-focus: #4A6FA8;
    --saas-canvas: #141820;
    --saas-canvas-elevated: #1C2230;
    --saas-canvas-border: rgba(255, 255, 255, 0.1);
    --saas-overlay: #FAFBF8;
    --saas-overlay-shadow: 0 24px 64px rgba(17, 19, 24, 0.14);
    --saas-line: rgba(21, 24, 29, 0.07);
    --saas-line-strong: rgba(21, 24, 29, 0.12);
    --saas-shadow-sm: 0 4px 16px rgba(17, 19, 24, 0.04);
    --saas-shadow-md: 0 12px 32px rgba(17, 19, 24, 0.06);
    --saas-shadow-float: 0 20px 50px rgba(17, 19, 24, 0.07), 0 2px 8px rgba(17, 19, 24, 0.04);
    --saas-info-bg: #E8F0F8;
    --saas-info-text: #1A4A6E;
    --saas-info-border: #C5D8EA;
    --saas-success-bg: #E4F2EA;
    --saas-success-text: #1A5C3A;
    --saas-success-border: #B5DCC8;
    --saas-warning-bg: #F8F2DC;
    --saas-warning-text: #5C4A12;
    --saas-warning-border: #E8D89A;
    --saas-danger-bg: #FCEFEE;
    --saas-danger-text: #8B2218;
    --saas-danger-border: #E8B4AE;
    --saas-security-bg: #EFF1F3;
    --saas-security-text: #3D4450;
    --saas-security-border: #D5DAE0;
    --saas-radius-sm: 14px;
    --saas-radius-md: 20px;
    --saas-radius-lg: 28px;
    --saas-radius-xl: 36px;
    --saas-radius-widget: 32px;
    --saas-space-1: 0.25rem;
    --saas-space-2: 0.5rem;
    --saas-space-3: 0.75rem;
    --saas-space-4: 1rem;
    --saas-space-5: 1.5rem;
    --saas-space-6: 2rem;
    --saas-space-7: 2.75rem;
    --saas-space-8: 3.5rem;
    --sidebar-w-collapsed: 76px;
    --sidebar-w-expanded: 76px;
    --sidebar-w: 76px;
    --topbar-h: 64px;

    /* Legacy aliases */
    --bg: var(--saas-bg-app);
    --ink: var(--saas-ink);
    --muted: var(--saas-ink-secondary);
    --soft: var(--saas-surface-muted);
    --line: var(--saas-line);
    --primary: var(--saas-accent);
    --primary-2: var(--saas-accent-hover);
    --teal: var(--saas-accent);
    --panel: var(--saas-widget);
    --shadow: var(--saas-shadow-md);
    --shadow-soft: var(--saas-shadow-sm);
    --info-bg: var(--saas-info-bg);
    --info-text: var(--saas-info-text);
    --info-border: var(--saas-info-border);
    --warning-bg: var(--saas-warning-bg);
    --warning-text: var(--saas-warning-text);
    --warning-border: var(--saas-warning-border);
    --success-bg: var(--saas-success-bg);
    --success-text: var(--saas-success-text);
    --success-border: var(--saas-success-border);
    --danger-bg: var(--saas-danger-bg);
    --danger-text: var(--saas-danger-text);
    --danger-border: var(--saas-danger-border);
    --radius-sm: var(--saas-radius-sm);
    --radius-md: var(--saas-radius-md);
    --radius-lg: var(--saas-radius-lg);
    --radius-xl: var(--saas-radius-xl);
    --sidebar-bg: rgba(255, 255, 255, 0.82);
    --sidebar-ink: var(--saas-ink);
    --sidebar-muted: var(--saas-ink-secondary);
    --sidebar-line: var(--saas-line);
    --sidebar-active: var(--saas-ink-pill);
    --bg-card: var(--saas-widget);
    --bg-card-hover: var(--saas-bg-subtle);
    --border: var(--saas-line);
    --border-strong: var(--saas-line-strong);
    --text-muted: var(--saas-ink-secondary);
    --text-dim: var(--saas-ink-tertiary);
    --primary-fg: #FFFFFF;
    --primary-strong: var(--saas-accent-hover);
}

.theme-saas body,
.theme-saas.app-body {
    background: var(--saas-bg-app);
    color: var(--saas-ink);
}

.theme-saas body::before {
    background:
        radial-gradient(ellipse 90% 60% at 10% -10%, rgba(201, 223, 212, 0.55), transparent 50%),
        radial-gradient(ellipse 70% 50% at 95% 5%, rgba(240, 235, 154, 0.25), transparent 45%),
        radial-gradient(ellipse 50% 40% at 50% 100%, rgba(255, 255, 255, 0.5), transparent 55%);
}

/* ==========================================================================
   App-Shell — schwebende Icon-Rail + Pill-Topbar
   ========================================================================== */

.theme-saas .app-shell {
    background: transparent;
}

.theme-saas .app-sidebar {
    left: 12px;
    top: 12px;
    bottom: 12px;
    width: var(--sidebar-w);
    height: auto;
    max-height: calc(100dvh - 24px);
    margin: 0;
    padding: 0.65rem 0.45rem;
    border-radius: var(--saas-radius-widget);
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: var(--saas-shadow-float);
    color: var(--saas-ink);
}

.theme-saas .sidebar-header {
    justify-content: center;
    margin-bottom: 0.35rem;
}

.theme-saas .sidebar-expand-toggle {
    display: none;
}

.theme-saas .sidebar-brand .brand {
    justify-content: center;
}

.theme-saas .brand-text,
.theme-saas .sidebar-label,
.theme-saas .sidebar-link-text,
.theme-saas .sidebar-link-hint,
.theme-saas .sidebar-group-divider,
.theme-saas .sidebar-footer-text,
.theme-saas .sidebar-user-name,
.theme-saas .sidebar-user-role {
    display: none !important;
}

.theme-saas .sidebar-nav-scroll {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none;
}

.theme-saas .sidebar-nav-scroll::-webkit-scrollbar {
    display: none;
}

.theme-saas .sidebar-group {
    margin-bottom: 0.25rem;
}

.theme-saas .sidebar-list {
    gap: 0.35rem;
}

.theme-saas .sidebar-link {
    width: 48px;
    height: 48px;
    min-height: 48px;
    margin: 0 auto;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
    color: var(--saas-ink-secondary);
    border: 1px solid transparent;
    background: transparent;
}

.theme-saas .sidebar-link:hover {
    background: var(--saas-surface-muted);
    color: var(--saas-ink);
}

.theme-saas .sidebar-link.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .sidebar-link--accent.is-active {
    background: var(--saas-accent);
}

.theme-saas .sidebar-icon {
    margin: 0;
}

.theme-saas .sidebar-footer {
    border-top: 1px solid var(--saas-line);
    padding-top: 0.5rem;
}

.theme-saas .sidebar-footer-btn {
    width: 48px;
    height: 48px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 0;
    justify-content: center;
}

.theme-saas .app-main-column {
    margin-left: calc(var(--sidebar-w) + 28px);
    width: calc(100vw - var(--sidebar-w) - 28px);
    background: transparent;
}

.theme-saas .app-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    min-height: var(--topbar-h);
    padding: 12px clamp(1rem, 2.5vw, 1.75rem) 8px;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem 1rem;
}

.theme-saas .topbar-left {
    grid-column: 1;
}

.theme-saas .saas-pill-nav {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem;
    grid-column: 2;
    justify-self: center;
    padding: 0.3rem;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--saas-line);
    border-radius: 999px;
    box-shadow: var(--saas-shadow-float);
}

.theme-saas .saas-pill-nav__item {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--saas-ink-secondary);
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease;
}

.theme-saas .saas-pill-nav__item:hover {
    color: var(--saas-ink);
    background: var(--saas-surface-muted);
}

.theme-saas .saas-pill-nav__item.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
}

.theme-saas .topbar-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.lang-switcher--dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-switcher__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 44px;
    min-width: 44px;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--saas-line, var(--line, #d8dee4));
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--saas-ink, var(--ink, #1a2332));
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}

.lang-switcher__trigger:hover,
.lang-switcher__trigger:focus-visible {
    border-color: var(--saas-ink-tertiary, #8a939e);
    outline: 2px solid rgba(26, 95, 140, 0.35);
    outline-offset: 2px;
}

.lang-switcher__globe {
    font-size: 1rem;
    line-height: 1;
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + 0.35rem);
    right: 0;
    z-index: 1200;
    min-width: 11rem;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border: 1px solid var(--saas-line, var(--line, #d8dee4));
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.lang-switcher__menu[hidden] {
    display: none;
}

.lang-switcher__option {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    color: var(--saas-ink, var(--ink, #1a2332));
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
}

.lang-switcher__option:hover,
.lang-switcher__option:focus-visible {
    background: var(--saas-surface-muted, #f3f5f7);
    outline: none;
}

.lang-switcher__option.is-active {
    background: rgba(26, 95, 140, 0.08);
    font-weight: 700;
}

.theme-saas .topbar-right .lang-switcher--dropdown {
    flex-shrink: 0;
}

.theme-saas .topbar-title-wrap,
.theme-saas .topbar-hint,
.theme-saas .topbar-nav,
.theme-saas .system-status-pill {
    display: none;
}

.theme-saas .topbar-center {
    display: none;
}

.theme-saas.saas-page-home .topbar-center {
    display: none;
}

.theme-saas .search-field {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--saas-line);
    border-radius: 999px;
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .topbar-search-mobile {
    padding: 0 1rem 0.5rem;
}

.theme-saas .topbar-search-mobile .search-field {
    width: 100%;
}

.theme-saas .icon-btn {
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .sidebar-toggle {
    display: none;
}

.theme-saas .sidebar-mobile-close {
    display: none;
}

.theme-saas .site-footer {
    background: transparent;
    border: none;
    color: var(--saas-ink-tertiary);
    font-size: 0.8125rem;
    padding: 2rem clamp(1rem, 3vw, 2rem);
}

.theme-saas.saas-page-home .site-footer {
    opacity: 0.85;
}

/* Bottom-Navigation (Mobile) */
.theme-saas .saas-bottom-nav {
    display: none;
}

/* ==========================================================================
   Typografie — leichter, eleganter
   ========================================================================== */

.theme-saas .display-title {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4.2vw, 2.85rem);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--saas-ink);
    margin-bottom: var(--saas-space-4);
}

.theme-saas .section-title {
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.theme-saas .display-lead {
    font-size: clamp(0.98rem, 1.6vw, 1.1rem);
    font-weight: 400;
    line-height: 1.65;
    color: var(--saas-ink-secondary);
    max-width: 42ch;
    margin-bottom: var(--saas-space-3);
}

.theme-saas .section-lead,
.theme-saas .hint,
.theme-saas .form-hint,
.theme-saas .help-text {
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.55;
    color: var(--saas-ink-tertiary);
}

.theme-saas .eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
    color: var(--saas-accent);
    margin-bottom: var(--saas-space-2);
}

/* ==========================================================================
   Buttons — dunkle Pills, Mint Secondary, Lemon Callouts
   ========================================================================== */

.theme-saas button,
.theme-saas .btn {
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
    box-shadow: none;
    border: 1px solid transparent;
}

.theme-saas .btn-primary,
.theme-saas .saas-action-primary {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    border-color: transparent;
}

.theme-saas .btn-primary:hover,
.theme-saas .saas-action-primary:hover {
    background: #2a2f38;
    color: #fff;
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .btn-secondary,
.theme-saas .saas-nav-widget.btn-secondary {
    background: var(--saas-widget-inner);
    border-color: var(--saas-line);
    color: var(--saas-ink);
    backdrop-filter: blur(8px);
}

.theme-saas .btn-secondary:hover {
    background: #fff;
    color: var(--saas-ink);
}

.theme-saas .btn-ghost,
.theme-saas .saas-nav-widget.btn-ghost {
    background: var(--saas-accent-soft);
    border-color: transparent;
    color: var(--saas-accent);
}

.theme-saas .btn-ghost:hover {
    background: var(--saas-widget-mint);
    color: var(--saas-accent-hover);
}

.theme-saas .btn-success {
    background: var(--saas-ink-pill);
    color: #fff;
}

.theme-saas .btn-soft {
    background: var(--saas-widget-lemon-soft);
    color: var(--saas-warning-text);
}

.theme-saas button:focus-visible,
.theme-saas .btn:focus-visible {
    outline: 2px solid var(--saas-focus);
    outline-offset: 3px;
}

/* ==========================================================================
   Widgets / Karten
   ========================================================================== */

.theme-saas .card,
.theme-saas .hero,
.theme-saas .community-card,
.theme-saas .workspace-card,
.theme-saas .project-panel,
.theme-saas .overview-card,
.theme-saas .stat-card,
.theme-saas .saas-widget {
    background: var(--saas-widget);
    border: 1px solid var(--saas-line);
    border-radius: var(--saas-radius-widget);
    box-shadow: var(--saas-shadow-float);
    padding: clamp(1.15rem, 2vw, 1.65rem);
}

.theme-saas .card:hover,
.theme-saas .workspace-card:hover {
    box-shadow: var(--saas-shadow-md);
    border-color: var(--saas-line-strong);
    transform: none;
}

/* ==========================================================================
   Startseite — Dashboard-Komposition
   ========================================================================== */

.theme-saas.saas-page-home .app-main {
    max-width: 1320px;
    padding: 0.25rem clamp(0.75rem, 2.5vw, 1.75rem) 5.5rem;
}

.theme-saas .saas-home {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.theme-saas .saas-home-meta {
    display: flex;
    margin-bottom: 0.5rem;
}

.theme-saas .saas-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--saas-ink-secondary);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--saas-line);
}

.theme-saas .saas-lemon-callout {
    display: inline-block;
    margin: 0 0 0.85rem;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--saas-warning-text);
    background: var(--saas-widget-lemon);
    border: 1px solid rgba(237, 232, 135, 0.6);
}

.theme-saas .saas-dashboard-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: 1.25rem;
    align-items: stretch;
    margin: 0;
}

.theme-saas .saas-dashboard-intro {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0.5rem 0.25rem 0;
}

.theme-saas .saas-home-hint {
    max-width: 38ch;
    margin-bottom: var(--saas-space-5);
}

.theme-saas .saas-dashboard-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    max-width: 520px;
}

.theme-saas .saas-dashboard-actions .saas-action-primary {
    grid-column: 1 / -1;
    min-height: 52px;
    font-size: 1rem;
}

.theme-saas .saas-dashboard-actions .saas-nav-widget {
    min-height: 46px;
    justify-content: center;
    text-align: center;
}

/* AI-Assistant Widget */
.theme-saas .saas-widget--assistant,
.theme-saas .saas-page-home .intake-panel {
    background: linear-gradient(165deg, var(--saas-widget-mint) 0%, var(--saas-widget-mint-deep) 100%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: var(--saas-radius-xl);
    box-shadow: var(--saas-shadow-float);
    padding: clamp(1.25rem, 2vw, 1.75rem);
    min-height: 380px;
}

.theme-saas .saas-widget--assistant .intake-panel-head h2 {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 1.10rem 0 0.35rem;
}

.theme-saas .saas-widget--assistant .intake-panel-head p {
    font-size: 0.875rem;
    color: var(--saas-ink-secondary);
    margin: 0;
}

.theme-saas .saas-widget--assistant .idea-composer-box {
    margin-top: 1rem;
    background: var(--saas-widget-inner);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--saas-radius-lg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.theme-saas .saas-widget--assistant .idea-composer-input {
    min-height: 120px;
    font-size: 1rem;
    padding: 1.15rem 1.25rem;
}

.theme-saas .saas-widget--assistant .idea-composer-toolbar {
    background: rgba(255, 255, 255, 0.45);
    border-top: 1px solid var(--saas-line);
    padding: 0.75rem 1rem;
}

.theme-saas .saas-widget--assistant .idea-submit-btn {
    width: 100%;
}

/* KPI-Widgets */
.theme-saas.saas-page-home .stats-grid--leitstand {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin: 0;
}

.theme-saas.saas-page-home .stat-card--leitstand {
    background: var(--saas-widget);
    border-radius: var(--saas-radius-lg);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--saas-shadow-float);
    border-color: var(--saas-line);
    min-height: 108px;
}

.theme-saas.saas-page-home .stat-card--leitstand .stat-card-value {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--saas-ink);
}

.theme-saas.saas-page-home .stat-card--leitstand .stat-card-label {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--saas-ink-secondary);
    line-height: 1.35;
}

.theme-saas.saas-page-home .stat-card--teal .stat-card-value { color: var(--saas-accent); }
.theme-saas.saas-page-home .stat-card--gold .stat-card-value { color: #8A7340; }
.theme-saas.saas-page-home .stat-card--red .stat-card-value { color: var(--saas-danger-text); }

/* Sekundäre Module — kompakter */
.theme-saas .saas-home-secondary {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.theme-saas.saas-page-home .workspace-section .section-header {
    margin-bottom: 1rem;
}

.theme-saas.saas-page-home .workspace-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
    gap: 0.85rem;
}

.theme-saas.saas-page-home .workspace-card {
    border-radius: var(--saas-radius-lg);
    padding: 1.15rem;
    background: var(--saas-widget);
}

.theme-saas.saas-page-home .workspace-card h3 {
    font-size: 1rem;
    font-weight: 600;
}

.theme-saas.saas-page-home .dash-layout-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border: none;
    background: transparent;
    box-shadow: none;
}

.theme-saas.saas-page-home .dash-layout-split > div > .card,
.theme-saas.saas-page-home .dash-layout-split .community-card {
    border-radius: var(--saas-radius-lg);
    background: var(--saas-widget);
}

/* ==========================================================================
   Statuschips, Hinweise, Formulare, Filter (Phase 1, verfeinert)
   ========================================================================== */

.theme-saas .badge,
.theme-saas .status-pill,
.theme-saas .saas-chip {
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid transparent;
}

.theme-saas .notice,
.theme-saas .alert,
.theme-saas .error {
    border-radius: var(--saas-radius-md);
    padding: 1rem 1.2rem;
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .notice-security {
    background: var(--saas-security-bg);
    border-color: var(--saas-security-border);
    color: var(--saas-security-text);
}

.theme-saas .notice-review {
    background: var(--saas-info-bg, #eff6ff);
    border: 1px solid var(--saas-info-border, #bfdbfe);
    color: var(--saas-info-text, #1e3a5f);
}

.theme-saas .notice-review-social {
    background: var(--saas-mint-bg, #ecfdf5);
    border-color: var(--saas-mint-border, #a7f3d0);
    color: var(--saas-mint-text, #134e4a);
}

.theme-saas .notice-review .notice-kicker {
    font-weight: 700;
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.theme-saas .safety-review-explainer {
    margin-top: 0.85rem;
}

.theme-saas .safety-review-explainer summary {
    cursor: pointer;
    font-weight: 600;
    color: inherit;
}

.theme-saas .safety-review-explainer p {
    margin: 0.65rem 0 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.theme-saas textarea,
    border-radius: var(--saas-radius-md);
    border-color: var(--saas-line-strong);
    background: var(--saas-widget-inner);
    min-height: 280px;

.theme-saas input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.theme-saas select {
    border-radius: var(--saas-radius-md);
    border-color: var(--saas-line-strong);
    background: var(--saas-widget-inner);
    min-height: 48px;
}

.theme-saas input.visually-hidden,
.theme-saas input[type="file"].visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
    min-height: 0;
    min-width: 0;
    left: 0;
    top: 0;
}

.theme-saas .supply-list-filters,
.theme-saas .supply-list-filters--toolbar {
    border-radius: var(--saas-radius-widget);
    background: var(--saas-widget);
    box-shadow: var(--saas-shadow-float);
}

.theme-saas .supply-list-chip.is-active,
.theme-saas .supply-list-chip:has(input:checked) {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    border-color: transparent;
}

/* ==========================================================================
   Analyse-Modul (Tokens für Projektkarte — später)
   ========================================================================== */

.theme-saas.map-mode,
.theme-saas body.map-mode {
    background: var(--saas-canvas);
}

.theme-saas .saas-analysis-surface {
    background: var(--saas-canvas);
    border-radius: var(--saas-radius-xl);
    color: var(--saas-ink-inverse);
}

.theme-saas .saas-analysis-overlay {
    background: var(--saas-overlay);
    border-radius: var(--saas-radius-lg);
    box-shadow: var(--saas-overlay-shadow);
    color: var(--saas-ink);
}

.theme-saas .saas-kpi-pill {
    display: inline-flex;
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--saas-ink-inverse);
    font-size: 0.8125rem;
    font-weight: 600;
}

.theme-saas .infra-leitstand-stage,
.theme-saas .infra-canvas {
    border-radius: var(--saas-radius-xl);
}

/* ==========================================================================
   Text-Varianten (SaaS: kürzere Labels)
   ========================================================================== */

.theme-saas .saas-text-short {
    display: inline;
}

.theme-saas .saas-text-full {
    display: none;
}

.theme-saas .saas-lead-legacy {
    display: none;
}

.theme-saas .saas-lead-compact {
    display: block;
    max-width: 42ch;
    margin-bottom: var(--saas-space-4);
}

/* ==========================================================================
   Filter — Legacy-kompatibel + SaaS
   ========================================================================== */

.saas-filter-details {
    display: block;
    border: none;
    margin: 0;
}

.saas-filter-details > summary {
    display: none;
    list-style: none;
}

.saas-filter-details > summary::-webkit-details-marker {
    display: none;
}

.saas-filter-details__body {
    display: contents;
}

.theme-saas .supply-list-filter-form--toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.theme-saas .saas-filter-search {
    flex: 1 1 240px;
    min-width: min(100%, 280px);
}

.theme-saas .saas-filter-details {
    flex: 1 1 100%;
    display: block;
}

.theme-saas .saas-filter-details > summary {
    display: none;
}

.theme-saas .saas-filter-details__body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
}

.theme-saas .supply-list-filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--saas-ink-tertiary);
    margin-bottom: 0.2rem;
}

.theme-saas .supply-list-filters__reset {
    font-weight: 600;
    text-decoration: none;
    color: var(--saas-ink-secondary);
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
}

.theme-saas .supply-list-filters__reset:hover {
    background: var(--saas-surface-muted);
    color: var(--saas-ink);
}

/* ==========================================================================
   Projektübersicht — Header + Tabs
   ========================================================================== */

.theme-saas.saas-page-list .app-main {
    max-width: 1440px;
    padding-top: 0.35rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.theme-saas.saas-page-list .site-footer {
    margin-top: auto;
}

.theme-saas.saas-page-list .saas-list-header {
    margin-bottom: 0.65rem;
}

.theme-saas.saas-page-list .saas-list-header .display-title {
    font-size: clamp(1.45rem, 2.8vw, 2rem);
    font-weight: 700;
    margin-bottom: 0.25rem;
    max-width: 20ch;
}

.theme-saas.saas-page-list .saas-list-header .eyebrow {
    margin-bottom: 0.35rem;
}

.theme-saas .saas-view-tabs.infra-view-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    padding: 0.28rem;
    margin: 0 0 0.75rem;
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--saas-line);
    border-radius: 999px;
    box-shadow: var(--saas-shadow-sm);
    width: fit-content;
    max-width: 100%;
}

.theme-saas .infra-view-tab {
    border-radius: 999px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--saas-ink-secondary);
    text-decoration: none;
}

.theme-saas .infra-view-tab.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
}

/* ==========================================================================
   Split-View Desktop
   ========================================================================== */

.theme-saas.saas-page-list {
    --saas-split-offset: 200px;
}

.theme-saas.saas-page-list .supply-split {
    display: grid;
    grid-template-columns: minmax(360px, 40%) minmax(0, 1fr);
    height: calc(100dvh - var(--saas-split-offset));
    min-height: 520px;
    max-height: none;
    border-radius: var(--saas-radius-widget);
    border: 1px solid var(--saas-line);
    background: var(--saas-widget);
    box-shadow: var(--saas-shadow-float);
    overflow: hidden;
    position: relative;
}

.theme-saas.saas-page-list .supply-split__list {
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--saas-bg-subtle);
    border-right: 1px solid var(--saas-line);
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 24, 29, 0.2) transparent;
}

.theme-saas.saas-page-list .supply-split__list::-webkit-scrollbar {
    width: 6px;
}

.theme-saas.saas-page-list .supply-split__list::-webkit-scrollbar-thumb {
    background: rgba(21, 24, 29, 0.15);
    border-radius: 999px;
}

.theme-saas.saas-page-list .supply-split__detail {
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(1.15rem, 2vw, 1.65rem);
    padding-bottom: 5.5rem;
    background: var(--saas-widget);
    scrollbar-width: thin;
    scrollbar-color: rgba(21, 24, 29, 0.2) transparent;
}

.theme-saas .saas-split-list-hint {
    display: block;
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--saas-ink-secondary);
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 1px solid var(--saas-line);
}

.theme-saas .supply-split-item {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--saas-line);
    border-left: 3px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.theme-saas .supply-split-item:hover {
    background: rgba(255, 255, 255, 0.55);
}

.theme-saas .supply-split-item:focus-visible {
    outline: 2px solid var(--saas-focus);
    outline-offset: -2px;
    background: rgba(255, 255, 255, 0.65);
}

.theme-saas .supply-split-item.is-active {
    background: var(--saas-widget-inner);
    border-left-color: var(--saas-accent);
    box-shadow: inset 0 0 0 1px var(--saas-line);
}

.theme-saas .supply-split-item__title {
    font-size: 1rem;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.theme-saas .supply-split-item__meta {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--saas-ink-secondary);
}

.theme-saas .supply-split-item__excerpt {
    font-size: 0.85rem;
    -webkit-line-clamp: 2;
}

.theme-saas .supply-split-item__chips li {
    font-size: 0.75rem;
    padding: 0.28rem 0.6rem;
    background: var(--saas-accent-soft);
    color: var(--saas-accent);
    border: 1px solid rgba(45, 106, 79, 0.15);
}

.theme-saas .supply-split-detail__title {
    font-size: clamp(1.25rem, 2.5vw, 1.55rem);
    font-weight: 700;
}

.theme-saas .supply-split-detail__label {
    text-transform: none;
    letter-spacing: 0.02em;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--saas-ink-secondary);
}

.theme-saas .supply-split-detail__section {
    border-bottom-color: var(--saas-line);
}

.theme-saas .supply-split-detail__dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-saas .supply-split-detail__dl dt {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--saas-ink-tertiary);
}

.theme-saas .supply-split-detail__actions {
    position: sticky;
    bottom: 0;
    margin: 0 -1.15rem -1rem;
    padding: 1rem 1.15rem;
    background: linear-gradient(180deg, transparent, var(--saas-widget) 28%);
    border-top: 1px solid var(--saas-line);
    z-index: 2;
}

.theme-saas .supply-split-detail__actions .btn {
    min-height: 48px;
}

.theme-saas .saas-detail-close {
    display: none;
}

.theme-saas .saas-detail-backdrop {
    display: none;
}

/* Sidebar Tooltips */
.theme-saas .sidebar-link {
    position: relative;
}

.theme-saas .sidebar-link[data-sidebar-tip]:hover::after,
.theme-saas .sidebar-link[data-sidebar-tip]:focus-visible::after {
    content: attr(data-sidebar-tip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    padding: 0.35rem 0.65rem;
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 8px;
    z-index: 60;
    pointer-events: none;
    box-shadow: var(--saas-shadow-md);
}

/* Projektkarte — Mobile KPI */
.theme-saas.saas-page-map .infra-kpi-bar {
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.5rem;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.theme-saas.saas-page-map .infra-kpi-chip {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
}

.theme-saas.saas-page-map .infra-kpi-chip strong {
    font-size: 0.95rem;
}

.theme-saas.saas-page-map .infra-kpi-chip span {
    white-space: nowrap;
}

.theme-saas.saas-page-map .infra-leitstand .search-field,
.theme-saas.saas-page-map .topbar-search-mobile .search-field {
    max-width: 100%;
}

.theme-saas.saas-page-map.map-mode .app-main,
.theme-saas.saas-page-map .infra-leitstand-stage {
    min-height: 0;
}

/* Startseite — kleine Konsistenz */
.theme-saas.saas-page-home .saas-dashboard-intro .display-title {
    max-width: 16ch;
}

.theme-saas.saas-page-home .intake-panel .idea-submit-btn {
    min-height: 48px;
}

/* Pill-Nav horizontal scroll (Tablet schmal) */
.theme-saas .saas-pill-nav {
    max-width: min(100%, 520px);
    overflow-x: auto;
    scrollbar-width: none;
    flex-wrap: nowrap;
    justify-self: center;
}

.theme-saas .saas-pill-nav::-webkit-scrollbar {
    display: none;
}

.theme-saas .saas-pill-nav__item {
    flex-shrink: 0;
}

body.saas-sheet-open,
body.sidebar-drawer-open {
    overflow: hidden;
}

/* ==========================================================================
   Mobile — App-Feeling
   ========================================================================== */

@media (max-width: 767px) {
    .theme-saas .sidebar-overlay {
        z-index: 900;
    }

    .theme-saas .app-sidebar {
        left: 0;
        top: 0;
        bottom: 0;
        width: min(88vw, 360px);
        max-width: min(88vw, 360px);
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        padding: 0.85rem 1rem 1rem;
        border-radius: 0 var(--saas-radius-xl) var(--saas-radius-xl) 0;
        border-right: 1px solid var(--saas-line);
        border-top: none;
        border-bottom: none;
        border-left: none;
        background: var(--saas-surface, #f8f9fb);
        box-shadow: var(--saas-overlay-shadow, 0 12px 48px rgba(17, 19, 24, 0.18));
        transform: translateX(-100%);
        z-index: 1000;
        overflow: hidden;
    }

    .theme-saas .app-sidebar.is-open {
        transform: translateX(0);
    }

    .theme-saas .sidebar-header {
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.65rem;
        border-bottom: 1px solid var(--saas-line);
    }

    .theme-saas .sidebar-mobile-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        margin-left: auto;
        border: 1px solid var(--saas-line);
        border-radius: 50%;
        background: var(--saas-widget-inner, #fff);
        color: var(--saas-ink);
        font-size: 1.15rem;
        line-height: 1;
        cursor: pointer;
    }

    .theme-saas .sidebar-mobile-close:focus-visible {
        outline: 2px solid var(--saas-accent, #1a5f8c);
        outline-offset: 2px;
    }

    .theme-saas .sidebar-brand .brand {
        justify-content: flex-start;
    }

    .theme-saas .brand-text,
    .theme-saas .sidebar-label,
    .theme-saas .sidebar-link-text,
    .theme-saas .sidebar-link-hint,
    .theme-saas .sidebar-group-divider,
    .theme-saas .sidebar-footer-text,
    .theme-saas .sidebar-user-name,
    .theme-saas .sidebar-user-role {
        display: revert !important;
    }

    .theme-saas .brand-text {
        display: flex !important;
    }

    .theme-saas .sidebar-group-divider {
        display: block !important;
    }

    .theme-saas .sidebar-link {
        width: 100%;
        height: auto;
        min-height: 44px;
        margin: 0;
        padding: 0.65rem 0.85rem;
        border-radius: var(--saas-radius-md, 12px);
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .theme-saas .sidebar-link-hint {
        margin-left: auto;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--saas-ink-tertiary);
    }

    .theme-saas .sidebar-footer-btn,
    .theme-saas .sidebar-user {
        width: 100%;
        height: auto;
        min-height: 44px;
        margin: 0;
        border-radius: var(--saas-radius-md, 12px);
        padding: 0.65rem 0.85rem;
        justify-content: flex-start;
        gap: 0.65rem;
    }

    .theme-saas .sidebar-user-meta {
        display: flex;
        flex-direction: column;
        min-width: 0;
    }

    .theme-saas .sidebar-footer {
        padding-top: 0.75rem;
        gap: 0.35rem;
    }

    .theme-saas .app-topbar {
        z-index: 1100;
    }

    .theme-saas .app-main-column {
        margin-left: 0;
        width: 100%;
    }

    .theme-saas .sidebar-toggle {
        display: inline-flex;
    }

    .theme-saas .saas-pill-nav {
        display: none;
    }

    .theme-saas .app-topbar {
        grid-template-columns: 1fr auto;
        padding-top: 8px;
    }

    .theme-saas .topbar-center {
        display: none;
    }

    .theme-saas .topbar-search-mobile {
        display: block;
    }

    .theme-saas .saas-bottom-nav {
        display: flex;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 45;
        justify-content: space-around;
        gap: 0.25rem;
        padding: 0.4rem;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--saas-line);
        border-radius: 999px;
        box-shadow: var(--saas-shadow-float);
    }

    .theme-saas .saas-bottom-nav__item {
        flex: 1;
        text-align: center;
        padding: 0.5rem 0.35rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 600;
        color: var(--saas-ink-secondary);
        text-decoration: none;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .theme-saas .saas-bottom-nav__item.is-active {
        background: var(--saas-ink-pill);
        color: var(--saas-ink-inverse);
    }

    .theme-saas.saas-page-home .app-main {
        padding: 0.5rem 0.85rem 6.5rem;
    }

    .theme-saas .saas-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .theme-saas .saas-widget--assistant {
        min-height: 0;
        order: 2;
    }

    .theme-saas .saas-dashboard-intro {
        order: 1;
    }

    .theme-saas .display-title {
        font-size: clamp(1.65rem, 7vw, 2.1rem);
    }

    .theme-saas .saas-dashboard-actions {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .theme-saas.saas-page-home .stats-grid--leitstand {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .theme-saas.saas-page-home .stat-card--leitstand {
        min-height: 96px;
        padding: 1rem;
    }

    .theme-saas.saas-page-home .stat-card--leitstand .stat-card-value {
        font-size: 1.65rem;
    }

    .theme-saas.saas-page-home .dash-layout-split {
        grid-template-columns: 1fr;
    }

    .theme-saas .site-footer {
        padding-bottom: 5rem;
    }

    /* Projektübersicht Mobile */
    .theme-saas.saas-page-list {
        --saas-split-offset: 168px;
    }

    .theme-saas.saas-page-list .supply-split {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .theme-saas.saas-page-list .supply-split__list {
        max-height: none;
        border-right: none;
        border-radius: var(--saas-radius-lg);
        background: var(--saas-widget);
        box-shadow: var(--saas-shadow-float);
        border: 1px solid var(--saas-line);
        max-height: min(70dvh, 640px);
    }

    .theme-saas .saas-split-list-hint {
        display: none;
    }

    .theme-saas.saas-page-list .supply-split__detail {
        display: none;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        max-height: min(88dvh, 720px);
        padding: 0;
        padding-bottom: 0;
        border-radius: var(--saas-radius-xl) var(--saas-radius-xl) 0 0;
        box-shadow: var(--saas-overlay-shadow);
        background: var(--saas-widget);
        flex-direction: column;
    }

    .theme-saas.saas-page-list .supply-split.is-detail-open .supply-split__detail {
        display: flex;
    }

    .theme-saas .saas-detail-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 48;
        background: rgba(17, 19, 24, 0.4);
        backdrop-filter: blur(4px);
      -webkit-backdrop-filter: blur(4px);
    }

    .theme-saas .saas-detail-backdrop[hidden] {
        display: none;
    }

    .theme-saas .saas-detail-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        margin: 0.75rem 1rem 0;
        min-height: 44px;
        padding: 0.45rem 1rem;
        border-radius: 999px;
        border: 1px solid var(--saas-line);
        background: var(--saas-surface-muted);
        color: var(--saas-ink);
        font-weight: 600;
        font-size: 0.875rem;
        cursor: pointer;
    }

    .theme-saas .supply-split-detail.is-active {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 0 1rem 1rem;
    }

    .theme-saas .supply-split-detail__head {
        flex-shrink: 0;
    }

    .theme-saas .supply-split-detail__actions {
        position: sticky;
        bottom: 0;
        margin: 0 -1rem;
        padding: 1rem;
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        background: var(--saas-widget);
        flex-direction: column;
    }

    .theme-saas .supply-split-detail__actions .btn {
        width: 100%;
    }

    .theme-saas.saas-page-list .app-main {
        padding-bottom: 5.5rem;
    }

    /* Filter Mobile */
    .theme-saas .saas-filter-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .theme-saas .saas-filter-details {
        flex: 1 1 100%;
    }

    .theme-saas .saas-filter-details > summary {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.55rem 1rem;
        border-radius: 999px;
        border: 1px solid var(--saas-line);
        background: var(--saas-widget-inner);
        font-weight: 600;
        font-size: 0.875rem;
        color: var(--saas-ink);
        cursor: pointer;
        list-style: none;
        width: fit-content;
    }

    .theme-saas .saas-filter-details:not([open]) .saas-filter-details__body {
        display: none;
    }

    .theme-saas .saas-filter-details[open] .saas-filter-details__body {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        margin-top: 0.75rem;
        padding: 1rem;
        border-radius: var(--saas-radius-lg);
        background: var(--saas-widget-inner);
        border: 1px solid var(--saas-line);
    }

    .theme-saas .supply-list-filter-field--inline select,
    .theme-saas .supply-list-filter-field--inline input[type="text"] {
        width: 100%;
        min-height: 48px;
    }

    .theme-saas .supply-list-filter-chips--inline {
        flex-direction: column;
        align-items: stretch;
    }

    .theme-saas .supply-list-filter-chips--inline .supply-list-chip {
        width: 100%;
        justify-content: flex-start;
        min-height: 48px;
        font-size: 0.875rem;
    }

    .theme-saas .supply-list-filter-actions--inline {
        flex-direction: column;
        width: 100%;
        margin-left: 0;
    }

    .theme-saas .supply-list-filter-actions--inline .btn,
    .theme-saas .supply-list-filter-actions--inline .supply-list-filters__reset {
        width: 100%;
        text-align: center;
        min-height: 48px;
    }

    .theme-saas .saas-view-tabs {
        width: 100%;
        justify-content: center;
    }

    .theme-saas .saas-pill-nav {
        display: inline-flex;
        max-width: calc(100vw - 2rem);
    }

    .theme-saas.saas-page-map .infra-kpi-bar {
        justify-content: flex-start;
    }

    .theme-saas.saas-page-map .infra-kpi-chip {
        flex: 0 0 auto;
    }
}

@media (max-width: 360px) {
    .theme-saas.saas-page-list .saas-list-header .display-title {
        font-size: 1.4rem;
    }

    .theme-saas .saas-bottom-nav__item {
        font-size: 0.65rem;
        padding: 0.45rem 0.2rem;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Projektleitstand — SaaS Dossier (/projekte/detail?theme=saas)
   ═══════════════════════════════════════════════════════════════ */

.theme-saas.saas-page-detail .app-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 6.5rem;
}

.theme-saas.saas-page-detail .saas-detail-dossier {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.theme-saas.saas-page-detail .saas-dossier-hero {
    border: none;
    border-radius: 28px;
    overflow: hidden;
    background: var(--saas-surface, #fff);
    box-shadow: 0 18px 48px rgba(26, 42, 38, 0.08);
}

.theme-saas.saas-page-detail .saas-dossier-hero .project-hero-cover {
    min-height: 120px;
    opacity: 0.55;
}

.theme-saas.saas-page-detail .saas-dossier-hero .project-hero-body {
    padding: 1.5rem 1.75rem 1.75rem;
    display: grid;
    grid-template-columns: 1fr minmax(200px, 260px);
    gap: 1.5rem;
    align-items: start;
}

.theme-saas.saas-page-detail .project-hero-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

.theme-saas.saas-page-detail .project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.theme-saas.saas-page-detail .project-hero-meta .status-pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.theme-saas.saas-page-detail .project-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 1rem;
}

.theme-saas.saas-page-detail .project-stat {
    background: var(--saas-mint-50, #f4faf7);
    border-radius: 16px;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(26, 42, 38, 0.06);
}

.theme-saas.saas-page-detail .project-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    display: block;
}

.theme-saas.saas-page-detail .project-stat-label {
    font-size: 0.72rem;
    color: var(--saas-muted, #5c6b66);
}

.theme-saas.saas-page-detail .project-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
    position: sticky;
    top: 4.5rem;
    z-index: 12;
    padding: 0.65rem 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 70%, rgba(255, 255, 255, 0));
}

.theme-saas.saas-page-detail .project-timeline-card {
    border-radius: 20px;
    background: var(--saas-mint-50, #f4faf7);
    border: 1px solid rgba(26, 42, 38, 0.06);
    padding: 1rem 1.1rem;
}

.theme-saas.saas-page-detail .saas-dossier-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(26, 42, 38, 0.08);
    box-shadow: 0 8px 24px rgba(26, 42, 38, 0.06);
    position: sticky;
    top: 3.75rem;
    z-index: 11;
    backdrop-filter: blur(10px);
}

.theme-saas.saas-page-detail .saas-dossier-nav a {
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--saas-ink-muted, #4a5c56);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
}

.theme-saas.saas-page-detail .saas-dossier-nav a:hover {
    background: var(--saas-mint-100, #e8f5ef);
    color: var(--saas-ink, #1a2a26);
}

.theme-saas.saas-page-detail .project-detail-grid,
.theme-saas.saas-page-detail .project-detail-main {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.theme-saas.saas-page-detail .project-panel {
    border-radius: 24px;
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(26, 42, 38, 0.07);
    box-shadow: 0 10px 32px rgba(26, 42, 38, 0.05);
}

.theme-saas.saas-page-detail .section-header {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.theme-saas.saas-page-detail .overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-saas.saas-page-detail .overview-card {
    border-radius: 18px;
    padding: 1rem 1.1rem;
    background: var(--saas-mint-50, #f4faf7);
    border: 1px solid rgba(26, 42, 38, 0.05);
}

.theme-saas.saas-page-detail .overview-card p {
    margin: 0.35rem 0 0;
    line-height: 1.55;
}

.theme-saas.saas-page-detail .pruefplan-summary,
.theme-saas.saas-page-detail .infra-metrics-grid,
.theme-saas.saas-page-detail .infra-operation-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.65rem;
}

.theme-saas.saas-page-detail .pruefplan-stat,
.theme-saas.saas-page-detail .infra-metric-card {
    border-radius: 16px;
    padding: 0.85rem;
    background: #fff;
    border: 1px solid rgba(26, 42, 38, 0.06);
}

.theme-saas.saas-page-detail table {
    border-radius: 16px;
    overflow: hidden;
}

.theme-saas.saas-page-detail .project-fold {
    border-radius: 20px;
    border: 1px solid rgba(26, 42, 38, 0.08);
    padding: 0.35rem 1rem;
    background: #fff;
}

.theme-saas.saas-page-detail .mobile-action-bar {
    display: none;
}

@media (max-width: 900px) {
    .theme-saas.saas-page-detail .saas-dossier-hero .project-hero-body {
        grid-template-columns: 1fr;
    }

    .theme-saas.saas-page-detail .project-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-saas.saas-page-detail .project-hero-actions {
        position: static;
        background: transparent;
        padding: 0;
    }

    .theme-saas.saas-page-detail .overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .theme-saas.saas-page-detail .app-main-column,
    .theme-saas.saas-page-detail .app-main {
        max-width: 100%;
        overflow-x: clip;
    }

    .theme-saas.saas-page-detail .saas-detail-dossier,
    .theme-saas.saas-page-detail .saas-dossier-hero,
    .theme-saas.saas-page-detail .project-detail-main {
        min-width: 0;
        max-width: 100%;
    }

    .theme-saas.saas-page-detail .app-main {
        padding: 0.85rem 0.85rem 5.5rem;
    }

    .theme-saas.saas-page-detail .saas-dossier-hero .project-hero-body {
        padding: 1rem 1rem 1.15rem;
    }

    .theme-saas.saas-page-detail .saas-dossier-nav {
        top: auto;
        position: static;
        border-radius: 18px;
        padding: 0.5rem;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .theme-saas.saas-page-detail .saas-dossier-nav a {
        font-size: 0.75rem;
        padding: 0.4rem 0.65rem;
        white-space: normal;
        text-align: center;
        flex: 1 1 calc(50% - 0.35rem);
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .theme-saas.saas-page-detail .pruefplan-summary,
    .theme-saas.saas-page-detail .infra-metrics-grid,
    .theme-saas.saas-page-detail .infra-operation-bar {
        grid-template-columns: 1fr;
    }

    .theme-saas.saas-page-detail .project-panel {
        overflow-x: auto;
    }

    .theme-saas.saas-page-detail table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
    }

    .theme-saas.saas-page-detail .project-hero-actions .btn-lg {
        width: 100%;
        min-height: 44px;
    }

    .theme-saas.saas-page-detail .project-hero-actions .btn:not(.btn-primary) {
        display: none;
    }

    .theme-saas.saas-page-detail .project-fab.mobile-action-bar {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        bottom: calc(3.5rem + env(safe-area-inset-bottom, 0px));
        z-index: 40;
        margin: 0;
        padding: 0.65rem max(0.85rem, env(safe-area-inset-right, 0px)) 0.65rem max(0.85rem, env(safe-area-inset-left, 0px));
        background: rgba(255, 255, 255, 0.96);
        border-top: 1px solid rgba(26, 42, 38, 0.1);
        box-shadow: 0 -8px 28px rgba(26, 42, 38, 0.1);
        gap: 0.5rem;
        align-items: stretch;
    }

    .theme-saas.saas-page-detail .mobile-action-bar-primary {
        min-width: 0;
        max-width: 100%;
    }

    .theme-saas.saas-page-detail .mobile-action-bar-primary .btn,
    .theme-saas.saas-page-detail .mobile-action-form .btn,
    .theme-saas.saas-page-detail .mobile-action-bar .btn {
        min-height: 44px;
        flex: 1 1 0;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
    }

    .theme-saas.saas-page-detail .project-hero-actions .btn {
        min-width: 0;
        flex: 1 1 100%;
    }

    .theme-saas.saas-page-detail .mobile-action-more-menu {
        left: 0.85rem;
        right: 0.85rem;
        min-width: 0;
        max-width: calc(100vw - 1.7rem);
    }

    .theme-saas.saas-page-detail .mobile-action-more {
        flex: 0 0 auto;
    }

    .theme-saas.saas-page-detail .section-header .hero-actions {
        width: 100%;
    }

    .theme-saas.saas-page-detail .section-header .hero-actions .btn {
        width: 100%;
        min-height: 44px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   Mitgestaltung — SaaS Dossier
   ═══════════════════════════════════════════════════════════════ */

.theme-saas.saas-page-codesign .app-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 5rem;
}

.theme-saas.saas-page-codesign .saas-codesign-dossier {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.theme-saas.saas-page-codesign .codesign-header.saas-dossier-hero,
.theme-saas.saas-page-decision .decision-header.saas-dossier-hero {
    border-radius: 28px;
    padding: 1.5rem 1.75rem;
    background: var(--saas-surface, #fff);
    box-shadow: 0 18px 48px rgba(26, 42, 38, 0.08);
    border: 1px solid rgba(26, 42, 38, 0.06);
}

.theme-saas.saas-page-codesign .codesign-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.theme-saas.saas-page-codesign .codesign-panel.card,
.theme-saas.saas-page-codesign .codesign-empty.card {
    border-radius: 24px;
    border: 1px solid rgba(26, 42, 38, 0.07);
    box-shadow: 0 10px 32px rgba(26, 42, 38, 0.05);
}

.theme-saas.saas-page-codesign .codesign-variant-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.75rem;
}

.theme-saas.saas-page-codesign .codesign-variant-card {
    border-radius: 20px;
    padding: 1rem;
    background: var(--saas-mint-50, #f4faf7);
    border: 1px solid rgba(26, 42, 38, 0.06);
}

.theme-saas.saas-page-codesign .codesign-variant-card.is-active {
    border-color: var(--saas-accent, #3d8f6e);
    box-shadow: 0 0 0 2px rgba(61, 143, 110, 0.15);
}

.theme-saas.saas-page-codesign .codesign-meta {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

.theme-saas.saas-page-codesign .codesign-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.theme-saas.saas-page-codesign .codesign-card-actions .btn {
    border-radius: 999px;
}

.theme-saas.saas-page-codesign .codesign-annotate-wrap,
.theme-saas.saas-page-codesign .codesign-new-variant {
    border-radius: 18px;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
}

.theme-saas.saas-page-codesign .codesign-compare-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.theme-saas.saas-page-codesign .codesign-compare-col {
    border-radius: 18px;
    padding: 0.85rem;
    background: var(--saas-mint-50, #f4faf7);
}

/* ═══════════════════════════════════════════════════════════════
   Entscheidung — SaaS Prüfung
   ═══════════════════════════════════════════════════════════════ */

.theme-saas.saas-page-decision .app-main {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 5rem;
}

.theme-saas.saas-page-decision .saas-decision-dossier {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.theme-saas.saas-page-decision .decision-panel.card {
    border-radius: 24px;
    border: 1px solid rgba(26, 42, 38, 0.07);
    box-shadow: 0 10px 32px rgba(26, 42, 38, 0.05);
}

.theme-saas.saas-page-decision .saas-decision-lead {
    font-size: 1.05rem;
    max-width: 42rem;
}

.theme-saas.saas-page-decision .saas-decision-status-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
}

.theme-saas.saas-page-decision .saas-decision-status-cards > div {
    border-radius: 16px;
    padding: 0.75rem 0.85rem;
    background: var(--saas-mint-50, #f4faf7);
    border: 1px solid rgba(26, 42, 38, 0.05);
}

.theme-saas.saas-page-decision .decision-basis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.theme-saas.saas-page-decision .decision-basis-grid article {
    border-radius: 18px;
    padding: 0.85rem 1rem;
    background: #fff;
    border: 1px solid rgba(26, 42, 38, 0.06);
}

.theme-saas.saas-page-decision .saas-decision-checklist {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.theme-saas.saas-page-decision .saas-decision-check-card {
    border-radius: 18px;
    padding: 0.85rem 1rem;
    background: var(--saas-mint-50, #f4faf7);
    border: 1px solid rgba(26, 42, 38, 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.theme-saas.saas-page-decision .saas-decision-check-card .status-pill,
.theme-saas.saas-page-decision .saas-chip {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #fff;
}

.theme-saas.saas-page-decision .decision-status-grid {
    border: none;
}

/* ═══════════════════════════════════════════════════════════════
   Projektstart — SaaS Flow
   ═══════════════════════════════════════════════════════════════ */

.theme-saas.saas-page-project-start .app-main {
    max-width: 760px;
    margin: 0 auto;
    padding: 1.25rem 1.5rem 5rem;
}

.theme-saas.saas-page-project-start .saas-project-start-flow .page-hero {
    margin-bottom: 1rem;
}

.theme-saas.saas-page-project-start .saas-project-start-flow .card,
.theme-saas.saas-page-project-start .saas-draft-panel {
    border-radius: 24px;
    border: 1px solid rgba(26, 42, 38, 0.07);
    box-shadow: 0 12px 36px rgba(26, 42, 38, 0.06);
    padding: 1.35rem 1.5rem;
}

.theme-saas.saas-page-project-start .idea-textarea,
.theme-saas.saas-page-project-start .saas-idea-form textarea {
    min-height: 140px;
    border-radius: 16px;
    font-size: 1rem;
    line-height: 1.55;
}

.theme-saas.saas-page-project-start .cluster-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.theme-saas.saas-page-project-start .cluster-actions .btn,
.theme-saas.saas-page-project-start .cluster-actions button {
    border-radius: 999px;
    min-height: 44px;
}

.theme-saas.saas-page-project-start .draft-preview-list {
    display: grid;
    gap: 0.65rem;
}

.theme-saas.saas-page-project-start .draft-summary-box {
    border-radius: 18px;
    padding: 1rem;
    background: var(--saas-mint-50, #f4faf7);
    margin: 1rem 0;
}

@media (max-width: 900px) {
    .theme-saas.saas-page-codesign .codesign-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .theme-saas.saas-page-codesign .app-main,
    .theme-saas.saas-page-decision .app-main,
    .theme-saas.saas-page-project-start .app-main {
        padding: 0.85rem 0.85rem 5rem;
    }

    .theme-saas.saas-page-codesign .codesign-header.saas-dossier-hero,
    .theme-saas.saas-page-decision .decision-header.saas-dossier-hero {
        padding: 1rem 1.1rem;
        border-radius: 20px;
    }

    .theme-saas.saas-page-codesign .codesign-variant-cards {
        grid-template-columns: 1fr;
    }

    .theme-saas.saas-page-codesign .codesign-card-actions .btn,
    .theme-saas.saas-page-decision .decision-panel .btn,
    .theme-saas.saas-page-project-start .cluster-actions .btn,
    .theme-saas.saas-page-project-start .cluster-actions button {
        width: 100%;
        justify-content: center;
    }

    .theme-saas.saas-page-decision .saas-decision-check-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ==========================================================================
   Phase A — Öffentliche Kernseiten (Auth, Suche, Bedarfe, Grundlagen, Ausfall)
   Preview: ?theme=saas
   ========================================================================== */

.theme-saas.saas-page-auth .app-main,
.theme-saas.saas-page-search .app-main,
.theme-saas.saas-page-gaps .app-main,
.theme-saas.saas-page-infra .app-main,
.theme-saas.saas-page-failure .app-main {
    max-width: 920px;
    margin: 0 auto;
    padding: 0.25rem clamp(0.75rem, 2.5vw, 1.75rem) 5.5rem;
}

.theme-saas .saas-page-header {
    margin-bottom: var(--saas-space-5);
}

.theme-saas .saas-page-header .display-lead {
    max-width: 48ch;
}

.theme-saas .saas-chip,
.theme-saas .badge.saas-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--saas-surface-muted);
    border: 1px solid var(--saas-line);
    color: var(--saas-ink-secondary);
    text-transform: none;
    letter-spacing: 0;
}

.theme-saas .saas-chip--danger {
    background: var(--saas-danger-bg);
    border-color: var(--saas-danger-border);
    color: var(--saas-danger-text);
}

.theme-saas .btn-block {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

/* Auth */
.theme-saas .saas-auth {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-4);
}

.theme-saas .saas-auth-steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-auth-step {
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-widget-inner);
    border: 1px solid var(--saas-line);
}

.theme-saas .saas-auth-step strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
}

.theme-saas .saas-auth-info-list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.5rem;
    color: var(--saas-ink-secondary);
    font-size: 0.9375rem;
    line-height: 1.55;
}

.theme-saas .saas-auth-form label,
.theme-saas .saas-gaps-form label,
.theme-saas .saas-infra-filter-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--saas-space-3);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--saas-ink);
}

.theme-saas .saas-auth-form input[type="text"],
.theme-saas .saas-auth-form input[type="password"],
.theme-saas .saas-auth-form input[type="file"],
.theme-saas .saas-gaps-form input,
.theme-saas .saas-gaps-form textarea,
.theme-saas .saas-infra-filter-form input,
.theme-saas .saas-infra-filter-form select {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 400;
    box-sizing: border-box;
}

.theme-saas .saas-auth-form textarea,
.theme-saas .saas-gaps-form textarea {
    min-height: 120px;
    resize: vertical;
}

.theme-saas .saas-auth-footer {
    text-align: center;
    margin-top: var(--saas-space-2);
}

.theme-saas .saas-auth-error {
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-danger-bg);
    border: 1px solid var(--saas-danger-border);
}

/* Suche */
.theme-saas .saas-search-form {
    margin-bottom: var(--saas-space-5);
}

.theme-saas .search-page-field {
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-3);
    align-items: stretch;
}

.theme-saas .search-page-field input[type="search"] {
    flex: 1 1 200px;
    min-width: 0;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}

.theme-saas .search-page-field .btn {
    min-height: 44px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.theme-saas .saas-search-results {
    display: grid;
    gap: var(--saas-space-3);
}

.theme-saas .saas-search-card {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-2);
}

.theme-saas .search-result-group {
    margin-bottom: var(--saas-space-5);
}

.theme-saas .search-result-group-title {
    margin-bottom: var(--saas-space-3);
}

.theme-saas .search-result-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.theme-saas .saas-meta-chip {
    display: inline-flex;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: var(--saas-surface-muted);
    font-size: 0.8125rem;
}

.theme-saas .saas-search-count {
    font-weight: 600;
    color: var(--saas-ink-secondary);
    margin-bottom: var(--saas-space-4);
}

.theme-saas .saas-search-empty {
    text-align: center;
    color: var(--saas-ink-secondary);
}

/* Offene Bedarfe */
.theme-saas .saas-gaps-grid,
.theme-saas .saas-infra-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: var(--saas-space-4);
}

.theme-saas .saas-gap-card,
.theme-saas .saas-infra-card {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
}

.theme-saas .saas-gap-card-head {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-2);
}

.theme-saas .saas-gap-title,
.theme-saas .saas-infra-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.theme-saas .saas-gap-chips,
.theme-saas .saas-infra-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.theme-saas .saas-gap-meta,
.theme-saas .saas-infra-card-meta {
    display: grid;
    gap: 0.65rem;
    margin: 0;
}

.theme-saas .saas-gap-meta > div,
.theme-saas .saas-infra-card-meta > div {
    display: grid;
    grid-template-columns: minmax(0, 38%) 1fr;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.theme-saas .saas-gap-meta dt,
.theme-saas .saas-infra-card-meta dt {
    margin: 0;
    font-weight: 600;
    color: var(--saas-ink-secondary);
}

.theme-saas .saas-gap-meta dd,
.theme-saas .saas-infra-card-meta dd {
    margin: 0;
    color: var(--saas-ink);
}

.theme-saas .saas-gap-actions {
    margin-top: auto;
    padding-top: var(--saas-space-2);
}

.theme-saas .saas-gap-actions .btn,
.theme-saas .saas-infra-card .btn {
    min-height: 44px;
}

.theme-saas .saas-gaps-empty,
.theme-saas .saas-infra-empty {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--saas-space-3);
}

/* Grundlagen / Infrastruktur */
.theme-saas .saas-infra-kpis {
    margin-bottom: var(--saas-space-5);
}

.theme-saas .saas-kpi-card {
    border-radius: var(--saas-radius-lg);
    padding: var(--saas-space-4);
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .saas-infra-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
    gap: var(--saas-space-3);
}

.theme-saas .saas-infra-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-2);
}

.theme-saas .saas-infra-filter-actions .btn {
    min-height: 44px;
}

.theme-saas .saas-infra-results .section-title {
    margin-bottom: var(--saas-space-4);
}

.theme-saas .saas-infra-filters {
    margin-bottom: var(--saas-space-5);
}

/* Ausfall-Simulation */
.theme-saas .saas-failure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--saas-space-4);
    margin-bottom: var(--saas-space-4);
}

.theme-saas .saas-failure-panel {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
}

.theme-saas .saas-failure-picker {
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.theme-saas .saas-failure-picker-item {
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-widget-inner);
    border: 1px solid var(--saas-line);
}

.theme-saas .failure-sim-picker-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--saas-accent);
    text-decoration: none;
    font-weight: 600;
}

.theme-saas .failure-sim-picker-link:hover {
    color: var(--saas-accent-hover);
    text-decoration: underline;
}

.theme-saas .saas-failure-note {
    display: inline-flex;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: var(--saas-info-bg);
    border: 1px solid var(--saas-info-border);
    color: var(--saas-info-text);
}

.theme-saas .saas-failure-links {
    text-align: center;
}

@media (max-width: 768px) {
    .theme-saas.saas-page-auth .app-main,
    .theme-saas.saas-page-search .app-main,
    .theme-saas.saas-page-gaps .app-main,
    .theme-saas.saas-page-infra .app-main,
    .theme-saas.saas-page-failure .app-main {
        padding-bottom: 6.5rem;
    }

    .theme-saas .saas-auth-steps-grid {
        grid-template-columns: 1fr;
    }

    .theme-saas .search-page-field {
        flex-direction: column;
    }

    .theme-saas .search-page-field .btn {
        width: 100%;
    }

    .theme-saas .saas-gap-meta > div,
    .theme-saas .saas-infra-card-meta > div {
        grid-template-columns: 1fr;
    }

    .theme-saas .saas-failure-grid {
        grid-template-columns: 1fr;
    }

    .theme-saas .saas-infra-filter-actions {
        flex-direction: column;
    }

    .theme-saas .saas-infra-filter-actions .btn {
        width: 100%;
    }

    .theme-saas .saas-gap-actions .btn,
    .theme-saas .saas-gaps-form .btn,
    .theme-saas .saas-auth-form .btn {
        width: 100%;
    }
}

/* ==========================================================================
   Phase B — Projektfluss (Wizard, Verbindungen, Grundlagen-Dossier, Ausfall-Detail)
   Preview: ?theme=saas
   ========================================================================== */

.theme-saas.saas-page-dependency .app-main,
.theme-saas.saas-page-infra .saas-infra-dossier,
.theme-saas.saas-page-infra .saas-infra-new,
.theme-saas.saas-page-failure .saas-failure-detail {
    max-width: 960px;
    margin: 0 auto;
}

.theme-saas .saas-project-start-advanced .saas-wizard-form {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-4);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.theme-saas .saas-wizard-progress {
    background: var(--saas-widget);
    border: 1px solid var(--saas-line);
    border-radius: var(--saas-radius-lg);
    padding: var(--saas-space-4);
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .saas-wizard-step {
    display: none;
}

.theme-saas .saas-wizard-step.active {
    display: block;
}

.theme-saas .saas-wizard-step label,
.theme-saas .saas-dependency-form label,
.theme-saas .saas-infra-new-form label,
.theme-saas .saas-stack-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--saas-space-3);
    font-weight: 600;
    font-size: 0.875rem;
}

.theme-saas .saas-wizard-step input,
.theme-saas .saas-wizard-step textarea,
.theme-saas .saas-wizard-step select,
.theme-saas .saas-dependency-form input,
.theme-saas .saas-dependency-form textarea,
.theme-saas .saas-dependency-form select,
.theme-saas .saas-infra-new-form input,
.theme-saas .saas-infra-new-form textarea,
.theme-saas .saas-infra-new-form select,
.theme-saas .saas-stack-form input,
.theme-saas .saas-stack-form textarea,
.theme-saas .saas-stack-form select {
    width: 100%;
    min-height: 44px;
    padding: 0.65rem 1rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 400;
    box-sizing: border-box;
}

.theme-saas .saas-wizard-step textarea,
.theme-saas .saas-dependency-form textarea,
.theme-saas .saas-infra-new-form textarea,
.theme-saas .saas-stack-form textarea {
    min-height: 120px;
    resize: vertical;
}

.theme-saas .saas-wizard-actions,
.theme-saas .saas-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-wizard-actions .btn,
.theme-saas .saas-form-actions .btn {
    min-height: 44px;
}

.theme-saas .saas-dependency-fields {
    display: grid;
    gap: 0;
}

.theme-saas .saas-form-section {
    margin-bottom: var(--saas-space-4);
    background: var(--saas-widget-inner);
    border-radius: var(--saas-radius-md);
}

.theme-saas .saas-checkbox-label {
    flex-direction: row !important;
    align-items: center;
    gap: 0.5rem !important;
    font-weight: 500 !important;
}

.theme-saas .saas-checkbox-label input {
    width: auto !important;
    min-height: auto !important;
}

.theme-saas .saas-infra-dossier {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-4);
    padding-bottom: 5.5rem;
}

.theme-saas .saas-dossier-hero {
    background: var(--saas-widget);
    border: 1px solid var(--saas-line);
    border-radius: var(--saas-radius-widget);
    padding: clamp(1.15rem, 2.5vw, 1.75rem);
    box-shadow: var(--saas-shadow-float);
}

.theme-saas .saas-infra-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: var(--saas-space-3) 0;
}

.theme-saas .saas-infra-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-dossier-panel {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
}

.theme-saas .saas-dossier-lead {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--saas-ink-secondary);
    margin: 0;
}

.theme-saas .saas-ops-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: var(--saas-space-3);
}

.theme-saas .saas-ops-card {
    background: var(--saas-widget-inner);
}

.theme-saas .saas-protocol-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--saas-space-3);
}

.theme-saas .saas-protocol-item {
    padding: var(--saas-space-3);
}

.theme-saas .saas-failure-detail {
    padding-bottom: 5.5rem;
}

.theme-saas .saas-failure-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-failure-section {
    margin-bottom: var(--saas-space-4);
}

.theme-saas .saas-failure-notice {
    margin-bottom: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
}

.theme-saas .saas-failure-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--saas-space-2);
}

.theme-saas .saas-failure-list-item {
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-widget-inner);
    border: 1px solid var(--saas-line);
}

.theme-saas .saas-failure-list-item a {
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: var(--saas-accent);
}

.theme-saas .saas-failure-impact {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--saas-space-2);
}

.theme-saas .saas-impact-card {
    border-radius: var(--saas-radius-md);
    padding: var(--saas-space-3);
    text-align: center;
    border: 1px solid var(--saas-line);
    background: var(--saas-widget-inner);
}

.theme-saas .saas-impact-card.is-active {
    border-color: var(--saas-accent);
    background: var(--saas-accent-soft);
}

.theme-saas .saas-recovery-list {
    padding-left: 1.25rem;
    line-height: 1.65;
    color: var(--saas-ink-secondary);
}

.theme-saas .back-link {
    color: var(--saas-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
}

.theme-saas .back-link:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .theme-saas .saas-wizard-actions,
    .theme-saas .saas-form-actions,
    .theme-saas .saas-failure-actions {
        flex-direction: column;
    }

    .theme-saas .saas-wizard-actions .btn,
    .theme-saas .saas-form-actions .btn,
    .theme-saas .saas-failure-actions .btn,
    .theme-saas .saas-stack-form .btn {
        width: 100%;
    }

    .theme-saas .saas-failure-impact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-saas .saas-infra-kpi-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-saas .saas-ops-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Phase C — Projektkarte & Vorhaben-Browser
   Preview: ?theme=saas
   ========================================================================== */

.theme-saas.saas-page-map.map-mode .app-main {
    max-width: none;
    padding: 0.25rem clamp(0.5rem, 2vw, 1rem) 5.5rem;
}

.theme-saas.saas-page-map .infra-leitstand {
    min-height: 0;
}

.theme-saas.saas-page-map .infra-leitstand-stage {
    position: relative;
    min-height: min(72vh, 820px);
    background: var(--saas-canvas);
    border: 1px solid var(--saas-canvas-border);
    box-shadow: var(--saas-shadow-float);
    overflow: hidden;
}

.theme-saas.saas-page-map .infra-canvas {
    background: var(--saas-canvas);
    border-radius: var(--saas-radius-xl);
    min-height: min(68vh, 760px);
}

.theme-saas.saas-page-map .infra-svg .infra-map-grid {
    stroke: rgba(255, 255, 255, 0.06);
}

.theme-saas.saas-page-map .infra-kpi-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    pointer-events: none;
    padding: 0;
    background: transparent;
    border: none;
}

.theme-saas.saas-page-map .infra-kpi-chip {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
    font-size: 0.8125rem;
    color: var(--saas-ink-secondary);
    backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-saas.saas-page-map .infra-kpi-chip strong {
    font-size: 0.9375rem;
    color: var(--saas-ink);
}

.theme-saas.saas-page-map .saas-map-mobile-hint {
    display: none;
}

.theme-saas.saas-page-map .infra-mobile-toggle {
    position: absolute;
    z-index: 14;
    min-height: 44px;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--saas-shadow-sm);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--saas-ink);
    backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.theme-saas.saas-page-map .infra-mobile-toggle--left {
    bottom: 72px;
    left: 12px;
}

.theme-saas.saas-page-map .infra-mobile-toggle--right {
    bottom: 72px;
    right: 12px;
}

.theme-saas.saas-page-map .infra-overlay {
    background: var(--saas-overlay);
    border: 1px solid var(--saas-line);
    border-radius: var(--saas-radius-lg);
    box-shadow: var(--saas-overlay-shadow);
    color: var(--saas-ink);
}

.theme-saas.saas-page-map .infra-overlay-head h2 {
    font-size: 1rem;
    font-weight: 700;
}

.theme-saas.saas-page-map .infra-detail-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.theme-saas.saas-page-map .infra-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: var(--saas-space-3);
}

.theme-saas.saas-page-map .infra-detail-actions .btn {
    min-height: 44px;
}

.theme-saas.saas-page-map .saas-simulation-banner {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem 0.75rem;
    max-width: calc(100% - 24px);
    padding: 0.65rem 1rem;
    border-radius: var(--saas-radius-lg);
    background: var(--saas-warning-bg);
    border: 1px solid var(--saas-warning-border);
    color: var(--saas-warning-text);
    box-shadow: var(--saas-shadow-md);
}

.theme-saas.saas-page-map .saas-simulation-banner .hint {
    color: inherit;
    opacity: 0.9;
}

.theme-saas.saas-page-map .saas-map-layout-fold {
    margin-bottom: var(--saas-space-3);
}

.theme-saas.saas-page-map .saas-map-layout-fold summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.35rem 0;
    color: var(--saas-ink-secondary);
}

.theme-saas.saas-page-map .infra-mode-pill {
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-weight: 600;
    font-size: 0.8125rem;
}

.theme-saas.saas-page-map .infra-mode-pill.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
}

.theme-saas.saas-page-list .supply-split-item {
    border-radius: var(--saas-radius-md);
    min-height: 44px;
}

.theme-saas.saas-page-list .supply-split-item__chips li {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--saas-surface-muted);
}

.theme-saas.saas-page-list .supply-list-filters--toolbar {
    margin-bottom: var(--saas-space-3);
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-lg);
    background: var(--saas-widget);
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
}

@media (max-width: 767px) {
    .theme-saas.saas-page-map .saas-map-mobile-hint {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        position: absolute;
        top: auto;
        bottom: 128px;
        left: 12px;
        right: 12px;
        z-index: 13;
        padding: 0.65rem 0.85rem;
        border-radius: var(--saas-radius-md);
        background: rgba(255, 255, 255, 0.92);
        border: 1px solid var(--saas-line);
        box-shadow: var(--saas-shadow-sm);
    }

    .theme-saas.saas-page-map .saas-map-mobile-hint .btn {
        min-height: 44px;
        margin-left: auto;
    }

    .theme-saas.saas-page-map .infra-kpi-bar {
        top: auto;
        bottom: 12px;
        left: 12px;
        right: 12px;
        justify-content: center;
    }

    .theme-saas.saas-page-map .infra-mobile-toggle--left,
    .theme-saas.saas-page-map .infra-mobile-toggle--right {
        bottom: auto;
        top: 12px;
    }

    .theme-saas.saas-page-map .infra-mobile-toggle--right {
        right: 12px;
    }

    .theme-saas.saas-page-map .infra-leitstand-stage {
        min-height: min(78dvh, 720px);
    }

    .theme-saas.saas-page-map .infra-overlay.is-open {
        position: fixed;
        inset: auto 0 0 0;
        max-height: min(88dvh, 640px);
        border-radius: var(--saas-radius-xl) var(--saas-radius-xl) 0 0;
        z-index: 55;
    }

    .theme-saas .saas-filter-details > summary.saas-filter-details__toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.45rem 1rem;
        border-radius: 999px;
        border: 1px solid var(--saas-line);
        background: var(--saas-surface-muted);
        font-weight: 600;
        font-size: 0.875rem;
        cursor: pointer;
        list-style: none;
    }

    .theme-saas .saas-filter-details:not([open]) .saas-filter-details__body {
        display: none;
    }

    .theme-saas .saas-filter-details[open] .saas-filter-details__body {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
        width: 100%;
        margin-top: 0.65rem;
    }

    .theme-saas.saas-page-list .supply-split__list {
        max-height: none;
    }
}

/* Map readability polish — Darstellungsmodi, Fokus, ruhige Linien */
.theme-saas.saas-page-map .saas-map-render-bar {
    position: absolute;
    top: 56px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 24;
    max-width: calc(100% - 5rem);
    pointer-events: none;
}

.theme-saas.saas-page-map .saas-map-render-modes {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
    pointer-events: auto;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.theme-saas.saas-page-map .saas-map-render-mode {
    min-height: 36px;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--saas-ink-secondary);
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
}

.theme-saas.saas-page-map .saas-map-render-mode.is-active,
.theme-saas.saas-page-map .saas-map-render-mode--sim.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    border-color: var(--saas-ink-pill);
}

.theme-saas.saas-page-map .infra-overlay--left.saas-map-panel {
    width: min(272px, calc(100% - 1.5rem));
}

.theme-saas.saas-page-map .saas-map-panel-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.35rem 0 0.5rem;
}

.theme-saas.saas-page-map .saas-map-panel-tab {
    min-height: 36px;
    padding: 0.3rem 0.55rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: var(--saas-surface-muted);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--saas-ink-secondary);
    cursor: pointer;
}

.theme-saas.saas-page-map .saas-map-panel-tab.is-active {
    background: var(--saas-ink-pill);
    color: var(--saas-ink-inverse);
    border-color: var(--saas-ink-pill);
}

.theme-saas.saas-page-map .saas-map-panel-section[hidden] {
    display: none !important;
}

.theme-saas.saas-page-map .infra-overlay-fold.saas-map-panel-section:not([open]) .infra-panel-compact,
.theme-saas.saas-page-map .infra-overlay-fold.saas-map-panel-section:not([open]) form {
    display: none;
}

.theme-saas.saas-page-map .saas-map-focus-clear {
    margin-left: auto;
    margin-right: 0.35rem;
    min-height: 36px;
    font-size: 0.75rem;
}

.theme-saas.saas-page-map .infra-overlay--right.saas-map-detail-panel:not(.is-collapsed) {
    width: min(300px, calc(100% - 1.5rem));
}

.theme-saas.saas-page-map .infra-svg .infra-region-zone--saas {
    fill: rgba(26, 95, 140, 0.04);
    stroke: rgba(26, 95, 140, 0.12);
    stroke-width: 1;
    stroke-dasharray: 6 8;
    pointer-events: none;
}

.theme-saas.saas-page-map .infra-map-mode--regionen .infra-region-zone--saas,
.theme-saas.saas-page-map .infra-region-zone--saas.infra-region-zone--emphasis {
    fill: rgba(26, 95, 140, 0.1);
    stroke: rgba(26, 95, 140, 0.28);
}

.theme-saas.saas-page-map .infra-region-label--saas {
    fill: var(--saas-ink-secondary);
    font-size: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.theme-saas.saas-page-map .infra-region-label--saas.infra-region-label--visible,
.theme-saas.saas-page-map .infra-map-mode--regionen .infra-region-label--saas {
    opacity: 0.85;
}

.theme-saas.saas-page-map .infra-edge--quiet {
    transition: stroke-opacity 0.15s ease, stroke-width 0.15s ease;
}

.theme-saas.saas-page-map .infra-map-mode--uebersicht .infra-edge--quiet:not(.is-focus-edge) {
    stroke-opacity: 0.35;
}

.theme-saas.saas-page-map .infra-map-mode--regionen .infra-edge--quiet:not(.is-focus-edge),
.theme-saas.saas-page-map .infra-map-mode--hinweise .infra-edge--quiet:not(.is-focus-edge) {
    stroke-opacity: 0.2;
}

.theme-saas.saas-page-map .infra-map-mode--verbindungen .infra-edge--quiet:not(.is-focus-edge):not(.is-focus-dimmed) {
    stroke-opacity: 0.55;
}

.theme-saas.saas-page-map .infra-edge.is-focus-dimmed {
    stroke-opacity: 0.08 !important;
}

.theme-saas.saas-page-map .infra-edge.is-focus-edge--in {
    stroke: rgba(52, 211, 153, 0.85) !important;
    stroke-width: 2.25 !important;
    stroke-opacity: 1 !important;
}

.theme-saas.saas-page-map .infra-edge.is-focus-edge--out {
    stroke: rgba(56, 189, 248, 0.9) !important;
    stroke-width: 2.25 !important;
    stroke-opacity: 1 !important;
}

.theme-saas.saas-page-map .infra-edge.is-focus-edge:not(.is-focus-edge--in):not(.is-focus-edge--out) {
    stroke-opacity: 0.95 !important;
    stroke-width: 2.5 !important;
}

.theme-saas.saas-page-map .infra-node.infra-node--labels-hidden .infra-node-label,
.theme-saas.saas-page-map .infra-node.infra-node--labels-hidden .infra-node-label-bg {
    opacity: 0;
    visibility: hidden;
}

.theme-saas.saas-page-map .infra-node.is-label-promoted .infra-node-label,
.theme-saas.saas-page-map .infra-node.is-label-promoted .infra-node-label-bg,
.theme-saas.saas-page-map .infra-node.is-hovered .infra-node-label,
.theme-saas.saas-page-map .infra-node.is-hovered .infra-node-label-bg {
    opacity: 1;
    visibility: visible;
}

.theme-saas.saas-page-map .infra-node.is-focus-dimmed {
    opacity: 0.28;
}

.theme-saas.saas-page-map .infra-node.is-focus-dimmed .infra-node-core {
    filter: grayscale(0.35);
}

.theme-saas.saas-page-map .infra-node.is-focus-active {
    opacity: 1;
}

.theme-saas.saas-page-map .infra-node.is-focus-active .infra-node-select-ring {
    opacity: 1;
    stroke: rgba(26, 95, 140, 0.75);
    stroke-width: 2;
}

.theme-saas.saas-page-map .infra-node.is-focus-connected {
    opacity: 0.92;
}

.theme-saas.saas-page-map .infra-node.infra-node--hint-emphasis .infra-node-core {
    stroke: #f87171;
    stroke-width: 3;
    filter: drop-shadow(0 0 6px rgba(248, 113, 113, 0.45));
}

.theme-saas.saas-page-map .infra-node.infra-node--hint-dim {
    opacity: 0.35;
}

.theme-saas.saas-page-map .infra-map-mode--simulation .infra-edge--quiet {
    stroke-opacity: 0.4;
}

.theme-saas.saas-page-map .infra-map-mode--simulation .infra-region-zone--saas {
    opacity: 0.65;
}

.theme-saas.saas-page-map.map-mode .infra-leitstand-stage:has(.infra-overlay--left.is-collapsed) .infra-kpi-bar,
.theme-saas.saas-page-map.map-mode .infra-leitstand-stage:has(.infra-overlay--left.is-collapsed) .saas-map-render-bar {
    max-width: calc(100% - 4rem);
}

@media (min-width: 1025px) {
    .theme-saas.saas-page-map .infra-overlay--left.saas-map-panel:not(.is-collapsed) ~ .infra-canvas,
    .theme-saas.saas-page-map .infra-leitstand-stage:has(.infra-overlay--left:not(.is-collapsed)) .saas-map-render-bar {
        /* panels float — canvas stays full width */
    }
}

@media (max-width: 1024px) {
    .theme-saas.saas-page-map .saas-map-render-bar {
        top: auto;
        bottom: 188px;
        left: 12px;
        right: 12px;
        transform: none;
        max-width: none;
    }

    .theme-saas.saas-page-map .saas-map-render-modes {
        border-radius: var(--saas-radius-lg);
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .theme-saas.saas-page-map .saas-map-render-mode {
        min-height: 44px;
        flex-shrink: 0;
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node:not(.is-focus-active):not(.is-hovered).infra-node--labels-hidden .infra-node-label,
    .theme-saas.saas-page-map .infra-map--mobile .infra-node:not(.is-focus-active):not(.is-hovered).infra-node--labels-hidden .infra-node-label-bg {
        opacity: 0;
        visibility: hidden;
    }
}

/* Projektkarte — Mobile Nutzbarkeit (≤768px) */
@media (max-width: 768px) {
    .theme-saas.saas-page-map.map-mode .app-main {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }

    .theme-saas.saas-page-map .infra-leitstand-stage {
        min-height: calc(100dvh - 7.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 7.5rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    }

    .theme-saas.saas-page-map .infra-canvas {
        min-height: calc(100dvh - 11rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: calc(100dvh - 11rem - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: hidden;
        touch-action: none;
    }

    .theme-saas.saas-page-map .infra-svg {
        max-width: 100%;
        max-height: 100%;
    }

    .theme-saas.saas-page-map .saas-map-density-hint {
        position: absolute;
        top: 52px;
        left: 12px;
        right: 12px;
        z-index: 12;
        margin: 0;
        padding: 0.45rem 0.65rem;
        border-radius: var(--saas-radius-sm);
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid var(--saas-line);
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .theme-saas.saas-page-map .saas-map-mobile-hint {
        bottom: calc(4.75rem + env(safe-area-inset-bottom));
    }

    .theme-saas.saas-page-map .saas-map-mobile-hint .saas-map-tap-hint {
        flex: 1 1 12rem;
        margin: 0;
        font-size: 0.75rem;
        line-height: 1.35;
    }

    .theme-saas.saas-page-map .infra-kpi-bar {
        bottom: calc(0.65rem + env(safe-area-inset-bottom));
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.35rem;
        overflow: visible;
    }

    .theme-saas.saas-page-map .infra-kpi-chip {
        flex: 0 1 auto;
        min-height: 40px;
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }

    .theme-saas.saas-page-map .infra-kpi-chip strong {
        font-size: 0.9rem;
    }

    .theme-saas.saas-page-map .infra-kpi-chip--status {
        display: none;
    }

    .theme-saas.saas-page-map .infra-kpi-more {
        position: relative;
        flex: 0 0 auto;
    }

    .theme-saas.saas-page-map .infra-kpi-more > summary {
        list-style: none;
        cursor: pointer;
    }

    .theme-saas.saas-page-map .infra-kpi-more > summary::-webkit-details-marker {
        display: none;
    }

    .theme-saas.saas-page-map .infra-kpi-chip--more {
        pointer-events: auto;
        color: var(--saas-ink-secondary);
    }

    .theme-saas.saas-page-map .infra-kpi-more__items {
        position: absolute;
        bottom: calc(100% + 6px);
        right: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 0.35rem;
        justify-content: flex-end;
        min-width: 10rem;
        padding: 0.45rem;
        border-radius: var(--saas-radius-md);
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--saas-line);
        box-shadow: var(--saas-shadow-md);
    }

    .theme-saas.saas-page-map .infra-overlay.is-open {
        max-height: min(70dvh, 560px);
        padding-bottom: env(safe-area-inset-bottom);
        z-index: 60;
    }

    .theme-saas.saas-page-map .infra-overlay.is-open .infra-overlay-body {
        max-height: calc(70dvh - 4.5rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .theme-saas.saas-page-map .infra-overlay--left.is-open {
        max-height: min(78dvh, 620px);
    }

    .theme-saas.saas-page-map .infra-overlay--left:not(.is-open) {
        display: none;
    }

    .theme-saas.saas-page-map .infra-overlay--right:not(.is-open) {
        display: none;
    }

    .theme-saas.saas-page-map .saas-map-render-bar {
        bottom: calc(7.25rem + env(safe-area-inset-bottom));
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node-touch-hit {
        fill: transparent;
        pointer-events: all;
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node.is-focus-active .infra-node-select-ring {
        stroke-width: 3;
        stroke: rgba(74, 111, 168, 0.9);
        opacity: 1;
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node.is-focus-active .infra-node-core {
        stroke-width: 2.5;
        filter: drop-shadow(0 0 8px rgba(74, 111, 168, 0.45));
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node--short-label .infra-node-label {
        font-size: 11px;
        font-weight: 600;
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-node.is-label-promoted .infra-node-label {
        font-size: 13px;
        font-weight: 700;
    }

    .theme-saas.saas-page-map .infra-map--edges-minimal .infra-edge--quiet:not(.is-focus-edge) {
        stroke-opacity: 0.08 !important;
        stroke-width: 1 !important;
    }

    .theme-saas.saas-page-map .infra-map--edges-minimal .infra-edge-hit:not(.is-focus-dimmed) {
        pointer-events: none;
    }

    .theme-saas.saas-page-map .infra-map--mobile .infra-region-zone--saas {
        opacity: 0.35;
    }

    .theme-saas.saas-page-map .infra-map--mobile.infra-map-mode--uebersicht .infra-region-label--saas {
        opacity: 0;
    }

    .theme-saas.saas-page-map .infra-mobile-toggle {
        top: auto;
        bottom: calc(7.5rem + env(safe-area-inset-bottom));
    }

    .theme-saas.saas-page-map .infra-mobile-toggle--left {
        left: 12px;
        right: auto;
    }

    .theme-saas.saas-page-map .infra-mobile-toggle--right {
        display: none;
    }
}

/* ==========================================================================
   Phase D — Nutzerbereich (Dashboard, Profil)
   Preview: ?theme=saas
   ========================================================================== */

.theme-saas.saas-page-dashboard .app-main,
.theme-saas.saas-page-profile .app-main {
    max-width: 960px;
    margin: 0 auto;
    padding: 0.25rem clamp(0.75rem, 2.5vw, 1.75rem) 5.75rem;
}

.theme-saas.saas-page-dashboard .site-footer,
.theme-saas.saas-page-profile .site-footer {
    margin-top: var(--saas-space-4);
}

.theme-saas .saas-dashboard-hero--personal {
    display: block;
    padding: var(--saas-space-5) var(--saas-space-4);
    border-radius: var(--saas-radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 252, 0.88));
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-md);
    margin-bottom: var(--saas-space-4);
}

.theme-saas .saas-dashboard-hero--personal .display-title {
    font-size: clamp(1.65rem, 4vw, 2.15rem);
    margin-bottom: 0.35rem;
}

.theme-saas .saas-user-dashboard {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-5);
}

.theme-saas.saas-page-dashboard .saas-user-kpis.stats-grid--leitstand {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--saas-space-3);
}

.theme-saas.saas-page-dashboard .saas-user-kpis .stat-card--leitstand {
    min-height: 120px;
    padding: var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-widget-inner);
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
    text-decoration: none;
    color: inherit;
}

.theme-saas.saas-page-dashboard .saas-user-kpis .stat-card-value {
    font-size: 1.75rem;
    font-weight: 700;
}

.theme-saas.saas-page-dashboard .saas-user-kpis .stat-card-label {
    font-size: 0.875rem;
    color: var(--saas-ink-secondary);
}

.theme-saas .saas-dashboard-action-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--saas-space-3);
}

.theme-saas .saas-dashboard-action-card {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-2);
    padding: var(--saas-space-4);
    min-height: 160px;
}

.theme-saas .saas-dashboard-action-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.theme-saas .saas-dashboard-action-card p {
    margin: 0;
    flex: 1;
    color: var(--saas-ink-secondary);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.theme-saas .saas-dashboard-action-card .btn {
    align-self: flex-start;
    min-height: 44px;
}

.theme-saas .saas-activity-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--saas-space-3);
}

.theme-saas .saas-activity-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: var(--saas-space-3);
    text-decoration: none;
    color: inherit;
    min-height: 88px;
}

.theme-saas .saas-activity-card strong {
    font-size: 0.98rem;
}

.theme-saas .saas-activity-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--saas-ink-secondary);
    line-height: 1.45;
}

.theme-saas .saas-activity-card__meta {
    font-size: 0.8125rem;
    color: var(--saas-ink-muted);
    margin-top: auto;
}

.theme-saas .saas-activity-empty {
    padding: var(--saas-space-4);
    text-align: center;
    color: var(--saas-ink-secondary);
}

.theme-saas .saas-profile {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-4);
}

.theme-saas .saas-profile-dossier {
    display: flex;
    align-items: center;
    gap: var(--saas-space-4);
    padding: var(--saas-space-5);
    border-radius: var(--saas-radius-lg);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(245, 248, 252, 0.9));
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-md);
}

.theme-saas .saas-profile-avatar {
    flex-shrink: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--saas-accent);
    background: var(--saas-surface-muted);
    border: 2px solid var(--saas-line);
}

.theme-saas .saas-profile-dossier-body .display-title {
    margin: 0 0 0.25rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.theme-saas .saas-profile-form-card {
    padding: var(--saas-space-5);
}

.theme-saas .saas-profile-form .saas-profile-label {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: var(--saas-space-3) 0;
    font-weight: 600;
    font-size: 0.875rem;
}

.theme-saas .saas-profile-form input[type="text"] {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 1rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    box-sizing: border-box;
}

.theme-saas .saas-notice {
    margin: 0;
}

.theme-saas .saas-notice--error {
    background: var(--saas-danger-bg);
    border: 1px solid var(--saas-danger-border);
    color: var(--saas-danger-text);
}

.theme-saas .saas-profile-privacy {
    text-align: center;
    max-width: 42ch;
    margin: 0 auto;
}

@media (max-width: 900px) {
    .theme-saas.saas-page-dashboard .saas-user-kpis.stats-grid--leitstand {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-saas .saas-dashboard-action-cards,
    .theme-saas .saas-activity-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .theme-saas.saas-page-dashboard .saas-user-kpis.stats-grid--leitstand {
        grid-template-columns: 1fr;
    }

    .theme-saas .saas-profile-dossier {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .theme-saas.saas-page-dashboard .app-main,
    .theme-saas.saas-page-profile .app-main {
        padding-bottom: 6.5rem;
    }

    .theme-saas .saas-dashboard-action-card .btn,
    .theme-saas .saas-profile-form .btn-block {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Phase E — Administration & System
   Preview: ?theme=saas
   ========================================================================== */

.theme-saas.saas-page-admin .app-main,
.theme-saas.saas-page-upgrade {
    max-width: 1040px;
    margin: 0 auto;
}

.theme-saas.saas-page-admin .app-main {
    padding: 0.25rem clamp(0.75rem, 2.5vw, 1.75rem) 5.75rem;
}

.theme-saas.saas-page-upgrade {
    padding: clamp(0.75rem, 2.5vw, 1.75rem);
    min-height: 100vh;
    box-sizing: border-box;
}

.theme-saas .saas-admin {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-5);
}

.theme-saas .saas-admin-hero {
    padding: var(--saas-space-4);
    border-radius: var(--saas-radius-lg);
    background: var(--saas-surface);
    border: 1px solid var(--saas-line);
    box-shadow: var(--saas-shadow-sm);
}

.theme-saas .saas-admin-hero .display-title {
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    margin-bottom: 0.35rem;
}

.theme-saas .saas-admin-hero .display-lead {
    max-width: 52ch;
    margin-bottom: 0;
}

.theme-saas .saas-admin-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--saas-space-3);
}

.theme-saas .saas-admin-status-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-saas .saas-admin-status-card {
    padding: var(--saas-space-3);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.theme-saas .saas-admin-status-card .section-title {
    font-size: 0.95rem;
    margin: 0;
}

.theme-saas .saas-admin-status-value,
.theme-saas .saas-admin-status-card strong {
    font-size: 1.05rem;
    font-weight: 600;
}

.theme-saas .saas-admin-status-label {
    font-size: 0.8125rem;
    color: var(--saas-ink-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.theme-saas .saas-admin-quick-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-admin-quick-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: var(--saas-space-4);
    text-decoration: none;
    color: inherit;
    min-height: 120px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.theme-saas .saas-admin-quick-card:hover {
    border-color: var(--saas-accent);
    box-shadow: var(--saas-shadow-md);
}

.theme-saas .saas-admin-quick-card h3 {
    margin: 0;
    font-size: 1rem;
}

.theme-saas .saas-admin-quick-card p {
    margin: 0;
    flex: 1;
    font-size: 0.875rem;
    color: var(--saas-ink-secondary);
    line-height: 1.45;
}

.theme-saas .saas-admin-quick-card--accent {
    border-color: var(--saas-warning-border, #e8d4a8);
    background: var(--saas-warning-bg, #fff9ed);
}

.theme-saas .saas-admin-settings-card {
    padding: var(--saas-space-4);
}

.theme-saas .saas-admin-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-2);
    padding: var(--saas-space-2) var(--saas-space-3);
    border-radius: var(--saas-radius-md);
    background: var(--saas-surface-muted);
    border: 1px solid var(--saas-line);
}

.theme-saas .saas-admin-subnav__link {
    padding: 0.4rem 0.85rem;
    border-radius: var(--saas-radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--saas-ink-secondary);
}

.theme-saas .saas-admin-subnav__link:hover,
.theme-saas .saas-admin-subnav__link.is-active {
    background: var(--saas-surface);
    color: var(--saas-ink);
    border: 1px solid var(--saas-line);
}

.theme-saas .saas-admin-backup-list {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
}

.theme-saas .saas-admin-backup-row {
    padding: var(--saas-space-3);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--saas-space-3);
}

.theme-saas .saas-admin-backup-row__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--saas-space-2);
    font-size: 0.875rem;
}

.theme-saas .saas-admin-backup-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--saas-space-2);
    align-items: center;
}

.theme-saas .saas-admin-inline-form {
    display: inline;
    margin: 0;
}

.theme-saas .saas-admin-form input[type="time"],
.theme-saas .saas-admin-form input[type="file"] {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.9);
    box-sizing: border-box;
}

.theme-saas .saas-admin-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: var(--saas-space-3);
    font-weight: 600;
    font-size: 0.875rem;
}

.theme-saas .saas-admin-form input[type="text"],
.theme-saas .saas-admin-form input[type="number"],
.theme-saas .saas-admin-form input[type="password"],
.theme-saas .saas-admin-form select {
    width: 100%;
    min-height: 44px;
    padding: 0.6rem 0.9rem;
    border-radius: var(--saas-radius-sm);
    border: 1px solid var(--saas-line);
    background: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 400;
    box-sizing: border-box;
}

.theme-saas .saas-admin-check {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.theme-saas .saas-admin-check input {
    width: auto;
    min-height: auto;
}

.theme-saas .saas-admin-run-form {
    margin: 0;
}

.theme-saas .saas-admin-run-form .btn {
    min-height: 44px;
}

.theme-saas .saas-notice--warn {
    background: #fff8eb;
    border: 1px solid #e8d4a8;
    color: #6b5420;
}

.theme-saas .saas-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid var(--saas-line);
    background: var(--saas-surface-muted);
    color: var(--saas-ink-secondary);
}

.theme-saas .saas-status-pill--pass {
    background: #e8f5ef;
    border-color: #b8dcc8;
    color: #1f5c3a;
}

.theme-saas .saas-status-pill--warn {
    background: #fff8eb;
    border-color: #e8d4a8;
    color: #6b5420;
}

.theme-saas .saas-status-pill--fail {
    background: var(--saas-danger-bg);
    border-color: var(--saas-danger-border);
    color: var(--saas-danger-text);
}

.theme-saas .saas-status-pill--skip {
    background: #eef1f6;
    border-color: #c8d0dc;
    color: #4a5568;
}

.theme-saas .saas-admin-test-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.theme-saas .saas-admin-test-results {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
}

.theme-saas .saas-admin-test-card {
    padding: var(--saas-space-3);
    border-left: 4px solid var(--saas-line);
}

.theme-saas .saas-admin-test-card--pass {
    border-left-color: #3d9a6a;
}

.theme-saas .saas-admin-test-card--warn {
    border-left-color: #c9a227;
}

.theme-saas .saas-admin-test-card--fail {
    border-left-color: var(--saas-danger-text);
    background: rgba(255, 245, 245, 0.6);
}

.theme-saas .saas-admin-test-card--skip {
    border-left-color: #8b95a5;
    background: rgba(248, 249, 251, 0.85);
}

.theme-saas .saas-admin-test-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.theme-saas .saas-admin-test-card__name {
    font-size: 0.98rem;
}

.theme-saas .saas-admin-test-detail {
    margin: 0;
    font-size: 0.875rem;
    color: var(--saas-ink-secondary);
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.theme-saas .saas-admin-test-details summary {
    cursor: pointer;
    font-size: 0.8125rem;
    color: var(--saas-ink-muted);
    margin-bottom: 0.35rem;
}

.theme-saas .saas-admin-flow-issues {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-3);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-admin-flow-issue-card {
    padding: var(--saas-space-3);
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-2);
}

.theme-saas .saas-admin-flow-issue-card p {
    margin: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.theme-saas .saas-admin-flow-issue-card .btn {
    align-self: flex-start;
    min-height: 44px;
}

.theme-saas .saas-upgrade {
    display: flex;
    flex-direction: column;
    gap: var(--saas-space-4);
    max-width: 720px;
    margin: 0 auto;
}

.theme-saas .saas-upgrade-details {
    padding: var(--saas-space-3);
}

.theme-saas .saas-upgrade-details summary {
    cursor: pointer;
    font-weight: 600;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.theme-saas .saas-upgrade-lists {
    display: grid;
    gap: var(--saas-space-4);
    margin-top: var(--saas-space-3);
}

.theme-saas .saas-upgrade-list {
    margin: 0;
    padding-left: 1.15rem;
    display: grid;
    gap: 0.35rem;
}

.theme-saas .saas-upgrade-list li {
    word-break: break-word;
    overflow-wrap: anywhere;
    font-size: 0.875rem;
}

.theme-saas .saas-upgrade-errors .saas-notice {
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .theme-saas .saas-admin-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-saas .saas-admin-quick-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .theme-saas .saas-admin-status-grid,
    .theme-saas .saas-admin-status-grid--compact {
        grid-template-columns: 1fr;
    }

    .theme-saas.saas-page-admin .app-main {
        padding-bottom: 6.5rem;
    }

    .theme-saas .saas-admin-form .btn,
    .theme-saas .saas-admin-run-form .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .theme-saas .btn:hover,
    .theme-saas .card:hover {
        transform: none;
    }
}
