/* Der Adminbereich verwendet dieselben semantischen Farbrollen wie Studio und Account. */
:root {
    color-scheme: dark;
    --studio-theme-www-light-bg: #dacfaa;
    --studio-theme-www-light-bg-rgb: 218, 207, 170;
    --studio-theme-light-surface-ceiling: #eae3cd;
    --studio-theme-light-surface-ceiling-rgb: 234, 227, 205;
    --studio-theme-light-layer-surface: #e9e2cb;
    --studio-theme-www-light-ink: #827b65;
    --studio-theme-www-light-ink-rgb: 130, 123, 101;
    --studio-theme-www-light-strong: #3c3524;
    --studio-theme-www-light-strong-rgb: 60, 53, 36;
    --studio-theme-www-light-control: #46402e;
    --studio-theme-www-light-muted: #6b5632;
    --studio-theme-www-light-muted-rgb: 107, 86, 50;
    --studio-theme-www-light-gold: #c49c48;
    --studio-theme-www-light-gold-rgb: 196, 156, 72;
    --studio-theme-www-light-gold-hover: #d5b56c;
    --panable-ci-gold: #c49c48;
    --panable-ci-gold-rgb: 196, 156, 72;
    --panable-ci-gold-hover: #d5b56c;
    --studio-theme-accent-rgb: 226, 179, 51;
    --studio-theme-bg-page: #212121;
    --studio-theme-bg-shell: #2d2d2d;
    --studio-theme-surface: #2d2d2d;
    --studio-theme-surface-card: #212121;
    --studio-theme-surface-muted: rgba(255, 255, 255, 0.045);
    --studio-theme-surface-popover: #2d2d2d;
    --studio-theme-surface-panel: #242424;
    --studio-theme-surface-overlay: #2b2b2b;
    --studio-theme-surface-deep: #1f1f1f;
    --studio-theme-surface-sunken: #252525;
    --studio-theme-field-bg: #2e2e2e;
    --studio-theme-field-bg-focus: #333333;
    --studio-theme-text: #f5f5f5;
    --studio-theme-text-strong: #f5f5f5;
    --studio-theme-text-bright: #f3f4f6;
    --studio-theme-text-muted: #9ca3af;
    --studio-theme-text-ui-muted-rgb: 160, 160, 160;
    --studio-theme-text-secondary: #d1d5db;
    --studio-theme-text-neutral: #e5e5e5;
    --studio-theme-border: #3b3b3b;
    --studio-theme-border-strong: #4a4a4a;
    --studio-theme-border-control: #353535;
    --studio-theme-border-cool: #4b5563;
    --studio-theme-active-bg: rgba(226, 179, 51, 0.18);
    --studio-theme-active-bg-hover: rgba(226, 179, 51, 0.24);
    --studio-theme-active-border: rgba(226, 179, 51, 0.52);
    --studio-theme-active-text: #f4d682;
    --studio-theme-active-shadow: 0 0 0 1px rgba(226, 179, 51, 0.2);
    --studio-theme-brand-mark: var(--panable-ci-gold);
    --studio-theme-header-action-border: rgba(255, 255, 255, 0.05);
    --studio-theme-studio-header-border-bottom: rgba(107, 86, 50, 0.58);
    --studio-theme-segmented-bg: #212121;
    --studio-theme-segmented-option-hover-bg: #2b2b2b;
    --studio-theme-segmented-option-hover-text: #e8eaee;
    --studio-theme-segmented-active-bg: #444444;
    --studio-theme-segmented-active-text: #ffffff;
    --studio-theme-segmented-active-shadow: none;
    --studio-theme-account-theme-option-color: #8f96a3;
    --studio-theme-account-theme-option-hover-color: #e8eaee;
    --studio-theme-campus-nav-item-color: #c9c9c9;
    --studio-theme-campus-nav-item-active-background: rgba(var(--studio-theme-accent-rgb), 0.15);
    --studio-theme-campus-nav-item-active-color: #f5e3b5;
    --studio-theme-primary-bg: var(--panable-ci-gold);
    --studio-theme-primary-bg-hover: var(--panable-ci-gold-hover);
    --studio-theme-primary-action-text: #111827;
    --studio-theme-secondary-action-bg: rgba(74, 71, 66, 0.72);
    --studio-theme-secondary-action-bg-hover: rgba(88, 84, 75, 0.78);
    --studio-theme-secondary-action-border: transparent;
    --studio-theme-secondary-action-border-hover: transparent;
    --studio-theme-secondary-action-text: #f5f5f5;
    --studio-theme-danger-bg: rgba(185, 28, 28, 0.22);
    --studio-theme-danger-bg-hover: rgba(185, 28, 28, 0.36);
    --studio-theme-danger-border: rgba(248, 113, 113, 0.46);
    --studio-theme-danger-text: #fecaca;
    --studio-theme-success-text: #86efac;
    --studio-theme-shadow-rgb: 0, 0, 0;
    --studio-theme-modal-backdrop: rgba(0, 0, 0, 0.68);
    --studio-theme-popover-shadow: 0 20px 42px rgba(0, 0, 0, 0.48);
    --campus-bg: var(--studio-theme-bg-page);
    --campus-surface: var(--studio-theme-surface-panel);
    --campus-surface-strong: var(--studio-theme-surface-overlay);
    --campus-border: var(--studio-theme-border);
    --campus-border-soft: var(--studio-theme-border-control);
    --campus-text-primary: var(--studio-theme-text);
    --campus-text-secondary: var(--studio-theme-text-secondary);
    --campus-text-muted: var(--studio-theme-text-muted);
    --campus-text-faint: var(--studio-theme-account-theme-option-color);
    --campus-accent: var(--studio-theme-primary-bg);
    --campus-accent-soft: var(--studio-theme-active-text);
}

