/* ------------------------------------------------------------
   Bestway Design Refresh 2026
   Inspiriert vom klaren ALL-INKL/KAS-Look: Weißraum, starke Typografie,
   schlanke Linien, ruhige Flächen und Bestway-Blau als Primärfarbe.
   ------------------------------------------------------------ */
:root {
    --bestway-blue: #174f81;
    --bestway-blue-strong: #0b3d67;
    --bestway-blue-soft: #e8f2fb;
    --bestway-ink: #0b0d10;
    --bestway-lime: #9af51b;
    --bg: #f4f6f8;
    --bg-soft: #eef2f6;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-muted: #f7f9fb;
    --border: #dfe5eb;
    --text: #111827;
    --text-muted: #667085;
    --muted: #667085;
    --primary: var(--bestway-blue);
    --primary-strong: var(--bestway-blue-strong);
    --accent: var(--bestway-blue);
    --success: #198754;
    --warning: #b7791f;
    --danger: #c24141;
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --shadow-soft: 0 12px 36px rgba(15, 23, 42, .07);
    --shadow-card: 0 10px 26px rgba(15, 23, 42, .055);
    --shadow-glow: 0 14px 34px rgba(23, 79, 129, .18);
    --sidebar-width: 286px;
    --topbar-height: 78px;
    --content-max: 1520px;
}

html,
body {
    background: #f3f5f7 !important;
    color: var(--text);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 15% 0%, rgba(23, 79, 129, .085), transparent 28rem),
        radial-gradient(circle at 92% 8%, rgba(23, 79, 129, .055), transparent 26rem),
        linear-gradient(180deg, #ffffff 0, #f3f5f7 380px);
}

.app-shell {
    background: transparent;
}

/* Sidebar: sachlich wie Hosting/KAS, aber mit Bestway-Akzent */
.sidebar {
    padding: 18px 14px !important;
    background: rgba(255, 255, 255, .96) !important;
    border-right: 1px solid #e5e7eb !important;
    box-shadow: 8px 0 28px rgba(15, 23, 42, .055) !important;
    gap: 20px !important;
}

.sidebar__brand {
    min-height: 56px;
    padding: 0 4px 14px;
    border-bottom: 1px solid #edf0f3;
}

.brand {
    gap: 12px !important;
}

.brand__mark {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px !important;
    border-radius: 10px !important;
    color: #ffffff !important;
    background: var(--bestway-blue) !important;
    box-shadow: 0 10px 22px rgba(23, 79, 129, .20) !important;
    font-weight: 900 !important;
    letter-spacing: -.08em !important;
}

.brand__text strong {
    color: var(--bestway-ink) !important;
    font-size: 1.08rem !important;
    font-weight: 900 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase;
}

.sidebar__nav {
    gap: 4px !important;
}

.nav-item,
.nav-subitem {
    color: #28323d !important;
    font-weight: 800 !important;
    letter-spacing: .01em;
}

.nav-item {
    min-height: 44px !important;
    border-radius: 9px !important;
    padding: 0 12px !important;
}

.nav-item__icon {
    width: 23px !important;
    flex-basis: 23px !important;
    color: var(--bestway-blue) !important;
    opacity: .92;
}

.nav-item:hover,
.nav-item.is-active,
.nav-group.is-open > .nav-item--parent {
    color: var(--bestway-blue) !important;
    background: #f0f5fa !important;
    transform: none !important;
}

.nav-item.is-active::before,
.nav-group.is-open > .nav-item--parent::before {
    content: '';
    width: 4px;
    align-self: stretch;
    margin: 8px 0 8px -8px;
    border-radius: 999px;
    background: var(--bestway-blue);
}

.nav-submenu {
    margin-left: 24px !important;
    padding-left: 14px !important;
    border-left: 1px solid #dbe3eb !important;
}

.nav-subitem {
    min-height: 34px !important;
    border-radius: 8px !important;
    font-size: .88rem !important;
    color: #52606f !important;
}

.nav-subitem:hover,
.nav-subitem.is-active {
    color: var(--bestway-blue) !important;
    background: #f0f5fa !important;
    transform: none !important;
}

.sidebar__panel {
    padding: 14px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1px solid #e3e9ef !important;
    box-shadow: none !important;
}

