/* SYNC-GRUPPE portal-assets · Kanonische Quelle: partner-portal/assets/css/layout.css
 * Aenderungen NUR in der Quelle vornehmen, dann: php tools/sync-portal-assets.php --apply
 * Kopien in den anderen Portalen werden dabei byte-genau ueberschrieben. */
/* Topbar, Kategorie-Bar, Subnav, Content-Grid, Sticky, Breadcrumb */

.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Topbar ----------------------------------------------------------- */
.topbar {
    position: sticky; top: 0; z-index: var(--z-sticky);
    height: var(--topbar-h);
    background: var(--bg-topbar);
    background-image:
        radial-gradient(620px 120px at 0% 0%, rgba(0,174,184,.30), transparent 70%),
        radial-gradient(420px 120px at 100% 120%, rgba(0,174,184,.18), transparent 70%);
    color: var(--text-inverse);
    display: flex; align-items: center;
    padding: 0 var(--space-5);
    gap: var(--space-4);
    box-shadow: 0 1px 0 rgba(255,255,255,.05), var(--shadow-md);
}
.topbar__brand {
    display: flex; align-items: center; gap: var(--space-2);
    font-family: var(--font-display);
    font-weight: var(--weight-extra);
    color: var(--text-inverse);
    text-decoration: none;
    font-size: var(--text-md);
    letter-spacing: -0.01em;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-md);
    transition: background var(--dur-fast) var(--ease-out);
}
.topbar__brand:hover { text-decoration: none; background: rgba(255,255,255,.06); }
/* Markenzeichen (NOA-Pin) – färbt ein inline-SVG oder Material-Icon türkis */
.topbar__brand .brand-mark { display: inline-flex; width: 26px; height: 26px; }
.topbar__brand .material-symbols-outlined { color: var(--color-primary-400); }
.topbar__brand .brand-word { color: #fff; }
.topbar__brand .brand-word b {
    font-weight: var(--weight-extra);
    background: linear-gradient(180deg, #5fdfe7, #00aeb8);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}

.topbar__search {
    flex: 1; max-width: 460px;
    display: flex; align-items: center; gap: var(--space-2);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-4);
    cursor: pointer;
    color: rgba(255,255,255,.82);
    font-size: var(--text-sm);
    transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.topbar__search:hover { background: rgba(255,255,255,.14); border-color: rgba(0,174,184,.5); }
.topbar__search-kbd {
    margin-left: auto;
    background: rgba(255,255,255,.10);
    padding: 2px 7px; border-radius: var(--radius-pill);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}
.topbar__spacer { flex: 1; }
.topbar__actions { display: flex; align-items: center; gap: var(--space-1); }
.topbar__btn {
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-pill);
    color: rgba(255,255,255,.92);
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: var(--text-sm);
    font-family: inherit;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.topbar__btn:hover { background: rgba(255,255,255,.12); text-decoration: none; color: var(--text-inverse); }
.topbar__btn:active { transform: scale(.97); }

/* --- Kategorie-Bar --------------------------------------------------- */
.catbar {
    position: sticky; top: var(--topbar-h); z-index: calc(var(--z-sticky) - 1);
    height: var(--catbar-h);
    background: color-mix(in srgb, var(--bg-catbar) 86%, transparent);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: stretch;
    padding: 0 var(--space-5);
    gap: var(--space-1);
    overflow-x: auto;
    scrollbar-width: thin;
}
.catbar::-webkit-scrollbar { height: 4px; }
.catbar__item {
    position: relative;
    display: inline-flex; align-items: center; gap: var(--space-2);
    padding: 0 var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.catbar__item .material-symbols-outlined { font-size: 20px; transition: transform var(--dur-base) var(--ease-spring); }
.catbar__item:hover { color: var(--text-primary); text-decoration: none; }
.catbar__item:hover .material-symbols-outlined { transform: translateY(-1px); }
.catbar__item.is-active {
    color: var(--color-primary-700);
}
.catbar__item.is-active::after {
    content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: -1px; height: 3px;
    background: var(--grad-brand);
    border-radius: var(--radius-pill) var(--radius-pill) 0 0;
}

/* --- Subnav ---------------------------------------------------------- */
.subbar {
    position: sticky; top: calc(var(--topbar-h) + var(--catbar-h)); z-index: calc(var(--z-sticky) - 2);
    height: var(--subbar-h);
    background: color-mix(in srgb, var(--bg-subbar) 88%, transparent);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--border-subtle);
    display: flex; align-items: center;
    padding: 0 var(--space-5);
    gap: var(--space-1);
    overflow-x: auto;
    scrollbar-width: thin;
}
.subbar__item {
    display: inline-flex; align-items: center; gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    margin: 0 1px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-pill);
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.subbar__item:hover { color: var(--text-primary); text-decoration: none; background: var(--bg-muted); }
.subbar__item.is-active {
    color: var(--color-primary-700);
    background: var(--color-primary-50);
}
.subbar__item .material-symbols-outlined { font-size: 18px; }

/* Subnav-Crossfade (gesteuert via JS-Klasse .is-switching) */
.subbar.is-switching .subbar__item {
    opacity: 0; transform: translateY(-4px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}

/* --- Content --------------------------------------------------------- */
.content {
    flex: 1;
    padding: var(--content-pad);
    max-width: var(--content-max);
    width: 100%;
    margin: 0 auto;
}
.page-header {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}
.page-header__titles { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.page-header__title {
    font-family: var(--font-display);
    font-size: var(--text-3xl); line-height: var(--leading-3xl);
    font-weight: var(--weight-extra); letter-spacing: -0.025em;
}
.page-header__subtitle { font-size: var(--text-sm); color: var(--text-secondary); max-width: 70ch; }
.page-header__actions { display: flex; gap: var(--space-2); flex-wrap: wrap; }

/* --- Breadcrumbs ----------------------------------------------------- */
.breadcrumb { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--text-muted); margin-bottom: var(--space-3); }
.breadcrumb__sep { color: var(--text-muted); }
.breadcrumb__item { color: var(--text-secondary); text-decoration: none; }
.breadcrumb__item:hover { color: var(--text-link); text-decoration: underline; }
.breadcrumb__item.is-current { color: var(--text-primary); font-weight: var(--weight-semibold); }

/* --- Mobile-Sheet (Off-Canvas) -------------------------------------- */
.mobile-sheet {
    display: none;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: 290px;
    max-width: 85vw;
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-modal);
    transform: translateX(-100%);
    transition: transform var(--dur-slow) var(--ease-out);
    overflow-y: auto;
}
.mobile-sheet.is-open { transform: translateX(0); }
.mobile-sheet__backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(10,37,64,.45);
    z-index: calc(var(--z-modal) - 1);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out);
}
.mobile-sheet__backdrop.is-open { opacity: 1; pointer-events: auto; }
.mobile-sheet__close {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    background: transparent;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
    color: var(--text-secondary);
}

/* Hamburger nur mobil sichtbar. */
.topbar .topbar__hamburger,
.topbar__hamburger { display: none; }

/* --- Responsive ------------------------------------------------------ */
@media (max-width: 1023px) {
    .catbar, .subbar { padding: 0 var(--space-3); }
    .content { padding: var(--space-5); }
}
@media (max-width: 767px) {
    .catbar, .subbar { display: none; }
    .topbar .topbar__hamburger,
    .topbar__hamburger { display: inline-flex; }
    .mobile-sheet,
    .mobile-sheet__backdrop { display: block; }
    .topbar__search { display: none; }
    .content { padding: var(--space-4); }
    .page-header { flex-direction: column; align-items: stretch; }
    .page-header__title { font-size: var(--text-2xl); line-height: var(--leading-2xl); }
}