html.crstudio-theme-light {
    color-scheme: light;
    --panable-ci-gold: var(--studio-theme-www-light-gold);
    --panable-ci-gold-rgb: var(--studio-theme-www-light-gold-rgb);
    --panable-ci-gold-hover: var(--studio-theme-www-light-muted);
    --studio-theme-accent-rgb: var(--studio-theme-www-light-gold-rgb);
    --studio-theme-bg-page: var(--studio-theme-www-light-bg);
    --studio-theme-bg-shell: var(--studio-theme-light-surface-ceiling);
    --studio-theme-surface: var(--studio-theme-light-surface-ceiling);
    --studio-theme-surface-card: var(--studio-theme-www-light-bg);
    --studio-theme-surface-muted: rgba(var(--studio-theme-www-light-strong-rgb), 0.06);
    --studio-theme-surface-popover: var(--studio-theme-light-surface-ceiling);
    --studio-theme-surface-panel: rgba(var(--studio-theme-www-light-bg-rgb), 0.82);
    --studio-theme-surface-overlay: var(--studio-theme-light-layer-surface);
    --studio-theme-surface-deep: rgba(var(--studio-theme-light-surface-ceiling-rgb), 0.78);
    --studio-theme-surface-sunken: rgba(var(--studio-theme-www-light-bg-rgb), 0.92);
    --studio-theme-field-bg: rgba(var(--studio-theme-light-surface-ceiling-rgb), 0.92);
    --studio-theme-field-bg-focus: rgba(var(--studio-theme-light-surface-ceiling-rgb), 0.96);
    --studio-theme-text: var(--studio-theme-www-light-strong);
    --studio-theme-text-strong: var(--studio-theme-www-light-strong);
    --studio-theme-text-bright: var(--studio-theme-www-light-strong);
    --studio-theme-text-muted: var(--studio-theme-www-light-muted);
    --studio-theme-text-ui-muted-rgb: var(--studio-theme-www-light-muted-rgb);
    --studio-theme-text-secondary: var(--studio-theme-www-light-control);
    --studio-theme-text-neutral: var(--studio-theme-www-light-control);
    --studio-theme-border: rgba(var(--studio-theme-www-light-ink-rgb), 0.38);
    --studio-theme-border-strong: rgba(var(--studio-theme-www-light-ink-rgb), 0.58);
    --studio-theme-border-control: rgba(var(--studio-theme-www-light-ink-rgb), 0.38);
    --studio-theme-border-cool: rgba(var(--studio-theme-www-light-ink-rgb), 0.58);
    --studio-theme-active-bg: rgba(var(--studio-theme-www-light-gold-rgb), 0.16);
    --studio-theme-active-bg-hover: rgba(var(--studio-theme-www-light-gold-rgb), 0.2);
    --studio-theme-active-border: rgba(var(--studio-theme-www-light-gold-rgb), 0.62);
    --studio-theme-active-text: var(--studio-theme-www-light-control);
    --studio-theme-active-shadow: 0 0 0 1px rgba(var(--studio-theme-www-light-gold-rgb), 0.12);
    --studio-theme-header-action-border: rgba(var(--studio-theme-www-light-ink-rgb), 0.38);
    --studio-theme-studio-header-border-bottom: var(--studio-theme-border-strong);
    --studio-theme-segmented-bg: var(--studio-theme-www-light-bg);
    --studio-theme-segmented-option-hover-bg: rgba(var(--studio-theme-www-light-gold-rgb), 0.13);
    --studio-theme-segmented-option-hover-text: var(--studio-theme-www-light-control);
    --studio-theme-segmented-active-bg: var(--studio-theme-light-surface-ceiling);
    --studio-theme-segmented-active-text: var(--studio-theme-www-light-strong);
    --studio-theme-segmented-active-shadow: inset 0 0 0 1px var(--studio-theme-www-light-ink), 0 6px 14px rgba(var(--studio-theme-www-light-strong-rgb), 0.12);
    --studio-theme-account-theme-option-color: var(--studio-theme-www-light-muted);
    --studio-theme-account-theme-option-hover-color: var(--studio-theme-www-light-control);
    --studio-theme-campus-nav-item-color: var(--studio-theme-www-light-control);
    --studio-theme-campus-nav-item-active-background: rgba(var(--studio-theme-www-light-gold-rgb), 0.16);
    --studio-theme-campus-nav-item-active-color: var(--studio-theme-www-light-strong);
    --studio-theme-primary-bg: var(--studio-theme-www-light-control);
    --studio-theme-primary-bg-hover: var(--studio-theme-www-light-strong);
    --studio-theme-primary-action-text: #ffffff;
    --studio-theme-secondary-action-bg: var(--studio-theme-surface-sunken);
    --studio-theme-secondary-action-bg-hover: rgba(var(--studio-theme-www-light-gold-rgb), 0.16);
    --studio-theme-secondary-action-border: rgba(var(--studio-theme-www-light-ink-rgb), 0.46);
    --studio-theme-secondary-action-border-hover: rgba(var(--studio-theme-www-light-gold-rgb), 0.72);
    --studio-theme-secondary-action-text: var(--studio-theme-www-light-control);
    --studio-theme-danger-bg: rgba(168, 100, 70, 0.1);
    --studio-theme-danger-bg-hover: rgba(168, 100, 70, 0.18);
    --studio-theme-danger-border: rgba(168, 100, 70, 0.34);
    --studio-theme-danger-text: #a86446;
    --studio-theme-success-text: var(--studio-theme-www-light-muted);
    --studio-theme-shadow-rgb: var(--studio-theme-www-light-strong-rgb);
    --studio-theme-modal-backdrop: rgba(var(--studio-theme-www-light-strong-rgb), 0.42);
    --studio-theme-popover-shadow: 0 24px 58px rgba(var(--studio-theme-www-light-strong-rgb), 0.18);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--studio-theme-bg-page); }
