/* OMNIPULSE-Startseite. Alles unter .om-dash, das übrige Panel bleibt unberührt. */

.om-dash {
    --om-surface: #ffffff;
    --om-hover: rgba(64, 69, 77, 0.05);
    --om-line: rgba(64, 69, 77, 0.16);
    --om-ink: #23262b;
    --om-muted: #5b616b;
    --om-data: #256b85;
    --om-data-soft: rgba(37, 107, 133, 0.14);
    --om-track: rgba(64, 69, 77, 0.08);
    --om-step-1: #c3dfe9;
    --om-step-2: #86bdd1;
    --om-step-3: #448eaa;
    --om-step-4: #256b85;
    --om-up: #2f7a45;
    --om-down: #c93a31;
    --om-accent: #7a5a0e;
    --om-accent-soft: #fdf4dc;
    --om-alert: #c93a31;
    --om-focus: #b8861a;
    color: var(--om-ink);
    font-variant-numeric: tabular-nums;
}

.dark .om-dash {
    --om-surface: rgba(255, 255, 255, 0.045);
    --om-hover: rgba(255, 255, 255, 0.05);
    --om-line: rgba(255, 255, 255, 0.11);
    --om-ink: #f4f5f6;
    --om-muted: #c5c9cf;
    --om-data: #6db2cc;
    --om-data-soft: rgba(109, 178, 204, 0.18);
    --om-track: rgba(255, 255, 255, 0.07);
    --om-step-1: #2f5563;
    --om-step-2: #437a8e;
    --om-step-3: #5a9ab2;
    --om-step-4: #8cc6da;
    --om-up: #84d298;
    --om-down: #ff9b92;
    --om-accent: #f5c754;
    --om-accent-soft: rgba(245, 199, 84, 0.15);
    --om-alert: #ff9b92;
    --om-focus: #f5c754;
}

/* :where hält die Spezifität bei null, damit die Klassen unten gewinnen. */
:where(.om-dash) a {
    color: inherit;
    text-decoration: none;
}

.om-dash a:focus-visible {
    outline: 2px solid var(--om-focus);
    outline-offset: -2px;
    border-radius: 0.5rem;
}