.sidebar__panel strong {
    color: var(--bestway-ink);
    font-size: .9rem;
}

.sidebar__panel small {
    color: #667085 !important;
    line-height: 1.35;
}

/* Topbar: kompakter, weiß, mit klarer Kopfzeile */
.topbar {
    min-height: var(--topbar-height) !important;
    background: rgba(255, 255, 255, .92) !important;
    border-bottom: 1px solid #e6ebf0 !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .045) !important;
}

.topbar__title span,
.hero__eyebrow {
    color: var(--bestway-blue) !important;
    font-weight: 900 !important;
    letter-spacing: .18em !important;
    text-transform: uppercase !important;
}

.topbar__title h1 {
    color: var(--bestway-ink) !important;
    font-weight: 900 !important;
    letter-spacing: -.045em !important;
}

.topbar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.user-chip {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
    padding: 0 12px;
    border: 1px solid #dde5ed;
    border-radius: 999px;
    background: #f8fafc;
    color: #344054;
    font-size: .86rem;
    font-weight: 800;
}

.btn,
.button,
.primary-button,
.ghost-button,
.danger-button,
.btn--ghost,
.btn--primary,
.button--primary {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 8px !important;
    font-weight: 900 !important;
    letter-spacing: .035em;
    text-transform: uppercase;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.btn--small,
.ghost-button--small,
.primary-button--small,
.danger-button--small {
    min-height: 34px !important;
    padding: 0 12px !important;
    font-size: .76rem !important;
}

.icon-button {
    border-radius: 8px !important;
    border-color: #dfe5eb !important;
    background: #ffffff !important;
    color: var(--bestway-blue) !important;
}

.ghost-button,
.btn--ghost,
.button,
.btn {
    border: 1px solid #dfe5eb !important;
    background: #ffffff !important;
    color: #111827 !important;
    box-shadow: none !important;
}

.primary-button,
.btn--primary,
.button--primary,
button[type='submit'].primary-button {
    border: 1px solid var(--bestway-blue) !important;
    color: #ffffff !important;
    background: var(--bestway-blue) !important;
    box-shadow: 0 12px 24px rgba(23, 79, 129, .18) !important;
}

.primary-button:hover,
.btn--primary:hover,
.button--primary:hover,
.ghost-button:hover,
.btn--ghost:hover,
.icon-button:hover {
    transform: translateY(-1px) !important;
}

.primary-button:hover,
.btn--primary:hover,
.button--primary:hover {
    background: var(--bestway-blue-strong) !important;
}

/* Content-Flächen */
.content {
    padding-top: clamp(22px, 3vw, 38px) !important;
}

.card,
.kpi,
.kpi-card,
.settings-panel,
.settings-card,
.user-admin-card,
.user-card,
.api-connection-item,
.otto-connection-card,
.shop-filter-card,
.shop-products-card {
    border: 1px solid #e0e7ef !important;
    border-radius: 16px !important;
    background: #ffffff !important;
    box-shadow: var(--shadow-card) !important;
    backdrop-filter: none !important;
}

.card__header,
.card__body {
    padding-inline: clamp(18px, 2vw, 26px) !important;
}

.card__header {
    padding-top: clamp(18px, 2vw, 24px) !important;
}

.card__body {
    padding-bottom: clamp(18px, 2vw, 26px) !important;
}

.card__title,
.kpi__value,
.kpi-card__value,
.settings-panel__title,
.user-card__name {
    color: var(--bestway-ink) !important;
    font-weight: 900 !important;
    letter-spacing: -.04em !important;
}

.card__meta,
.kpi__label,
.kpi-card__label,
.table-meta,
.table-subtext {
    color: #667085 !important;
}

/* Hero im Stil einer modernen Hosting-Landingpage */
.hero,
html body .app-shell .content > .hero.card.dashboard-hero,
html body .app-shell .content > .hero.card.otto-hero,
html body .app-shell .content > .hero.card.optimizer-hero {
    position: relative !important;
    overflow: hidden !important;
    isolation: isolate !important;
    border: 0 !important;
    border-radius: 20px !important;
    padding: clamp(28px, 4vw, 50px) !important;
    color: #ffffff !important;
    background:
        radial-gradient(circle at 84% 30%, rgba(255, 255, 255, .14), transparent 20rem),
        linear-gradient(135deg, #101318 0%, #172331 52%, #174f81 100%) !important;
    box-shadow: 0 24px 54px rgba(15, 23, 42, .20) !important;
}

.hero::before,
html body .app-shell .content > .hero.card.dashboard-hero::before,
html body .app-shell .content > .hero.card.otto-hero::before,
html body .app-shell .content > .hero.card.optimizer-hero::before {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    inset: auto -90px -150px auto !important;
    width: 420px !important;
    height: 420px !important;
    border-radius: 50% !important;
    background: repeating-radial-gradient(circle, rgba(255, 255, 255, .16) 0 2px, transparent 3px 14px) !important;
    opacity: .7 !important;
    z-index: -1 !important;
}

.hero::after,
html body .app-shell .content > .hero.card.dashboard-hero::after,
html body .app-shell .content > .hero.card.otto-hero::after,
html body .app-shell .content > .hero.card.optimizer-hero::after {
    content: '' !important;
    display: block !important;
    position: absolute !important;
    top: 24px !important;
    right: clamp(20px, 4vw, 54px) !important;
    width: 92px !important;
    height: 92px !important;
    border: 2px solid rgba(255, 255, 255, .18) !important;
    border-radius: 18px !important;
    transform: rotate(8deg) !important;
    z-index: -1 !important;
}

.hero h1,
.hero h2,
html body .app-shell .content > .hero.card.dashboard-hero h1,
html body .app-shell .content > .hero.card.dashboard-hero h2,
html body .app-shell .content > .hero.card.otto-hero h1,
html body .app-shell .content > .hero.card.otto-hero h2,
html body .app-shell .content > .hero.card.optimizer-hero h1,
html body .app-shell .content > .hero.card.optimizer-hero h2 {
    max-width: 920px;
    color: #ffffff !important;
    font-size: clamp(2rem, 5vw, 4.7rem) !important;
    line-height: .96 !important;
    font-weight: 950 !important;
    letter-spacing: -.075em !important;
    text-transform: none !important;
}

.hero p,
html body .app-shell .content > .hero.card.dashboard-hero p,
html body .app-shell .content > .hero.card.otto-hero p,
html body .app-shell .content > .hero.card.optimizer-hero p,
html body .app-shell .content > .hero.card.optimizer-hero .optimizer-note {
    max-width: 780px;
    color: rgba(255, 255, 255, .82) !important;
    font-size: clamp(1rem, 1.4vw, 1.18rem) !important;
    line-height: 1.55 !important;
}

.hero__eyebrow,
html body .app-shell .content > .hero.card.dashboard-hero .hero__eyebrow,
html body .app-shell .content > .hero.card.otto-hero .hero__eyebrow,
html body .app-shell .content > .hero.card.optimizer-hero .hero__eyebrow {
    color: #b9d9f3 !important;
}

html body .app-shell .content > .hero.card.otto-hero .otto-connection-card,
html body .app-shell .content > .hero.card.optimizer-hero .otto-connection-card,
html body .app-shell .content > .hero.card.otto-hero .hero__aside,
html body .app-shell .content > .hero.card.optimizer-hero .hero__aside {
    background: rgba(255, 255, 255, .10) !important;
    border-color: rgba(255, 255, 255, .20) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* Kennzahlen wie Tarif-/Produktkacheln: klare Kontur, großer Wert */
.otto-kpi-grid,
.grid--kpi,
.shop-kpi-grid--five,
.shop-kpi-grid--six {
    gap: 16px !important;
}

.kpi,
.kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    padding: 20px !important;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.kpi::after,
.kpi-card::after {
    content: '';
    position: absolute;
    inset: auto -42px -50px auto;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(23, 79, 129, .07) !important;
}

.kpi:hover,
.kpi-card:hover,
.otto-kpi-grid a:hover .kpi-card {
    transform: translateY(-3px) !important;
    border-color: rgba(23, 79, 129, .34) !important;
    box-shadow: 0 18px 38px rgba(15, 23, 42, .10) !important;
}

.kpi-card.is-active,
.otto-kpi-grid a.is-active .kpi-card,
.otto-kpi-grid .card.is-active {
    border-color: var(--bestway-blue) !important;
    box-shadow: inset 0 3px 0 var(--bestway-blue), 0 18px 38px rgba(23, 79, 129, .12) !important;
}

.kpi-card__label,
.kpi__label {
    text-transform: uppercase;
    font-size: .76rem !important;
    font-weight: 900 !important;
    letter-spacing: .13em;
}

.kpi-card__value,
.kpi__value {
    font-size: clamp(2rem, 3.2vw, 3.25rem) !important;
}

/* Toolbar & Formularfelder */
.otto-toolbar,
.filter-bar,
.shop-article-filter-bar,
.optimizer-filter-form {
    background: #ffffff !important;
    border: 1px solid #e0e7ef !important;
    border-radius: 16px !important;
    box-shadow: var(--shadow-card) !important;
}

.field__control,
.control-field input,
.control-field select,
.control-field textarea,
.otto-toolbar select,
.otto-toolbar input,
.optimizer-filter-form input,
.optimizer-filter-form select,
.status-toggle {
    min-height: 44px;
    border: 1px solid #d9e1ea !important;
    border-radius: 9px !important;
    background: #f8fafc !important;
    color: #111827 !important;
    box-shadow: none !important;
}

.field__control:focus,
.control-field input:focus,
.control-field select:focus,
.control-field textarea:focus,
.otto-toolbar select:focus,
.otto-toolbar input:focus,
.optimizer-filter-form input:focus,
.optimizer-filter-form select:focus {
    border-color: rgba(23, 79, 129, .58) !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(23, 79, 129, .10) !important;
}

.field__control::placeholder,
.control-field input::placeholder,
.control-field textarea::placeholder,
.otto-toolbar input::placeholder,
.optimizer-filter-form input::placeholder {
    color: #98a2b3 !important;
}

select,
.field__control option,
.control-field select option,
.otto-toolbar select option,
.optimizer-filter-form select option {
    background: #ffffff !important;
    color: #111827 !important;
}

/* Tabellen: dichter, heller, mit Kopfzeile wie KAS-Tabellen */
.table-wrap,
.shop-products-card,
.card:has(.data-table) {
    border-radius: 16px;
}

.data-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.data-table th {
    padding: 13px 14px !important;
    color: #111827 !important;
    background: #f2f5f8 !important;
    border-bottom: 1px solid #dde5ed !important;
    font-size: .76rem !important;
    font-weight: 950 !important;
    letter-spacing: .12em !important;
}

.data-table td {
    padding: 13px 14px !important;
    border-bottom: 1px solid #eef2f6 !important;
    color: #27313d;
}

.data-table tbody tr:nth-child(even) {
    background: #fbfcfd;
}

.data-table tbody tr:hover {
    background: #eef6fc !important;
}

/* Badges und Hinweise */
.badge,
.status-badge,
.status-pill,
.pill {
    min-height: 26px !important;
    border-radius: 999px !important;
    border: 1px solid #dde5ed !important;
    background: #f7f9fb !important;
    color: #475467 !important;
    font-weight: 900 !important;
}

.badge--success,
.status-badge--success,
.status-pill--success,
.pill--success {
    color: #146c43 !important;
    background: #eaf8f0 !important;
    border-color: #c5ead4 !important;
}

.badge--warning,
.status-badge--warning,
.status-pill--warning,
.pill--warning {
    color: #946200 !important;
    background: #fff6df !important;
    border-color: #f0d99b !important;
}

.badge--danger,
.status-badge--danger,
.status-pill--danger,
.status-pill--error,
.pill--danger {
    color: #a92e2e !important;
    background: #fff0f0 !important;
    border-color: #f0c5c5 !important;
}

html body .app-shell .content .alert {
    border-radius: 12px !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .06) !important;
}

html body .app-shell .content .alert--success {
    color: #135d3a !important;
    background: #effaf3 !important;
    border-color: #bde7cd !important;
}

html body .app-shell .content .alert--warning {
    color: #7a530f !important;
    background: #fff7e7 !important;
    border-color: #ecd39b !important;
}

html body .app-shell .content .alert--danger,
html body .app-shell .content .alert--error {
    color: #992828 !important;
    background: #fff2f2 !important;
    border-color: #ecc1c1 !important;
}

.empty-state,
.settings-section,
.api-edit-panel,
.credential-preview div {
    background: #f8fafc !important;
    border-color: #e0e7ef !important;
}

.settings-panel__header,
#user-management .settings-panel__header {
    border-radius: 16px !important;
    background: #ffffff !important;
    color: #111827 !important;
}

.settings-panel__header:hover,
#user-management .settings-panel__header:hover {
    background: #f5f8fb !important;
}