body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    padding: 0.5rem;
    background: var(--studio-theme-bg-page) !important;
    color: var(--studio-theme-text-secondary) !important;
    font-family: 'Montserrat', sans-serif !important;
    font-kerning: normal;
    font-feature-settings: "kern" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.admin-studio-shell {
    width: 100%;
    min-height: calc(100vh - 1rem);
    padding: 0.75rem 1rem 1.25rem;
    border-radius: 0.75rem;
    background: var(--studio-theme-bg-shell);
    box-shadow: 0 25px 50px -12px rgba(var(--studio-theme-shadow-rgb), 0.42);
}

.studio-header {
    --studio-header-action-size: 2.5rem;
    --studio-header-action-scale: 1.08;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 3.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    overflow: visible;
    border-bottom: 1px solid var(--studio-theme-studio-header-border-bottom);
}
.studio-header-left, .studio-header-right, .header-account-area { display: inline-flex; align-items: center; }
.studio-header-left { gap: 0.85rem; min-width: 0; flex-shrink: 1; justify-self: start; }
.studio-header-right { gap: 0.7rem; position: relative; flex-shrink: 0; justify-self: end; flex-wrap: nowrap; }
.studio-brand-link { display: inline-flex; align-items: center; justify-content: center; min-width: 0; flex-shrink: 0; border-radius: 0.7rem; color: var(--studio-theme-brand-mark); }
.studio-brand-link:focus-visible { outline: 2px solid var(--studio-theme-active-border); outline-offset: 3px; }
.studio-brand-wordmark { display: block; width: auto; height: 2.5rem; margin-left: 0.625rem; }
.studio-brand-mark { display: none; width: 2.25rem; height: auto; overflow: visible; stroke: currentColor; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; }