:where(.om-dash) :where(h1, h2, p, ul, ol, dl, dd) {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Begrüßung: kein Kasten, sie trägt die Seite als Überschrift. */
.om-greeting {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-block: 0.25rem;
}

.om-greeting__title {
    font-size: 1.875rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.015em;
}

.om-greeting__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.375rem;
    margin-top: 0.375rem;
    color: var(--om-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.om-greeting__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Kennzahlen: ein Band mit Haarlinien statt Einzelkarten. */
.om-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    overflow: hidden;
    background: var(--om-surface);
    border: 1px solid var(--om-line);
    border-radius: 0.875rem;
}

.om-kpi {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    padding: 1rem 1.125rem 0.875rem;
    box-shadow: 0 0 0 0.5px var(--om-line);
    transition: background-color 150ms ease-out;
}

.om-kpi:hover {
    background: var(--om-hover);
}

.om-kpi__label {
    color: var(--om-muted);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.om-kpi__value {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 600;
    letter-spacing: -0.015em;
    white-space: nowrap;
}

.om-kpi__context {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.125rem 0.375rem;
    color: var(--om-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.om-delta {
    display: inline-flex;
    align-items: center;
    gap: 0.1875rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.om-delta--up {
    color: var(--om-up);
}

.om-delta--down {
    color: var(--om-down);
}

.om-delta--flat {
    color: var(--om-muted);
    font-weight: 500;
}

.om-delta__icon {
    width: 0.875rem;
    height: 0.875rem;
    flex: none;
}

.om-spark {
    display: block;
    margin-top: auto;
    padding-top: 0.5rem;
    box-sizing: content-box;
    overflow: visible;
}

.om-spark__line {
    fill: none;
    stroke: var(--om-data);
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.om-spark__area {
    fill: var(--om-data-soft);
}

.om-spark__hit {
    fill: transparent;
}

.om-spark__hit:hover {
    fill: var(--om-data-soft);
}

/* Gemeinsame Fläche der Abschnitte. */
.om-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--om-surface);
    border: 1px solid var(--om-line);
    border-radius: 0.875rem;
    padding: 1.125rem 1.25rem 1.25rem;
    box-sizing: border-box;
}

.om-panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.875rem;
}

.om-panel__title {
    font-size: 1rem;
    line-height: 1.35;
    font-weight: 600;
}

.om-panel__link {
    color: var(--om-accent);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.om-panel__link:hover {
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.om-panel__note {
    margin-top: auto;
    padding-top: 1.125rem;
    color: var(--om-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.om-empty {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding-block: 0.5rem;
    color: var(--om-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.om-empty__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
    margin-top: 0.0625rem;
    color: var(--om-up);
}

/* Heute dran */
.om-attention {
    display: flex;
    flex-direction: column;
    margin-inline: -0.625rem;
}

.om-attention__row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) 1rem;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    transition: background-color 150ms ease-out;
}

.om-attention__row:hover {
    background: var(--om-hover);
}

.om-attention__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.75rem;
    border-radius: 0.5rem;
    background: var(--om-track);
    font-size: 0.9375rem;
    font-weight: 600;
}

.om-attention__count--urgent {
    background: var(--om-accent-soft);
    color: var(--om-accent);
}

.om-attention__label {
    font-size: 0.9375rem;
    line-height: 1.35;
}

.om-attention__icon {
    width: 1rem;
    height: 1rem;
    color: var(--om-muted);
}

/* Vertriebsstufen */
.om-funnel {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.om-funnel__row {
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(3rem, 1fr) 4.5rem 5.5rem;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.om-funnel__label {
    line-height: 1.3;
}

.om-funnel__track {
    display: block;
    height: 0.625rem;
    border-radius: 0.3125rem;
    background: var(--om-track);
    overflow: hidden;
}

.om-funnel__bar {
    display: block;
    height: 100%;
    border-radius: 0.3125rem;
    background: var(--om-data);
}

.om-funnel__value {
    text-align: right;
    font-weight: 600;
}

.om-funnel__delta {
    text-align: right;
}

/* Werkzeuge */
.om-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
}

.om-tool {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    min-width: 0;
    padding: 1.125rem 1.25rem;
    background: var(--om-surface);
    border: 1px solid var(--om-line);
    border-radius: 0.875rem;
    transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

a.om-tool:hover {
    background: var(--om-hover);
    border-color: var(--om-accent);
}

.om-tool__head {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.om-tool__icon {
    width: 1.375rem;
    height: 1.375rem;
    flex: none;
    color: var(--om-accent);
}

/* Zeichen der Schwester-Apps (Menü und Kacheln): helle und dunkle Fassung, sichtbar je nach Panel-Theme. */
.om-appsign {
    display: block;
    flex: none;
    width: 100%;
    height: 100%;
}

.om-appsign__img {
    display: block;
    width: 100%;
    height: 100%;
}

.om-appsign__img--dark,
.dark .om-appsign__img--light {
    display: none;
}

.dark .om-appsign__img--dark {
    display: block;
}

.om-tool__head .om-appsign {
    width: 1.75rem;
    height: 1.75rem;
}

.om-tool__name {
    font-size: 1rem;
    font-weight: 600;
}

.om-tool__arrow {
    width: 1rem;
    height: 1rem;
    margin-left: auto;
    color: var(--om-muted);
}

.om-tool__text {
    color: var(--om-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.om-tool__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.om-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 4.5rem;
    max-width: 11rem;
}

.om-stat__value {
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 600;
}

.om-stat__value--alert {
    color: var(--om-alert);
}

.om-stat__label {
    color: var(--om-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.om-tool--list {
    gap: 0;
    padding: 0.5rem 0.625rem;
}

.om-toollink {
    display: grid;
    grid-template-columns: 1.25rem auto minmax(0, 1fr) 1rem;
    align-items: center;
    gap: 0.625rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: background-color 150ms ease-out;
}

.om-toollink:hover {
    background: var(--om-hover);
}

.om-toollink__icon,
.om-toollink__arrow {
    width: 1rem;
    height: 1rem;
    color: var(--om-muted);
}

.om-toollink__name {
    font-weight: 500;
    white-space: nowrap;
}

.om-toollink__text {
    color: var(--om-muted);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* PitchPage-Stufen */
.om-pipeline__bar {
    display: flex;
    gap: 2px;
    height: 0.875rem;
    margin-bottom: 1rem;
}

.om-pipeline__segment {
    display: block;
    min-width: 0.375rem;
    flex-basis: 0;
    border-radius: 0.25rem;
}

.om-pipeline__segment--1 {
    background: var(--om-step-1);
}

.om-pipeline__segment--2 {
    background: var(--om-step-2);
}

.om-pipeline__segment--3 {
    background: var(--om-step-3);
}

.om-pipeline__segment--4 {
    background: var(--om-step-4);
}

.om-pipeline__legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(5.5rem, 1fr));
    gap: 0.75rem 1rem;
}

.om-pipeline__item dt {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--om-muted);
    font-size: 0.8125rem;
    line-height: 1.3;
}

.om-pipeline__item dd {
    margin-top: 0.1875rem;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 600;
}

.om-pipeline__swatch {
    display: block;
    width: 0.625rem;
    height: 0.625rem;
    flex: none;
    border-radius: 0.1875rem;
}

/* Zuletzt passiert */
.om-activity {
    display: flex;
    flex-direction: column;
    margin-inline: -0.625rem;
}

.om-activity__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4375rem 0.625rem;
    border-radius: 0.5rem;
    transition: background-color 150ms ease-out;
}

.om-activity__row:hover {
    background: var(--om-hover);
}

.om-activity__text {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.5rem;
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.4;
}

.om-activity__title {
    font-weight: 500;
}

.om-activity__detail {
    color: var(--om-muted);
}

.om-activity__when {
    flex: none;
    color: var(--om-muted);
    font-size: 0.75rem;
}

/* Laden */
.om-skeleton {
    border-radius: 0.875rem;
    background: var(--om-surface);
    border: 1px solid var(--om-line);
    animation: om-pulse 1400ms ease-in-out infinite;
}

@keyframes om-pulse {
    50% {
        opacity: 0.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .om-skeleton {
        animation: none;
    }

    .om-dash * {
        transition: none !important;
    }
}

@media (max-width: 640px) {
    .om-greeting__title {
        font-size: 1.5rem;
    }

    .om-greeting__actions {
        width: 100%;
    }

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

    .om-kpi {
        padding: 0.875rem 0.875rem 0.75rem;
    }

    .om-kpi__value {
        font-size: 1.375rem;
    }

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

    .om-funnel__row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.25rem 0.75rem;
    }

    .om-funnel__track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .om-toollink {
        grid-template-columns: 1.25rem minmax(0, 1fr) 1rem;
    }

    .om-toollink__text {
        display: none;
    }
}