.settings-panel__icon,
#user-management .settings-panel__icon,
.user-avatar {
    border-radius: 10px !important;
    color: #ffffff !important;
    background: var(--bestway-blue) !important;
}

.optimizer-tab-button {
    border-radius: 8px !important;
    background: #ffffff !important;
    border: 1px solid #dfe5eb !important;
    color: #111827 !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.optimizer-tab-button.is-active {
    color: #ffffff !important;
    background: var(--bestway-blue) !important;
    border-color: var(--bestway-blue) !important;
}

.shop-thumb-button {
    border-radius: 10px !important;
    border-color: #dfe5eb !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07) !important;
}

.shop-thumb {
    border-radius: 9px !important;
}

.app-footer {
    background: transparent !important;
    border-top: 1px solid #e6ebf0 !important;
}

/* Login-Seite wird optisch mitgezogen, ohne Funktion anzufassen */
.login-page,
body.login-body {
    background: linear-gradient(180deg, #ffffff 0, #f3f5f7 100%) !important;
}

.login-card {
    border-radius: 20px !important;
    border-color: #e0e7ef !important;
    background: #ffffff !important;
    box-shadow: 0 24px 58px rgba(15, 23, 42, .10) !important;
}

/* Mobile: Sidebar zuverlässig als Drawer */
@media (max-width: 1080px) {
    .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto !important;
        padding-inline: 14px !important;
    }

    .topbar__menu {
        display: inline-grid !important;
    }

    .topbar__actions .user-chip {
        display: none;
    }

    .sidebar {
        width: min(88vw, 326px) !important;
        transform: translateX(-110%) !important;
    }

    body.sidebar-is-open .sidebar,
    body.sidebar-open .sidebar,
    body.is-sidebar-open .sidebar,
    .sidebar.is-open {
        transform: translateX(0) !important;
    }

    .sidebar-backdrop {
        background: rgba(15, 23, 42, .48) !important;
        backdrop-filter: blur(2px);
    }

    .content {
        padding-inline: 14px !important;
    }

    .hero,
    html body .app-shell .content > .hero.card.dashboard-hero,
    html body .app-shell .content > .hero.card.otto-hero,
    html body .app-shell .content > .hero.card.optimizer-hero {
        padding: 26px 20px !important;
    }
}