.account-menu { position: relative; }
.account-menu-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--studio-header-action-size);
    height: var(--studio-header-action-size);
    padding: 0;
    border: 1px solid var(--studio-theme-header-action-border);
    border-radius: 9999px;
    background: var(--studio-theme-field-bg);
    color: var(--studio-theme-text);
    line-height: 1;
    transform: scale(var(--studio-header-action-scale));
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.account-menu-trigger:hover, .account-menu-trigger:focus-visible, .account-menu-trigger[aria-expanded="true"] { border-color: rgba(var(--studio-theme-accent-rgb), 0.2); background: rgba(var(--studio-theme-accent-rgb), 0.14); color: var(--studio-theme-active-text); outline: none; }
.account-menu-trigger:hover, .account-menu-trigger:focus-visible { transform: translateY(-1px) scale(var(--studio-header-action-scale)); }
.account-menu-trigger:focus-visible { box-shadow: 0 0 0 2px rgba(var(--studio-theme-accent-rgb), 0.24), 0 8px 18px rgba(var(--studio-theme-shadow-rgb), 0.28); }
.account-header-avatar-image, .account-header-avatar-fallback, .account-trigger-icon { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 9999px; }
.account-header-avatar-image { display: none; z-index: 2; object-fit: cover; object-position: center; }
.account-header-avatar-fallback { display: none !important; align-items: center; justify-content: center; }
.account-trigger-icon { z-index: 1; display: inline-flex; align-items: center; justify-content: center; pointer-events: none; }
.account-trigger-icon svg { width: 1.3rem; height: 1.3rem; }
.account-header-avatar-image[style*="display: block"] + .account-trigger-icon { display: none; }
.account-menu-flyout {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    z-index: 2100;
    display: none;
    width: min(94vw, 16rem);
    max-height: min(78vh, 45rem);
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    border: 1px solid var(--studio-theme-border);
    border-radius: 0.75rem;
    background: var(--studio-theme-surface-popover);
    box-shadow: var(--studio-theme-popover-shadow);
}
.account-menu-flyout.active { display: block; }
.account-menu-profile { display: flex; align-items: center; gap: 0.75rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--studio-theme-border); }
.account-menu-profile-avatar { position: relative; width: 4rem; height: 4rem; flex: 0 0 4rem; overflow: hidden; border-radius: 9999px; background: var(--studio-theme-surface-muted); }
.account-menu-profile-avatar-image, .account-menu-profile-avatar-fallback { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; }
.account-menu-profile-avatar-image { display: none; object-fit: cover; object-position: center; }
.account-menu-profile-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; color: var(--studio-theme-text-bright); font-size: 0.95rem; font-weight: 700; letter-spacing: 0.04em; }
.account-menu-profile-copy { min-width: 0; }
.account-menu-profile-name, .account-menu-profile-email { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account-menu-profile-name { color: var(--studio-theme-text-strong); font-size: 0.875rem; font-weight: 600; line-height: 1.25; }
.account-menu-profile-email { margin-top: 0.15rem; color: var(--studio-theme-text-muted); font-size: 0.75rem; line-height: 1.25; }
.account-menu-section + .account-menu-section { border-top: 1px solid var(--studio-theme-border); }
.account-menu-actions { padding: 0.5rem; }
.account-menu-action { display: inline-flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.5rem 0.75rem; border: 1px solid transparent; border-radius: 0.5rem; background: transparent; color: var(--studio-theme-text-strong); font-size: 0.875rem; line-height: 1.25; text-align: left; transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease; }
.account-menu-action svg { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; }
.account-menu-action:hover:not(:disabled), .account-menu-action:focus-visible { border-color: var(--studio-theme-border-strong); background: var(--studio-theme-surface-muted); outline: none; }
.account-menu-language-wrap, .account-theme-section { padding: 0.75rem; }
.account-menu-section-label { margin: 0 0 0.55rem 0.1rem; color: var(--studio-theme-text-muted); font-size: 0.75rem; letter-spacing: 0.03em; text-transform: uppercase; }
.account-language-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.account-language-option { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.35rem 0.5rem; overflow: hidden; border: 2px solid transparent; border-radius: 0.5rem; background: var(--studio-theme-bg-page); color: var(--studio-theme-text); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.account-language-option:hover, .account-language-option:focus-visible { border-color: var(--studio-theme-border-cool); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(var(--studio-theme-shadow-rgb), 0.25); outline: none; }
.account-language-option.active { border-color: transparent; box-shadow: 0 0 0 2px rgba(var(--studio-theme-text-ui-muted-rgb), 1); }
.account-language-flag, .account-language-flag svg { display: block; width: 2rem; height: 1.5rem; }
.account-language-name { color: var(--studio-theme-text); font-size: 0.6875rem; line-height: 1.15; text-align: center; }
.account-theme-toggle { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 999px; background: var(--studio-theme-segmented-bg); }
.account-theme-option { display: inline-flex; align-items: center; justify-content: center; gap: 0.42rem; min-width: 0; min-height: 2.35rem; padding: 0.52rem 0.65rem; border: 0; border-radius: 999px; background: transparent; color: var(--studio-theme-account-theme-option-color); font-size: 0.86rem; font-weight: 700; line-height: 1; white-space: nowrap; transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease; }
.account-theme-option:hover, .account-theme-option:focus-visible { background: var(--studio-theme-segmented-option-hover-bg); color: var(--studio-theme-account-theme-option-hover-color); outline: none; }
.account-theme-option.active, .account-theme-option[aria-pressed="true"] { background: var(--studio-theme-segmented-active-bg); color: var(--studio-theme-segmented-active-text); box-shadow: var(--studio-theme-segmented-active-shadow); }
.account-theme-option-icon { display: inline-flex; align-items: center; justify-content: center; width: 1rem; height: 1rem; flex: 0 0 auto; }
.account-theme-option-icon svg { width: 100%; height: 100%; }

.admin-layout { display: flex; align-items: flex-start; gap: 1.5rem; width: 100%; }
.admin-nav-shell { width: clamp(15rem, 20vw, 17.5rem); min-width: 15rem; flex: 0 0 auto; }
.admin-sidebar {
    position: sticky;
    top: 1rem;
    width: 100% !important;
    min-width: 0 !important;
    padding: 1rem !important;
    border: 1px solid var(--studio-theme-border) !important;
    border-radius: 1rem !important;
    background: var(--studio-theme-surface-overlay) !important;
}
.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; }
.nav-tab {
    min-height: 2.85rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    color: var(--studio-theme-campus-nav-item-color);
    font-size: 0.9rem;
    font-weight: 600;
}
.nav-tab:hover, .nav-tab:focus-visible { border-color: var(--studio-theme-border); background: var(--studio-theme-surface-muted); color: var(--studio-theme-text); }
.nav-tab.is-active { border-color: transparent; background: var(--studio-theme-campus-nav-item-active-background); color: var(--studio-theme-campus-nav-item-active-color); }
.nav-tab svg { width: 1.2rem; height: 1.2rem; }
.nav-submenu { margin: 0.1rem 0 0.35rem 1.65rem; padding-left: 0.65rem; border-left-color: var(--studio-theme-border-strong); }
.nav-subtab { min-height: 2.45rem; color: var(--studio-theme-text-muted); }
.nav-subtab:hover, .nav-subtab:focus-visible { background: var(--studio-theme-surface-muted); color: var(--studio-theme-text); }
.nav-subtab.is-active { background: var(--studio-theme-campus-nav-item-active-background); color: var(--studio-theme-campus-nav-item-active-color); }
.workspace-compact-nav-toggle { display: none; }
.admin-main { flex: 1 1 auto; min-width: 0; }
.admin-overview-groups { display: grid; gap: 1.5rem; }
.admin-overview-group { display: grid; gap: 0.85rem; min-width: 0; }
.admin-overview-group-title { color: var(--studio-theme-text-muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.admin-overview-stats { display: grid; gap: 1rem; }
.admin-overview-group .admin-overview-stats--accounts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-overview-group .admin-overview-stats--subscriptions { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.admin-overview-stat { min-width: 0; min-height: 5.5rem; }
.live-presence-header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.live-presence-title { color: var(--studio-theme-text); font-size: 1.05rem; font-weight: 700; }
.live-presence-message { min-height: 1.05rem; color: var(--studio-theme-text-muted); font-size: 0.8rem; text-align: right; }
.live-presence-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.live-presence-list-panel { padding: 1.5rem; }
.share-analytics-groups { display: grid; gap: 1.5rem; }
.share-analytics-group { display: grid; align-content: start; gap: 0.85rem; min-width: 0; }
.share-analytics-group-title { color: var(--studio-theme-text-muted); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.share-analytics-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.share-analytics-table-panel { overflow: hidden; }
.share-analytics-filter-grid { display: grid; grid-template-columns: minmax(15rem, 2fr) repeat(3, minmax(9rem, 1fr)); gap: 1rem; }
.share-analytics-table { width: 100%; min-width: 82rem; border-collapse: collapse; }
.share-analytics-table th, .share-analytics-table td { padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--studio-theme-border); text-align: left; vertical-align: top; }
.share-analytics-table th { color: var(--studio-theme-text-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.share-analytics-table td { color: var(--studio-theme-text-secondary); font-size: 0.82rem; }
.share-analytics-table tbody tr:last-child td { border-bottom: 0; }
.share-analytics-primary { color: var(--studio-theme-text); font-size: 0.86rem; font-weight: 700; }
.share-analytics-secondary { margin-top: 0.2rem; color: var(--studio-theme-text-muted); font-size: 0.7rem; overflow-wrap: anywhere; }
.share-analytics-badge { display: inline-flex; align-items: center; min-height: 1.65rem; padding: 0.2rem 0.55rem; border: 1px solid var(--studio-theme-border); border-radius: 999px; color: var(--studio-theme-text-secondary); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.share-analytics-badge.is-active, .share-analytics-badge.is-live { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); color: var(--studio-theme-active-text); }
.share-analytics-badge.is-expired { opacity: 0.65; }
.share-analytics-empty { padding: 2rem !important; color: var(--studio-theme-text-muted) !important; text-align: center !important; }
.share-analytics-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.5rem; border-top: 1px solid var(--studio-theme-border); }
.share-analytics-message { color: var(--studio-theme-text-muted); font-size: 0.8rem; }
.automation-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.automation-summary-card { min-width: 0; min-height: 5.5rem; padding: 1rem; }
.automation-table-panel { overflow: hidden; }
.automation-table { width: 100%; min-width: 80rem; border-collapse: collapse; }
.automation-table th, .automation-table td { padding: 0.85rem 0.75rem; border-bottom: 1px solid var(--studio-theme-border); text-align: left; vertical-align: top; }
.automation-table th { color: var(--studio-theme-text-muted); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.automation-table td { color: var(--studio-theme-text-secondary); font-size: 0.82rem; }
.automation-table tbody tr:last-child td { border-bottom: 0; }
.automation-name-cell { min-width: 16rem; }
.automation-row-toggle { display: flex; align-items: flex-start; width: 100%; gap: 0.55rem; color: inherit; text-align: left; }
.automation-row-toggle:focus-visible { border-radius: 0.45rem; outline: 2px solid var(--studio-theme-active-border); outline-offset: 0.2rem; }
.automation-row-chevron { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; width: 1rem; color: var(--studio-theme-text-muted); font-size: 1.25rem; line-height: 1; transform: rotate(0deg); transition: transform 0.16s ease, color 0.16s ease; }
.automation-row-toggle[aria-expanded="true"] .automation-row-chevron { color: var(--studio-theme-active-text); transform: rotate(90deg); }
.automation-name-content { display: grid; min-width: 0; gap: 0.2rem; }
.automation-name-cell strong { color: var(--studio-theme-text); font-size: 0.9rem; }
.automation-technical-id, .automation-result { color: var(--studio-theme-text-muted); font-size: 0.7rem; overflow-wrap: anywhere; }
.automation-result--error { color: var(--studio-theme-danger-text); }
.automation-row:hover td { background: var(--studio-theme-surface-muted); }
.automation-details-row td { padding: 0 0.75rem 0.85rem; }
.automation-description-panel { margin-left: 1.55rem; padding: 0.8rem 1rem; border-left: 2px solid var(--studio-theme-active-border); border-radius: 0 0.6rem 0.6rem 0; background: var(--studio-theme-surface-muted); color: var(--studio-theme-text-secondary); font-size: 0.82rem; line-height: 1.55; }
.automation-description-panel p { margin: 0; }
.automation-status { display: inline-flex; align-items: center; min-height: 1.65rem; padding: 0.2rem 0.55rem; border: 1px solid var(--studio-theme-border); border-radius: 9999px; color: var(--studio-theme-text-secondary); font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.automation-status--success { border-color: var(--studio-theme-success-text); color: var(--studio-theme-success-text); }
.automation-status--running { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); color: var(--studio-theme-active-text); }
.automation-status--warning, .automation-status--delayed, .automation-status--never_run { border-color: var(--studio-theme-active-border); color: var(--studio-theme-active-text); }
.automation-status--failed { border-color: var(--studio-theme-danger-border); background: var(--studio-theme-danger-bg); color: var(--studio-theme-danger-text); }
.automation-empty-cell { padding: 2rem !important; color: var(--studio-theme-text-muted) !important; text-align: center !important; }
.automation-message { padding: 1rem; border-top: 1px solid var(--studio-theme-border); color: var(--studio-theme-text-muted); font-size: 0.85rem; }
.automation-message--error { color: var(--studio-theme-danger-text); }
.admin-users-table { width: 100%; min-width: 100%; }
#view-team .admin-users-table { min-width: 760px; }
.team-member-row[role="link"]:focus-visible { outline: 2px solid var(--studio-theme-active-border); outline-offset: -2px; }
#team-workspace-id, #team-workspace-identifier { overflow-wrap: anywhere; }
.team-section-note { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--studio-theme-border); color: var(--studio-theme-text-muted); font-size: 0.9rem; }
#selected-user-layout { margin-top: 1rem; }

@media (min-width: 1400px) {
    .admin-overview-groups { grid-template-columns: minmax(0, 3fr) minmax(0, 4fr); align-items: start; }
}

@media (min-width: 1500px) {
    .share-analytics-groups { grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 4fr); align-items: start; }
}

.panel { border-color: var(--studio-theme-border-control) !important; background: var(--studio-theme-surface-panel) !important; }
.text-white { color: var(--studio-theme-text-strong) !important; }
.text-gray-200, .text-gray-300 { color: var(--studio-theme-text-secondary) !important; }
.text-gray-400, .text-gray-500 { color: var(--studio-theme-text-muted) !important; }
.border-gray-700, .border-gray-800 { border-color: var(--studio-theme-border) !important; }
.divide-gray-800 > :not([hidden]) ~ :not([hidden]) { border-color: var(--studio-theme-border) !important; }
[class~="bg-[#171717]"], [class~="bg-[#111]"], [class~="bg-[#1f1f1f]"] { background: var(--studio-theme-field-bg) !important; }
[class~="hover:bg-[#1f1f1f]"]:hover { background: var(--studio-theme-field-bg-focus) !important; }
.scroll-area { max-width: 100%; overflow: auto; scrollbar-color: var(--studio-theme-border-strong) transparent; }
.data-row:hover, .data-row.is-selected { background: var(--studio-theme-active-bg); }
.selected-user-layout, .customer-card, .pani-statistics-card, .pani-knowledge-source-card, .pani-knowledge-log-card, .pani-knowledge-chunk-card, .audio-job-card {
    border-color: var(--studio-theme-border) !important;
    background: var(--studio-theme-surface-card) !important;
}
.status-control-button {
    border-color: var(--studio-theme-active-border);
    background: var(--studio-theme-active-bg);
    color: var(--studio-theme-active-text);
}
.status-control-button:hover, .status-control-button:focus-visible { border-color: var(--studio-theme-active-border); color: var(--studio-theme-text-strong); }
.status-control-button--active, .status-control-button--active:hover, .status-control-button--active:focus-visible { color: var(--studio-theme-success-text); }
.status-control-button--locked, .status-control-button--locked:hover, .status-control-button--locked:focus-visible {
    border-color: var(--studio-theme-danger-border);
    background: var(--studio-theme-danger-bg);
    color: var(--studio-theme-danger-text);
}
.selected-user-trial-flow { color: var(--studio-theme-text-secondary); }
.selected-user-trial-flow-button, .selected-user-trial-flow-button:hover, .selected-user-trial-flow-button:focus-visible { color: var(--studio-theme-active-text); }
.uid-copy-label, .uid-copy-feedback { color: var(--studio-theme-text-muted); }
.pani-status-pill {
    border-color: var(--studio-theme-border-strong);
    background: var(--studio-theme-surface-muted);
    color: var(--studio-theme-text-secondary);
}
.pani-status-pill--live { color: var(--studio-theme-success-text); }
.pani-status-pill--ended { color: var(--studio-theme-text-secondary); }
.pani-status-pill--error {
    border-color: var(--studio-theme-danger-border);
    background: var(--studio-theme-danger-bg);
    color: var(--studio-theme-danger-text);
}
.pani-table-shell { border-color: var(--studio-theme-border) !important; background: var(--studio-theme-surface-deep) !important; }
.pani-chat-table th { color: var(--studio-theme-text-muted); }
.pani-chat-participant-name { color: var(--studio-theme-text-strong); }
.pani-insight-pill { border-color: var(--studio-theme-border-strong); background: var(--studio-theme-surface-muted); color: var(--studio-theme-text-secondary); }
.pani-insight-pill--good { color: var(--studio-theme-success-text); }
.pani-insight-pill--warn { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); color: var(--studio-theme-active-text); }
.pani-insight-pill--bad { border-color: var(--studio-theme-danger-border); background: var(--studio-theme-danger-bg); color: var(--studio-theme-danger-text); }
.pani-insight-pill--pending { color: var(--studio-theme-text-muted); }
.pani-chat-summary-text {
    border-color: var(--studio-theme-active-border);
    border-left-color: var(--studio-theme-active-border);
    background: var(--studio-theme-active-bg);
    color: var(--studio-theme-text-strong);
    box-shadow: none;
}
.pani-chat-summary-text.is-empty { border-color: var(--studio-theme-border); background: var(--studio-theme-surface-muted); color: var(--studio-theme-text-secondary); }
.pani-chat-icon-button:hover { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); color: var(--studio-theme-text-strong); }
.pani-chat-meta-item.is-primary { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); }
.pani-chat-message.is-user { border-color: var(--studio-theme-active-border) !important; background: var(--studio-theme-active-bg) !important; }
.pani-chat-message-text { color: var(--studio-theme-text-secondary); }
.pani-statistics-panel > #pani-stats-message { margin-top: 0.75rem; }
#pani-stats-summary, .pani-statistics-chart-wrap, #pani-stats-breakdown { margin-top: 1rem; }
.pani-stats-preset { border-color: var(--studio-theme-border); background: var(--studio-theme-secondary-action-bg); color: var(--studio-theme-secondary-action-text); }
.pani-stats-preset:hover, .pani-stats-preset.is-active { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); color: var(--studio-theme-active-text); }
.pani-statistics-card {
    border-color: var(--studio-theme-border) !important;
    background: var(--studio-theme-surface-card) !important;
}
.pani-statistics-card-label, .pani-statistics-card-note { color: var(--studio-theme-text-muted); }
.pani-statistics-card-value { color: var(--studio-theme-text-strong); }
.pani-statistics-chart-wrap, .pani-statistics-detail-table-wrap {
    border-color: var(--studio-theme-border);
    background: var(--studio-theme-surface-card);
}
.pani-statistics-bar-row, .pani-statistics-detail-table, .pani-statistics-breakdown-row { color: var(--studio-theme-text-secondary); }
.pani-statistics-bar-track { background: var(--studio-theme-surface-muted); }
.pani-statistics-detail-table th, .pani-statistics-detail-muted { color: var(--studio-theme-text-muted); }
.pani-statistics-detail-primary { color: var(--studio-theme-text-strong); }
.pani-statistics-detail-table th, .pani-statistics-detail-table td, .pani-statistics-breakdown-row { border-color: var(--studio-theme-border); }
.uid-copy-button, .agent-deploy-action, .agent-code-editor, .agent-code-textarea, .pani-chat-table thead,
.pani-chat-message, .workspace-button, .status-layer-close, .trial-date-trigger, .audio-job-secondary-button {
    border-color: var(--studio-theme-border) !important;
    background: var(--studio-theme-surface-sunken) !important;
    color: var(--studio-theme-text-secondary) !important;
}
#pani-knowledge-summary { margin-top: 1rem; }
.pani-knowledge-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: hidden;
    overflow-y: auto;
}
.pani-knowledge-source-card { min-width: 0; }
.pani-knowledge-card-preview {
    max-width: 100%;
    border-color: var(--studio-theme-active-border) !important;
    background: var(--studio-theme-active-bg) !important;
}
.pani-knowledge-card-preview-layout { display: flex; align-items: flex-start; gap: 0.75rem; min-width: 0; }
.pani-knowledge-card-preview-image {
    width: 6rem;
    height: 4rem;
    flex: 0 0 6rem;
    border-radius: 0.375rem;
    object-fit: cover;
}
.pani-knowledge-card-preview-content { min-width: 0; overflow-wrap: anywhere; }
.pani-knowledge-manual-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.pani-knowledge-manual-main, .pani-knowledge-manual-preview { min-width: 0; }
.pani-knowledge-source-card:hover, .pani-knowledge-source-card:focus-visible {
    border-color: var(--studio-theme-active-border) !important;
    background: var(--studio-theme-active-bg) !important;
}
.status-layer, .pani-chat-detail-modal, .pani-chat-tech-layer, .pani-knowledge-layer { background: var(--studio-theme-modal-backdrop) !important; }
.status-layer-panel, .pani-chat-detail-panel, .pani-chat-tech-panel, .pani-knowledge-layer-panel, .trial-date-layer-calendar {
    border-color: var(--studio-theme-border-strong) !important;
    background: var(--studio-theme-surface-popover) !important;
    color: var(--studio-theme-text) !important;
    box-shadow: var(--studio-theme-popover-shadow) !important;
}
.admin-notification {
    border-color: var(--studio-theme-border) !important;
    background: var(--studio-theme-surface-popover) !important;
    color: var(--studio-theme-text) !important;
    box-shadow: var(--studio-theme-popover-shadow) !important;
}
.admin-notification-title { color: var(--studio-theme-text-muted); }
.admin-notification-message { color: var(--studio-theme-text); }

