/* ============================================================
   CircuitDoc Landing Page & Werkzeuge — App-Design (Styleguide v1.1)
   Hell · Teal #1D9E75 · flach (keine Verläufe, keine Schatten)
   Kontrast (seit 14.11.2026, wie in der App, STYLEGUIDE §2):
   Text, Links und Knöpfe mit Text in Teal → --primary-dark #0F6E56,
   Hover → --primary-darker #085041. --accent/--primary (#1D9E75)
   nur noch für Flächen, Linien, Punkte und Symbole ohne Text.
   ============================================================ */

:root {
    /* Verhindert Dark-Mode-Override durch iOS/Android-OS (Styleguide §8) */
    color-scheme: light;

    /* ── App-Tokens ───────────────────────────────────────────
       Identisch zum Block unter ".app-wrapper" – hier auf :root
       gehoben, damit Landingpage und Werkzeuge dieselben Tokens
       nutzen können. */
    --primary:        #1D9E75;
    --primary-dark:   #0F6E56;
    --primary-darker: #085041;
    --primary-light:  #9FE1CB;
    --primary-ghost:  #E1F5EE;

    --surface:        #FFFFFF;
    --surface-2:      #F1F3F0;

    --text-primary:   #1A1A1A;
    --text-hint:      #8A8983;

    --border-tertiary:#ECEBE5;
    --border-focus:   #1D9E75;
    --shadow-sm:      none;      /* Flach & technisch – keine Schatten */
    --shadow-md:      none;
    --radius-sm:      8px;       /* Chips, Buttons, Inputs */
    --radius-md:      12px;      /* Karten, Gruppen, Sheets */
    --radius-pill:    20px;      /* Badges, Pills */

    /* Statussystem (Styleguide §2) */
    --status-planned:         #0F6E56;  /* geplant – Teal */
    --status-planned-bg:      #E1F5EE;
    --status-active:          #3B6D11;  /* ok / aktiv – Grün */
    --status-active-bg:       #EAF3DE;
    --status-cable-active:    #185FA5;  /* aktiv (Kabel) – Blau */
    --status-cable-active-bg: #E6F1FB;
    --status-warn:            #854F0B;  /* warnung – Amber */
    --status-warn-bg:         #FAEEDA;
    --status-inactive:        #5F5E5A;  /* inaktiv – Grau */
    --status-inactive-bg:     #F1EFE8;
    --status-decomm:          #A32D2D;  /* fehler / außer Betrieb – Rot */
    --status-decomm-bg:       #FCEBEB;

    /* Kabelstatus-Balken */
    --bar-planned:    #9FE1CB;
    --bar-active:     #85B7EB;
    --bar-inactive:   #D3D1C7;
    --bar-decomm:     #F09595;

    /* ── Alias-Namen der Landing-/Werkzeug-Regeln ─────────────
       Gleiche Werte unter den historischen Variablennamen, damit
       bestehende .lp-* / .tool-* / .cb-* / .dse-* Regeln greifen. */
    --bg:             #F7F8F6;
    --bg-surface:     #F1F3F0;
    --bg-card:        #FFFFFF;
    --bg-card-hover:  #F1F3F0;
    --accent:         #1D9E75;
    --accent-dim:     #E1F5EE;
    --accent-border:  #9FE1CB;
    --accent-2:       #0F6E56;
    --text:           #1A1A1A;
    --text-secondary: #5F5E5A;
    --text-muted:     #8A8983;
    --border:         #E2E1DB;
    --border-strong:  #D6D5CD;
    --radius:         8px;
    --radius-lg:      12px;
    --shadow:         none;
    --glow:           none;
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.lp-navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 248, 246, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 0.5px solid var(--border);
}

.lp-nav-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.lp-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text);
    white-space: nowrap;
    flex-shrink: 0;
}

.lp-logo:hover {
    color: var(--primary-dark);
}

.lp-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--accent);
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 1rem;
    color: #fff;
    letter-spacing: 0;
    flex-shrink: 0;
}

.lp-logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    flex-shrink: 0;
}

.lp-nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.lp-nav-links a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: color 0.18s ease, background 0.18s ease;
}

.lp-nav-links a:hover {
    color: var(--primary-dark);
    background: var(--primary-ghost);
}

.lp-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.lp-lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
    transition: border-color 0.18s, background 0.18s;
}

.lp-lang-toggle:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
    color: var(--text);
}

.lp-lang-active {
    color: var(--primary-dark);
}

.lp-lang-sep {
    color: var(--text-secondary);
    font-weight: 300;
}

.lp-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-dark);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    border: none;
    transition: background 0.18s;
    white-space: nowrap;
}

.lp-cta-btn:hover {
    background: var(--primary-darker);
    color: #fff;
}

/* Zweiter Knopf oben: Umriss statt Fläche, damit "App öffnen" der Hauptknopf bleibt. */
.lp-nav-demo {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--primary-dark);
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.lp-nav-demo:hover {
    background: var(--primary-ghost);
    color: var(--primary-darker);
}

@media (max-width: 600px) {
    .lp-nav-demo {
        display: none;
    }
}

/* ============================================================
   BUTTONS
   ============================================================ */

.lp-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-dark);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s;
}

.lp-btn-primary:hover {
    background: var(--primary-darker);
    color: #fff;
}

.lp-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    padding: 14px 28px;
    border-radius: var(--radius);
    border: 0.5px solid var(--border);
    cursor: pointer;
    text-decoration: none;
    transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.lp-btn-secondary:hover {
    color: var(--text);
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

/* ============================================================
   HERO SECTION
   ============================================================ */

.lp-hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    background: var(--bg);
    overflow: hidden;
    padding: 80px 24px 80px;
}

.lp-hero-inner {
    max-width: 1160px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 64px;
}

.lp-hero-content {
    flex: 1;
    min-width: 0;
}

.lp-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--accent-dim);
    border: 0.5px solid var(--accent-border);
    color: var(--primary-dark);
    font-size: 0.80rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    padding: 5px 14px 5px 10px;
    border-radius: var(--radius-pill);
    margin-bottom: 24px;
    text-transform: uppercase;
}

.lp-hero-tag::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.lp-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.035em;
    color: var(--text);
    margin-bottom: 24px;
}

.lp-hero-accent {
    color: var(--primary-dark);
}

.lp-hero-sub {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 36px;
}

.lp-hero-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.lp-hero-content,
.lp-mockup {
    position: relative;
    z-index: 1;
}

/* ============================================================
   MOCKUP CARD
   ============================================================ */

.lp-mockup {
    flex-shrink: 0;
    width: 340px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lp-mock-topbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: var(--surface-2);
    border-bottom: 0.5px solid var(--border);
}

.lp-mock-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.lp-mock-dot--red    { background: var(--bar-decomm); }
.lp-mock-dot--yellow { background: #E8C07A; }
.lp-mock-dot--green  { background: var(--bar-planned); }

.lp-mock-title {
    margin-left: auto;
    margin-right: auto;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.lp-mock-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-mock-section-label {
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
}

.lp-mock-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    transition: border-color 0.15s;
}

.lp-mock-item--active {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.lp-mock-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.lp-mock-item-info {
    flex: 1;
    min-width: 0;
}

.lp-mock-item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lp-mock-item-sub {
    font-size: 0.72rem;
    color: var(--text-secondary);
}

.lp-mock-badge {
    background: var(--status-active-bg);
    color: var(--status-active);
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.lp-mock-divider {
    height: 1px;
    background: var(--border);
    margin: 2px 0;
}

.lp-mock-cable-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--surface-2);
    border: 0.5px solid var(--border);
}

.lp-mock-cable-num {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--primary-dark);
    font-family: 'SF Mono', 'Fira Code', monospace;
    flex-shrink: 0;
}

.lp-mock-cable-info {
    flex: 1;
    font-size: 0.78rem;
    color: var(--text);
}

.lp-mock-cable-route {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.lp-mock-cable-status {
    font-size: 0.68rem;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
}

.lp-mock-cable-status--ok {
    background: var(--status-active-bg);
    color: var(--status-active);
}

.lp-mock-progress-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
}

.lp-mock-progress-bar {
    height: 5px;
    background: var(--surface-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.lp-mock-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width 0.6s ease;
}

/* ============================================================
   SECTIONS — SHARED
   ============================================================ */

.lp-section {
    padding: 96px 24px;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-section--alt {
    max-width: 100%;
    background: var(--surface-2);
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
    padding: 96px 24px;
}

.lp-section-inner {
    max-width: 1160px;
    margin: 0 auto;
    text-align: center;
}

.lp-section-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
}

.lp-section-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    margin: 12px auto 0;
}

.lp-section-title--light {
    color: var(--text);
}

.lp-section-sub {
    font-size: 1.05rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 56px;
    margin-top: 4px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.lp-section-sub--light {
    color: var(--text-secondary);
}

/* ============================================================
   FEATURES GRID
   ============================================================ */

.lp-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.lp-feature-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s, background 0.2s;
}

.lp-feature-card:hover {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}


.lp-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--primary-ghost);
    color: var(--primary-dark);
    margin-bottom: 14px;
}

.lp-feature-card h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.lp-feature-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================================
   HOW IT WORKS — STEPS
   ============================================================ */

.lp-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-step {
    text-align: center;
    padding: 0 16px;
}

.lp-step-number {
    font-size: 3rem;
    font-weight: 600;
    letter-spacing: -0.04em;
    color: var(--primary-light);
    margin-bottom: 16px;
    line-height: 1;
}

.lp-step h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
}

.lp-step p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================================
   PRICING
   ============================================================ */

.lp-pricing-single {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    max-width: 820px;
    margin: 0 auto;
    background: var(--surface);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.lp-pricing-left {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    background: var(--primary-ghost);
}

.lp-pricing-divider {
    width: 1px;
    background: var(--border);
    margin: 32px 0;
}

.lp-pricing-right {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
}

.lp-pricing-plan {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.lp-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 12px;
}

.lp-price-from {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lp-price-amount {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
}

.lp-price-period {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.lp-pricing-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.55;
}

.lp-price-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
    flex: 1;
}

.lp-price-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.lp-check {
    color: var(--accent);
    font-weight: 500;
    flex-shrink: 0;
    margin-top: 1px;
}

.lp-pricing-btn {
    width: 100%;
    justify-content: center;
    margin-top: auto;
}

.lp-pricing-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-top: 24px;
}

/* Paketkarten: Privat, Solo, Team, Betrieb */
.lp-plan-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1100px;
    margin: 0 auto;
}

.lp-plan-card {
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
}

.lp-plan-card--featured {
    border-color: var(--primary);
    background: var(--primary-ghost);
}

.lp-plan-card .lp-pricing-desc {
    margin-bottom: 20px;
    min-height: 2.6em;
}

/* Pricing table */
.lp-pricing-table {
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 20px 0 16px;
    font-size: 0.85rem;
}

.lp-pricing-table-header {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    gap: 0;
    background: var(--primary-ghost);
    padding: 8px 14px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lp-pricing-table-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    padding: 9px 14px;
    border-top: 0.5px solid var(--border);
    color: var(--text-primary);
}

.lp-pricing-table-vat {
    padding: 7px 14px;
    border-top: 0.5px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
}

.lp-pricing-example {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.lp-pricing-example-label {
    font-weight: 500;
    color: var(--primary-dark);
    margin-right: 6px;
}

/* ============================================================
   ROADMAP SECTION
   ============================================================ */

.lp-roadmap {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 760px;
    margin: 0 auto;
    position: relative;
}

.lp-roadmap::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background: var(--border);
}

.lp-roadmap-item {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    align-items: flex-start;
    gap: 20px;
    padding: 28px 0;
    border-bottom: 0.5px solid var(--border);
    position: relative;
}

.lp-roadmap-item:last-child {
    border-bottom: none;
}

.lp-roadmap-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    background: var(--primary-ghost);
    border: 0.5px solid var(--primary-light);
    border-radius: var(--radius-md);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.lp-roadmap-content h3 {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.lp-roadmap-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.lp-roadmap-status {
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-dark);
    background: var(--primary-ghost);
    border: 0.5px solid var(--accent-border);
    border-radius: 20px;
    padding: 4px 12px;
    white-space: nowrap;
    align-self: center;
}

/* ============================================================
   DOWNLOAD SECTION
   ============================================================ */

.lp-download-section {
    background: var(--primary-ghost);
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
    padding: 96px 24px;
}

.lp-store-btns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 22px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.2s, background 0.2s;
    min-width: 200px;
}

.lp-store-btn:hover:not(.lp-store-btn--disabled) {
    border-color: var(--accent-border);
    background: var(--bg-card-hover);
}

.lp-store-btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.lp-store-btn--web {
    border-color: var(--accent-border);
    background: var(--accent-dim);
}

.lp-store-btn--web:hover {
    border-color: var(--primary);
}

.lp-store-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.lp-store-btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.lp-store-btn-sub {
    font-size: 0.68rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
}

.lp-store-btn-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
}

/* ============================================================
   CONTACT / IMPRESSUM
   ============================================================ */

.lp-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-contact-block {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
}

.lp-contact-block h3 {
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 14px;
}

.lp-contact-block p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 6px;
}

.lp-contact-link {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.15s;
}

.lp-contact-link:hover {
    color: var(--primary-darker);
    text-decoration: underline;
}

/* ============================================================
   FOOTER
   ============================================================ */

.lp-footer {
    border-top: 0.5px solid var(--border);
    background: var(--bg);
    padding: 28px 24px;
}

.lp-footer-inner {
    max-width: 1160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.lp-footer-copy {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.lp-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 20px;
}

.lp-footer-links a {
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: color 0.15s;
}

.lp-footer-links a:hover {
    color: var(--text-primary);
}

/* ============================================================
   BLAZOR ERROR UI
   ============================================================ */

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--status-decomm-bg);
    border: 0.5px solid var(--status-decomm);
    color: var(--status-decomm);
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.88rem;
    z-index: 9999;
    gap: 12px;
    align-items: center;
}

#blazor-error-ui .reload {
    color: var(--primary-dark);
    text-decoration: underline;
    margin-left: 8px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 12px;
    color: var(--text-muted);
}

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */

@media (max-width: 1024px) {
    .lp-plan-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 720px;
    }

    .lp-hero-inner {
        gap: 40px;
    }

    .lp-mockup {
        width: 290px;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */

@media (max-width: 768px) {

    /* Navbar */
    .lp-nav-links {
        display: none;
    }

    .lp-nav-inner {
        gap: 12px;
    }

    .lp-cta-btn {
        font-size: 0.82rem;
        padding: 7px 14px;
    }

    .lp-lang-toggle {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    /* Hero */
    .lp-hero {
        padding: 60px 20px 60px;
        min-height: auto;
    }

    .lp-hero-inner {
        flex-direction: column;
        gap: 48px;
        text-align: center;
    }

    .lp-hero h1 {
        font-size: 2rem;
    }

    .lp-hero-sub {
        font-size: 1rem;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .lp-hero-actions {
        justify-content: center;
    }

    .lp-mockup {
        width: 100%;
        max-width: 340px;
        margin: 0 auto;
        text-align: left;
    }

    /* Sections */
    .lp-section {
        padding: 64px 20px;
    }

    .lp-section--alt {
        padding: 64px 20px;
    }

    .lp-download-section {
        padding: 64px 20px;
    }

    /* Features */
    .lp-features-grid {
        grid-template-columns: 1fr;
    }

    /* Steps */
    .lp-steps {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .lp-step {
        padding: 0;
    }

    /* Pricing */
    .lp-pricing-single {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .lp-plan-grid {
        grid-template-columns: 1fr;
        max-width: 460px;
    }

    .lp-pricing-left,
    .lp-pricing-right {
        padding: 28px 22px;
    }

    .lp-pricing-divider {
        width: auto;
        height: 1px;
        margin: 0 24px;
    }

    .lp-pricing-table-header,
    .lp-pricing-table-row {
        grid-template-columns: 1fr 60px 1fr;
        font-size: 0.78rem;
    }

    /* Roadmap */
    .lp-roadmap::before {
        display: none;
    }

    .lp-roadmap-item {
        grid-template-columns: 48px 1fr;
        grid-template-rows: auto auto;
    }

    .lp-roadmap-icon {
        width: 40px;
        height: 40px;
    }

    .lp-roadmap-status {
        grid-column: 2;
        align-self: flex-start;
        margin-top: 8px;
        width: fit-content;
    }

    /* Store buttons */
    .lp-store-btns {
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin: 0 auto;
    }

    .lp-store-btn {
        min-width: unset;
        width: 100%;
        justify-content: center;
    }

    /* Contact */
    .lp-contact-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Footer */
    .lp-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .lp-footer-links {
        justify-content: center;
    }

    /* Buttons */
    .lp-btn-primary,
    .lp-btn-secondary {
        padding: 12px 22px;
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .lp-hero h1 {
        font-size: 1.75rem;
    }

    .lp-hero-actions {
        flex-direction: column;
        gap: 10px;
    }

    .lp-btn-primary,
    .lp-btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   FOOTER COOKIE LINK
   ============================================================ */

.lp-footer-cookie-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.lp-footer-cookie-btn:hover {
    color: var(--text-primary);
}

/* ============================================================
   404 / NICHT GEFUNDEN
   ============================================================ */

.lp-notfound {
    min-height: 100vh;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lp-notfound-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px 32px;
    max-width: 460px;
    width: 100%;
    text-align: center;
}

.lp-notfound-code {
    display: inline-block;
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--primary-light);
    margin-bottom: 8px;
}

.lp-notfound-card h1 {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lp-notfound-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    margin-bottom: 28px;
    line-height: 1.6;
}

.lp-notfound-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   COOKIE BANNER
   ============================================================ */

.cb-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 16px 24px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: cb-fade-in 0.2s ease;
}

@keyframes cb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Beim Drucken nie mitnehmen: Der Hintergrund liegt fest über der ganzen Seite
   (mit Unschärfe) und würde jedes Blatt verdecken – gilt für alle Seiten. */
@media print {
    .cb-backdrop,
    .cb-panel {
        display: none !important;
    }
}

.cb-panel {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    overflow-y: auto;
    animation: cb-slide-up 0.25s ease;
}

@keyframes cb-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ===== Compact View ===== */

.cb-compact {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cb-compact-top {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-cookie-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cb-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text);
    margin: 0;
}

.cb-intro {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.cb-intro-link {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.cb-link {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cb-link:hover {
    color: var(--primary-darker);
}

.cb-compact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ===== Detail View ===== */

.cb-details {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.cb-details-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-categories {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-category {
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: border-color 0.2s;
}

.cb-category:hover {
    border-color: var(--border);
}

.cb-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cb-category-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cb-category-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

.cb-category-badge {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
}

.cb-category-badge--required {
    background: var(--primary-ghost);
    color: var(--primary-dark);
    border: 0.5px solid var(--accent-border);
}

.cb-category-desc {
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* ===== Toggle ===== */

.cb-toggle {
    width: 44px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
}

.cb-toggle--on {
    background: var(--accent);
    border-color: var(--accent);
}

.cb-toggle--disabled {
    background: var(--primary-ghost);
    border-color: var(--accent-border);
    cursor: not-allowed;
    opacity: 0.7;
}

.cb-toggle-knob {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s;
}

.cb-toggle--on .cb-toggle-knob,
.cb-toggle--disabled .cb-toggle-knob {
    transform: translateX(20px);
}

/* ===== Cookie Table ===== */

.cb-cookie-list {
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    font-size: 0.8rem;
}

.cb-cookie-list-header {
    display: grid;
    grid-template-columns: 1.4fr 2fr 1fr 1fr;
    background: var(--primary-ghost);
    padding: 7px 12px;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cb-cookie-list-row {
    display: grid;
    grid-template-columns: 1.4fr 2fr 1fr 1fr;
    padding: 8px 12px;
    gap: 8px;
    border-top: 0.5px solid var(--border);
    color: var(--text-secondary);
    align-items: center;
}

.cb-cookie-list-row--empty {
    grid-template-columns: 1fr;
    color: var(--text-secondary);
    font-style: italic;
}

.cb-cookie-list-row code {
    font-family: 'Courier New', monospace;
    font-size: 0.78rem;
    color: var(--primary-dark);
    background: var(--primary-ghost);
    padding: 1px 5px;
    border-radius: 4px;
}

/* ===== Details Info ===== */

.cb-details-info {
    border-top: 0.5px solid var(--border);
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cb-details-info p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* ===== Buttons ===== */

.cb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: background 0.18s, opacity 0.18s, transform 0.12s;
    white-space: nowrap;
    font-family: inherit;
}

.cb-btn:hover {
    opacity: 0.88;
}

.cb-btn:active {
    transform: translateY(0);
}

.cb-btn--primary {
    background: var(--primary-dark);
    color: #fff;
}

/* Hover dunkler statt blasser (.cb-btn:hover blendet sonst auf 88 % ab). */
.cb-btn--primary:hover {
    background: var(--primary-darker);
    opacity: 1;
}

.cb-btn--secondary {
    background: var(--surface-2);
    color: var(--text);
    border: 0.5px solid var(--border);
}

.cb-btn--ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 0.5px solid var(--border);
}

/* ===== Details Actions ===== */

.cb-details-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    border-top: 0.5px solid var(--border);
    padding-top: 20px;
}

.cb-details-actions-right {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* ===== Responsive ===== */

@media (max-width: 600px) {
    .cb-backdrop {
        align-items: flex-end;
        padding: 0 0 0;
    }

    .cb-panel {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 85vh;
    }

    .cb-compact {
        padding: 20px 18px;
    }

    .cb-details {
        padding: 20px 18px;
    }

    .cb-compact-actions {
        flex-direction: column;
    }

    .cb-btn {
        width: 100%;
    }

    .cb-details-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cb-details-actions-right {
        flex-direction: column;
    }

    .cb-cookie-list-header,
    .cb-cookie-list-row {
        grid-template-columns: 1fr 1.5fr;
        font-size: 0.72rem;
    }

    .cb-cookie-list-header span:nth-child(3),
    .cb-cookie-list-header span:nth-child(4),
    .cb-cookie-list-row span:nth-child(3),
    .cb-cookie-list-row span:nth-child(4) {
        display: none;
    }
}

/* ============================================================
   DATENSCHUTZERKLÄRUNG
   ============================================================ */

.dse-main {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--bg);
}

.dse-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 32px 80px;
}

/* Header */
.dse-header {
    margin-bottom: 56px;
    padding-bottom: 32px;
    border-bottom: 0.5px solid var(--border);
}

.dse-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-dark);
    background: var(--accent-dim);
    border: 0.5px solid var(--accent-border);
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    margin-bottom: 16px;
}

.dse-header h1 {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 12px;
}

.dse-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Body / Sections */
.dse-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dse-section {
    padding: 40px 0;
    border-bottom: 0.5px solid var(--border);
}

.dse-section:last-child {
    border-bottom: none;
}

.dse-section h2 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 16px;
    scroll-margin-top: 100px;
}

.dse-section h3 {
    font-size: 0.97rem;
    font-weight: 500;
    color: var(--text);
    margin: 24px 0 10px;
}

.dse-section p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 14px;
}

.dse-section p:last-child {
    margin-bottom: 0;
}

/* Address block */
.dse-address-block {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dse-address-block p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Link */
.dse-link {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.15s;
}

.dse-link:hover {
    /* Kein Abblenden: mit 75 % Deckkraft fiele der Link unter 4,5 : 1. */
    color: var(--primary-darker);
}

/* Notice boxes */
.dse-notice {
    border-radius: var(--radius);
    padding: 14px 18px;
    font-size: 0.875rem;
    line-height: 1.65;
    margin: 16px 0;
}

.dse-notice strong {
    display: block;
    margin-bottom: 6px;
}

.dse-notice--info {
    background: var(--primary-ghost);
    border: 0.5px solid var(--accent-border);
    color: var(--text-secondary);
}

.dse-notice--info strong {
    color: var(--primary-dark);
}

.dse-notice--warning {
    background: var(--status-warn-bg);
    border: 0.5px solid var(--status-warn);
    color: var(--text-secondary);
}

.dse-notice--warning strong {
    color: var(--status-warn);
}

/* Lists */
.dse-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    padding-left: 0;
}

.dse-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    padding-left: 20px;
    position: relative;
}

.dse-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 500;
}

/* Tables */
.dse-table-wrapper {
    overflow-x: auto;
    margin: 16px 0;
    border-radius: var(--radius);
    border: 0.5px solid var(--border);
}

.dse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.dse-table thead tr {
    background: var(--primary-ghost);
}

.dse-table th {
    padding: 10px 14px;
    text-align: left;
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    white-space: nowrap;
}

.dse-table td {
    padding: 10px 14px;
    border-top: 0.5px solid var(--border);
    color: var(--text-secondary);
    line-height: 1.55;
    vertical-align: top;
}

.dse-table td code {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
    color: var(--primary-dark);
    background: var(--primary-ghost);
    padding: 2px 6px;
    border-radius: 4px;
}

.dse-table-empty {
    color: var(--text-secondary) !important;
    font-style: italic;
}

/* Rights grid */
.dse-rights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.dse-right-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: border-color 0.2s;
}

.dse-right-card:hover {
    border-color: var(--border);
}

.dse-right-art {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.dse-right-card h3 {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text);
    margin: 0 0 8px;
}

.dse-right-card p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* CTA inline */
.dse-cta-inline {
    margin: 12px 0;
}

.dse-cookie-btn {
    font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 700px) {
    .dse-inner {
        padding: 40px 18px 60px;
    }

    .dse-header h1 {
        font-size: 1.8rem;
    }

    .dse-rights-grid {
        grid-template-columns: 1fr;
    }

    .dse-table th,
    .dse-table td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}
/* ══════════════════════════════════════════════════════
   CircuitDoc – Global Styles
   ══════════════════════════════════════════════════════ */

/* ── Design Tokens ───────────────────────────────────── */
/* App-specific design tokens — scoped to .app-wrapper so they don't
   overwrite the landing-page :root variables (--bg, --accent, --border, etc.)
   Also applied to auth/legal layouts which are not inside .app-wrapper */
.app-wrapper,
.auth-layout,
.legal-layout {
    /* Styleguide v1.1 – Primärfarbe Teal (Markenfarbe) */
    color-scheme: light;

    --primary:        #1D9E75;   /* Primäraktion, aktive Nav, FAB */
    --primary-dark:   #0F6E56;   /* Text auf hellem Hintergrund */
    --primary-darker: #085041;   /* Text auf sehr hellem Hintergrund */
    --primary-light:  #9FE1CB;   /* Hover / Border-Akzent */
    --accent:         #1D9E75;
    --accent-dark:    #0F6E56;
    --primary-ghost:  #E1F5EE;   /* Hintergrund-Highlight, aktive Zustände */

    --bg:             #F7F8F6;
    --surface:        #FFFFFF;
    --surface-2:      #F1F3F0;

    --text-primary:   #1A1A1A;
    --text-secondary: #5F5E5A;
    --text-hint:      #8A8983;

    --border:         #E2E1DB;
    --border-tertiary:#ECEBE5;
    --border-focus:   #1D9E75;
    --shadow-sm:      none;      /* Flach & technisch – keine Schatten */
    --shadow-md:      none;
    --radius-sm:      8px;       /* Chips, Buttons, Inputs */
    --radius-md:      12px;      /* Karten, Gruppen, Sheets */
    --radius-lg:      12px;
    --radius-pill:    20px;      /* Badges, Pills */

    /* Statussystem (Styleguide §2) */
    --status-planned:       #0F6E56;  /* geplant – Teal */
    --status-planned-bg:    #E1F5EE;
    --status-active:        #3B6D11;  /* ok / aktiv – Grün */
    --status-active-bg:     #EAF3DE;
    --status-cable-active:    #185FA5;  /* aktiv (Kabel) – Blau */
    --status-cable-active-bg: #E6F1FB;
    --status-warn:          #854F0B;  /* warnung – Amber */
    --status-warn-bg:       #FAEEDA;
    --status-inactive:      #5F5E5A;  /* inaktiv – Grau */
    --status-inactive-bg:   #F1EFE8;
    --status-decomm:        #A32D2D;  /* fehler / außer Betrieb – Rot */
    --status-decomm-bg:     #FCEBEB;

    /* Kabelstatus-Balken (3px links an der Karte) */
    --bar-planned:    #9FE1CB;
    --bar-active:     #85B7EB;
    --bar-inactive:   #D3D1C7;
    --bar-decomm:     #F09595;
}


/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
}

/* ── Page Title & Header ──────────────────────────────── */
.page-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-ghost);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-ghost);
}