@media (max-width: 680px) {
    .topbar__title span {
        font-size: .66rem !important;
    }

    .topbar__title h1 {
        font-size: 1.22rem !important;
    }

    .hero h1,
    .hero h2,
    html body .app-shell .content > .hero.card.dashboard-hero h1,
    html body .app-shell .content > .hero.card.dashboard-hero h2,
    html body .app-shell .content > .hero.card.otto-hero h1,
    html body .app-shell .content > .hero.card.otto-hero h2,
    html body .app-shell .content > .hero.card.optimizer-hero h1,
    html body .app-shell .content > .hero.card.optimizer-hero h2 {
        font-size: clamp(2rem, 12vw, 3rem) !important;
    }

    .card__header {
        flex-direction: column;
    }
}


/* Dashboard-Feinschliff: bereinigte Kopfzeile ohne doppelten Menü-Button */
.topbar,
.topbar.topbar--clean {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.topbar__title {
    min-width: 0;
}

.topbar__menu {
    display: none !important;
}

@media (max-width: 1080px) {
    .topbar,
    .topbar.topbar--clean {
        grid-template-columns: minmax(0, 1fr) auto !important;
    }
}


/* Dashboard-Willkommenskarte: Absatz nach Überschrift, Texte direkt untereinander */
.dashboard-welcome-card .card__header {
    padding-bottom: 0 !important;
}

.dashboard-welcome-card .card__body {
    padding-top: 18px !important;
}

.dashboard-welcome-card .card__body p {
    margin: 0 !important;
}

.dashboard-welcome-card .card__body p + p {
    margin-top: 2px !important;
}


/* Dashboard-Hero: Titel etwas kompakter, analog zur Listungs-Übersicht */
html body .app-shell .content > .hero.card.dashboard-hero h1,
html body .app-shell .content > .hero.card.dashboard-hero h2 {
    font-size: clamp(1.85rem, 3.2vw, 3.05rem) !important;
    line-height: 1.02 !important;
    letter-spacing: -.06em !important;
}

@media (max-width: 680px) {
    html body .app-shell .content > .hero.card.dashboard-hero h1,
    html body .app-shell .content > .hero.card.dashboard-hero h2 {
        font-size: clamp(1.85rem, 9vw, 2.55rem) !important;
    }
}


/* Mobile-Menü wieder aktiv: Desktop ausgeblendet, mobil sichtbar */
.topbar.topbar--clean {
    grid-template-columns: minmax(0, 1fr) auto !important;
}

.topbar.topbar--clean .topbar__menu {
    display: none !important;
}

@media (max-width: 1080px) {
    .topbar.topbar--clean {
        grid-template-columns: auto minmax(0, 1fr) auto !important;
    }

    .topbar.topbar--clean .topbar__menu {
        display: inline-grid !important;
    }
}


/* OTTO Listungs-Übersicht: API-Status im Hero + saubere Filterleiste */
html body .app-shell .content > .hero.card.otto-hero.listings-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px) !important;
    align-items: center !important;
    gap: clamp(22px, 4vw, 46px) !important;
}