#loading, #fallback-shell { min-height: calc(100vh - 1rem); }
#loading { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; }
#loading > div:last-child, #fallback {
    border: 1px solid var(--studio-theme-border);
    border-radius: 1rem;
    background: var(--studio-theme-surface-panel);
    color: var(--studio-theme-text);
}
#loading .muted { color: var(--studio-theme-text-muted); }
.spinner { width: 2.5rem; height: 2.5rem; border: 4px solid var(--studio-theme-active-bg); border-top-color: var(--studio-theme-primary-bg); border-radius: 9999px; animation: admin-spin 1s linear infinite; }
#fallback { width: min(100%, 35rem); margin: 8vh auto 0; padding: 2rem; text-align: center; }
#fallback a { color: var(--studio-theme-active-text); font-weight: 700; }
@keyframes admin-spin { to { transform: rotate(360deg); } }

@media (min-width: 640px) {
    body { padding: 1rem; }
    .admin-studio-shell { min-height: calc(100vh - 2rem); padding: 1rem; }
}

@media (min-width: 1100px) {
    .pani-knowledge-manual-layout { grid-template-columns: minmax(0, 1fr) minmax(20rem, 22.5rem); }
    .pani-knowledge-manual-preview { position: sticky; top: 1rem; align-self: start; }
}