.page-header h2 {
    margin: 0;
    flex: 1;
}

.btn-add {
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: .85rem;
    white-space: nowrap;
}

/* ── Loading / Empty ─────────────────────────────────── */
.loading-text,
.empty-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: .9rem;
    padding: 40px 0;
}

/* ══════════════════════════════════════════════════════
   PROJECT OVERVIEW
   ══════════════════════════════════════════════════════ */

.project-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (min-width: 480px) {
    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

.project-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .18s, box-shadow .18s;
    border: 0.5px solid var(--border);
    -webkit-tap-highlight-color: transparent;
}

.project-card:active {
    transform: scale(.97);
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.project-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.project-card-body {
    padding: 12px;
}

.project-card-body h3 {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card-body p {
    font-size: .78rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ══════════════════════════════════════════════════════
   PROJECT STANDS
   ══════════════════════════════════════════════════════ */

.stands-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stand-card {
    display: flex;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    border: 0.5px solid var(--border);
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
    gap: 12px;
}

.stand-card:active {
    transform: scale(.98);
}

.stand-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent);
}

.stand-card-body {
    flex: 1;
    min-width: 0;
}

.stand-card-body h3 {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.stand-date {
    font-size: .78rem;
    color: var(--primary);
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.stand-card-body p {
    font-size: .8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stand-chevron {
    color: var(--text-hint);
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
}

/* ══════════════════════════════════════════════════════
   CABLE LIST / CARDS
   ══════════════════════════════════════════════════════ */

/* ── View Toggle ──────────────────────────────────────── */
.view-toggle {
    display: flex;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 12px;
    gap: 3px;
    /* Fünf Einträge („Adern | Kabel | Kabelbäume | Geräte | Netz") passen auf
       375 px nicht mehr in feste Spalten. Statt die Begriffe abzukürzen darf die
       Leiste schieben – die Bildlaufleiste bleibt ausgeblendet. */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.view-toggle::-webkit-scrollbar {
    display: none;
}

.view-toggle-btn {
    flex: 1 0 auto;
    white-space: nowrap;
    /* Auf 375 px passen fünf Einträge nur mit dieser Größe – der Umschalter
       bleibt zusätzlich schiebbar, falls Begriffe später länger werden. */
    padding: 7px 8px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
}

/* Stand-Reiter (StandTabs): Sechs Einträge passen auf 390 px nicht in eine
   Zeile – „Meldungen" verschwand rechts außerhalb des Bildes. Auf schmalen
   Bildschirmen deshalb 3 × 2 statt Schieben: alles sichtbar, größere Tippflächen. */
@media (max-width: 560px) {
    .view-toggle--stand {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        overflow: visible;
    }

    .view-toggle--stand .view-toggle-btn {
        min-height: 40px;
        padding: 7px 4px;
    }
}

/* Zähler offener Meldungen am Reiter */
.view-toggle-count {
    display: inline-block;
    min-width: 18px;
    margin-left: 4px;
    padding: 0 5px;
    border-radius: var(--radius-pill);
    background: var(--status-warn-bg);
    color: var(--status-warn);
    font-size: .7rem;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

.view-toggle-btn.active .view-toggle-count {
    background: #fff;
    color: var(--primary-dark);
}

/* Zähler in Projekt- und Ständeübersicht */
.report-count-chip {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--status-warn-bg);
    color: var(--status-warn);
    font-size: .72rem;
    font-weight: 600;
}

/* ── Meldungen (StandReportList) ───────────────────────── */
.report-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 96px;
}

.report-compose {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
}

.report-compose-label {
    display: block;
    margin-bottom: 6px;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.report-textarea {
    width: 100%;
    min-height: 88px;
    resize: vertical;
    font-size: 1rem; /* 16 px: iOS zoomt sonst beim Antippen */
    line-height: 1.4;
}

.report-compose-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
}

.report-counter {
    font-size: .75rem;
    color: var(--text-hint);
}

.report-counter--near {
    color: var(--status-warn);
}

.report-compose-foot .report-send {
    width: auto;
    flex: 0 0 auto;
    min-height: 44px;
    min-width: 120px;
}

.report-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--status-warn);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.report-card--done {
    border-left-color: var(--border);
    opacity: .85;
}

.report-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    font-size: .75rem;
    color: var(--text-secondary);
}

.report-author {
    font-weight: 600;
    color: var(--text-primary);
}

.report-meta .status-chip {
    margin-left: auto;
}

.report-text {
    margin: 6px 0 0;
    font-size: .9rem;
    color: var(--text-primary);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.report-resolved {
    margin: 6px 0 0;
    font-size: .75rem;
    color: var(--text-secondary);
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.report-actions .report-action {
    width: auto;
    flex: 0 0 auto;
    min-height: 44px;
    padding-left: 16px;
    padding-right: 16px;
}

.report-done-group > summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: .8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.report-done-group > .report-card {
    margin-bottom: 10px;
}

/* ── Aderansicht ──────────────────────────────────────── */
.ader-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 80px;
}

.ader-cable-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.ader-cable-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.ader-cable-tag {
    font-weight: 500;
    font-size: .95rem;
    color: var(--text-primary);
}
/* Geraeteverbindung im grauen Kopf: "Geraet · Buchse → Geraet · Buchse" */
.ader-cable-conn {
    font-size: .8rem;
    color: var(--text-secondary);
    min-width: 0;
    overflow-wrap: anywhere;
}

.ader-cable-type {
    font-size: .8rem;
    color: var(--text-secondary);
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    padding: 1px 6px;
}

.ader-cable-status {
    margin-left: auto;
}

.ader-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.ader-row:last-child {
    border-bottom: none;
}

.ader-color {
    font-size: .85rem;
    color: var(--text-secondary);
    min-width: 70px;
}

.ader-connection {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .85rem;
    color: var(--text-primary);
    flex: 1;
}

.ader-arrow {
    color: var(--text-hint);
}

.ader-function {
    font-size: .78rem;
    color: var(--text-hint);
    font-style: italic;
}

.ader-no-cores {
    padding: 10px 14px;
    font-size: .85rem;
    color: var(--text-hint);
}

/* ── Kabelansicht ─────────────────────────────────────── */
.cable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 80px; /* space for FAB */
}

.cable-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 0.5px solid var(--border);
    border-left-width: 3px;  /* Statusbalken (Styleguide §6) */
    overflow: hidden;
    transition: border-color .15s;
}

.cable-card:hover {
    border-top-color: var(--primary-light);
    border-right-color: var(--primary-light);
    border-bottom-color: var(--primary-light);
}

/* Kabelstatus-Balken (Styleguide §2) */
.border-planned {
    border-left-color: var(--bar-planned);
}

.border-active {
    border-left-color: var(--bar-active);
}

.border-inactive {
    border-left-color: var(--bar-inactive);
}

.border-decommissioned {
    border-left-color: var(--bar-decomm);
}

/* Cable header (clickable row) */
.cable-header {
    display: flex;
    align-items: center;
    padding: 14px 14px 14px 16px;
    cursor: pointer;
    gap: 8px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.cable-header-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cable-tag {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cable-status {
    font-size: .75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cable-chevron {
    color: var(--text-hint);
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform .2s;
}

/* ── Verlauf eines Stands (StandHistory) ───────────────── */
.history-page {
    padding-bottom: 96px;
}

.history-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 4px 0 2px;
}

.history-day {
    margin: 18px 0 8px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.history-item--created  { border-left-color: var(--bar-planned); }
.history-item--pulled   { border-left-color: var(--primary); }
.history-item--deleted,
.history-item--removed  { border-left-color: var(--bar-decomm); }
.history-item--resolved { border-left-color: var(--bar-active); }

.history-head {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.history-time {
    flex-shrink: 0;
    font-size: .75rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-hint);
}

.history-text {
    min-width: 0;
    font-size: .875rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.history-changes {
    display: grid;
    grid-template-columns: minmax(90px, max-content) 1fr;
    gap: 4px 12px;
    margin: 8px 0 0 44px;
    font-size: .8rem;
}

.history-changes dt {
    color: var(--text-secondary);
}

.history-changes dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

.history-old {
    color: var(--text-hint);
    text-decoration: line-through;
}

.history-arrow {
    margin: 0 4px;
    color: var(--text-hint);
}

.history-new {
    color: var(--text-primary);
    font-weight: 500;
}

.history-removed {
    margin-left: 4px;
    color: var(--text-hint);
}

.history-more {
    width: auto;
    margin: 16px auto 0;
    display: flex;
    min-height: 44px;
}

@media (max-width: 480px) {
    .history-changes {
        grid-template-columns: 1fr;
        gap: 0;
        margin-left: 0;
    }

    .history-changes dd {
        margin-bottom: 6px;
    }
}

/* ── Live-Hinweis (LiveHint): jemand anderes hat geändert ─── */
.live-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 4px 4px 4px 12px;
    border: 1px solid #F2D9AE;
    border-radius: var(--radius-sm);
    background: var(--status-warn-bg);
    color: var(--status-warn);
    font-size: .85rem;
    font-weight: 500;
}

/* Im Formular oben festhalten – wer weiter unten tippt, sieht den Hinweis sonst nicht. */
.bottom-sheet .live-hint {
    position: sticky;
    top: 0;
    z-index: 3;
}

.live-hint-text {
    flex: 1;
    min-width: 0;
}

.live-hint-action {
    flex-shrink: 0;
    min-height: 40px;
    padding: 0 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

/* „Zuletzt geändert von …" auf Kabel- und Geräteseite */
.last-change {
    margin-top: 6px;
    font-size: .75rem;
    color: var(--text-hint);
}

/* ── „gezogen" abhaken (PullCheck) ──────────────────────────
   Eine Zeile unter dem Kabelkopf. Das Kästchen samt Beschriftung ist die
   Tippfläche: mindestens 44 px hoch, auch mit Handschuh zu treffen. */
.cable-pull-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 12px;
    padding: 0 14px 6px 16px;
    margin-top: -8px;
}

.cable-pull-row--inline {
    padding: 0;
    margin: 0 0 -6px;
}

.pull-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    min-width: 44px;
    padding: 0 14px 0 10px;
    margin-left: -10px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.pull-toggle:active {
    background: var(--primary-ghost);
}

.pull-toggle--busy {
    opacity: .6;
}

.pull-toggle-input {
    width: 24px;
    height: 24px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.pull-done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    font-size: .8125rem;
    color: var(--primary-dark);
}

.pull-done-mark {
    font-weight: 700;
}

.pull-error {
    flex-basis: 100%;
    font-size: .78rem;
    color: var(--status-decomm);
}

/* Edit-mode action buttons */
.cable-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    border: 0.5px solid transparent;
    background: transparent;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
    transition: background .15s, color .15s, border-color .15s;
    color: var(--text-secondary);
    -webkit-tap-highlight-color: transparent;
}
/* Sichtbar, sobald der Bearbeiten-Modus aktiv ist: leichte Fläche statt
   frei schwebender Symbole – siehe STYLEGUIDE §10 (flach, kein Schatten). */
.cable-actions .btn-icon,
.ader-cable-header .btn-icon {
    background: var(--surface);
    border-color: var(--border);
}

.btn-icon:hover {
    background: var(--primary-ghost);
    border-color: var(--primary);
    color: var(--primary);
}
.btn-icon:active {
    transform: scale(.94);
}

/* Gesperrte Aktion – etwa das Entfernen eines Admins: sichtbar, aber wirkungslos.
   Der Hover-Zustand muss mit unterdrückt werden, sonst wirkt sie doch anklickbar. */
.btn-icon:disabled {
    opacity: .35;
    cursor: not-allowed;
}
.btn-icon:disabled:hover {
    background: transparent;
    border-color: transparent;
    color: var(--text-secondary);
}

/* Grundfarbe des Icon-Löschknopfes. Sie fehlte, weil die ungebundene Regel
   ".btn-danger" weiter unten (jetzt ".btn.btn-danger") den Knopf zur roten
   Vollfläche machte und die :hover-Regel darunter das Gegenteil vorsah. Beides
   zusammen ergab einen Knopf, der im Ruhezustand anders aussah als bei
   Berührung – auf dem Telefon, wo es kein Hover gibt, war der Ruhezustand der
   einzige. Jetzt: rotes Zeichen auf transparentem Grund, Hover verstärkt. */
.btn-icon.btn-danger {
    color: var(--status-decomm);
}

.btn-icon.btn-danger:hover {
    background: var(--status-decomm-bg);
    border-color: var(--status-decomm);
    color: var(--status-decomm);
}

/* Cable expanded details */
.cable-details {
    border-top: 1px solid var(--border);
    padding: 12px 16px 14px;
    background: var(--surface-2);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cable-details p {
    font-size: .82rem;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
}

.cable-details p strong {
    color: var(--text-primary);
    min-width: 110px;
    font-weight: 500;
}

/* ── Cable Cores (Einzeladern) ────────────────────────── */
.core-list {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.core-list-label {
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    display: block;
}

.core-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
}

.core-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.15);
    display: inline-block;
}

.core-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 72px;
    flex-shrink: 0;
}

.core-connection {
    flex: 1;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', Consolas, monospace;
    font-size: .78rem;
}

.core-function {
    font-style: italic;
    color: var(--text-hint);
    font-size: .78rem;
    flex-shrink: 0;
}

/* Core form rows */
.core-form-entry {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.core-form-top {
    display: flex;
    align-items: center;
    gap: 8px;
}

.core-form-top .core-swatch {
    width: 20px;
    height: 20px;
}

.core-form-top .form-control {
    flex: 1;
    width: auto;
    min-width: 0;
}

.core-form-connections {
    display: flex;
    align-items: center;
    gap: 6px;
}

.core-form-connections .form-control {
    flex: 1;
    width: auto;
    min-width: 0;
}

.core-arrow {
    color: var(--text-hint);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Buchse und Pin eines Aderendes nebeneinander – beides kurze Werte (X1 / 3),
   untereinander würde jede Ader unnötig hoch. */
.core-endpoint-selects {
    display: flex;
    gap: 6px;
    min-width: 0;
}

.core-endpoint-selects .form-control {
    flex: 1;
    min-width: 0;
}

/* Hinzufügen-Knöpfe in Formularen: farbige Schrift statt farbiger Fläche. Sie
   sollen auffallen, aber hinter „Speichern" zurückstehen – die einzige gefüllte
   Primärfläche im Sheet bleibt der Abschluss. */
.btn.btn-add {
    flex: 0 0 auto;
    color: var(--primary-dark);
    font-weight: 600;
    white-space: nowrap;
}

.btn-add-core {
    flex: none;
    width: 100%;
    margin-top: 4px;
    padding: 8px 16px;
    font-size: .85rem;
}

/* ══════════════════════════════════════════════════════
   CABLE FORM
   ══════════════════════════════════════════════════════ */

.cable-form {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-md);
    border: 0.5px solid var(--border);
}

.cable-form h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.form-group {
    margin-bottom: 12px;
}

/* Abschnitte in längeren Formularen (Kabel: Aufbau, Verlegung, Weiteres).
   Gleiche Schrift wie die Feldbeschriftungen, aber dunkler und mit Linie –
   sonst liest sich die Überschrift als weiteres Feld. */
.form-section-title {
    margin: 20px 0 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-primary);
}

/* Zwei kurze Felder nebeneinander (Adern | Querschnitt, Länge | Radius).
   Auch am Telefon zweispaltig: die Werte sind höchstens fünf Zeichen lang. */
.form-row-2 {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 10px;
}

/* Kontrollkästchen neben einem Eingabefeld: auf Höhe des Feldes, nicht der
   Beschriftung darüber. */
.form-group--check {
    display: flex;
    align-items: flex-end;
    padding-bottom: 11px;
}

/* .form-group label macht jede Beschriftung zur Versalien-Überschrift mit
   display: block – das Kontrollkästchen stünde dann über seinem Text. */
.form-group .login-checkbox-label {
    display: flex;
    align-items: center;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.form-hint {
    margin: -4px 0 12px;
    font-size: .78rem;
    color: var(--text-hint);
    line-height: 1.4;
}

.form-hint strong {
    color: var(--text-primary);
    font-weight: 600;
}

.bend-factor-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: -4px 0 6px;
}

.bend-factor-row .form-hint {
    margin: 0 4px 0 0;
}

/* Knopf, dessen Wert schon im Feld steht – wie ein aktives Segment (teal, weiß). */
.bend-factor-btn[aria-pressed="true"],
.bend-factor-btn[aria-pressed="true"]:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    font-weight: 500;
}