html body .app-shell .content > .hero.card.otto-hero.listings-hero .listings-connection-card {
    justify-self: end;
    width: min(100%, 340px);
    min-width: 0;
    padding: 20px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .12) !important;
    border: 1px solid rgba(255, 255, 255, .22) !important;
    color: #ffffff !important;
    box-shadow: none !important;
    backdrop-filter: blur(14px);
}

html body .app-shell .content > .hero.card.otto-hero.listings-hero .listings-connection-card strong {
    color: #ffffff !important;
    font-weight: 900 !important;
    letter-spacing: -.02em;
}

html body .app-shell .content > .hero.card.otto-hero.listings-hero .listings-connection-card small {
    color: rgba(255, 255, 255, .78) !important;
    line-height: 1.4;
}

html body .app-shell .content > .hero.card.otto-hero.listings-hero .listings-connection-card .badge {
    width: fit-content;
    text-transform: uppercase;
}

html body .app-shell .content form.otto-toolbar {
    display: grid !important;
    grid-template-columns: minmax(280px, 2fr) minmax(180px, .7fr) minmax(220px, 1fr) minmax(140px, .55fr) auto !important;
    align-items: end !important;
    gap: 16px !important;
    padding: 20px !important;
    margin: 0 0 18px !important;
    overflow: visible !important;
}