@media (max-width: 900px) {
    .admin-layout { flex-direction: column; gap: 1rem; }
    .admin-main { width: 100%; max-width: 100%; }
    .admin-overview-group .admin-overview-stats--accounts, .admin-overview-group .admin-overview-stats--subscriptions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .live-presence-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .share-analytics-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .automation-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-nav-shell { position: relative; display: flex; align-items: stretch; width: 100%; min-width: 0; overflow: visible; border: 1px solid var(--studio-theme-border); border-radius: 0.85rem; background: var(--studio-theme-surface-overlay); }
    .admin-sidebar { position: static; display: flex; flex: 1 1 0; width: 0 !important; max-width: none; padding: 0.45rem !important; border: 0 !important; border-radius: 0.85rem !important; background: transparent !important; }
    .admin-nav { width: 100%; flex-direction: row; align-items: center; gap: 0.25rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; scroll-snap-type: inline proximity; }
    .admin-nav::-webkit-scrollbar { display: none; }
    .nav-tab { width: auto; flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
    .nav-submenu.is-open { position: absolute; top: calc(100% + 0.5rem); left: 0.5rem; z-index: 2050; display: flex; flex-direction: column; width: min(18rem, calc(100vw - 1rem)); max-height: calc(100dvh - 1rem); margin: 0; padding: 0.45rem; overflow-y: auto; border: 1px solid var(--studio-theme-border-strong); border-radius: 0.85rem; background: var(--studio-theme-surface-overlay); box-shadow: var(--studio-theme-popover-shadow); }
}

@media (max-width: 720px) {
    .pani-knowledge-source-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
    body { padding: 0; }
    .admin-studio-shell { min-height: 100vh; padding: 0.5rem; border-radius: 0; box-shadow: none; }
    .studio-header { min-height: 3.5rem; margin-bottom: 0.75rem; }
    .studio-header-left { flex-shrink: 0; }
    .studio-brand-link { width: 2.75rem; height: 2.75rem; margin-left: 0.5rem; }
    .studio-brand-wordmark { display: none; }
    .studio-brand-mark { display: block; width: 2.75rem; }
    .account-menu-flyout { position: fixed; top: 4.2rem; right: 0.5rem; }
    #admin-notification-container { top: 4.8rem; }
}

@media (max-width: 500px) {
    .admin-overview-group .admin-overview-stats--accounts, .admin-overview-group .admin-overview-stats--subscriptions { grid-template-columns: minmax(0, 1fr); }
    .live-presence-header { align-items: flex-start; flex-direction: column; gap: 0.25rem; }
    .live-presence-message { text-align: left; }
    .live-presence-summary { grid-template-columns: minmax(0, 1fr); }
    .share-analytics-stats, .share-analytics-filter-grid { grid-template-columns: minmax(0, 1fr); }
    .share-analytics-footer { align-items: stretch; flex-direction: column; }
    .automation-summary-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-nav-shell { position: relative; }
    .workspace-compact-nav-toggle { display: flex; flex: 1 1 auto; align-items: center; justify-content: flex-start; gap: 0.55rem; min-width: 0; min-height: 2.65rem; margin: 0.45rem; padding: 0.55rem 0.7rem; border: 1px solid transparent; border-radius: 0.75rem; background: var(--studio-theme-campus-nav-item-active-background); color: var(--studio-theme-campus-nav-item-active-color); font-size: 0.86rem; font-weight: 700; line-height: 1.2; text-align: left; }
    .workspace-compact-nav-toggle:hover, .workspace-compact-nav-toggle:focus-visible { border-color: var(--studio-theme-active-border); background: var(--studio-theme-active-bg); outline: none; }
    .workspace-compact-nav-icon { display: inline-flex; width: 1.2rem; height: 1.2rem; }
    .workspace-compact-nav-icon svg { width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
    .workspace-compact-nav-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .workspace-compact-nav-chevron { width: 1rem; height: 1rem; transition: transform 0.2s ease; }
    .admin-nav-shell.is-compact-nav-open .workspace-compact-nav-chevron { transform: rotate(180deg); }
    .admin-sidebar { position: absolute; top: calc(100% + 0.5rem); left: 0; z-index: 2040; display: none; width: 100% !important; padding: 0.45rem !important; border: 1px solid var(--studio-theme-border-strong) !important; background: var(--studio-theme-surface-overlay) !important; box-shadow: var(--studio-theme-popover-shadow); }
    .admin-nav-shell.is-compact-nav-open .admin-sidebar { display: block; }
    .admin-nav { flex-direction: column; align-items: stretch; overflow: visible; }
    .nav-tab { width: 100%; justify-content: flex-start; }
    .nav-submenu.is-open { position: static; display: grid; width: 100%; max-height: none; margin: 0.1rem 0 0.35rem 1.65rem; padding: 0 0 0 0.65rem; overflow: visible; border: 0; border-left: 1px solid var(--studio-theme-border-strong); border-radius: 0; background: transparent; box-shadow: none; }
}

@media (max-width: 380px) {
    .studio-brand-link { margin-left: 0.25rem; }
    .studio-brand-mark { width: 2.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