/* Fokus: deutlicher Rahmen statt Bootstrap-Schatten; nicht markierter Knopf bleibt hell */
.bend-factor-btn:focus-visible {
    outline: 2px solid var(--primary-darker);
    outline-offset: 2px;
    box-shadow: none;
}

.bend-factor-btn:not([aria-pressed="true"]):focus,
.bend-factor-btn:not([aria-pressed="true"]):focus-visible {
    background-color: var(--bg);
    border-color: var(--border);
    color: var(--text-secondary);
}

.bend-factor-btn:not([aria-pressed="true"]):hover {
    background-color: var(--border);
    color: var(--text-primary);
}

.form-group label {
    display: block;
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: .9rem;
    color: var(--text-primary);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(29,158,117,.18);   /* Markenfarbe, vorher Material-Blau */
    background: var(--surface);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%236B7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

/* ── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: none;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, transform .1s, box-shadow .15s;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    flex: 1;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(21,101,192,.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(21,101,192,.4);
}

/* Bootstrap färbt deaktivierte Primärknöpfe blau (--bs-btn-disabled-bg) –
   im CircuitDoc-Grün bleiben, nur blasser. */
.btn-primary:disabled {
    background-color: var(--primary);
    border-color: transparent;
    color: #fff;
    opacity: .45;
}

.btn-secondary {
    background-color: var(--bg);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.btn-secondary:hover {
    background-color: var(--border);
    color: var(--text-primary);
}

/* ── Blazor defaults override ─────────────────────────── */
.valid.modified:not([type=checkbox]) {
    outline: 1.5px solid var(--status-active);
}

.invalid {
    outline: 1.5px solid var(--status-decomm);
}

.validation-message {
    color: var(--status-decomm);
    font-size: .78rem;
    margin-top: 3px;
}

.blazor-error-boundary {
    background: var(--status-decomm);
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
    border-radius: var(--radius-sm);
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

/* ══════════════════════════════════════════════════════
   ACCOUNT PAGE
   ══════════════════════════════════════════════════════ */

.account-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Avatar header */
.account-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 16px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 0.5px solid var(--border);
}

.account-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: .5px;
}

.account-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.account-display-name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-display-email {
    font-size: .82rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Toast */
.account-toast {
    background: var(--status-active-bg);
    color: var(--status-active);
    border: 1px solid var(--status-active);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: .88rem;
    font-weight: 500;
    text-align: center;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Settings sections */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.settings-section-title {
    font-size: .72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-secondary);
    padding: 0 4px;
}

/* Settings card */
.settings-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 0.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-divider {
    height: 1px;
    background: var(--border);
    margin: 0 16px;
}

.settings-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
}

.settings-row-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-label {
    font-size: .78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .4px;
}

.settings-hint {
    font-size: .78rem;
    color: var(--text-hint);
    line-height: 1.4;
}

.settings-card > .login-error {
    margin-left: var(--card-gutter);
    margin-right: var(--card-gutter);
    margin-bottom: 12px;
}

.settings-card > .settings-hint {
    padding: 0 var(--card-gutter) 12px;
}

/* Folgt der Hinweis unmittelbar auf eine Zeile, sitzt er zu dicht darunter –
   deren Padding endet bereits. */
.settings-card > .group-info-row + .settings-hint {
    padding-top: 2px;
    margin-top: -4px;
}

.settings-input {
    width: 100%;
    padding: 10px 12px;
    font-size: .9rem;
    color: var(--text-primary);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

/* Pflichtfeld, das noch fehlt (Rechnungsdaten). Amber statt Rot: beim ersten
   Öffnen ist ein leeres Pflichtfeld kein Fehler, sondern noch zu erledigen. */
.settings-input--missing {
    border-color: var(--status-warn);
    background: var(--status-warn-bg);
}

/* Stand der Pflichtangaben oben im Rechnungsformular. */
.billing-status {
    margin: 10px 0 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .84rem;
    font-weight: 500;
    line-height: 1.4;
}

.billing-status--missing {
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border: 1px solid #E8C48A;
}

.billing-status--complete {
    background: var(--status-active-bg);
    color: var(--status-active);
    border: 1px solid #C3DDA5;
}

.settings-input:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(29,158,117,.18);   /* Markenfarbe, vorher Material-Blau */
    background: var(--surface);
}

.settings-input--mono {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: .5px;
}

/* Read-only value */
.settings-value {
    font-size: .9rem;
    color: var(--text-primary);
    padding: 2px 0;
}


/* Save button */
.account-save-btn {
    width: 100%;
    padding: 13px;
    font-size: .95rem;
}

/* Edit mode action buttons */
.account-edit-actions {
    display: flex;
    gap: 10px;
}

.account-edit-actions .btn {
    padding: 13px;
    font-size: .95rem;
}

/* Abmelden row */
.settings-row--action {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background .15s;
    -webkit-tap-highlight-color: transparent;
}

.settings-row--action:hover {
    background: var(--status-decomm-bg);
}

.settings-action-label {
    font-size: .9rem;
    font-weight: 500;
}

.settings-action-label--danger {
    color: var(--status-decomm);
}

.settings-action-icon {
    color: var(--text-hint);
    font-size: 1.1rem;
}

/* ══════════════════════════════════════════════════════
   LOGIN / REGISTER PAGE
   ══════════════════════════════════════════════════════ */

.auth-layout {
    min-height: 100dvh;
    background: #0F6E56;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px env(safe-area-inset-bottom, 24px);
}

.login-screen {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* Branding */
.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    background: #fff;
    padding: 8px;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 4px;
}

.login-app-name {
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -.3px;
}

.login-app-sub {
    font-size: .85rem;
    color: rgba(255,255,255,.85);
    font-weight: 400;
}

/* Card */
.login-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    overflow: hidden;
}

/* Tabs */
.login-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
}

.login-tab {
    flex: 1;
    padding: 14px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color .15s, box-shadow .15s;
    font-family: inherit;
}

.login-tab--active {
    color: var(--primary-dark);
    box-shadow: inset 0 -2px 0 var(--primary);
}

/* Error */
/* Sachliche Mitteilung, kein Fehler: „Wir haben dir eine Mail geschickt"
   gehört nicht in einen roten Kasten. Gleiche Maße wie .login-error, damit
   die Karte nicht springt, wenn das eine durch das andere ersetzt wird. */
.login-notice {
    margin: 12px 20px 0;
    padding: 10px 14px;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius-sm);
    color: var(--accent-2);
    font-size: .84rem;
    line-height: 1.45;
}

.login-inline-action {
    display: flex;
    justify-content: center;
    margin: 10px 20px 0;
}

/* „Passwort vergessen?" und „Zurück zur Anmeldung": unter dem Hauptknopf,
   volle Breite, damit sie zentriert stehen statt links zu kleben. */
.login-forgot {
    width: 100%;
    margin-top: 2px;
}

.login-forgot-hint {
    margin: 0 0 4px;
    font-size: .84rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.login-error {
    margin: 12px 20px 0;
    padding: 10px 14px;
    background: var(--status-decomm-bg);
    border: 1px solid #F09595;
    border-radius: var(--radius-sm);
    color: var(--status-decomm);
    font-size: .84rem;
    font-weight: 500;
}

/* Form */
.login-form {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-btn {
    width: 100%;
    padding: 13px;
    font-size: .95rem;
    margin-top: 4px;
}

/* ══════════════════════════════════════════════════════
   LEGAL LAYOUT & AGB PAGE
   ══════════════════════════════════════════════════════ */

.legal-layout {
    min-height: 100dvh;
    background: var(--bg);
    display: flex;
    flex-direction: column;
}

.legal-layout-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px env(safe-area-inset-top, 0px);
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    box-shadow: var(--shadow-sm);
}

.legal-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.15);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s;
}

.legal-back-btn:hover { background: rgba(255,255,255,.25); }

.legal-layout-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    background: #fff;
    padding: 3px;
    object-fit: contain;
    flex-shrink: 0;
}

.legal-layout-brand {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
}

.legal-layout-body {
    flex: 1;
    overflow-y: auto;
}

/* AGB page */
.agb-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px 40px;
}

.agb-hero {
    padding: 28px 0 20px;
    text-align: center;
}

.agb-hero-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
}

.agb-hero-sub {
    font-size: .82rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.agb-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 0.5px solid var(--border);
    overflow: hidden;
}

.agb-section {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.agb-section:last-of-type {
    border-bottom: none;
}

.agb-section p {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.65;
}

.agb-section strong {
    color: var(--text-primary);
}

.agb-section-title {
    font-size: 1rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 4px;
}

.agb-subsection-title {
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 6px;
    margin-bottom: 2px;
}

.agb-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-left: 4px;
}

.agb-list li {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    padding-left: 16px;
    position: relative;
}

.agb-list li::before {
    content: "–";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 500;
}

.agb-price-table {
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin: 4px 0;
}

.agb-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: .87rem;
}

.agb-price-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.agb-price-label {
    color: var(--text-secondary);
}

.agb-price-value {
    font-weight: 500;
    color: var(--primary-dark);
}

.agb-footer {
    padding: 20px 22px;
    text-align: center;
    border-top: 1px solid var(--border);
}

.agb-back-link {
    font-size: .85rem;
    color: var(--primary-dark);
    font-weight: 500;
}

.agb-back-link:hover { color: var(--primary-darker); }

/* Checkbox */
.login-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    padding: 0 2px;
}

.login-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--primary);
    cursor: pointer;
}

.login-checkbox-label span {
    font-size: .83rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.login-checkbox-label a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.login-required-star {
    color: var(--primary);
    font-weight: 500;
}

.login-required-note {
    font-size: .76rem;
    color: var(--text-secondary);
    margin-top: -4px;
}

/* Login footer */
.login-legal-footer {
    text-align: center;
    color: rgba(255,255,255,.85);
    font-size: .78rem;
    padding-bottom: 4px;
}

.login-legal-footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ══════════════════════════════════════════════════════
   PROJECT PLACEHOLDER (kein Bild)
   ══════════════════════════════════════════════════════ */

.project-image-placeholder {
    width: 100%;
    height: 110px;
    background: var(--primary-ghost);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

/* ══════════════════════════════════════════════════════
   BOTTOM SHEET
   ══════════════════════════════════════════════════════ */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 300;
    animation: fadeIn .2s ease;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 24px);
    z-index: 400;
    border-top: 0.5px solid var(--border-tertiary);
    animation: slideUp .25s cubic-bezier(.32,1,.23,1);
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.sheet-handle {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    align-self: center;
    margin-bottom: 4px;
}

.sheet-title {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════
   GROUP MANAGEMENT
   ══════════════════════════════════════════════════════ */

.group-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.group-no-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
}

.group-hint {
    font-size: .9rem;
    color: var(--text-secondary);
}

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

.group-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.group-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.group-member-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.group-member-name {
    font-size: .9rem;
    font-weight: 500;
    color: var(--text-primary);
}

.group-member-email {
    font-size: .78rem;
    color: var(--text-secondary);
}

.group-member-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Rolle des Mitglieds: statt eines Abzeichens unter der E-Mail trägt das
   Auswahlfeld selbst die Farbe. Dieselben Töne wie die Abzeichen der Legende. */
.role-select {
    font-weight: 500;
    border-color: transparent;
}
/* Gesperrt: die eigene Admin-Zeile. Farbe bleibt, damit die Rolle erkennbar ist. */
.role-select:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.role-select--1     { background: #E6F1FB;                  color: #185FA5; }
.role-select--2     { background: var(--status-active-bg);  color: var(--status-active); }
.role-select--3     { background: var(--status-warn-bg);    color: var(--status-warn); }
.role-select--4     { background: var(--primary-ghost);     color: var(--primary-dark); }
.role-select--admin { background: var(--primary);           color: #FFFFFF; }

/* Die aufgeklappte Liste stylen nicht alle Browser – wo sie es tun, tragen die
   Einträge dieselben Farben, sonst bleibt es beim Standard. */
.role-option { background: var(--surface); color: var(--text-primary); }
.role-option--1     { color: #185FA5; }
.role-option--2     { color: var(--status-active); }
.role-option--3     { color: var(--status-warn); }
.role-option--4     { color: var(--primary-dark); }
.role-option--admin { color: var(--primary-dark); font-weight: 600; }

/* Rollen-Legende unter der Mitgliederliste: Abzeichen links, Erklärung rechts. */
.role-legend-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
}

.role-legend-text {
    font-size: .8125rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.group-level-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: .75rem;
    font-weight: 500;
    white-space: nowrap;
}

.group-level-badge.level-1 { background: #E6F1FB; color: #185FA5; }
.group-level-badge.level-2 { background: var(--status-active-bg); color: var(--status-active); }
.group-level-badge.level-3 { background: var(--status-warn-bg); color: var(--status-warn); }
.group-level-badge.level-4 { background: var(--primary-ghost); color: var(--primary-dark); }
/* Admin ist keine fünfte Stufe, sondern eine eigene Rolle – deshalb gefüllt statt
   im selben Ton wie Stufe 4, mit der sie sich sonst optisch nicht unterscheidet. */
.group-level-badge.level-admin { background: var(--primary); color: #FFFFFF; }

.invite-code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: .15em;
    color: var(--primary);
    background: var(--surface-2);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    border: 0.5px solid var(--border);
    user-select: all;
    cursor: pointer;
}

.btn-sm {
    padding: 6px 14px;
    font-size: .82rem;
}

/* Auf .btn eingegrenzt. Ungebunden traf diese Regel auch ".btn-icon btn-danger" –
   sie steht weiter unten in der Datei und gewann bei gleicher Spezifität gegen
   ".btn-icon". Die Icon-Knöpfe zum Löschen waren dadurch rote Vollflächen mit
   weißem Zeichen, während die :hover-Regel darüber (heller Grund, rotes Zeichen)
   das Gegenteil vorsah – gemeint war ersichtlich der umgekehrte Weg. */
.btn.btn-danger {
    background: var(--status-decomm);
    color: #fff;
    border: none;
}

.btn.btn-danger:active {
    background: var(--status-decomm);
}

.form-control--sm {
    padding: 4px 8px;
    font-size: .82rem;
    border-radius: var(--radius-sm);
    border: 0.5px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
}

.confirm-text {
    font-size: .9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ── Subscription ────────────────────────────────────────── */

.subscription-warning-banner {
    background: var(--status-decomm);
    color: #FFFFFF;
    text-align: center;
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 500;
    position: sticky;
    top: 0;
    z-index: 200;
}

/* Gratismonat endet bald / ist beendet – ein Hinweis, kein Fehler: Amber statt
   Rot, und klickbar, weil es genau eine Aktion dazu gibt (Paket wählen). */
.subscription-info-banner {
    display: block;
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border-bottom: 1px solid #F2D9AE;
    text-align: center;
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 500;
    text-decoration: none;
    position: sticky;
    top: 0;
    z-index: 200;
}

/* Privat-Version: ruhiger Hinweis in Teal (kein Amber – es ist nichts falsch),
   mit Schließen-Knopf, weil Privatnutzer ihn nicht jeden Tag sehen müssen. */
.private-hint-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--status-planned-bg);
    color: var(--status-planned);
    border-bottom: 1px solid var(--primary-light);
    padding: 6px 8px 6px 16px;
    font-size: .85rem;
    font-weight: 500;
}

.private-hint-banner a {
    color: inherit;
    text-decoration: none;
    text-align: center;
}

.private-hint-close {
    flex: none;
    background: none;
    border: 0;
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
    padding: 4px 8px;
    cursor: pointer;
}

/* ── Demo-Konto ───────────────────────────────────────────────
   Leiste im App-Rahmen (nur bei IsDemo, Vorrang vor den Abo-Leisten) – gleiche
   Amber-Töne wie die Info-Leiste, damit es eine Familie bleibt. Am Handy zwei
   Zeilen: Text, darunter der Knopf. */
.demo-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 12px;
    background: var(--status-warn-bg);
    color: var(--status-warn);
    border-bottom: 1px solid #F2D9AE;
    padding: 6px 12px;
    font-size: .8rem;
    font-weight: 500;
    line-height: 1.35;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 200;
}

.demo-banner-text {
    min-width: 0;
}

.demo-banner-btn {
    flex-shrink: 0;
    min-height: 30px;
    padding: 4px 12px;
    background: #fff;
    color: inherit;
    border: 1px solid currentColor;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: inherit;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.demo-banner-btn:active {
    transform: scale(.97);
}

@media (min-width: 640px) {
    .demo-banner {
        font-size: .85rem;
        padding: 8px 16px;
    }
}

/* Gesperrte Aktion in der Demo: Bedienelement bleibt sichtbar (aber aus), daneben
   dieser Hinweis. */
.demo-hint {
    font-size: .75rem;
    font-weight: 400;
    color: var(--text-hint);
}

.demo-hint--block {
    padding: 0 4px;
}

.demo-locked {
    opacity: .5;
}

.demo-hint-text {
    font-size: .8rem;
    color: var(--text-hint);
}

.btn-link:disabled {
    opacity: .5;
    cursor: not-allowed;
    text-decoration: none;
}

/* Demo-Einstieg und Anmeldung der Demo-Instanz */
.demo-start-error {
    padding: 10px 14px;
    background: var(--status-decomm-bg);
    border: 1px solid #F09595;
    border-radius: var(--radius-sm);
    color: var(--status-decomm);
    font-size: .84rem;
    font-weight: 500;
}

.login-demo-cta {
    padding: 16px 20px 0;
    display: flex;
}

a.login-forgot {
    display: block;
}

a.login-tab {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* Versionszeile ganz unten im Konto */
.account-version {
    text-align: center;
    font-size: .75rem;
    color: var(--text-hint);
    margin: 4px 0 0;
}

/* ── Toasts (ToastHost im App-Rahmen) ─────────────────────────
   Unten über Bottom-Navbar und FAB; Look von .account-toast, plus Info/Warnung. */
.toast-host {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(148px + env(safe-area-inset-bottom, 0px));
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    width: 100%;
    max-width: 440px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    font-family: inherit;
    font-size: .88rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
    cursor: pointer;
    animation: fadeIn .2s ease;
}

.toast--info    { background: var(--status-planned-bg); color: var(--status-planned); border-color: var(--status-planned); }
.toast--warn    { background: var(--status-warn-bg);    color: var(--status-warn);    border-color: #F2D9AE; }
.toast--success { background: var(--status-active-bg);  color: var(--status-active);  border-color: var(--status-active); }

/* Bootstrap blendet .toast ohne .show aus (display: none) – damit waren alle
   Hinweise des ToastHost unsichtbar. Hier ausdrücklich wieder einblenden. */
.toast-host > .toast {
    display: block;
}

.toast-host > .toast--action {
    display: flex;
}

/* Mit Aktion (Rückgängig): Text links, Knopf rechts, ausreichend groß zum Tippen. */
.toast--action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 4px 4px 16px;
    text-align: left;
    cursor: default;
}

.toast-text {
    flex: 1;
    min-width: 0;
}

.toast-action {
    flex-shrink: 0;
    min-height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
}

.subscription-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.subscription-status-badge {
    font-size: .75rem;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
}
.subscription-status-badge--active    { background: var(--status-active-bg);   color: var(--status-active); }
.subscription-status-badge--pending   { background: var(--status-warn-bg);                    color: var(--status-warn); }
.subscription-status-badge--grace     { background: var(--status-inactive-bg);  color: var(--status-inactive); }
.subscription-status-badge--suspended { background: var(--status-decomm-bg);    color: var(--status-decomm); }
.subscription-status-badge--cancelled { background: var(--status-planned-bg);   color: var(--status-planned); }
/* "none" = noch nie angefragt. Wurde vorher ausgeblendet – seit Gruppe und
   Einzelkonto dieselbe Karte rendern, ist der Zustand benannt statt leer. */
.subscription-status-badge--none      { background: var(--status-inactive-bg); color: var(--status-inactive); }
/* Gratismonat aus einem Code – Teal wie „geplant": freigeschaltet, aber noch ohne Paket. */
.subscription-status-badge--trial     { background: var(--status-planned-bg);   color: var(--status-planned); }

/* ── Code einlösen (/app/code/{CODE}) ─────────────────────────
   Ziel des Links aus der Kundenmail. Steht im AuthLayout wie die
   Anmeldung, weil auch Besucher ohne Konto hier landen. */
.redeem-offer {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: center;
}

.redeem-code {
    display: block;
    text-align: center;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .08em;
    color: var(--primary-darker);
    background: var(--primary-ghost);
    border: 1px dashed var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 12px 8px;
    word-break: break-all;
}

.redeem-text {
    font-size: .9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.redeem-facts {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: .9rem;
    color: var(--text-primary);
}

.redeem-facts li::before {
    content: "✓ ";
    color: var(--primary);
    font-weight: 700;
}

.redeem-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Rechnungsanschrift in der Abonnement-Karte – Adressblock, nicht kursiv wie
   der Browser-Standard für <address>. */
.billing-address {
    font-style: normal;
    font-size: .875rem;
    line-height: 1.45;
    color: var(--text-secondary);
    padding: 2px var(--card-gutter) 12px;
}

.subscription-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: .9rem;
    color: var(--text-secondary);
}
.subscription-amount {
    font-weight: 500;
    color: var(--text-primary);
}

/* ── Innenabstand in Karten ───────────────────────────────────────────────
   Die .settings-card selbst hat bewusst kein Padding: ihre Zeilen bringen es
   mit, damit Trennlinien über die volle Breite laufen. Blöcke, die diesen
   Seitenabstand vergaßen, standen deshalb bündig am Rahmen. --card-gutter
   hält alle auf demselben Wert wie .group-info-row. */
:root { --card-gutter: 16px; }

.subscription-warning {
    color: var(--status-decomm);
    font-weight: 500;
    font-size: .9rem;
    padding: 12px var(--card-gutter) 0;
    margin-bottom: 4px;
}

/* ── Subscription Slots ──────────────────────────────────────────────── */
.subscription-slots-grid {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
}

.subscription-slot-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.subscription-slot-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary, #888);
}

.subscription-slot-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #fff);
}

.subscription-slot-warning {
    font-size: 12px;
    color: var(--status-warn);
    font-weight: 500;
}

/* ── Subscription Price Breakdown ───────────────────────────────────── */
.subscription-price-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px var(--card-gutter);
}

.subscription-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary, #aaa);
}