html body .app-shell .content form.otto-toolbar .field,
html body .app-shell .content form.otto-toolbar .otto-status-multiselect,
html body .app-shell .content form.otto-toolbar .otto-category-filter {
    min-width: 0 !important;
    width: 100% !important;
}

html body .app-shell .content form.otto-toolbar .field__label {
    display: block;
    margin-bottom: 7px;
}

html body .app-shell .content form.otto-toolbar .field__control,
html body .app-shell .content form.otto-toolbar input.field__control,
html body .app-shell .content form.otto-toolbar select.field__control,
html body .app-shell .content form.otto-toolbar .otto-status-multiselect__button {
    width: 100% !important;
    min-height: 46px !important;
    padding: 0 14px !important;
    line-height: 1.2 !important;
}

html body .app-shell .content form.otto-toolbar .otto-toolbar__actions {
    display: flex !important;
    align-items: end !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
    min-width: max-content;
}

html body .app-shell .content form.otto-toolbar .otto-toolbar__actions .ghost-button {
    min-height: 46px !important;
    white-space: nowrap !important;
    padding-inline: 16px !important;
}

html body .app-shell .content form.otto-toolbar .otto-status-multiselect__panel {
    width: max(100%, 230px);
}

@media (max-width: 1240px) {
    html body .app-shell .content form.otto-toolbar {
        grid-template-columns: minmax(260px, 1fr) minmax(180px, 1fr) !important;
    }

    html body .app-shell .content form.otto-toolbar .otto-toolbar__actions {
        min-width: 0;
    }
}