/* Abrechnungsübersicht in der Abo-Karte: je Posten Zeitraum + Betrag, darunter
   Beschreibung + Rechnungsstand. */
.billing-period-list {
    list-style: none;
    margin: 6px 0 4px;
    padding: 0;
}

.billing-period {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-tertiary);
}

.billing-period:last-child {
    border-bottom: 0;
}

.billing-period-main,
.billing-period-sub {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.billing-period-main {
    font-size: 14px;
    color: var(--text-primary);
}

.billing-period-amount {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.billing-period-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.billing-period-state {
    white-space: nowrap;
    color: var(--status-warn);
}

.billing-period-state.is-invoiced {
    color: var(--status-active);
}

.subscription-price-row--total {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary, #fff);
    padding-top: 4px;
    border-top: 1px solid var(--divider, rgba(255,255,255,0.08));
    margin-top: 4px;
}

/* ── Subscription slot sublabel ─────────────────────────────────────── */
.subscription-slot-sublabel {
    font-size: 11px;
    color: var(--text-secondary, #888);
}

/* ── Blocked project card ────────────────────────────────────────────── */
.project-card--blocked {
    opacity: 0.5;
    cursor: default;
    position: relative;
}

/* Gesperrt: kein schwarzes Overlay – Karte leicht ausgegraut,
   weißes Badge mit Schloss-Icon (Styleguide Mockup 1) */
.project-blocked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px;
    background: rgba(255, 255, 255, 0.55);
    border-radius: inherit;
}

.project-blocked-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--surface);
    color: var(--text-secondary);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
}





/* ── Kabelvorlagen-Picker ──────────────────────────────────── */
.template-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 12px;
}

/* Zeile mit Text links und Favoritenschalter rechts. */
.template-picker-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.template-picker-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.template-picker-item:active {
    background: var(--surface-hover, #f0f0f0);
}

.template-picker-name {
    font-weight: 500;
    font-size: 0.95rem;
}

.template-picker-detail {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
}

.template-select-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.selected-template-name {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary, #1D9E75);
    background: color-mix(in srgb, var(--primary, #1D9E75) 12%, transparent);
    border-radius: 4px;
    padding: 3px 8px;
}

/* ── Edit Mode Topbar Button ──────────────────────────────── */
.topbar-btn--editing {
    color: var(--primary, #1D9E75);
    font-weight: 500;
    min-width: 60px;
}

.topbar-done-label {
    font-size: 0.88rem;
    letter-spacing: 0.01em;
}

/* ── Textaktion im Sheet ──────────────────────────────────────
   Für den bewusst zweitrangigen Weg neben der Hauptaktion – aktuell
   „endgültig aus allen Ständen löschen" im Kabeldialog. */
.btn-link {
    background: none;
    border: none;
    padding: 4px 0;
    font-size: .85rem;
    font-family: inherit;
    color: var(--text-secondary);
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.btn-link--danger {
    color: var(--status-decomm);
}

/* ── Template Star Button ─────────────────────────────────── */
.btn-star {
    font-size: 1.1rem;
    color: var(--text-secondary, #999);
    background: none;
    border: none;
    padding: 4px 6px;
    cursor: pointer;
    line-height: 1;
}

.btn-star--active {
    color: #D4A017;
}

/* ── Discount Code ─────────────────────────────────────────── */
.discount-active-row {
    display: flex;
    align-items: center;
    padding: 10px var(--card-gutter);
}

.discount-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--status-active-bg);
    color: var(--status-active);
    font-size: .8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

.subscription-price-row--discount {
    color: var(--status-active);
}

.discount-savings {
    font-weight: 500;
    color: var(--status-active);
}

.discount-code-row {
    padding: 8px 0;
}

/* ── Discount Confirm Sheet ────────────────────────────────── */
.discount-confirm-sheet {
    max-height: 90vh;
    overflow-y: auto;
}

.discount-confirm-section {
    margin-bottom: 16px;
}

.discount-confirm-label {
    display: block;
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.discount-confirm-text {
    font-size: .9rem;
    color: var(--text-primary);
    line-height: 1.5;
}

.discount-price-compare {
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.discount-price-old {
    font-size: .85rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.discount-price-new {
    font-size: 1rem;
    font-weight: 500;
    color: var(--status-active);
}

/* ============================================================
   TOOLS / WERKZEUGE SECTION (Landing Page)
   ============================================================ */

.lp-tools-section {
    padding: 96px 24px;
    max-width: 100%;
    background: var(--bg);
    border-top: 0.5px solid var(--border);
    border-bottom: 0.5px solid var(--border);
}

.lp-tools-inner {
    max-width: 1160px;
    margin: 0 auto;
}

.lp-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.lp-tool-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s;
    position: relative;
}

.lp-tool-card:hover {
    border-color: var(--primary);
}

.lp-tool-card--featured {
    border: 1.5px solid var(--primary);
    background: var(--surface);
}

.lp-tool-card--soon {
    border: 1.5px dashed var(--border);
    background: transparent;
    pointer-events: none;
}

.lp-tool-card--soon .lp-tool-card-head,
.lp-tool-card--soon .lp-tool-card-footer {
    border-color: var(--border-tertiary);
}

.lp-tool-card--soon .lp-tool-card-title {
    color: var(--text-secondary);
}

.lp-tool-card-head {
    padding: 24px 24px 18px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 0.5px solid var(--border);
}

.lp-tool-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lp-tool-icon--amber {
    background: var(--status-warn-bg);
    color: var(--status-warn);
}

.lp-tool-icon--blue {
    background: var(--primary-ghost);
    color: var(--primary-dark);
}

.lp-tool-icon--muted {
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
}

.lp-tool-card-title {
    font-size: 1.02rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.lp-tool-card-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.lp-tool-norm-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
}

.lp-tool-norm-badge--blue {
    background: var(--status-cable-active-bg);
    color: var(--status-cable-active);
}

.lp-tool-norm-badge--muted {
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
}

.lp-tool-card-body {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.lp-tool-param {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    gap: 12px;
}

.lp-tool-param-key {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.lp-tool-param-val {
    color: var(--text-secondary);
    text-align: right;
    font-size: 0.82rem;
}

.lp-tool-card-footer {
    padding: 14px 24px;
    border-top: 0.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.lp-tool-card-cta {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 5px;
}

.lp-tool-card-cta-arrow {
    transition: transform 0.15s;
}

.lp-tool-card:hover .lp-tool-card-cta-arrow {
    transform: translateX(3px);
}

.lp-tool-card-cta--muted {
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .lp-tools-section {
        padding: 64px 20px;
    }

    .lp-tools-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   WERKZEUG-SEITEN (tool-*) — gemeinsamer Rahmen aller Werkzeuge
   PV-Rechner, Spannungsfall, Modbus, Wallbox-Check, Checklisten …
   Hießen bis 11/2026 pv-* und gehörten nur dem PV-Rechner.
   Komponenten: CircuitDoc.Shared/Components/Tools (ToolPage,
   ToolResult, ToolSteps, ToolNote, ToolCta, ToolShare).
   Anleitung und Klassenliste: STYLEGUIDE.md §14 „Werkzeug-Seiten“.
   ============================================================ */

.tool-page {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
}

.tool-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    border-bottom: 0.5px solid var(--border);
    padding: 0 16px;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.tool-back-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: background 0.15s;
    flex-shrink: 0;
}

.tool-back-btn:hover {
    background: var(--primary-ghost);
    color: var(--primary-dark);
}

.tool-topbar-divider {
    width: 1px;
    height: 18px;
    background: var(--border);
    flex-shrink: 0;
}

.tool-topbar-title {
    font-size: 1.06rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tool-topbar-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--status-planned);
    background: var(--status-planned-bg);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.tool-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px 80px;
}

/* Mit Hauptnavigation (ToolPage SiteNav, Standard): Nur die Navigation klebt oben.
   Die schmale Leiste mit „← Werkzeuge“ scrollt mit – zwei feste Kopfleisten
   übereinander nähmen am Handy zu viel Platz und lägen beim Scrollen
   übereinander (beide hatten top: 0). Die Fußzeile folgt direkt dem Inhalt. */
.tool-site--nav .tool-topbar {
    position: static;
    z-index: auto;
    /* Bündig mit Logo und Knopf der Navigation (lp-nav-inner: 1160 px, 24 px Rand;
       der Zurück-Link hat selbst 12 px Innenabstand). */
    padding: 0 max(12px, calc((100% - 1160px) / 2 + 12px));
}

/* Am Handy: Die Leiste trägt nur noch „← Werkzeuge“ – der Titel stünde doppelt,
   die Überschrift folgt direkt darunter. Niedriger, damit unter der Navigation
   kein zweiter Kopfbereich entsteht. */
@media (max-width: 640px) {
    .tool-site--nav .tool-topbar {
        height: 44px;
        padding: 0 6px;
    }

    .tool-site--nav .tool-topbar-title {
        display: none;
    }
}

.tool-site--nav .tool-page {
    min-height: 0;
}

/* Werkzeuge gibt es nur auf Deutsch: Der Sprachumschalter der Navigation hätte
   hier nichts umzuschalten. */
.tool-site--de-only .lp-lang-toggle {
    display: none;
}

.tool-page-header {
    margin-bottom: 28px;
}

.tool-page-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    letter-spacing: -0.025em;
    margin-bottom: 6px;
}

.tool-page-sub {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 560px;
}

/* Karte */
.tool-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
}

.tool-card-header {
    padding: 12px 18px;
    border-bottom: 0.5px solid var(--border);
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--surface-2);
}

.tool-card-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.tool-card-title {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tool-card-title-sub {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tool-card-body {
    padding: 18px;
}

/* Raster */
.tool-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.tool-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 640px) {
    .tool-grid-2 { grid-template-columns: 1fr; }
    .tool-field-row { grid-template-columns: 1fr; }
}

/* Formularfelder */
.tool-field {
    margin-bottom: 14px;
}

.tool-field:last-child {
    margin-bottom: 0;
}

.tool-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.tool-input-wrap {
    position: relative;
}

.tool-input,
.tool-select {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.92rem;
    color: var(--text);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.15s, background 0.15s;
}

.tool-input:focus,
.tool-select:focus {
    background: var(--surface);
    border-color: var(--border-focus);
}

.tool-input-unit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.tool-input { padding-right: 40px; }

.tool-field-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Zwei Hinweise hintereinander (z. B. „Gelesen als …“ + Hilfetext): jeder in eigener Zeile */
.tool-field-hint:has(+ .tool-field-hint),
.tool-field-hint + .tool-field-hint {
    display: block;
}

/* Gruppe (wiederholbarer Block, z. B. Wechselrichter, Ladepunkt) */
.tool-group {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 12px;
}

.tool-group:last-of-type {
    margin-bottom: 0;
}

.tool-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 12px;
}

.tool-group-label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Untergruppe (z. B. Modulfeld) */
.tool-subgroup {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-left: 3px solid var(--bar-planned);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin: 10px 0 0 16px;
}

/* Knöpfe – mit Text immer in Dunkel-Teal #0F6E56 (Styleguide §2.1, Kontrast);
   #1D9E75 nur für Flächen ohne Text. --primary und --dark sehen seit 14.11.2026
   gleich aus, --dark bleibt als Name für bestehende Seiten. */
.tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
}

.tool-btn:active { transform: scale(0.97); }

.tool-btn--primary {
    background: var(--primary-dark);
    color: #fff;
}

.tool-btn--primary:hover {
    background: var(--primary-darker);
    color: #fff;
}

.tool-btn--secondary {
    background: var(--surface);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}

.tool-btn--secondary:hover {
    background: var(--surface-2);
    color: var(--text-primary);
}

.tool-btn--danger {
    background: var(--status-decomm-bg);
    color: var(--status-decomm);
}

.tool-btn--danger:hover {
    background: #F7DADA;
}

.tool-btn--sm {
    padding: 6px 12px;
    font-size: 0.80rem;
}

.tool-btn--full {
    width: 100%;
}

/* Ergebnis-Kacheln */
.tool-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.tool-result-tile {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
}

.tool-result-tile--accent {
    background: var(--primary-ghost);
    border-color: var(--bar-planned);
}

.tool-result-tile--warn {
    background: var(--status-warn-bg);
    border-color: #E8C07A;
}

.tool-result-tile--danger {
    background: var(--status-decomm-bg);
    border-color: var(--bar-decomm);
}

.tool-result-label {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.tool-result-tile--accent .tool-result-label { color: var(--primary-dark); }
.tool-result-tile--warn   .tool-result-label { color: var(--status-warn); }
.tool-result-tile--danger .tool-result-label { color: var(--status-decomm); }

.tool-result-value {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.tool-result-tile--accent .tool-result-value { color: var(--primary-dark); }
.tool-result-tile--warn   .tool-result-value { color: var(--status-warn); }
.tool-result-tile--danger .tool-result-value { color: var(--status-decomm); }

.tool-result-unit {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-left: 3px;
}

/* In farbigen Kacheln steht die Einheit in der Farbe der Zahl – nicht abblenden (Kontrast). */
.tool-result-tile--accent .tool-result-unit,
.tool-result-tile--warn   .tool-result-unit,
.tool-result-tile--danger .tool-result-unit { color: inherit; }

/* Statuszeile */
.tool-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 500;
    margin-top: 4px;
}

.tool-status--ok {
    background: var(--status-active-bg);
    color: var(--status-active);
}

.tool-status--warn {
    background: var(--status-warn-bg);
    color: var(--status-warn);
}

.tool-status--error {
    background: var(--status-decomm-bg);
    color: var(--status-decomm);
}

/* Empfehlung mit Kennwerten */
.tool-rec {
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 10px;
}

.tool-rec:last-child { margin-bottom: 0; }

.tool-rec-head {
    padding: 11px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 0.5px solid var(--border);
    background: var(--surface-2);
}

.tool-rec-bar {
    width: 3px;
    height: 32px;
    border-radius: 2px;
    flex-shrink: 0;
}

.tool-rec-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
}

.tool-rec-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 1px;
}

.tool-rec-badge {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
}

.tool-rec-badge--ok {
    background: var(--status-active-bg);
    color: var(--status-active);
}

.tool-rec-badge--warn {
    background: var(--status-warn-bg);
    color: var(--status-warn);
}

.tool-rec-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: var(--surface);
}

.tool-rec-stat {
    padding: 9px 12px;
    text-align: center;
    border-right: 0.5px solid var(--border);
    font-size: 0.78rem;
}

.tool-rec-stat:last-child { border-right: none; }

.tool-rec-stat-val {
    font-weight: 500;
    color: var(--text);
    display: block;
}

.tool-rec-stat-lab {
    font-size: 0.68rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

/* Formelkasten */
.tool-formula-box {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.9;
}

.tool-formula-hl {
    color: var(--primary-dark);
    font-weight: 500;
}

.tool-formula-comment {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

/* Wertetabelle (Schlüssel links, Wert rechts) */
.tool-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 14px;
}

.tool-info-table td {
    padding: 8px 0;
    border-bottom: 0.5px solid var(--border);
    vertical-align: top;
}

.tool-info-table tr:last-child td { border-bottom: none; }

.tool-info-table .td-key {
    color: var(--text-secondary);
    width: 55%;
}

.tool-info-table .td-val {
    color: var(--text);
    font-weight: 500;
    text-align: right;
}

/* Beispielkasten */
.tool-example-box {
    background: var(--primary-ghost);
    border: 0.5px solid var(--bar-planned);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.tool-example-box h3 {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.tool-example-box p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.55;
}

.tool-example-box ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tool-example-box li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-example-box li::before {
    content: '→';
    color: var(--primary-dark);
    font-size: 0.75rem;
}

.tool-example-box strong {
    color: var(--text);
}

/* SVG-Diagramm */
.tool-chart {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    width: 100%;
    display: block;
}

/* Ergebnisblock je Gruppe */
.tool-result-block {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.tool-result-block:last-child { margin-bottom: 0; }

.tool-result-block-name {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.tool-result-block-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 3px 0;
}

.tool-result-block-row strong {
    color: var(--text);
    font-weight: 500;
}

/* Summenblock */
.tool-total-block {
    background: var(--primary-ghost);
    border: 0.5px solid var(--bar-planned);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-top: 12px;
}

.tool-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    padding: 4px 0;
    color: var(--text-secondary);
}

.tool-total-row strong {
    color: var(--primary-dark);
    font-weight: 500;
}

/* Leerzustand */
.tool-empty {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 8px 0;
}

/* Text über dem Diagramm */
.tool-chart-info {
    font-size: 0.80rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.tool-chart-info strong {
    color: var(--text-secondary);
    font-weight: 500;
}

@media (max-width: 640px) {
    .tool-content { padding: 20px 16px 60px; }
    .tool-page-title { font-size: 1.25rem; }
    .tool-rec-stats { grid-template-columns: repeat(2, 1fr); }

    /* Topbar bleibt einzeilig auf 52px (Styleguide §7):
       Kontextbadge und Trenner entfallen, der Titel wird gekuerzt. */
    .tool-topbar-badge,
    .tool-topbar-divider {
        display: none;
    }

    .tool-topbar-title {
        font-size: 0.94rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .tool-back-btn {
        padding: 6px 8px;
    }
}


/* ------------------------------------------------------------
   Werkzeug-Rahmen: Ergänzungen für die Komponenten und die
   Werkzeuge nach dem PV-Rechner (Design 2: flach, Text in
   #0F6E56, Statusfarben aus Styleguide §2).
   ------------------------------------------------------------ */

/* Schmale Spalte für einspaltige Werkzeuge und Checklisten */
.tool-content--narrow {
    max-width: 760px;
}

/* Abschnittstitel im Inhalt (h2) */
.tool-section-title {
    font-size: 0.94rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    margin: 24px 0 10px;
}

/* Kartentitel als echte Überschrift (h2/h3): Bootstrap gäbe ihr sonst Abstand
   nach unten und eine eigene Zeilenhöhe. */
h2.tool-card-title,
h3.tool-card-title {
    margin: 0;
    line-height: inherit;
}

/* Auswahlfeld: der Pfeil fehlt wegen appearance: none */
.tool-select {
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F5E5A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6l6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

/* Eingabe ohne Einheit rechts braucht den Platz dafür nicht */
.tool-input--plain {
    padding-right: 12px;
}

.tool-input--error,
.tool-select--error {
    border-color: var(--status-decomm);
}

/* Fehler unter dem Feld: Symbol und Text, nicht nur roter Rand (ToolNumberField) */
.tool-field-error {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--status-decomm);
    margin-top: 4px;
}

.tool-field-error svg {
    margin-top: 1px;
}

.tool-field-error + .tool-field-hint {
    display: block;
}

/* Umschalter (Styleguide §6 Segment-Control): aktives Segment gefüllt */
.tool-segment {
    display: flex;
    gap: 2px;
    padding: 3px;
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.tool-segment-btn {
    flex: 1 0 auto;
    padding: 7px 10px;
    font-size: 0.8125rem;
    font-weight: 400;
    font-family: inherit;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    border-radius: 6px;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.tool-segment-btn:hover {
    color: var(--text-primary);
}

.tool-segment-btn--active,
.tool-segment-btn--active:hover,
.tool-segment-btn[aria-pressed="true"] {
    background: var(--primary-dark);
    color: #fff;
    font-weight: 500;
}

/* Ankreuzfeld mit Text (Formular und Checkliste) */
.tool-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 7px 0;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.45;
    cursor: pointer;
}

.tool-check input[type="checkbox"],
.tool-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--primary-dark);
}

.tool-check-sub {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Knopf in Dunkel-Teal (Kontrastregel seit Styleguide 2.1) und als Link */
.tool-btn--dark {
    background: var(--primary-dark);
    color: #fff;
}

.tool-btn--dark:hover {
    background: var(--primary-darker);
    color: #fff;
}

a.tool-btn {
    text-decoration: none;
}

.tool-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.tool-btn:focus-visible,
.tool-segment-btn:focus-visible,
.tool-back-btn:focus-visible {
    outline: 2px solid var(--primary-dark);
    outline-offset: 2px;
}

/* Aktionszeile unter einem Formular oder Ergebnis */
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

/* Liste mit Punkten (das globale Reset nimmt ul die Punkte) */
.tool-list {
    list-style: disc;
    margin: 0;
    padding-left: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-list li + li {
    margin-top: 4px;
}

/* Tabelle mit Spaltenköpfen; am Handy seitlich schiebbar */
.tool-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.tool-table th {
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    background: var(--surface-2);
    padding: 8px 12px;
    border-bottom: 0.5px solid var(--border);
    white-space: nowrap;
}

.tool-table td {
    padding: 9px 12px;
    border-bottom: 0.5px solid var(--border);
    color: var(--text-primary);
    vertical-align: top;
}

.tool-table tr:last-child td {
    border-bottom: none;
}

.tool-table .tool-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Hervorgehobene Zeile – zusätzlich mit Balken links, nicht nur über die Farbe */
.tool-table tr.tool-row--hl td {
    background: var(--primary-ghost);
    font-weight: 500;
}

.tool-table tr.tool-row--hl td:first-child {
    box-shadow: inset 3px 0 0 var(--primary-dark);
}

.tool-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
}

/* ── ToolResult: großes Ergebnis mit Ampel ───────────────── */
.tool-result {
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-left: 4px solid var(--border-strong);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.tool-result--ok {
    background: var(--status-active-bg);
    border-color: #C3DBA3;
    border-left-color: var(--status-active);
}

.tool-result--warn {
    background: var(--status-warn-bg);
    border-color: #E8C07A;
    border-left-color: var(--status-warn);
}

.tool-result--error {
    background: var(--status-decomm-bg);
    border-color: var(--bar-decomm);
    border-left-color: var(--status-decomm);
}

/* Die Stufe als Wort mit Symbol: lesbar auch ohne Farbe */
.tool-result-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.tool-result--ok .tool-result-status { color: var(--status-active); }
.tool-result--warn .tool-result-status { color: var(--status-warn); }
.tool-result--error .tool-result-status { color: var(--status-decomm); }

.tool-result-figures {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 28px;
}

.tool-result-figure-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.tool-result-figure-value {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}

.tool-result-figure-unit {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0;
}

.tool-result-text {
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 10px 0 0;
}

.tool-result-extra {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-top: 8px;
}

/* ── ToolSteps: Rechenweg ────────────────────────────────── */
.tool-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tool-step {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 10px;
}

.tool-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-ghost);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-step-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 24px;
}

.tool-step-formula,
.tool-step-inserted {
    font-family: ui-monospace, SFMono-Regular, Menlo, 'SF Mono', 'Fira Code', monospace;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.tool-step-result {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-top: 2px;
}

.tool-step-note {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.tool-steps-extra {
    margin-top: 14px;
}

/* ── ToolNote: Hinweisbox (Styleguide §6 Info-Box) ───────── */
.tool-note {
    background: #E6F1FB;
    color: #123F6E;
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.8125rem;
    line-height: 1.55;
    margin-bottom: 16px;
}

.tool-note--warn {
    background: var(--status-warn-bg);
    color: var(--status-warn);
}

.tool-note-title {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.tool-note p {
    margin: 0;
}

.tool-note .tool-note-body > * + * {
    margin-top: 6px;
}

.tool-note .tool-note-body + .tool-note-standard {
    margin-top: 8px;
}

.tool-note a {
    text-decoration: underline;
}

.tool-note .tool-list {
    color: inherit;
}

/* ── ToolCta: Weg in die App ─────────────────────────────── */
.tool-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 20px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    margin-top: 24px;
}

.tool-cta-text {
    flex: 1 1 280px;
    min-width: 0;
}

.tool-cta-title {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tool-cta-sub {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 2px;
}

.tool-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Einzeilige Fassung, z. B. am Ende einer Checkliste – kein Werbeblock */
.tool-cta--compact {
    display: block;
    background: transparent;
    border: none;
    border-top: 0.5px solid var(--border);
    border-radius: 0;
    padding: 12px 0 0;
    margin: 16px 0 0;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.tool-cta-link {
    color: var(--primary-dark);
    font-weight: 500;
    text-decoration: underline;
    white-space: nowrap;
}

/* ── ToolShare: Teilen-Link ──────────────────────────────── */
.tool-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 16px;
}

.tool-share-done {
    font-size: 0.8125rem;
    color: var(--status-active);
}

.tool-share-link {
    flex: 1 1 100%;
    padding: 8px 10px;
    font-size: 0.8125rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--text-primary);
    background: var(--bg);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
}

/* ── Druck: Schreibfelder und Kästchen ───────────────────── */
/* Feld zum Ausfüllen von Hand („Projekt: ________“), z. B. im Kopf einer Checkliste */
.tool-print-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 20px;
    margin-bottom: 16px;
}

.tool-print-field {
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-bottom: 0.5px solid var(--text-secondary);
    padding-bottom: 2px;
    min-height: 34px;
}

.tool-print-only {
    display: none;
}

@media (max-width: 640px) {
    /* Unter 16px zoomt iOS beim Fokus in das Feld (wie .search-input). */
    .tool-input,
    .tool-select,
    .tool-share-link {
        font-size: 16px;
    }

    .tool-result-figure-value { font-size: 1.75rem; }
    .tool-print-fields { grid-template-columns: 1fr; }

    /* Knöpfe am Handy über die ganze Breite: sicher zu treffen */
    .tool-cta-actions { width: 100%; }
    .tool-cta-actions .tool-btn { flex: 1 1 0; white-space: nowrap; }
}

@media print {
    /* Gehört nicht aufs Blatt: Navigation, Leiste, Fußzeile, Weg in die App,
       Teilen, Bedienknöpfe */
    .tool-site .lp-navbar,
    .tool-site .lp-footer,
    .tool-topbar,
    .tool-cta,
    .tool-share,
    .tool-no-print {
        display: none !important;
    }

    .tool-print-only {
        display: block !important;
    }

    /* ToolCta mit Compact und PrintLine: die Zeile bleibt als schlichter Text stehen,
       die Links darin entfallen über .tool-no-print. */
    .tool-cta.tool-cta--print {
        display: block !important;
        color: #000;
    }

    /* Eigene Blattvorgabe: Die Zugliste stellt weiter oben für alle Seiten
       A4 quer ein – Werkzeuge und Checklisten drucken hoch. */
    .tool-page {
        page: tool;
        min-height: 0;
        background: #fff;
    }

    .tool-content {
        max-width: none;
        padding: 0;
    }

    .tool-card,
    .tool-result,
    .tool-note,
    .tool-step,
    .tool-check,
    .tool-table tr {
        break-inside: avoid;
    }

    .tool-card {
        border: 0.5pt solid #999;
    }

    .tool-table-wrap {
        overflow: visible;
    }

    .tool-print-break {
        break-before: page;
    }

    /* Eine Überschrift bleibt bei dem, was sie überschreibt. */
    .tool-section-title,
    .tool-card-header {
        break-after: avoid;
    }

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

    /* Flächen druckt der Browser in der Regel nicht mit: Die Ampel bleibt über
       Symbol, Wort und den Balken links lesbar. */
    .tool-result {
        border: 0.5pt solid #999;
        border-left: 3pt solid #000;
    }
}

@page tool {
    size: A4 portrait;
    margin: 14mm;
}

/* Beschriftung ohne Großbuchstaben – für Einheiten und Formelzeichen, die sonst
   verfälscht würden („mA“ → „MA“, „kVA“ → „KVA“). Größe und Farbe wie tool-label. */
.tool-label--plain {
    text-transform: none;
    letter-spacing: 0;
}

/* Am Handy stehen die Felder einer tool-field-row untereinander. Dann braucht auch
   das letzte Feld der Reihe Abstand nach unten, und ein Feldhinweis darf nicht am
   nächsten Label kleben. Nur unter 640 px – am Desktop bleibt alles wie bisher. */
@media (max-width: 640px) {
    .tool-field-row {
        row-gap: 14px;
        margin-bottom: 14px;
    }

    .tool-field-row:last-child {
        margin-bottom: 0;
    }

    .tool-field-row > .tool-field {
        margin-bottom: 0;
    }

    .tool-field-hint {
        display: block;
    }
}

/* ══════════════════════════════════════════════════════
   APP SHELL (Styleguide §5–§7)
   Topbar · Bottom-Navbar · FAB · Page-Content
   ══════════════════════════════════════════════════════ */

.app-wrapper {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text-primary);
}

/* ── Topbar (52px, Styleguide §7) ─────────────────────── */
.app-wrapper .topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    background: var(--surface);
    border-bottom: 0.5px solid var(--border-tertiary);
}

/* Hinweisleiste + Topbar kleben als EIN Block oben (AppLayout, .app-top); innen sind
   die Teile normal gestapelt. Einzeln klebend deckte die Leiste die Topbar zu. */
.app-wrapper .app-top {
    position: sticky;
    top: 0;
    z-index: 200;
}

.app-wrapper .app-top .topbar,
.app-wrapper .app-top .demo-banner,
.app-wrapper .app-top .subscription-warning-banner,
.app-wrapper .app-top .subscription-info-banner {
    position: static;
}

.app-wrapper .topbar-title {
    font-size: 17px;          /* Screen-Titel h1 */
    font-weight: 500;
    color: var(--text-primary);
    /* Trägt seit dem Umbau den Kontext ("Anlage A – Stand 2") statt des
       Markennamens – lange Namen werden gekürzt statt die Leiste zu sprengen. */
    flex: 1;
    min-width: 0;
    text-align: center;
    padding: 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-wrapper .topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--primary);
    font-size: 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app-wrapper .topbar-btn:active {
    background: var(--primary-ghost);
}

.app-wrapper .topbar-spacer {
    min-width: 40px;
}

/* Links Zurück, rechts Suche + Stift: beide Seiten gleich breit, damit der Titel
   mittig bleibt, egal welche Knöpfe gerade sichtbar sind. */
.app-wrapper .topbar-side {
    display: flex;
    align-items: center;
    min-width: 80px;
}

.app-wrapper .topbar-side--end {
    justify-content: flex-end;
}

/* ══════════════════════════════════════════════════════
   GLOBALE SUCHE (Components/GlobalSearch.razor)
   Handy: Vollbild · ab 640px: Dialog oben in der Mitte
   ══════════════════════════════════════════════════════ */

.search-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 450;
    animation: fadeIn .15s ease;
}

.search-panel {
    position: fixed;
    inset: 0;
    z-index: 460;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    padding-top: env(safe-area-inset-top, 0px);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 12px;
    border-bottom: 0.5px solid var(--border-tertiary);
}

.search-bar-icon {
    display: inline-flex;
    color: var(--text-hint);
}

.search-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;   /* unter 16px zoomt iOS beim Fokus */
    color: var(--text-primary);
}

/* Das eigene X der Browser doppelt sich mit unserem. */
.search-input::-webkit-search-cancel-button { display: none; }

.search-clear,
.search-cancel {
    border: none;
    background: transparent;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.search-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: var(--text-hint);
}

.search-clear:hover { background: var(--bg-surface); }

.search-cancel {
    padding: 0 8px;
    height: 40px;
    color: var(--primary);
    font-size: 15px;
}

.search-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 0.5px solid var(--border-tertiary);
}

.search-scope {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-removed-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    cursor: pointer;
}

.search-removed-toggle input { accent-color: var(--primary); }

.search-results {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px calc(16px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
}

.search-hint {
    padding: 16px 8px;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.search-hint code {
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-surface);
    padding: 1px 4px;
    border-radius: 4px;
}

.search-hint--error { color: var(--status-decomm); }

.search-group { padding-top: 8px; }

.search-group-title {
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--text-hint);
}

.search-hit {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 52px;
    padding: 8px;
    border: none;
    border-radius: var(--radius-sm);
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
}

.search-hit--active { background: var(--primary-ghost); }

.search-hit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--primary-dark);
}

.search-hit-icon svg { stroke: currentColor; }

.search-hit-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.search-hit-title,
.search-hit-sub {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-hit-title {
    font-size: 15px;
    font-weight: 500;
}

.search-hit-sub {
    font-size: 13px;
    color: var(--text-secondary);
}

.search-hit--removed .search-hit-title {
    color: var(--text-hint);
    text-decoration: line-through;
}

.search-hit-badge {
    flex-shrink: 0;
    max-width: 40%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
}

.search-hit-badge--planned        { background: var(--status-planned-bg);      color: var(--status-planned); }
.search-hit-badge--active         { background: var(--status-cable-active-bg); color: var(--status-cable-active); }
.search-hit-badge--decommissioned { background: var(--status-decomm-bg);       color: var(--status-decomm); }

@media (min-width: 640px) {
    .search-panel {
        inset: auto;
        top: 10vh;
        left: 50%;
        transform: translateX(-50%);
        width: min(640px, calc(100vw - 32px));
        max-height: 75vh;
        border-radius: var(--radius-md);
        border: 0.5px solid var(--border);
        padding-top: 0;
        overflow: hidden;
    }

    .search-results { padding-bottom: 12px; }
}

/* Kabel aus der Suche: kurz hervorheben, dann wie jede andere Karte. */
.cable-card--focus {
    animation: cableFocus 2.4s ease-out;
}

@keyframes cableFocus {
    0%, 40% { box-shadow: 0 0 0 2px var(--primary); background: var(--primary-ghost); }
    100%    { box-shadow: 0 0 0 0 transparent;     background: var(--surface); }
}

/* ── Page Content (16px Screen-Padding) ───────────────── */
.app-wrapper .page-content {
    flex: 1;
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 16px 16px calc(84px + env(safe-area-inset-bottom, 0px));
}

/* ── Bottom-Navbar (Styleguide §7) ────────────────────── */
.app-wrapper .bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    background: var(--surface);
    border-top: 0.5px solid var(--border-tertiary);
    padding: 6px 0 calc(20px + env(safe-area-inset-bottom, 0px));
}

.app-wrapper .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-secondary);
    text-decoration: none;
    padding-top: 4px;
    -webkit-tap-highlight-color: transparent;
}

.app-wrapper .bottom-nav-item.active {
    color: var(--primary);
}

.app-wrapper .bottom-nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-wrapper .bottom-nav-icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── FAB (48px, Styleguide §6) ────────────────────────── */
.app-wrapper .fab {
    position: fixed;
    right: 16px;
    bottom: calc(90px + env(safe-area-inset-bottom, 0px));
    z-index: 110;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.app-wrapper .fab:active {
    background: var(--primary-dark);
}

/* ── Abo: manuelle Freischaltung ──────────────────────── */
.subscription-pending-hint {
    background: var(--status-warn-bg);
    color: var(--status-warn);
    font-size: .85rem;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    margin: 12px var(--card-gutter) 4px;
}

.subscription-activate-hint {
    padding: 4px var(--card-gutter) 12px;
    font-size: .8rem;
    color: var(--text-secondary);
}

/* ── Abo: Schritt-Leiste vor der Freischaltung ───────────
   Nur der aktuelle Schritt ist hervorgehoben und trägt die Hauptaktion;
   erledigte Schritte zeigen eine Zeile Zusammenfassung. */
.subscription-private {
    padding: 12px var(--card-gutter) 4px;
}
.subscription-private-text {
    font-size: .88rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}
.subscription-private .subscription-slots-grid {
    padding: 10px 0 4px;
}
.subscription-private-warning {
    margin: 4px 0 8px;
}

.subscription-steps {
    list-style: none;
    margin: 0;
    padding: 8px var(--card-gutter) 12px;
    display: flex;
    flex-direction: column;
}
.subscription-step {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}
/* Verbindungslinie zwischen den Markern */
.subscription-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 38px;
    bottom: -6px;
    width: 1.5px;
    background: var(--border);
}
.subscription-step-marker {
    flex: 0 0 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
    border: 1.5px solid var(--border-strong);
    color: var(--text-muted);
    background: var(--surface);
    position: relative;
    z-index: 1;
}
.subscription-step.is-done .subscription-step-marker {
    background: var(--status-active-bg);
    border-color: var(--status-active-bg);
    color: var(--status-active);
}
.subscription-step.is-current .subscription-step-marker {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.subscription-step-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 3px;
}
.subscription-step-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}
.subscription-step-head .btn-link {
    padding: 0;
    font-size: .8rem;
}
.subscription-step-title {
    font-size: .92rem;
    font-weight: 500;
    color: var(--text-primary);
}
.subscription-step.is-todo .subscription-step-title {
    color: var(--text-muted);
}
.subscription-step-summary,
.subscription-step-text {
    font-size: .82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
    overflow-wrap: anywhere;
}
.subscription-step.is-todo .subscription-step-text {
    color: var(--text-hint);
}
.subscription-step-body > .btn {
    flex: 0 0 auto;
    align-self: flex-start;
}
.subscription-step-body > .subscription-request-btn {
    align-self: stretch;
}
/* In der Schritt-Leiste steht der Inhalt schon eingerückt – die Blöcke
   bringen ihren Kartenrand-Abstand nicht noch einmal mit. */
.subscription-step-body .subscription-price-breakdown,
.subscription-step-body .subscription-activate-hint,
.subscription-step-body .subscription-pending-hint {
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
}
.subscription-step-body .subscription-pending-hint {
    padding: 10px 12px;
}
.subscription-price-caption {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-secondary);
    margin-top: 6px;
}
.subscription-price-breakdown .subscription-price-row > span:first-child {
    padding-right: 12px;
    line-height: 1.35;
}
.subscription-price-breakdown .subscription-price-row > span:last-child {
    white-space: nowrap;
}
.subscription-change-plan {
    padding: 12px var(--card-gutter);
}
.subscription-section > .subscription-error {
    margin: 0 var(--card-gutter) 12px;
}
.members-seat-hint {
    margin: 0 4px 8px;
}
.login-error-action {
    margin-top: 8px;
    flex: 0 0 auto;
}

/* ── Paketauswahl ───────────────────────────────────────── */
.plan-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.plan-interval-toggle {
    display: flex;
    gap: 4px;
    padding: 3px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}
.plan-interval-option {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 7px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    font: inherit;
    font-size: .85rem;
    color: var(--text-secondary);
    cursor: pointer;
}
.plan-interval-option.is-selected {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 500;
    box-shadow: 0 0 0 1px var(--border);
}
.plan-save-badge {
    font-size: .7rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--status-active-bg);
    color: var(--status-active);
}
.plan-interval-hint {
    font-size: .78rem;
    color: var(--text-hint);
    margin: 0;
}
.plan-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.plan-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.plan-option:hover:not(:disabled) {
    border-color: var(--accent-border);
}
.plan-option.is-selected {
    border-color: var(--primary);
    background: var(--primary-ghost);
}
.plan-option.is-disabled {
    opacity: .55;
    cursor: not-allowed;
}
.plan-option-head {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.plan-option-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-primary);
}
.plan-option-badge {
    font-size: .68rem;
    font-weight: 500;
    padding: 1px 6px;
    border-radius: var(--radius-pill);
    background: var(--accent-dim);
    color: var(--accent-2);
    border: 0.5px solid var(--accent-border);
}
.plan-option-badge--current {
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
    border-color: var(--border);
}
.plan-option-seats {
    font-size: .78rem;
    color: var(--text-secondary);
}
.plan-option-price {
    font-size: .95rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-top: 2px;
}
.plan-option-price small {
    font-size: .72rem;
    font-weight: 400;
    color: var(--text-hint);
}
.plan-option-note {
    font-size: .75rem;
    color: var(--status-warn);
}
.plan-seats-input {
    margin: 0;
}
.plan-seats-input .settings-input {
    max-width: 120px;
}
.plan-picker-actions {
    display: flex;
    gap: 8px;
}


/* ══════════════════════════════════════════════════════
   GERÄTEVERWALTUNG (Styleguide §6/§9/§10)
   ══════════════════════════════════════════════════════ */

.device-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.device-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.device-card--selected {
    border: 1.5px solid var(--primary);
}

.device-card-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: var(--primary-ghost);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.device-card-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-card-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ── Einbau-Baum (Geräteliste) ─────────────────────────────
   Eingerückt über --tree-depth statt verschachtelter Container: die Liste bleibt
   eine flache Folge von Karten, Auf-/Zuklappen filtert nur Einträge heraus. Auf
   schmalen Geräten wächst die Einrückung langsamer, damit tiefe Ebenen nicht
   zur Hälfte aus dem Bild rutschen. */