@media (max-width: 860px) {
    html body .app-shell .content > .hero.card.otto-hero.listings-hero {
        grid-template-columns: 1fr !important;
    }

    html body .app-shell .content > .hero.card.otto-hero.listings-hero .listings-connection-card {
        justify-self: stretch;
        width: 100%;
    }

    html body .app-shell .content form.otto-toolbar {
        grid-template-columns: 1fr !important;
        padding: 16px !important;
    }

    html body .app-shell .content form.otto-toolbar .otto-toolbar__actions {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    html body .app-shell .content form.otto-toolbar .otto-toolbar__actions .ghost-button {
        width: 100% !important;
    }
}

@media (max-width: 520px) {
    html body .app-shell .content form.otto-toolbar .otto-toolbar__actions {
        grid-template-columns: 1fr;
    }
}

/* OTTO Listungs-Übersicht: smarte Mobile-Ansicht statt breiter Tabelle */
.otto-mobile-listings {
    display: none;
}

@media (max-width: 820px) {
    .table-shell:has(.data-table) {
        display: none !important;
    }

    .otto-mobile-listings {
        display: grid;
        gap: 12px;
        margin-top: 14px;
    }

    .otto-mobile-listing-card {
        display: grid;
        gap: 14px;
        padding: 14px;
        border: 1px solid #e0e7ef;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(15, 23, 42, .055);
    }

    .otto-mobile-listing-card__top {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    .otto-mobile-listing-card__image {
        grid-row: span 2;
    }

    .otto-mobile-listing-card__image .otto-thumb-button,
    .otto-mobile-listing-card__image .otto-thumb {
        width: 52px !important;
        height: 52px !important;
        min-width: 52px !important;
        border-radius: 12px !important;
    }

    .otto-mobile-listing-card__main {
        min-width: 0;
        display: grid;
        gap: 3px;
    }

    .otto-mobile-listing-card__label,
    .otto-mobile-listing-card__facts span,
    .otto-mobile-listing-card__meta span {
        color: #667085;
        font-size: .68rem;
        font-weight: 900;
        letter-spacing: .13em;
        text-transform: uppercase;
    }

    .otto-mobile-listing-card__main > strong {
        color: #0b0d10;
        font-size: 1.2rem;
        font-weight: 950;
        line-height: 1.05;
        letter-spacing: -.04em;
    }

    .otto-mobile-listing-card__category {
        width: fit-content;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding: 4px 8px;
        border: 1px solid #d7e4ef;
        border-radius: 999px;
        background: #f0f5fa;
        color: var(--bestway-blue);
        font-size: .73rem;
        font-weight: 850;
    }

    .otto-mobile-listing-card__status {
        grid-column: 2;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .otto-mobile-listing-card__facts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .otto-mobile-listing-card__facts > div,
    .otto-mobile-listing-card__meta > div {
        min-width: 0;
        display: grid;
        gap: 5px;
        padding: 10px;
        border: 1px solid #e7edf3;
        border-radius: 12px;
        background: #f8fafc;
    }

    .otto-mobile-listing-card__facts strong,
    .otto-mobile-listing-card__meta strong {
        min-width: 0;
        color: #111827;
        font-size: .88rem;
        font-weight: 850;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .otto-mobile-listing-card__facts .otto-score-button,
    .otto-mobile-listing-card__facts .otto-issue-button {
        width: fit-content;
        max-width: 100%;
    }

    .otto-mobile-listing-card__meta {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .otto-mobile-listing-card__actions {
        display: flex;
        justify-content: flex-end;
        padding-top: 2px;
    }

    .otto-mobile-listing-card__actions .ghost-button {
        min-width: 128px;
    }

    .otto-pagination {
        margin-top: 16px !important;
    }
}

@media (max-width: 440px) {
    .otto-mobile-listing-card {
        padding: 12px;
        border-radius: 14px;
    }

    .otto-mobile-listing-card__top {
        grid-template-columns: 48px minmax(0, 1fr);
    }

    .otto-mobile-listing-card__image .otto-thumb-button,
    .otto-mobile-listing-card__image .otto-thumb {
        width: 48px !important;
        height: 48px !important;
        min-width: 48px !important;
    }

    .otto-mobile-listing-card__facts {
        grid-template-columns: 1fr;
    }

    .otto-mobile-listing-card__actions,
    .otto-mobile-listing-card__actions .ghost-button {
        width: 100%;
    }
}