.device-card--nested {
    margin-left: calc(min(var(--tree-depth, 0), 6) * 18px);
    border-left: 2px solid var(--primary-light);
}

@media (max-width: 480px) {
    .device-card--nested {
        margin-left: calc(min(var(--tree-depth, 0), 6) * 10px);
    }
}

.device-tree-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: -4px -6px -4px -8px;
    padding: 0;
    border: none;
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    flex-shrink: 0;
}

.device-tree-toggle:hover {
    background: var(--bg-card-hover);
}

.device-tree-spacer {
    width: 28px;
    margin: 0 -6px 0 -8px;
    flex-shrink: 0;
}

.device-card-rds {
    font-size: 12px;
    font-weight: 500;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.confirm-text--warn {
    color: var(--status-warn);
}

/* Einbau-Kette auf der Gerätedetailseite. */
.device-hero-rds {
    font-size: .85rem;
    font-weight: 500;
    color: var(--primary-dark);
    overflow-wrap: anywhere;
}

.device-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 6px;
    margin: 0 2px 12px;
    font-size: .82rem;
    color: var(--text-secondary);
}

.device-breadcrumb-label {
    margin-right: 2px;
}

.device-breadcrumb-link {
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-underline-offset: 2px;
    cursor: pointer;
    overflow-wrap: anywhere;
    text-align: left;
}

.device-breadcrumb-sep {
    color: var(--text-hint);
}

.device-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.device-card-chevron {
    color: var(--text-hint);
    font-size: 13px;
}

.device-add-btn {
    margin-top: 12px;
    width: 100%;
}

.device-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 16px;
    border: 1.5px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
}

.device-empty-icon {
    font-size: 22px;
    color: var(--primary);
}

/* ── Gerätekopf (Detailseite) ─────────────────────────── */
.device-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.device-hero-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-ghost);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.device-hero-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device-hero-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

.device-hero-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.device-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 2px 12px;
}

.device-stand-chip {
    background: var(--primary-ghost);
    color: var(--primary-dark);
    font-size: 10px;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    margin-left: 6px;
    text-transform: none;
    letter-spacing: 0;
}

.device-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 48px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.device-error-icon {
    color: var(--text-hint);
}

/* ── Buchsen ──────────────────────────────────────────── */
.socket-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 4px;
}

.socket-row--display {
    padding: 10px 14px;
}

.socket-row-name {
    font-weight: 500;
    font-size: 13px;
    color: var(--text-primary);
    min-width: 48px;
}

.socket-row-meta {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
}

.socket-add-row {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
}

.socket-add-name  { flex: 2; }
.socket-add-type  { flex: 3; }
.socket-add-pins  { flex: 2; }

.device-socket-selects {
    display: flex;
    gap: 6px;
}

.device-socket-selects select:first-child { flex: 3; }
.device-socket-selects select:last-child  { flex: 2; }

/* ── Verbindungen (Geräteseite) ───────────────────────── */
.direction-badge {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.direction-badge--outgoing {
    background: var(--primary-ghost);
    color: var(--primary-dark);
}

.direction-badge--incoming {
    background: var(--status-cable-active-bg);
    color: var(--status-cable-active);
}

.connection-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.connection-row-main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.connection-card {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 8px;
}

.connection-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.connection-card-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.connection-card-tag {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.connection-card-type {
    font-size: 12px;
    color: var(--text-secondary);
}

.connection-card-route {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 8px 0 0;
    padding-top: 8px;
    border-top: 0.5px solid var(--border-tertiary);
}

.connection-cores {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.connection-core-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.connection-core-row .core-swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 0.5px solid var(--border);
    flex-shrink: 0;
}

.core-function {
    min-width: 48px;
    font-weight: 500;
    color: var(--text-primary);
}

.core-route {
    color: var(--text-secondary);
}

.connection-card-stats {
    display: flex;
    margin-top: 10px;
    border-top: 0.5px solid var(--border-tertiary);
    padding-top: 8px;
}

.connection-card-stats .stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border-right: 0.5px solid var(--border-tertiary);
}

.connection-card-stats .stat:last-child { border-right: none; }

.stat-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.stat-label {
    font-size: 10px;
    color: var(--text-hint);
}

.status-chip {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
}

.status-chip--planned        { background: var(--status-planned-bg);      color: var(--status-planned); }
.status-chip--active         { background: var(--status-cable-active-bg); color: var(--status-cable-active); }
.status-chip--inactive       { background: var(--status-inactive-bg);     color: var(--status-inactive); }
.status-chip--decommissioned { background: var(--status-decomm-bg);       color: var(--status-decomm); }
.status-chip--warn           { background: var(--status-warn-bg);         color: var(--status-warn); }

.device-connection-detail {
    padding: 4px 0 4px 12px;
    border-left: 2px solid var(--primary-light);
    margin: 2px 0 6px 14px;
}

.device-open-other {
    width: 100%;
}

/* ══════════════════════════════════════════════════════
   SCHALTPLAN / NETZ  (Übersichtsschaltplan, EN 61082)
   ══════════════════════════════════════════════════════ */

.schematic-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.schematic-legend {
    font-size: 12px;
    color: var(--text-secondary);
}

.schematic-hint {
    color: var(--status-warn);
}

.schematic-zoom {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.schematic-zoom .btn-icon {
    min-width: 44px;
    font-size: 12px;
    font-weight: 500;
}

/* Der Plan scrollt ausschließlich in seinem eigenen Rahmen */
.schematic-canvas {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    max-height: calc(100dvh - 260px);
    min-height: 240px;
}

.schematic-svg {
    display: block;
}

/* ── Leitungen ────────────────────────────────────────── */
/* Ausschließlich orthogonal geführt (EN 61082) – die Punkte liefert
   SchematicLayoutService, hier wird nur eingefärbt. */
.sch-edge {
    fill: none;
    stroke-width: 1.5;
    stroke-linejoin: round;
    cursor: pointer;
}

.sch-edge--planned        { stroke: var(--bar-planned); }
.sch-edge--active         { stroke: var(--bar-active); }
.sch-edge--inactive       { stroke: var(--bar-inactive); }
.sch-edge--decommissioned { stroke: var(--bar-decomm); stroke-dasharray: 4 3; }

.sch-edge:hover {
    stroke-width: 2.5;
}

.sch-edge-label {
    font-size: 9px;
    fill: var(--text-hint);
    /* Hof in Hintergrundfarbe: kreuzt eine Leitung die Beschriftung, bleibt sie lesbar */
    paint-order: stroke;
    stroke: var(--surface);
    stroke-width: 3px;
    stroke-linejoin: round;
    /* Beschriftung ist Teil der Klickflaeche der Leitung */
    pointer-events: auto;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}
.sch-edge-group { cursor: pointer; }
.sch-edge-group:hover .sch-edge-label { fill: var(--primary); }
.sch-edge-group:hover .sch-edge { stroke-width: 2.5; }

/* ── Geräteknoten ─────────────────────────────────────── */
.sch-node rect {
    fill: var(--surface);
    stroke: var(--border);
    stroke-width: 0.5;
}

.sch-node {
    cursor: pointer;
}

.sch-node:hover rect {
    stroke: var(--primary-light);
}

.sch-node--selected rect {
    stroke: var(--primary);
    stroke-width: 1.5;
}

.sch-symbol {
    stroke: var(--primary-dark);
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sch-node-label {
    font-size: 11px;
    font-weight: 500;
    fill: var(--text-primary);
    pointer-events: none;
}

.sch-node-sub {
    font-size: 9px;
    fill: var(--text-secondary);
    pointer-events: none;
}

/* Schrank mit Inhalt: zweiter Rahmen dahinter und „▸ n" – Klick öffnet ihn. */
.sch-node--container rect {
    stroke: var(--primary-dark);
    stroke-width: 1;
}

.sch-node .sch-node-stack {
    fill: var(--primary-ghost);
    stroke: var(--primary-light);
}

.sch-node-badge {
    font-size: 9px;
    font-weight: 600;
    fill: var(--primary-dark);
    pointer-events: none;
}

/* Gegenstelle außerhalb des geöffneten Schranks: nur angedeutet. */
.sch-node--external rect {
    fill: var(--bg);
    stroke: var(--text-hint);
    stroke-dasharray: 4 3;
}

.sch-node--external .sch-symbol {
    opacity: .5;
}

/* Der geöffnete Schrank selbst (seine eigenen Klemmleisten). */
.sch-node--scope rect {
    fill: var(--primary-ghost);
    stroke: var(--primary);
}

/* ── Ebenen-Pfad über dem Plan ────────────────────────── */
.schematic-path {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 6px;
    margin: 0 0 8px;
    font-size: .85rem;
    color: var(--text-secondary);
}

.schematic-path-link {
    padding: 2px 0;
    border: none;
    background: none;
    font: inherit;
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-underline-offset: 2px;
    cursor: pointer;
    overflow-wrap: anywhere;
    text-align: left;
}

.schematic-path-sep {
    color: var(--text-hint);
}

.schematic-path-current {
    font-weight: 600;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.schematic-path-details {
    margin-left: auto;
}

.sch-separator {
    stroke: var(--border);
    stroke-width: 0.5;
    stroke-dasharray: 3 3;
}

.sch-section-label {
    font-size: 9px;
    fill: var(--text-hint);
}

/* ── Adernliste im Auswahl-Sheet ──────────────────────── */
.sch-core-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    max-height: 180px;
    overflow-y: auto;
}

.sch-core-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.sch-core-fn {
    color: var(--text-primary);
    min-width: 64px;
}

.sch-core-path {
    color: var(--text-secondary);
    font-size: 11px;
}

/* ── Kennzeichnungsfelder nach EN 81346 (Geräteformular) ── */
/* Geräteformular, Abschnitt „Stromlaufplan": Bemessung, Phase, Polzahl nebeneinander. */
.device-electrical {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.device-electrical-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
}

.device-electrical-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* Kabelformular: „gespeist über" / „geschaltet über" je Ader. */
.core-form-feed {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 6px;
    margin-top: 6px;
}

.rds-fields {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.rds-field {
    display: flex;
    align-items: center;
    gap: 4px;
}

.rds-prefix {
    font-size: 15px;
    font-weight: 500;
    color: var(--primary-dark);
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}

.rds-field .settings-input {
    min-width: 0;
}

@media (max-width: 400px) {
    .rds-fields {
        grid-template-columns: 1fr;
    }
}

/* ── Vorlagen: Global-Badge ───────────────────────────── */
/* Eigene Fassung einer globalen Vorlage – abgesetzt vom „Global"-Abzeichen,
   damit auf einen Blick klar ist, welche der beiden gerade gilt. */
.template-own-badge {
    background: var(--primary-ghost);
    color: var(--primary-dark);
}

.template-global-badge {
    background: var(--primary-ghost);
    color: var(--primary-dark);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: var(--radius-pill);
    white-space: nowrap;
    flex-shrink: 0;
}

.device-template-details {
    padding: 10px 14px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: -8px;
    margin-bottom: 8px;
}

/* ── Fokus-Ring der Seiten-Überschrift ──────────────────────────────────────
   <FocusOnNavigate Selector="h1"> in Routes.razor setzt beim Aufruf jeder Seite
   den Fokus auf die h1; der Browser zeichnet dafür seinen blauen Ring.
   Nur dieser Fall wird ausgeblendet – der Fokus auf Bedienelementen
   (Buttons, Links, Eingabefelder) bleibt sichtbar. */
h1:focus,
h1:focus-visible {
    outline: none;
    box-shadow: none;
}


/* ── Kabelbäume ─────────────────────────────────────────────────────────────
   Bündel mehrerer Kabel. Gleiche Kartenoptik wie die Kabelliste, damit die
   dritte Ansicht nicht wie ein Fremdkörper wirkt. */
.harness-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 0;
}

.harness-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: var(--surface);
    border: 0.5px solid var(--border-tertiary);
    border-radius: var(--radius-md);
}

.harness-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.harness-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.harness-name {
    font-size: .875rem;
    color: var(--text-secondary);
}

.harness-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: .8125rem;
    color: var(--text-secondary);
}

.harness-detail-row {
    display: flex;
    gap: 8px;
    font-size: .8125rem;
}

.harness-cables {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

/* Kabelkennzeichen im Bündel und das Bündelkennzeichen an der Kabelkarte –
   dieselbe Pille, damit die Zusammengehörigkeit sofort lesbar ist. */
.harness-cable-chip,
.harness-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--primary-ghost);
    color: var(--primary-dark);
    font-size: .75rem;
    white-space: nowrap;
}

.assign-list {
    display: flex;
    flex-direction: column;
    max-height: 45vh;
    overflow-y: auto;
}

.assign-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 0.5px solid var(--border-tertiary);
    cursor: pointer;
}

.assign-hint {
    margin-left: auto;
    font-size: .75rem;
    color: var(--text-secondary);
}

/* ============================================================
   STARTSEITE – Kacheln zu den Unterseiten
   ============================================================ */

/* Die Kacheln sind Links. Farbe explizit, sonst färbt die globale a-Regel
   Überschrift und Text ein. */
a.lp-teaser-card {
    display: flex;
    flex-direction: column;
    color: var(--text);
    text-decoration: none;
}

a.lp-teaser-card:hover {
    border-color: var(--accent-border);
    color: var(--text);
}

.lp-teaser-cta {
    margin-top: auto;
    padding-top: 16px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
}

/* ============================================================
   ROADMAP – Stufen (umgesetzt / geplant / ferne Zukunft)
   ============================================================ */

.lp-roadmap-group {
    max-width: 760px;
    margin: 0 auto 48px;
}

.lp-roadmap-group:last-child {
    margin-bottom: 0;
}

.lp-roadmap-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin: 0 0 4px;
}

.lp-roadmap-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.lp-roadmap-status--done {
    color: var(--status-active);
    background: var(--status-active-bg);
    border-color: transparent;
}

.lp-roadmap-item--done .lp-roadmap-icon {
    color: var(--status-active);
    background: var(--status-active-bg);
    border-color: transparent;
}

.lp-roadmap-status--vision {
    color: var(--status-inactive);
    background: var(--status-inactive-bg);
    border-color: transparent;
}

.lp-roadmap-item--vision .lp-roadmap-icon {
    color: var(--status-inactive);
    background: var(--status-inactive-bg);
    border-color: var(--border);
}

/* ============================================================
   UNTERSEITEN – Inhaltsbausteine (Beispiele, Listen, FAQ)
   ============================================================ */

/* Zwei Spalten: Text links, Beispiel rechts. Unter 900 px untereinander. */
.lp-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-split h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 14px;
}

.lp-split p {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

.lp-check-list {
    list-style: none;
    padding: 0;
    margin: 18px 0 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-check-list li {
    position: relative;
    padding-left: 26px;
    font-size: 0.94rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.lp-check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent);
    font-weight: 600;
}

.lp-check-list strong {
    color: var(--text);
    font-weight: 500;
}

/* Beispiel-Datensatz: sieht aus wie ein Blatt aus der App. */
.lp-example {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lp-example-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--border);
    background: var(--bg-surface);
}

.lp-example-title {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.lp-example-label {
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.lp-example-rows {
    margin: 0;
    padding: 6px 20px 14px;
}

.lp-example-row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 0.5px solid var(--border-tertiary, var(--border));
    font-size: 0.88rem;
}

.lp-example-row:last-child {
    border-bottom: none;
}

.lp-example-row dt {
    color: var(--text-secondary);
}

.lp-example-row dd {
    margin: 0;
    color: var(--text);
}

.lp-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.86em;
}

.lp-pill {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    color: var(--status-active);
    background: var(--status-active-bg);
}

/* Feldliste: was pro Kabel erfasst wird, in Gruppen. */
.lp-field-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-field-group {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.lp-field-group h3 {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.lp-field-group ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lp-field-group li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 6px 0;
    border-bottom: 0.5px solid var(--border-tertiary, var(--border));
    line-height: 1.5;
}

.lp-field-group li:last-child {
    border-bottom: none;
}

.lp-field-group li span {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Chips: Gerätetypen, Vorlagen. */
.lp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.lp-chips span {
    font-size: 0.82rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 4px 12px;
    white-space: nowrap;
}

/* Kennzeichen-Erklärung: =A1 +S1 -A1 -K3 */
.lp-designation {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 6px;
}

.lp-designation-part {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    min-width: 92px;
}

.lp-designation-part code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.lp-designation-part span {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Tabelle: Rollen im Team. */
.lp-table-wrap {
    max-width: 860px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.lp-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.lp-table th,
.lp-table td {
    text-align: left;
    padding: 14px 20px;
    border-bottom: 0.5px solid var(--border);
    vertical-align: top;
}

.lp-table tr:last-child td {
    border-bottom: none;
}

.lp-table th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-secondary);
    background: var(--bg-surface);
}

.lp-table td {
    color: var(--text-secondary);
    line-height: 1.55;
}

.lp-table td:first-child {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
}

.lp-table-free {
    color: var(--status-active);
    font-weight: 500;
}

/* Rechenbeispiele auf der Preisseite. */
.lp-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1160px;
    margin: 0 auto;
}

.lp-calc-card {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-calc-who {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary-dark);
}

.lp-calc-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.lp-calc-result {
    margin-top: auto;
    padding-top: 12px;
    border-top: 0.5px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.lp-calc-plan {
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 500;
}

.lp-calc-price {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.lp-calc-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Häufige Fragen: <details>, damit es ohne Skript auf- und zuklappt. */
.lp-faq {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lp-faq details {
    background: var(--bg-card);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 20px;
}

.lp-faq details[open] {
    border-color: var(--accent-border);
}

.lp-faq summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 28px 16px 0;
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text);
    position: relative;
}

.lp-faq summary::-webkit-details-marker {
    display: none;
}

.lp-faq summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent);
}

.lp-faq details[open] summary::after {
    content: '–';
}

.lp-faq details p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 16px;
}

/* Hinweisbox mit Handlung, z. B. "Dir fehlt etwas?" */
.lp-callout {
    max-width: 760px;
    margin: 56px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--primary-ghost);
    border: 0.5px solid var(--accent-border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
}

.lp-callout h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.lp-callout p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.lp-callout .lp-btn-primary {
    flex-shrink: 0;
}

.lp-split--spaced {
    margin-top: 64px;
}

.lp-field-grid--two {
    grid-template-columns: repeat(2, 1fr);
}

.lp-card-meta--flush {
    margin-top: 0;
}

.lp-example-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    border-top: 0.5px solid var(--border);
    background: var(--bg-surface);
}

.lp-link-cta {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* Drei Karten nebeneinander (Einsatzbereiche, Kontaktanlässe). */
.lp-features-grid--three {
    grid-template-columns: repeat(3, 1fr);
}

.lp-card-meta {
    display: block;
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (max-width: 900px) {
    .lp-split,
    .lp-field-grid,
    .lp-field-grid--two,
    .lp-calc-grid,
    .lp-features-grid--three {
        grid-template-columns: 1fr;
    }

    .lp-split {
        gap: 32px;
    }

    .lp-callout {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .lp-example-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .lp-table th,
    .lp-table td {
        padding: 12px 14px;
    }

    .lp-table td:first-child {
        white-space: normal;
    }
}

/* ============================================================
   NAVBAR – aktiver Punkt und Menü auf schmalen Bildschirmen
   ============================================================ */

.lp-nav-links a.lp-nav-link--active,
.lp-nav-menu-panel a.lp-nav-link--active {
    color: var(--primary-dark);
    background: var(--primary-ghost);
}

/* Das Menü (<details>) gibt es nur auf schmalen Bildschirmen, siehe unten. */
.lp-nav-menu {
    display: none;
}

.lp-nav-menu-btn {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 0.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    cursor: pointer;
}

.lp-nav-menu-btn::-webkit-details-marker {
    display: none;
}

/* Drei Striche aus einem Element: Mitte als Fläche, oben und unten als Schatten. */
.lp-nav-menu-bars {
    display: block;
    width: 16px;
    height: 1.75px;
    background: var(--text);
    border-radius: 1px;
    box-shadow: 0 -5px 0 var(--text), 0 5px 0 var(--text);
}

.lp-nav-menu[open] .lp-nav-menu-btn {
    border-color: var(--accent-border);
    background: var(--primary-ghost);
}

/* Unter der ganzen Leiste statt unter dem Knopf: .lp-navbar ist sticky und damit
   Bezugsrahmen für die absolute Position. */
.lp-nav-menu-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 8px 16px 16px;
    background: var(--bg);
    border-bottom: 0.5px solid var(--border);
}

.lp-nav-menu-panel a {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-secondary);
}

.lp-nav-menu-panel a:hover {
    color: var(--primary-dark);
    background: var(--primary-ghost);
}

/* Unterhalb von rund 1090 px passten die Punkte in voller Größe nicht mehr neben
   Logo und Schaltflächen – die Leiste lief über und schob die Seite waagerecht
   auf. Statt Punkte zu streichen, wird hier enger gesetzt. */
@media (min-width: 881px) and (max-width: 1120px) {
    .lp-nav-inner {
        gap: 12px;
    }

    .lp-nav-links {
        gap: 2px;
    }

    .lp-nav-links a {
        padding: 6px 8px;
        font-size: 0.84rem;
    }
}

/* Darunter passt die Linkliste nicht mehr nebeneinander; an ihre Stelle tritt
   das Menü. Vorher verschwanden die Links hier ersatzlos – das ging, solange die
   Startseite eine lange Seite mit Sprungmarken war. Seit jeder Punkt eine eigene
   Seite ist, wären sie auf dem Telefon sonst nicht erreichbar. */
@media (max-width: 880px) {
    .lp-nav-links {
        display: none;
    }

    .lp-nav-menu {
        display: block;
    }
}

/* Auf sehr schmalen Geräten reicht der Platz für Wortmarke + Sprache +
   Schaltfläche + Menü nicht mehr; das Logo bleibt, das Wort weicht. */
@media (max-width: 480px) {
    .lp-logo-word {
        display: none;
    }

    .lp-nav-inner {
        padding: 0 14px;
        gap: 8px;
    }

    .lp-nav-actions {
        gap: 8px;
    }

    .lp-cta-btn {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
}

/* ============================================================
   KLEMMEN UND BRÜCKEN (Untermenü einer Anschlussbuchse)
   ============================================================ */

/* .btn trägt flex:1 – gedacht für Knopfreihen, die sich die Breite teilen. In der
   Buchsenzeile soll der Klemmen-Knopf aber nur so breit sein wie seine Beschriftung,
   sonst drängt er Name und Angaben zusammen. */
.socket-row .btn {
    flex: 0 0 auto;
}

/* Ein Aderende: Auswahlliste der Klemmen, darunter das Textfeld – letzteres nur,
   solange keine Klemme gewählt ist. Beide untereinander, damit die Zeile auf dem
   Telefon nicht zu dritt nebeneinander gequetscht wird. */
.core-endpoint {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pin-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 8px 0 12px;
}

.pin-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Laufende Nummer, nicht die Beschriftung: Sie zeigt die Position in der
   Leiste, die auch die Brücken meinen. */
.pin-row-index {
    width: 22px;
    flex-shrink: 0;
    font-size: .75rem;
    color: var(--text-muted);
    text-align: right;
}

.pin-row-input {
    flex: 1;
    min-width: 0;
}

.bridge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 0.5px solid var(--border-tertiary);
}

.bridge-row-span {
    font-size: .82rem;
    color: var(--text);
    white-space: nowrap;
}

.bridge-row-label {
    flex: 1;
    min-width: 0;
    font-size: .82rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
}

.bridge-add-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.bridge-add-row .settings-input {
    flex: 1;
    min-width: 90px;
}

.bridge-add-arrow {
    font-size: .8rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════
   KABELZUGLISTE
   Bildschirmansicht und Druckbild in einem. Der Ausdruck entsteht über den
   Druckdialog des Systems („Als PDF sichern"), deshalb liegt das ganze
   Seitenlayout des Blattes unten in @media print.
   ══════════════════════════════════════════════════════ */

.pull-list-page {
    padding: 12px 16px 32px;
}



.pull-list-actions-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.pull-list-sheet {
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}

.pull-list-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.pull-list-title {
    margin: 0 0 2px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pull-list-subtitle {
    margin: 0;
    font-size: .875rem;
    color: var(--text-secondary);
}

.pull-list-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: .78rem;
    color: var(--text-secondary);
}

/* Kein break-inside: avoid – eine Gruppe, die nicht mehr auf den Rest der
   Seite passte, sprang damit komplett aufs nächste Blatt und hinterließ eine
   leere halbe Seite. Die Zuordnung auf Folgeseiten übernimmt im Druck die
   Gruppenzeile im <thead> (.pull-print-group-row). */
.pull-list-group {
    margin-top: 22px;
}

/* Hinweis auf ausgeblendete, leere Spalten – nur am Bildschirm. */
.pull-list-hint {
    margin: 12px 0 0;
    font-size: .78rem;
    color: var(--text-hint);
}

/* Gruppenüberschrift als Tabellenzeile: nur im Druck, siehe @media print. */
.pull-print-group-row {
    display: none;
}

.pull-list-group-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pull-list-group-title {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-primary);
}

.pull-list-group-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: .78rem;
    color: var(--text-secondary);
}

.pull-list-empty-group {
    margin: 0;
    padding: 8px 0;
    font-size: .82rem;
    color: var(--text-hint);
}

/* Auf schmalen Geräten darf die Tabelle seitlich scrollen – umbrechen würde die
   Zeilen unlesbar machen, und die Seite selbst soll nicht wandern. */
.pull-list-table-wrap {
    overflow-x: auto;
}

.pull-list-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.pull-list-table th {
    text-align: left;
    font-weight: 500;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-secondary);
    padding: 6px 8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.pull-list-table td {
    padding: 7px 8px;
    border-bottom: 0.5px solid var(--border);
    vertical-align: top;
    color: var(--text-primary);
}

.pull-col-num {
    text-align: right;
    white-space: nowrap;
}

.pull-col-check {
    width: 26px;
    text-align: center;
}

.pull-col-end {
    font-variant-numeric: tabular-nums;
}

/* Kästchen für den Ausdruck. Am Bildschirm steht dort, wer schreiben darf, ein
   echtes Kontrollkästchen – der Zugstatus wird mit Datum gespeichert. */
.pull-checkbox {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1px solid var(--text-secondary);
    border-radius: 2px;
    font-size: 10px;
    line-height: 11px;
    text-align: center;
}

.pull-check-input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--primary);
    cursor: pointer;
}

.pull-pulled-date {
    display: block;
    margin-top: 2px;
    font-size: .68rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.pull-row--pulled td {
    background: var(--primary-ghost);
}

/* Bearbeitbare Liste: Eingabefelder brauchen Platz. Die Tabelle scrollt dann
   seitlich (.pull-list-table-wrap), statt die Felder unbenutzbar schmal zu machen. */
.pull-list-table--edit {
    min-width: 1020px;
}

.pull-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 5px 7px;
    font: inherit;
    font-size: .82rem;
    color: var(--text-primary);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
}

.pull-input:focus {
    border-color: var(--border-focus);
    background: var(--surface);
}

.pull-input::placeholder {
    color: var(--text-hint);
}

.pull-input:disabled {
    opacity: .6;
}

.pull-input + .pull-value + .pull-input,
.pull-input--sub {
    margin-top: 4px;
}

.pull-input--num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pull-value {
    display: block;
}

/* Wert für das Blatt; am Bildschirm steht an seiner Stelle das Eingabefeld.
   Muss NACH .pull-value stehen und spezifischer sein – sonst gewinnt
   display:block und der Wert erscheint doppelt unter dem Eingabefeld. */
.pull-value.pull-value--print,
.pull-checkbox.pull-value--print {
    display: none;
}

/* Fehlender Wert ohne Eingabefeld: am Bildschirm ein Strich, im Druck eine
   Schreiblinie (siehe @media print). */
.pull-blank:not(.pull-value--print)::before {
    content: "–";
    color: var(--text-hint);
}

.pull-end-link {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
    color: var(--primary-dark);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
    text-underline-offset: 2px;
}

.pull-row-error td {
    padding-top: 0;
    font-size: .76rem;
    color: var(--status-decomm);
    background: var(--status-decomm-bg);
}

.pull-cable-tag {
    display: block;
    font-weight: 600;
}

.pull-cable-number {
    display: block;
    font-size: .74rem;
    color: var(--text-secondary);
}

.pull-list-footer {
    margin: 22px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: .72rem;
    color: var(--text-secondary);
}

@media print {
    /* Die App-Hülle gehört nicht aufs Blatt. */
    .app-top,
    .topbar,
    .bottom-navbar,
    .fab,
    .toast-host,
    .demo-banner,
    .next-step-bar,
    .subscription-warning-banner,
    .subscription-info-banner,
    .private-hint-banner,
    .pull-list-actions,
    #blazor-error-ui {
        display: none !important;
    }

    /* Die Hülle begrenzt die Höhe und scrollt – beim Druck würde davon nur die
       erste Bildschirmseite erscheinen. */
    html, body,
    .app-wrapper,
    .page-content {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #fff !important;
    }

    /* Die Inhaltsspalte ist am Bildschirm auf 720 px begrenzt. Auf dem Blatt
       blieb die Liste deshalb so schmal wie im Browserfenster, und die breite
       Tabelle bekam im Druck einen Scrollbalken statt der vollen Seitenbreite. */
    .app-wrapper .page-content {
        max-width: none !important;
        width: auto !important;
    }

    .pull-list-page {
        padding: 0 !important;
    }

    /* Titel und Projekt aufs Blatt: Die Handy-Regel (max-width: 760px) blendet sie
       aus, und Chrome wendet sie beim Drucken auf schmalem Papier/Fenster mit an. */
    .pull-list-title,
    .pull-list-subtitle {
        display: block !important;
    }

    /* Die Hülle ist am Bildschirm eine Flex-Spalte mit min-height: 100dvh.
       Flex-Container werden beim Seitenumbruch nicht in jedem Browser sauber
       geteilt; als Block fließt der Inhalt einfach weiter. */
    .app-wrapper {
        display: block !important;
        min-height: 0 !important;
    }

    .pull-list-hint,
    .pull-input,
    .pull-check-input,
    .pull-value--screen,
    .pull-row-error {
        display: none !important;
    }

    .pull-value--print {
        display: block !important;
    }
    .pull-checkbox.pull-value--print {
        display: inline-block !important;
    }

    .pull-row--pulled td {
        background: none !important;
    }

    .pull-list-table--edit {
        min-width: 0 !important;
    }

    /* Schreiblinie für fehlende Angaben: auf der Baustelle wird von Hand
       ergänzt und danach in der App nachgetragen. */
    .pull-blank {
        min-height: 5mm;
        border-bottom: 0.5px solid #777;
    }
    .pull-blank::before {
        content: none !important;
    }
    .pull-value + .pull-value.pull-blank,
    .pull-value.pull-blank + .pull-value {
        margin-top: 1.5mm;
    }

    /* Gruppenkopf: Bei Gruppen mit Kabeln steht er im <thead> und wiederholt sich
       auf jeder Folgeseite, der Bildschirm-Kopf entfällt. Leere Kabelbäume haben
       keine Tabelle und behalten ihn. */
    .pull-list-group--rows > .pull-list-group-head {
        display: none !important;
    }

    .pull-list-group-head {
        break-after: avoid;
    }

    .pull-list-group {
        margin-top: 6mm;
    }

    .pull-print-group-row {
        display: table-row !important;
    }

    .pull-list-table .pull-print-group-row th {
        text-align: left;
        text-transform: none;
        letter-spacing: 0;
        font-size: 9.5pt;
        padding: 0 0 2mm !important;
        border-bottom: none !important;
    }

    .pull-print-group-title {
        font-weight: 600;
        margin-right: 3mm;
    }

    .pull-print-group-meta {
        font-weight: 400;
        margin-right: 3mm;
        color: #444 !important;
    }

    /* Die erste Kabelzeile nicht vom Tabellenkopf trennen – sonst stünde
       unten auf der Seite ein Kopf ohne Zeile. */
    .pull-list-table tbody tr:first-child {
        break-before: avoid;
    }

    /* Auf Papier gibt es kein seitliches Scrollen: die Tabelle muss auf die
       Blattbreite passen und dafür umbrechen. */
    .pull-list-table-wrap {
        overflow: visible !important;
    }

    .pull-list-table {
        table-layout: fixed;
        width: 100% !important;
    }

    .pull-list-table th,
    .pull-list-table td {
        white-space: normal !important;
        overflow-wrap: anywhere;
        padding: 4px 5px !important;
    }

    /* Spaltenbreiten für A4 quer (≈ 273 mm Satzbreite) über <col>. Von/Nach
       haben keine feste Breite und teilen sich den Rest – dort stehen die
       langen Kennzeichen. Alle Spalten erscheinen immer, damit fehlende Werte
       von Hand eingetragen werden können. */
    .pull-w-check  { width: 9mm; }
    .pull-w-cable  { width: 30mm; }
    .pull-w-type   { width: 34mm; }
    .pull-w-num    { width: 15mm; }
    .pull-w-laying { width: 40mm; }

    /* Rahmen, Schatten und Rundungen kosten auf Papier nur Toner. */
    .pull-list-sheet {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    .pull-list-table {
        font-size: 8.5pt;
    }

    .pull-list-table th,
    .pull-list-table td {
        color: #000 !important;
        border-color: #999 !important;
    }

    /* Kopfzeile auf jeder Folgeseite wiederholen. */
    .pull-list-table thead {
        display: table-header-group;
    }

    .pull-list-table tr {
        break-inside: avoid;
    }

    @page {
        size: A4 landscape;
        margin: 12mm;
    }
}

/* Aktionszeile unter der Sichtenauswahl eines Stands. Rechtsbündig, damit sie
   die Reiter nicht optisch verlängert. */
.stand-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 0 16px 4px;
}

/* ══════════════════════════════════════════════════════
   STROMLAUFPLAN (CircuitDiagramPage)
   Die Blätter sind SVG in Millimetern mit eigenem Stil (weißes Papier, auch
   im Dunkelmodus). Am Bildschirm füllen sie die Breite, im Druck liegt jedes
   Blatt auf einer eigenen Seite – Format siehe <style> in der Seite.
   ══════════════════════════════════════════════════════ */

.cdg-page {
    padding: 12px 16px 32px;
}



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

.cdg-format {
    display: inline-flex;
    padding: 3px;
    border: 0.5px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
}

.cdg-format-btn {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
}

.cdg-format-btn.active {
    background: var(--primary);
    color: #fff;
}

.cdg-summary {
    margin: 0 0 10px;
    font-size: .82rem;
    color: var(--text-secondary);
}

.cdg-hint {
    margin: 0 0 12px;
    font-size: .82rem;
    color: var(--text-secondary);
}

.cdg-findings {
    margin-bottom: 14px;
    padding: 10px 14px;
    border: 0.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: .84rem;
}

.cdg-findings summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
}

.cdg-findings ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.cdg-findings li {
    margin-bottom: 4px;
    color: var(--text-primary);
}

.cdg-finding--warn strong {
    color: var(--status-decomm);
}

.cdg-findings-note {
    margin: 6px 0 0;
    font-size: .76rem;
    color: var(--text-secondary);
}

.cdg-sheets {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Das Blatt bleibt weiß: Es ist ein Ausdruck, kein Teil der Oberfläche. */
.cdg-sheet {
    background: #fff;
    border: 0.5px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.cdg-sheet svg {
    display: block;
    width: 100%;
    height: auto;
}

/* Sprungmarke: Platz für die Kopfleiste der App über dem Zielblatt. */
.cdg-sheet {
    scroll-margin-top: 72px;
}

/* „← zurück zu Blatt n" nach einem Sprung über einen Querverweis. */
.cdg-back {
    position: fixed;
    right: 16px;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    z-index: 60;
    padding: 9px 14px;
    border: none;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: .84rem;
    font-weight: 600;
    cursor: pointer;
}

/* Die Inhaltsspalte ist am Bildschirm schmal begrenzt – ein Plan braucht Breite. */
.app-wrapper .page-content:has(.cdg-page) {
    max-width: 1400px;
}

@media print {
    .cdg-actions,
    .cdg-back,
    .cdg-summary,
    .cdg-hint,
    .cdg-findings {
        display: none !important;
    }

    .cdg-page {
        padding: 0 !important;
    }

    .cdg-sheets {
        display: block;
    }

    .cdg-sheet {
        border: none;
        border-radius: 0;
        break-after: page;
        break-inside: avoid;
    }

    .cdg-sheet:last-child {
        break-after: auto;
    }

    /* Knapp unter Blattgröße, damit Rundung keine leere Folgeseite erzeugt. */
    .cdg-page--a4 .cdg-sheet svg { width: 296mm; height: 209mm; }
    .cdg-page--a3 .cdg-sheet svg { width: 419mm; height: 296mm; }

    /* Safari (WebKit, auch jeder Browser auf iOS) übergeht @page: Hochformat und
       eigene Ränder, das Blatt in Originalgröße liefe rechts oder unten über –
       jede zweite Seite wäre leer. Dort deshalb an die Breite des Druckbereichs
       anpassen. Über etwa 87 % der Breite fügt WebKit im Querformat trotzdem
       Leerseiten ein (gemessen, unabhängig von Fenster und Rändern), daher 84 %.
       font: -apple-system-body versteht nur WebKit. */
    @supports (font: -apple-system-body) {
        .cdg-page .cdg-sheet svg {
            width: 84%;
            height: auto;
            margin: 0 auto;
        }
    }
}


/* ══════════════════════════════════════════════════════
   ADMIN – FREISCHALTUNGEN
   Baut auf den Konto-Karten auf (.settings-*), damit die Seite wie der Rest
   der App aussieht. Eigenes nur für Liste, Rechnung und Bestätigung.
   ══════════════════════════════════════════════════════ */

.admin-error {
    margin: 16px;
}

.admin-value-wrap {
    overflow-wrap: anywhere;
}

.admin-muted {
    color: var(--text-hint);
}

.admin-status {
    align-self: flex-start;
    font-size: .78rem;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
}

.admin-status--pending { background: var(--status-warn-bg);   color: var(--status-warn); }
.admin-status--active  { background: var(--status-active-bg); color: var(--status-active); }
.admin-status--suspended,
.admin-status--cancelled { background: var(--status-decomm-bg); color: var(--status-decomm); }

/* Zeilen, die weiterführen – settings-row--action färbt beim Überfahren rot,
   weil sie sonst nur für „Konto löschen" genutzt wird. */
.admin-request-row,
.admin-link-row {
    text-decoration: none;
    color: inherit;
}

.admin-request-row:hover,
.admin-link-row:hover {
    background: var(--bg-card-hover);
}

.admin-request-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.admin-request-name {
    font-weight: 600;
    color: var(--text-primary);
}

.admin-request-meta {
    font-size: .8rem;
    color: var(--text-secondary);
}

.admin-request-warn {
    font-size: .78rem;
    font-weight: 500;
    color: var(--status-warn);
}

.admin-invoice {
    padding: 12px var(--card-gutter);
}

.admin-invoice .settings-label {
    display: block;
    margin-bottom: 6px;
}

.admin-invoice-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .85rem;
    padding: 3px 0;
    color: var(--text-primary);
}

.admin-invoice-row span:last-child {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.admin-invoice-sum {
    margin-top: 4px;
    padding-top: 6px;
    border-top: 1px solid var(--border);
}

.admin-address {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 12px var(--card-gutter);
    font-size: .9rem;
    color: var(--text-primary);
}

.admin-card-status {
    margin: 12px var(--card-gutter) 0;
}

.admin-card-hint {
    padding: 0 var(--card-gutter) 12px;
}

.admin-actions {
    padding: 4px 16px 32px;
}

.admin-confirm {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.admin-confirm p {
    margin: 0 0 12px;
    font-size: .9rem;
    line-height: 1.45;
}


/* ══════════════════════════════════════════════════════
   ADMIN – KUNDEN, RABATTCODES, ABRECHNUNG
   Ergänzt den Block oben; gleiche Karten (.settings-*), eigene Bausteine nur
   für Filter, Rückfragen, Formulare und die Abrechnungsliste.
   ══════════════════════════════════════════════════════ */

.admin-page {
    padding-bottom: 32px;
}

.admin-error--inline {
    margin: 0;
}

.admin-link {
    color: var(--primary-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    overflow-wrap: anywhere;
}

/* Kein Paket / Privat-Version: grau (Basis), gesperrt und gekündigt: rot (oben). */
.admin-status--none { background: var(--status-inactive-bg); color: var(--status-inactive); }
.admin-status--trial { background: var(--status-planned-bg); color: var(--status-planned); }

/* Suche und Filter über der Liste. */
.admin-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-search {
    width: 100%;
}

.admin-filter,
.admin-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-chip {
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: .82rem;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.admin-chip:hover {
    background: var(--bg-card-hover);
}

.admin-chip--active,
.admin-chip--active:hover {
    background: var(--primary-ghost);
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* Zeilenende: Status-Abzeichen und Pfeil. */
.admin-row-end {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-request-note {
    font-size: .78rem;
    font-weight: 500;
    color: var(--status-warn);
}

/* Eine Rabattcode-Zeile ist ein <button> – Standardoptik zurücknehmen. */
.admin-code-row {
    width: 100%;
    border: none;
    background: none;
    font: inherit;
    text-align: left;
}

.admin-code-name {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: .5px;
}

.admin-code-input {
    text-transform: uppercase;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    letter-spacing: .5px;
}

.admin-code-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px var(--card-gutter, 16px) 14px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}

.admin-code-detail .settings-label {
    padding-top: 10px;
}

/* Rückfrage vor einer Aktion – zweite Stufe. */
.admin-confirm-text p {
    margin: 0 0 12px;
    font-size: .9rem;
    line-height: 1.45;
}

.admin-confirm--danger {
    border-color: var(--status-decomm);
    background: var(--status-decomm-bg);
}

.admin-confirm--danger .form-control {
    background: var(--surface);
}

.admin-confirm .form-actions {
    margin-top: 6px;
}

.admin-confirm .form-actions .btn {
    flex: 1;
}

.admin-notice {
    margin: 0;
}

/* Aktionsknöpfe untereinander, am Telefon volle Breite. */
.admin-action-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-action-list .btn {
    width: 100%;
    text-decoration: none;
}

@media (min-width: 640px) {
    .admin-action-list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .admin-action-list .btn {
        width: auto;
    }
}

.admin-actions--tight {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-export-hint {
    margin: 0;
}

.admin-card-actions {
    padding: 0 var(--card-gutter, 16px) 14px;
}

.admin-card-actions--flush {
    padding: 8px 0 0;
}

.admin-card-confirm {
    padding: 0 12px 12px;
}

.admin-form {
    padding: 14px var(--card-gutter, 16px) 16px;
}

.admin-form .admin-switch {
    margin-bottom: 14px;
}

.admin-discount-card .settings-row {
    flex-direction: column;
}

/* Mitglieder. */
.admin-member-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.admin-badge {
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    background: var(--status-inactive-bg);
    color: var(--status-inactive);
    font-size: .72rem;
    font-weight: 500;
    white-space: nowrap;
}

.admin-badge--admin { background: var(--primary); color: #FFFFFF; }
.admin-badge--planner { background: var(--primary-ghost); color: var(--primary-dark); }

/* Protokoll. */
.admin-audit-row {
    gap: 2px;
}

.admin-audit-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: .88rem;
}

.admin-audit-head .admin-muted {
    font-size: .78rem;
    white-space: nowrap;
}

.admin-more {
    padding: 8px 16px;
    text-align: center;
}

/* Abrechnungsliste. */
.admin-range {
    margin-top: 2px;
}

.admin-bill-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: .85rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.admin-bill-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
}

.admin-bill-row--selected {
    background: var(--primary-ghost);
}

.admin-bill-check,
.admin-bill-head input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.admin-bill-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.admin-bill-sum {
    background: var(--bg);
}

.admin-period-text {
    margin: 2px 0 4px;
}

/* ── Vorlagenordner (Vorlagenseite, Geräte- und Kabelauswahl) ─────────── */
.template-folder-head {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font: inherit;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.template-folder-head--open {
    background: var(--primary-ghost);
    border-color: var(--primary-light);
}

.template-folder-chevron {
    width: 12px;
    color: var(--text-secondary);
}

.template-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    color: var(--primary-dark);
}

.template-folder-star {
    color: #D4A017;
    font-size: 16px;
    line-height: 1;
}

.template-folder-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-folder-count {
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    text-align: center;
}

/* ══════════════════════════════════════════════════════
   DESIGN 2 „GEFÜHRT" (plan-design-2-gefuehrt.md, STYLEGUIDE §6/§7)
   Leisten mit ⓘ und zweiter Zeile · 4 Tabs mit Zähler · „Nächster
   Schritt" · Pillen-FAB · Startseite Heute · Stand-Übersicht · Kabel-
   Assistent. Text und Knöpfe mit Text auf/in Teal: #0F6E56 (--primary-dark);
   #1D9E75 nur für Flächen, Balken, Ränder, Punkte (Kontrast 3,3:1 auf Weiß).
   ══════════════════════════════════════════════════════ */

.app-wrapper {
    --screen-bg:   #FAFAF7;
    --info-bg:     #E6F1FB;
    --info-text:   #123F6E;
    --next-bg:     #E1F5EE;
    --next-border: #9FE1CB;
    --next-text:   #085041;
    --badge-red:   #A32D2D;
    --nav-height:  72px;
    background: var(--screen-bg);
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Kontrast: Knöpfe mit Text und aktive Segmente in #0F6E56.
   Auch Anmeldung, Demo-Start und AGB (.auth-layout / .legal-layout) – dorthin führen
   die Knöpfe der öffentlichen Seiten (seit 14.11.2026). */
.app-wrapper .btn-primary,
.app-wrapper .btn-primary:disabled,
.auth-layout .btn-primary,
.auth-layout .btn-primary:disabled,
.legal-layout .btn-primary,
.legal-layout .btn-primary:disabled,
.wizard .btn-primary { background-color: var(--primary-dark); box-shadow: none; }
.app-wrapper .btn-primary:hover,
.auth-layout .btn-primary:hover,
.legal-layout .btn-primary:hover,
.wizard .btn-primary:hover { background-color: var(--primary-darker); box-shadow: none; }
/* login-required-star und login-checkbox-label stehen auch in der App – dort unverändert. */
.auth-layout .login-required-star,
.auth-layout .login-checkbox-label a { color: var(--primary-dark); }
.auth-layout .login-checkbox-label a:hover { color: var(--primary-darker); }
.app-wrapper .view-toggle-btn.active { background: var(--primary-dark); }
.app-wrapper .topbar-btn,
.wizard .topbar-btn { color: var(--primary-dark); }

/* ── Obere Leiste: Titel + ⓘ, zweite Zeile ───────────── */
.app-wrapper .topbar { height: 56px; }

.topbar-center {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 0 4px;
}

.topbar-titleline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    max-width: 100%;
    min-width: 0;
}

.app-wrapper .topbar-center .topbar-title,
.wizard .topbar-title {
    flex: 0 1 auto;
    min-width: 0;
    padding: 0;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-help {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 0;
    border-radius: 14px;
    background: none;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
}

.topbar-help svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; }
.topbar-help:focus-visible { outline: 2px solid var(--primary); }

.topbar-subtitle {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.2;
    color: var(--text-secondary);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

a.topbar-subtitle:hover { color: var(--primary-dark); }

/* Bearbeiten aktiv: Leiste hellgrün, rechts „✓ Fertig", darunter ein Satz */
.app-wrapper .topbar--editing { background: var(--next-bg); border-bottom-color: var(--next-border); }
.app-wrapper .topbar--editing .topbar-btn--editing {
    background: var(--primary-dark);
    color: #fff;
    padding: 0 12px;
    height: 36px;
}
.topbar-edit-hint {
    padding: 8px 14px;
    font-size: 12px;
    color: var(--primary-dark);
    background: var(--next-bg);
    border-bottom: 0.5px solid var(--next-border);
    text-align: center;
}

/* ⓘ-Sheet */
.help-sheet-text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-primary); }

@media (min-width: 640px) {
    .help-sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 20vh;
        transform: translateX(-50%);
        width: min(440px, calc(100vw - 32px));
        border-radius: var(--radius-md);
        border: 0.5px solid var(--border);
        animation: none;
    }
    .help-sheet .sheet-handle { display: none; }
}

/* ── Untere Leiste: 4 Tabs (Monteur 3), Pille, Zähler ─── */
.app-wrapper .bottom-navbar { padding: 8px 4px calc(12px + env(safe-area-inset-bottom, 0px)); }

.app-wrapper .bottom-nav-item {
    gap: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
}

.app-wrapper .bottom-nav-item.active { color: var(--primary-dark); }

.app-wrapper .bottom-nav-icon {
    position: relative;
    width: 56px;
    height: 30px;
    border-radius: 15px;
}

.app-wrapper .bottom-nav-item.active .bottom-nav-icon { background: var(--primary-ghost); }

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    left: 30px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--badge-red);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--surface);
}

/* ── „Nächster Schritt" über der Navigation ──────────── */
.next-step-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    z-index: 105;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 6px 0 14px;
    background: var(--next-bg);
    border-top: 0.5px solid var(--next-border);
    color: var(--next-text);
    font-size: 13px;
}

.next-step-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    color: inherit;
    text-decoration: none;
}

.next-step-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.next-step-link b { font-weight: 500; }
.next-step-link svg,
.next-step-close svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

.next-step-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.app-wrapper--next-step .page-content { padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }

/* ── Aktionsknopf als Pille mit Wort ─────────────────── */
.app-wrapper .fab {
    width: auto;
    height: 48px;
    padding: 0 18px 0 14px;
    border-radius: 24px;
    gap: 6px;
    background: var(--primary-dark);
    font-size: 15px;
    font-weight: 500;
}

.app-wrapper .fab svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.app-wrapper .fab:active { background: var(--primary-darker); }
.app-wrapper .fab--raised { bottom: calc(132px + env(safe-area-inset-bottom, 0px)); }

.fab-hint {
    position: fixed;
    right: 16px;
    bottom: calc(146px + env(safe-area-inset-bottom, 0px));
    z-index: 111;
    max-width: 230px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    padding: 8px 6px 8px 12px;
    border-radius: 10px;
    background: #1A1A1A;
    color: #fff;
    font-size: 13px;
    line-height: 1.35;
}

.app-wrapper--next-step .fab-hint { bottom: calc(188px + env(safe-area-inset-bottom, 0px)); }

.fab-hint-close {
    border: 0;
    background: none;
    color: #fff;
    padding: 2px;
    cursor: pointer;
    display: inline-flex;
}

.fab-hint-close svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ── Startseite „Heute" (B1) ─────────────────────────── */
.today { display: flex; flex-direction: column; gap: 14px; }
.today-head { display: flex; flex-direction: column; gap: 4px; }
.today-h1 { margin: 0; font-size: 22px; font-weight: 500; color: var(--text-primary); }
.today-lead { margin: 0; font-size: 14px; color: var(--text-secondary); }
.today-h2 { margin: 6px 0 -4px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.today-meta { font-size: 12px; color: var(--text-secondary); }

.today-card {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.today-checklist-head { padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 8px; }
.today-checklist-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.today-checklist-title b { font-size: 15px; font-weight: 500; }

.today-bar { height: 6px; border-radius: 3px; background: var(--border-tertiary); overflow: hidden; }
.today-bar span { display: block; height: 100%; background: var(--primary); border-radius: 3px; }

.today-step {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 14px;
    border-top: 0.5px solid var(--border-tertiary);
}

.today-step--next { background: #F3FAF6; }

.today-step-mark {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 14px;
    border: 1.5px solid #D6D5CD;
    color: var(--text-hint);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

.today-step--next .today-step-mark { border: 2px solid var(--primary-dark); color: var(--primary-dark); font-weight: 600; }
.today-step--done .today-step-mark { border: 0; background: var(--primary); color: #fff; }
.today-step-mark svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.25; stroke-linecap: round; stroke-linejoin: round; }

.today-step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.today-step-title { font-size: 14px; color: var(--text-primary); }
.today-step--next .today-step-title { font-weight: 500; }
.today-step--done .today-step-title { color: var(--text-secondary); text-decoration: line-through; }

.app-wrapper .today-step-btn { flex: 0 0 auto; height: 34px; padding: 0 14px; font-size: 13px; text-decoration: none; color: #fff; }

.today-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
}

.today-item + .today-item { border-top: 0.5px solid var(--border-tertiary); }
.today-item:hover { background: var(--bg-card-hover); }
.today-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.today-item-text b { font-size: 14px; font-weight: 500; }

.today-item-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-ghost);
    color: var(--primary-dark);
}

.today-item-icon--meldungen { background: var(--status-warn-bg); color: var(--status-warn); }
.today-item-icon--verlauf { background: var(--info-bg); color: #185FA5; }
.today-item-icon svg,
.today-chevron { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.today-chevron { color: var(--text-hint); flex-shrink: 0; }

.today-empty p { margin: 0; padding: 16px 14px; font-size: 14px; color: var(--text-secondary); }

/* ── Stand-Übersicht als Kacheln (B5) ────────────────── */
.stand-overview { display: flex; flex-direction: column; gap: 10px; }
.stand-overview-head { font-size: 13px; color: var(--text-secondary); }
.stand-overview-head b { color: var(--text-primary); font-weight: 500; }

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

@media (min-width: 640px) {
    .stand-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.stand-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 104px;
    padding: 12px;
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    color: inherit;
    text-decoration: none;
}

.stand-tile:hover { border-color: var(--primary-light); }
.stand-tile:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.stand-tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.stand-tile-icon { width: 20px; height: 20px; fill: none; stroke: var(--primary-dark); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.stand-tile-count { padding: 1px 8px; border-radius: 10px; background: var(--surface-2); color: var(--text-secondary); font-size: 12px; }
.stand-tile-count--warn { background: var(--status-warn-bg); color: var(--status-warn); }
.stand-tile-title { font-size: 15px; font-weight: 500; }
.stand-tile-text { font-size: 12px; line-height: 1.35; color: var(--text-secondary); }

/* Kabel ohne Adern (W017 im Design) */
.cable-cores-missing { font-size: 12px; color: var(--status-warn); margin-right: auto; }

/* ── Kabel-Assistent (C4–C6) ─────────────────────────── */
.wizard-backdrop {
    position: fixed;
    inset: 0;
    z-index: 440;
    background: rgba(0,0,0,.4);
}

.wizard {
    position: fixed;
    inset: 0;
    z-index: 450;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    color: var(--text-primary);
}

@media (min-width: 720px) {
    .wizard {
        inset: 4vh auto 4vh 50%;
        transform: translateX(-50%);
        width: min(640px, calc(100vw - 32px));
        border-radius: var(--radius-md);
        border: 0.5px solid var(--border);
        overflow: hidden;
    }
}

.wizard-top {
    height: 56px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 8px;
    border-bottom: 0.5px solid var(--border-tertiary);
}

.wizard-top .topbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border: 0;
    background: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
}

.wizard-top-spacer { min-width: 40px; }

.wizard-steps {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 10px 14px 4px;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0 0 6px;
    border: 0;
    background: none;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.wizard-step:disabled { cursor: default; }
.wizard-step-bar { height: 4px; border-radius: 2px; background: var(--border-tertiary); }
.wizard-step--done .wizard-step-bar { background: var(--primary); }
.wizard-step--current .wizard-step-bar { background: var(--primary-dark); }
.wizard-step-label { font-size: 11px; color: var(--text-hint); }
.wizard-step--done .wizard-step-label { color: var(--primary-dark); }
.wizard-step--current .wizard-step-label { color: var(--text-primary); font-weight: 500; }

.wizard-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wizard-h1 { margin: 4px 0 0; font-size: 20px; font-weight: 500; }
.wizard-lead { margin: -4px 0 0; font-size: 14px; line-height: 1.45; color: var(--text-secondary); }
.wizard-fields { display: flex; flex-direction: column; gap: 4px; }
.wizard-manual-toggle { align-self: flex-start; color: var(--primary-dark); }
.wizard-templates { max-height: none; }
.template-picker-item--chosen { background: #F3FAF6; box-shadow: inset 3px 0 0 var(--primary); }
.template-picker-check { color: var(--primary-dark); font-weight: 600; margin-left: auto; padding: 0 6px; }

.wizard-more { border: 0.5px solid var(--border); border-radius: var(--radius-sm); padding: 0 12px; }
.wizard-more summary { padding: 12px 0; font-size: 14px; font-weight: 500; color: var(--primary-dark); cursor: pointer; }
.wizard-more[open] { padding-bottom: 12px; }

.wizard-summary {
    background: var(--surface);
    border: 0.5px solid var(--border-strong);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.wizard-kv {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 8px 14px;
    font-size: 14px;
}

.wizard-kv + .wizard-kv { border-top: 0.5px solid var(--border-tertiary); }
.wizard-kv > span:first-child { color: var(--text-secondary); }
.wizard-kv b { font-weight: 500; text-align: right; }
.wizard-kv .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.wizard-swatches { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

.wizard-warning {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--status-warn-bg);
    color: var(--status-warn);
    font-size: 13px;
    line-height: 1.4;
}

.wizard-warning svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.wizard-again { margin-top: 4px; }

.wizard-actions {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    border-top: 0.5px solid var(--border-tertiary);
    background: var(--surface);
}

.wizard-actions .btn { height: 46px; }

/* Nachfrage und ⓘ über dem Assistenten */
.wizard-layer-backdrop { z-index: 460; }
.bottom-sheet.wizard-layer-sheet { z-index: 470; }

/* A2 Konto anlegen: Hinweis Privat-Version / Monteure im Paket */
.login-info {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: #E6F1FB;
    color: #123F6E;
    font-size: 13px;
    line-height: 1.45;
}

/* Design 2: Zweitknöpfe in Assistent und Sheets mit Teal-Text (Design C4–C6) */
.wizard-actions .btn-secondary,
.app-wrapper .form-actions .btn-secondary { background: var(--surface); color: var(--primary-dark); border: 1px solid var(--border-strong); }
/* Im Assistenten wachsen Knöpfe nicht in die Höhe (.btn hat flex: 1) */
.wizard-body .btn { flex: 0 0 auto; }

/* ============================================================
   EINHEITLICHER RAHMEN DER STAND-UNTERSEITEN (06.11.2026)
   Bereichs-Leiste, kompakte Aktionszeile, „Gehe zu"-Sheet,
   Zugliste als Karten am Handy.
   ============================================================ */

/* Bereichs-Leiste: neun Einträge. Am Handy schiebt NUR die Leiste seitlich
   (der aktive Eintrag wird mittig eingeblendet), die Seite selbst nie. Ein
   weicher Rand rechts zeigt, dass es weitergeht. Ersetzt das frühere 3×2-Raster. */
.view-toggle--stand {
    display: flex;
    overflow-x: auto;
    max-width: 100%;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
            mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent);
}

.view-toggle--stand .view-toggle-btn {
    flex: 0 0 auto;
    min-height: 36px;
    padding: 7px 12px;
}

@media (min-width: 900px) {
    .view-toggle--stand {
        -webkit-mask-image: none;
                mask-image: none;
    }
    .view-toggle--stand .view-toggle-btn {
        flex: 1 0 auto;
    }
}

@media (max-width: 560px) {
    /* Altes 3×2-Raster aufheben (stand weiter oben in der Datei). */
    .view-toggle--stand {
        display: flex;
        overflow-x: auto;
    }
    .view-toggle--stand .view-toggle-btn {
        min-height: 36px;
        padding: 7px 12px;
    }
}

/* Kompakte Aktionszeile unter der Bereichs-Leiste (Zugliste, Stromlaufplan). */
.page-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.btn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0.5px solid var(--border);
    border-radius: 18px;
    background: var(--surface);
    color: #0F6E56;
    font: inherit;
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
}

.btn-chip svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-chip--primary {
    background: #0F6E56;
    border-color: #0F6E56;
    color: #fff;
}

.btn-chip:disabled {
    opacity: .5;
    cursor: default;
}

/* „Gehe zu" an der zweiten Titelzeile. */
.topbar-subtitle--btn {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.up-sheet-list {
    display: flex;
    flex-direction: column;
    margin: 4px 0 8px;
}

.up-sheet-link {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 4px;
    border-bottom: 0.5px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
}

.up-sheet-link:last-child {
    border-bottom: 0;
}

.up-sheet-label {
    font-size: .9375rem;
    font-weight: 500;
    color: #0F6E56;
}

.up-sheet-hint {
    font-size: .8125rem;
    color: var(--text-secondary);
}

/* Zugliste: Karten am Handy, Tabelle am Rechner und im Druck. */
.pull-cards,
.pull-only-narrow {
    display: none;
}

@media (max-width: 760px) {
    .pull-list-table-wrap,
    .pull-only-wide {
        display: none;
    }
    /* Titel und Projekt stehen schon in der oberen Leiste – am Handy nur die
       Zahlen in einer Zeile, ohne Blatt-Rahmen um die Karten. */
    .pull-list-sheet {
        background: none;
        border: 0;
        box-shadow: none;
        padding: 0;
    }
    .pull-list-title,
    .pull-list-subtitle {
        display: none;
    }
    .pull-list-head {
        padding-bottom: 8px;
    }
    .pull-list-meta {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 2px 12px;
    }
    .pull-list-group {
        margin-top: 16px;
    }
    .pull-only-narrow {
        display: block;
    }
    .pull-cards {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0 0 12px;
    }
}

.pull-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius-md);
}

.pull-card--pulled {
    background: #F3FAF6;
    border-color: #9FE1CB;
}

.pull-card-check {
    width: 22px;
    height: 22px;
    margin: 2px 0 0;
    accent-color: #0F6E56;
    flex-shrink: 0;
}

.pull-card-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    text-align: left;
    color: var(--text-primary);
}

button.pull-card-body {
    cursor: pointer;
}

.pull-card-top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.pull-card-tag {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 600;
    font-size: .9375rem;
}

.pull-card-type {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8125rem;
    color: var(--text-secondary);
}

.pull-card-len {
    font-size: .8125rem;
    font-variant-numeric: tabular-nums;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.pull-card-route {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8125rem;
    overflow-wrap: anywhere;
}

.pull-card-pulled {
    font-size: .75rem;
    color: #0F6E56;
}

.pull-card-error {
    margin: -4px 0 0;
    padding: 6px 12px;
    font-size: .8125rem;
    color: #A32D2D;
}

.pull-sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.pull-sheet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    font-size: .75rem;
    color: var(--text-secondary);
}

.pull-sheet-field--wide {
    grid-column: 1 / -1;
}

.pull-sheet-field .pull-input {
    width: 100%;
    box-sizing: border-box;
}

.pull-sheet-field .pull-end-link {
    font-size: .875rem;
}

.sheet-hint {
    margin: 0 0 10px;
    font-size: .75rem;
    color: var(--text-secondary);
}

@media print {
    .view-toggle--stand,
    .page-actions,
    .pull-cards,
    .pull-only-narrow,
    .pull-sheet,
    .up-sheet {
        display: none !important;
    }
    .pull-list-table-wrap {
        display: block !important;
    }
}

/* Kabelkarte nach Design C1 (06.11.2026). */
.cable-card-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.cable-card-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8125rem;
    color: var(--text-secondary);
}

.cable-card-status {
    margin-left: auto;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 10px;
    background: #F1EFE8;
    color: #5F5E5A;
    font-size: .6875rem;
    font-weight: 500;
}

.cable-card-status--planned {
    background: #E1F5EE;
    color: #0F6E56;
}

.cable-card-status--active,
.cable-card-status--installed {
    background: #E6F1FB;
    color: #185FA5;
}

.cable-card-status--decommissioned {
    background: #FCEBEB;
    color: #A32D2D;
}

.cable-card-route {
    display: block;
    margin-top: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .8125rem;
    color: var(--text-primary);
    overflow-wrap: anywhere;
}

.cable-card-cores {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.cable-card-cores .core-swatch {
    width: 14px;
    height: 14px;
    border-radius: 7px;
}

/* Kabelbaum-Chip in der Kabelkarte nicht über die ganze Breite ziehen. */
.cable-header-info .harness-chip {
    align-self: flex-start;
    margin-top: 4px;
}
