/* ═══════════════════════════════════════════════════════════════════════
   CareCommunity · Communication Hub · Global Styles
   Audi RS8 Cockpit · LED Glow · Dark Navy
   ═══════════════════════════════════════════════════════════════════════ */


:root {
    --bg-void:    #03070f;
    --bg-deep:    #060d1a;
    --bg-panel:   #091221;
    --bg-card:    #0c1829;
    --bg-raised:  #0f1f33;
    --cyan:       #1ac6ff;
    --cyan-dim:   rgba(26,198,255,0.12);
    --orange:     #ff5e1a;
    --gold:       #ffaa00;
    --blue:       #3b8bff;
    --magenta:    #d94fff;
    --green:      #1affa0;
    --red:        #ff3d3d;
    --amber:      #ffbb33;
    --border-1:   rgba(26,198,255,0.18);
    --border-2:   rgba(255,255,255,0.07);
    --text-1:     #e8f4ff;
    --text-2:     rgba(232,244,255,0.6);
    --text-3:     rgba(232,244,255,0.3);
    --mono:       'JetBrains Mono', monospace;
    --sans:       'DM Sans', sans-serif;
}


/* ── Scrollbars ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(26,198,255,0.04); }
::-webkit-scrollbar-thumb {
    background: rgba(26,198,255,0.45);
    border-radius: 5px;
    border: 2px solid transparent;
    background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(26,198,255,0.75); background-clip: padding-box; }
* { scrollbar-color: rgba(26,198,255,0.55) rgba(26,198,255,0.05); scrollbar-width: thin; }

/* ── Form Elements ────────────────────────────────────────────────────── */
input, textarea, select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(26,198,255,0.15);
    border-radius: 6px;
    padding: 9px 12px;
    color: var(--text-1);
    font-size: 13px;
    font-family: var(--sans);
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
    border-color: rgba(26,198,255,0.5);
    box-shadow: 0 0 0 3px rgba(26,198,255,0.08), 0 0 12px rgba(26,198,255,0.1);
}

/* ── Animations ───────────────────────────────────────────────────────── */
@keyframes led-scan {
    0%   { background-position: -200% center; }
    100% { background-position: 300% center; }
}
@keyframes glow-pulse {
    0%,100% { opacity: 0.5; }
    50%      { opacity: 1; }
}
@keyframes slide-up {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes composer-in {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Layout ───────────────────────────────────────────────────────────── */
.hub-root {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    background: var(--bg-void);
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(26,198,255,0.02) 40px),
        repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(26,198,255,0.015) 40px);
}

.hub-page {
    width: 100%;
    flex: 1;
    display: flex;
    min-height: 0;
}

.hub-context-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 16px;
    padding: 10px 22px 12px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(6,13,26,0.98), rgba(3,7,15,0.94));
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.hub-context-primary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    flex: 1;
    min-width: 200px;
}

.hub-back-link {
    font-size: 11px;
    font-weight: 600;
    color: rgba(26,198,255,0.85);
    text-decoration: none;
    letter-spacing: 0.2px;
    transition: color 0.15s, text-shadow 0.15s;
}
.hub-back-link:hover {
    color: var(--cyan);
    text-shadow: 0 0 8px rgba(26,198,255,0.35);
}

.hub-context-sep { color: var(--text-3); font-weight: 500; user-select: none; }

.hub-context-channel {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.hub-context-sub {
    font-size: 12px;
    color: var(--text-3);
    width: 100%;
    flex-basis: 100%;
    padding-left: 0;
}

@media (min-width: 640px) {
    .hub-context-sub {
        width: auto;
        flex-basis: auto;
        padding-left: 4px;
    }
}

.hub-context-alert {
    width: 100%;
    flex-basis: 100%;
    font-size: 12px;
    color: var(--amber);
    background: rgba(255,187,51,0.08);
    border: 1px solid rgba(255,187,51,0.22);
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.4;
}

.hub-context-alert--muted {
    color: var(--text-2);
    border-color: rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.03);
}

.hub-context-hint {
    width: 100%;
    flex-basis: 100%;
    font-size: 12px;
    color: var(--text-2);
    background: rgba(26,255,160,0.06);
    border: 1px solid rgba(26,255,160,0.18);
    border-radius: 8px;
    padding: 10px 12px;
    line-height: 1.45;
}

.hub-divider-fade {
    height: 12px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent);
    pointer-events: none;
}

.hub-studio-unknown {
    max-width: 520px;
    margin: clamp(28px, 6vh, 48px) auto;
    padding: 28px 26px;
    text-align: center;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(12,24,41,0.55);
}

.hub-studio-unknown-lead {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    margin: 0 0 10px;
    line-height: 1.45;
}

.hub-studio-unknown-copy {
    font-size: 12px;
    color: var(--text-3);
    margin: 0 0 22px;
    line-height: 1.55;
}

.hub-studio-unknown-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

a.hub-studio-link {
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.hub-studio-link--ghost {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.1);
}

.studio-pill-muted {
    opacity: 0.42;
}

.hub-main {
    flex: 1; display: flex; min-height: 0;
}

.hub-content {
    flex: 1; display: flex; flex-direction: column; min-height: 0;
}

/* ── LED Strip ────────────────────────────────────────────────────────── */
.led-strip {
    height: 2px; flex-shrink: 0;
    background: linear-gradient(90deg,
        transparent 0%, var(--orange) 15%, var(--gold) 30%,
        var(--cyan) 50%, var(--blue) 65%, var(--cyan) 80%, transparent 100%);
    background-size: 200% 100%;
    animation: led-scan 3.5s linear infinite;
    box-shadow: 0 0 8px rgba(26,198,255,0.4);
    position: relative;
}
.led-strip-thin {
    height: 1px; flex-shrink: 0;
    background: linear-gradient(90deg, transparent, var(--cyan) 40%, var(--blue) 60%, transparent);
    background-size: 200% 100%;
    animation: led-scan 3s linear infinite;
    opacity: 0.6;
}
.led-custom {
    height: 1px; flex-shrink: 0;
}

/* ── Top Bar ──────────────────────────────────────────────────────────── */
.hub-topbar {
    display: flex; align-items: center;
    padding: 12px 22px; min-height: 154px;
    background: rgba(3,7,15,0.98);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}
.hub-logo {
    display: flex; align-items: center; gap: 18px; margin-right: 32px;
}
.hub-logo img {
    width: 136px; height: 136px; border-radius: 28px; object-fit: cover;
    box-shadow: 0 0 30px rgba(26,198,255,0.42), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.hub-logo-title {
    font-size: 18px; font-weight: 800; color: var(--text-1); letter-spacing: -0.3px; line-height: 1;
}
.hub-logo-sub {
    font-size: 11px; color: var(--text-3); letter-spacing: 1px; margin-top: 6px;
}
.hub-status-badges {
    display: flex; gap: 6px;
}
.hub-status-badge {
    font-size: 11px; padding: 3px 10px; border-radius: 6px;
    border: 1px solid;
}
.hub-topbar-spacer { flex: 1; }
.hub-time {
    font-size: 11px; color: var(--text-3); font-family: var(--mono); margin-right: 16px;
}
.hub-compose-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 18px;
    background: linear-gradient(135deg, rgba(26,198,255,0.18), rgba(255,94,26,0.12));
    border: 1px solid rgba(26,198,255,0.35); border-radius: 9px;
    color: var(--cyan); font-size: 13px; font-weight: 700; cursor: pointer;
    font-family: var(--sans); letter-spacing: 0.3px;
    box-shadow: 0 0 18px rgba(26,198,255,0.15);
    transition: all 0.2s;
}
.hub-compose-btn:hover {
    box-shadow: 0 0 28px rgba(26,198,255,0.3);
    border-color: rgba(26,198,255,0.6);
}
.hub-compose-icon { font-size: 20px; line-height: 1; text-shadow: 0 0 10px var(--cyan); }
@media (max-width: 920px) {
    .hub-topbar {
        flex-wrap: wrap;
        height: auto;
        gap: 10px;
        padding: 10px 16px;
    }
    .hub-context-bar { padding-inline: 16px; }
}

.hub-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; cursor: pointer; margin-left: 10px;
}

/* ── Channel Tabs ─────────────────────────────────────────────────────── */
.hub-tabs {
    display: flex; align-items: stretch;
    background: rgba(6,13,26,0.95);
    border-bottom: 1px solid var(--border-2);
    flex-shrink: 0; overflow-x: auto;
}
.hub-tab-icon {
    width: 13px; height: 13px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.hub-tab {
    display: flex; align-items: center; gap: 7px;
    padding: 0 15px; height: 48px;
    background: none; border: none; cursor: pointer;
    font-family: var(--sans); font-size: 12px; font-weight: 400;
    border-bottom: 2px solid transparent;
    color: var(--text-3);
    transition: all 0.15s; white-space: nowrap; flex-shrink: 0;
    margin-bottom: -1px;
}
.hub-tab.active {
    font-weight: 600;
    border-bottom-color: var(--tab-color, var(--cyan));
    color: var(--tab-color, var(--cyan));
    text-shadow: 0 0 10px var(--tab-color, var(--cyan));
    background: color-mix(in srgb, var(--tab-color, var(--cyan)) 6%, transparent);
}
.hub-tab-badge {
    font-size: 10px; padding: 1px 6px; border-radius: 8px;
    background: color-mix(in srgb, var(--tab-color, var(--cyan)) 15%, transparent);
    color: var(--tab-color, var(--cyan));
}
.hub-tab:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--tab-color, var(--cyan)) 70%, white);
    outline-offset: -2px;
}
.hub-overview {
    flex: 1; overflow-y: auto; padding: 22px 26px;
    animation: slide-up 0.3s ease;
}
.hub-overview-snapshot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--text-3);
    font-size: 11px;
}
.hub-overview-snapshot div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.hub-overview-snapshot span {
    letter-spacing: 1.6px;
    text-transform: uppercase;
}
.hub-overview-snapshot strong {
    color: var(--cyan);
    font-family: var(--mono);
    font-size: 12px;
}
.hub-overview-snapshot small {
    color: var(--amber);
}
.hub-kpi-grid {
    display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; margin-bottom: 28px;
}
.hub-kpi-card {
    background: var(--bg-card); border-radius: 12px; padding: 18px 20px;
    position: relative; overflow: hidden; border: 1px solid;
}
.hub-kpi-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    animation: glow-pulse 2.5s ease-in-out infinite;
}
.hub-kpi-value {
    font-size: 30px; font-weight: 700; font-family: var(--mono);
    line-height: 1; margin-top: 6px;
}
.hub-kpi-label {
    font-size: 12px; color: var(--text-1); margin-top: 8px; font-weight: 500;
}
.hub-kpi-sub {
    font-size: 11px; color: var(--text-3); margin-top: 3px;
}

.hub-section-header {
    margin-bottom: 10px; font-size: 10px; font-weight: 600;
    color: var(--text-3); letter-spacing: 2px; text-transform: uppercase;
    display: flex; align-items: center; gap: 10px;
}
.hub-section-line {
    flex: 1; height: 1px;
    background: linear-gradient(90deg, rgba(26,198,255,0.2), transparent);
}

.hub-channels-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(175px,1fr));
    gap: 10px; margin-bottom: 28px;
}

/* ── Channel Card ─────────────────────────────────────────────────────── */
.channel-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid;
    border-radius: 12px; padding: 15px 15px 13px;
    cursor: pointer; position: relative; overflow: hidden;
    transition: all 0.2s;
}
.channel-card:hover {
    transform: translateY(-2px);
}
.channel-card-glow {
    position: absolute; top: 0; left: 5%; right: 5%; height: 1px;
    background: linear-gradient(90deg, transparent, var(--ch-color, var(--cyan)), transparent);
    transition: all 0.2s;
}
.channel-card-icon {
    width: 34px; height: 34px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}
.channel-card-label {
    font-size: 10px; font-weight: 600; color: var(--text-3);
    letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 4px;
}
.channel-card-value {
    font-size: 24px; font-weight: 700; font-family: var(--mono);
    line-height: 1; margin-bottom: 4px;
    transition: text-shadow 0.2s;
}
.channel-card-stat { font-size: 11px; color: var(--text-2); }
.channel-card-sub  { font-size: 10px; color: var(--text-3); margin-top: 2px; }
.channel-card-alert {
    position: absolute; top: 13px; right: 13px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--red); box-shadow: 0 0 8px var(--red);
    animation: glow-pulse 1.8s ease-in-out infinite;
}

/* ── Timeline Row ─────────────────────────────────────────────────────── */
.hub-timeline { display: grid; gap: 5px; }
.timeline-row {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px; padding: 9px 14px;
    transition: background 0.15s;
}
.timeline-row:hover { background: rgba(255,255,255,0.04); }
.timeline-dot {
    width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.timeline-time {
    font-size: 11px; color: var(--text-3); font-family: var(--mono); flex-shrink: 0; width: 36px;
}
.timeline-text {
    font-size: 12px; color: var(--text-2);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.timeline-sub { font-size: 10px; color: var(--text-3); }

/* ── Timeline Panel ───────────────────────────────────────────────────── */
.hub-timeline-panel {
    width: 280px; flex-shrink: 0;
    display: flex; flex-direction: column;
    border-left: 1px solid var(--border-2);
    background: rgba(6,13,26,0.7);
}
.hub-timeline-header {
    padding: 14px 14px 0;
}
.hub-timeline-filters {
    display: flex; gap: 4px; flex-wrap: wrap;
    margin-top: 10px; padding-bottom: 10px;
    border-bottom: 1px solid var(--border-2);
}
.hub-timeline-filter-btn {
    font-size: 10px; padding: 3px 8px; border-radius: 6px;
    border: none; cursor: pointer; font-family: var(--sans);
    background: rgba(255,255,255,0.05); color: var(--text-3);
    transition: all 0.15s;
}
.hub-timeline-filter-btn.active {
    background: rgba(26,198,255,0.18); color: var(--cyan);
    box-shadow: 0 0 8px rgba(26,198,255,0.2);
}
.hub-timeline-scroll {
    flex: 1; overflow-y: auto; padding: 10px 12px;
    display: flex; flex-direction: column; gap: 0;
}
.hub-timeline-item { display: flex; gap: 10px; }
.hub-timeline-track {
    display: flex; flex-direction: column; align-items: center;
}
.hub-timeline-dot {
    width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
}
.hub-timeline-line {
    width: 1px; flex: 1; background: rgba(255,255,255,0.05); min-height: 16px;
}
.hub-timeline-content { flex: 1; padding-bottom: 12px; }
.hub-timeline-t {
    font-size: 10px; color: var(--text-3); font-family: var(--mono); margin-bottom: 2px;
}
.hub-timeline-msg { font-size: 11px; color: var(--text-2); line-height: 1.4; }
.hub-timeline-sub { font-size: 10px; color: var(--text-3); margin-top: 1px; }

/* ── Studio Shell ─────────────────────────────────────────────────────── */
.studio-header {
    padding: 14px 22px; border-bottom: 1px solid var(--border-2);
    display: flex; align-items: center; gap: 14px; flex-shrink: 0;
    background: rgba(6,13,26,0.6);
}
.studio-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.studio-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.studio-title span { } /* colored part set inline */
.studio-sub { font-size: 11px; color: var(--text-3); }
.studio-actions { margin-left: auto; display: flex; gap: 6px; }
.studio-body {
    flex: 1; overflow-y: auto; padding: 18px 22px;
    display: flex; gap: 20px;
    min-height: 0;
    min-width: 0;
}
.studio-body.no-pad { padding: 0; }
.studio-left  { flex: 1.2; overflow-y: auto; padding-right: 4px; min-width: 0; }
.studio-right { width: min(320px, 32vw); min-width: 280px; flex-shrink: 0; overflow-y: auto; }

@media (max-width: 1180px) {
    .studio-body {
        flex-direction: column;
    }

    .studio-left,
    .studio-right {
        width: 100%;
        min-width: 0;
        overflow: visible;
        padding-right: 0;
    }
}

/* ── Studio Section ───────────────────────────────────────────────────── */
.studio-section { margin-bottom: 20px; }
.studio-section-label {
    font-size: 10px; font-weight: 600; color: var(--text-3);
    letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.studio-section-line { flex: 1; height: 1px; }

/* ── Pills / Buttons ──────────────────────────────────────────────────── */
.pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px; padding: 7px 14px;
    color: var(--text-2); font-size: 12px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s; font-family: var(--sans);
}
.pill:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
    color: var(--text-1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.pill:active {
    transform: scale(.94);
    transition-duration: 60ms;
    filter: brightness(.85);
    box-shadow: inset 0 2px 6px rgba(0,0,0,.3);
}
.pill.active {
    background: color-mix(in srgb, var(--pill-color, var(--cyan)) 15%, transparent);
    border-color: var(--pill-color, var(--cyan));
    color: var(--pill-color, var(--cyan));
    box-shadow: 0 0 10px color-mix(in srgb, var(--pill-color, var(--cyan)) 20%, transparent);
}
.pill.primary {
    background: rgba(26,198,255,0.15);
    border-color: var(--cyan); color: var(--cyan);
    box-shadow: 0 0 14px rgba(26,198,255,0.25); font-weight: 700;
}

/* ── Stat Grid ────────────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-card {
    background: rgba(255,255,255,0.03); border-radius: 8px;
    padding: 14px; position: relative; overflow: hidden; border: 1px solid;
}
.stat-card-bar {
    position: absolute; top: 0; left: 0; right: 0; height: 1px;
}
.stat-card-value {
    font-size: 22px; font-weight: 700; font-family: var(--mono);
}
.stat-card-label { font-size: 10px; color: var(--text-3); margin-top: 3px; letter-spacing: 0.5px; }

.push-history-refresh {
    margin-left: auto;
    padding: 4px 9px;
    font-size: 10px;
}

.push-history-list {
    display: grid;
    gap: 8px;
}

.push-history-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-3);
    font-size: 11px;
}

.push-history-summary span {
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.07);
}

.push-history-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    padding: 12px 13px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.035);
}

.push-history-row.is-success { border-color: rgba(26,255,160,0.18); }
.push-history-row.is-error { border-color: rgba(255,61,61,0.26); background: rgba(255,61,61,0.055); }
.push-history-row.is-scheduled { border-color: rgba(255,170,0,0.22); }

.push-history-main {
    min-width: 0;
}

.push-history-title {
    color: var(--text-1);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.push-history-body {
    margin-top: 3px;
    color: var(--text-3);
    font-size: 11px;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.push-history-error {
    margin-top: 8px;
    color: var(--red);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.push-history-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    color: var(--text-3);
    font-size: 10px;
    white-space: nowrap;
}

.push-history-status {
    color: var(--text-1);
    font-weight: 700;
}

.push-history-empty {
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: var(--text-3);
    font-size: 12px;
    text-align: center;
}

/* ── Push Preview ─────────────────────────────────────────────────────── */
.push-preview {
    background: var(--bg-void); border-radius: 14px; padding: 20px;
    border: 1px solid rgba(26,198,255,0.15); position: relative; overflow: hidden;
}
.push-preview-app {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px; margin-top: 14px;
}
.push-preview-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: rgba(26,198,255,0.15); border: 1px solid rgba(26,198,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; box-shadow: 0 0 12px rgba(26,198,255,0.2);
}
.push-preview-title { font-size: 14px; font-weight: 600; color: var(--text-1); margin-bottom: 4px; }
.push-preview-body  { font-size: 12px; color: var(--text-2); line-height: 1.6; }

/* ── Live Chat ────────────────────────────────────────────────────────── */
.chat-list { width: 260px; border-right: 1px solid var(--border-2); flex-shrink: 0; display: flex; flex-direction: column; }
.chat-list-search { padding: 14px 14px 10px; display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-refresh { min-height: 30px; padding: 0 10px; font-size: 11px; }
.chat-stats {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px;
    padding: 0 14px 12px;
}
.chat-stats > div {
    min-width: 0; padding: 8px 9px; border: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.035); border-radius: 8px;
}
.chat-stats strong { display: block; color: var(--text-1); font-size: 16px; line-height: 1; }
.chat-stats span {
    display: block; color: var(--text-3); font-size: 10px; margin-top: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chat-search-results {
    margin: 0 14px 10px;
    padding: 8px 10px;
    background: rgba(26,198,255,0.06);
    border: 1px solid rgba(26,198,255,0.18);
    border-radius: 8px;
    box-shadow: 0 0 8px rgba(26,198,255,0.08);
}
.chat-search-results-label {
    font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--cyan); margin-bottom: 6px; font-weight: 600;
}
.chat-search-result {
    padding: 7px 8px; cursor: pointer; border-radius: 6px;
    transition: background 0.12s;
}
.chat-search-result:hover { background: rgba(26,198,255,0.12); }
.chat-search-result-name { font-size: 12px; color: var(--text-1); font-weight: 500; }
.chat-search-result-meta { font-size: 10px; color: var(--text-3); margin-top: 2px; }

.chat-list-scroll { flex: 1; overflow-y: auto; }
.chat-item {
    padding: 12px 14px; cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    border-left: 2px solid transparent; transition: all 0.15s;
}
.chat-item.active { background: rgba(59,139,255,0.08); border-left-color: var(--blue); }
.chat-item.unread {
    background: rgba(26,198,255,0.075); border-left-color: var(--cyan);
    box-shadow: inset 0 0 18px rgba(26,198,255,0.06);
}
.chat-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3px; }
.chat-item-name { font-size: 13px; font-weight: 600; color: var(--text-1); }
.chat-item-id { color: var(--text-3); font-weight: 400; font-size: 11px; }
.chat-item-last { font-size: 11px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread {
    float: right; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px;
    border-radius: 999px; background: rgba(26,198,255,0.2); color: var(--cyan);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700;
}

.chat-main { flex: 1; display: flex; flex-direction: column; }
.chat-header { padding: 12px 18px; border-bottom: 1px solid var(--border-2); display: flex; align-items: center; gap: 12px; }
.chat-messages { flex: 1; padding: 16px 18px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble {
    max-width: 70%; border-radius: 10px; padding: 10px 14px; border: 1px solid;
}
.chat-bubble.admin { background: rgba(59,139,255,0.15); border-color: rgba(59,139,255,0.25); box-shadow: 0 0 12px rgba(59,139,255,0.1); align-self: flex-end; }
.chat-bubble.user  { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.07); align-self: flex-start; }
.chat-bubble.deep-link-target {
    animation: cc-deep-link-pop 1.8s cubic-bezier(.16, 1, .3, 1) both;
    border-color: var(--blue);
}
.chat-bubble-text { font-size: 13px; color: var(--text-1); line-height: 1.5; }
.chat-bubble-time { font-size: 10px; color: var(--text-3); margin-top: 3px; }

@keyframes cc-deep-link-pop {
    0% { transform: scale(.94); box-shadow: 0 0 0 0 rgba(59,139,255,.0), 0 0 0 rgba(59,139,255,.0); }
    18% { transform: scale(1.045); box-shadow: 0 0 0 5px rgba(59,139,255,.26), 0 0 42px rgba(59,139,255,.45); }
    42% { transform: scale(1); box-shadow: 0 0 0 2px rgba(59,139,255,.18), 0 0 28px rgba(59,139,255,.30); }
    100% { transform: scale(1); box-shadow: 0 0 0 1px rgba(59,139,255,.08), 0 0 12px rgba(59,139,255,.12); }
}
.chat-input-row { padding: 10px 14px; display: flex; gap: 8px; }

/* ── Notes Page Layout ────────────────────────────────────────────────── */
.notes-body {
    flex-direction: column;
    overflow-y: auto;   /* war: hidden — verhinderte dass Speichern-Button sichtbar war */
    overflow-x: hidden;
}
.notes-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-2);
    margin-bottom: 12px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--bg-deep);  /* Toolbar bleibt beim Scrollen sichtbar */
}
.notes-search-input {
    flex: 1;
    min-width: 180px;
    font-size: 12px;
}
.notes-new-form {
    flex-shrink: 0;  /* Formular drückt notes-scroll nach unten */
}
.notes-scroll {
    flex: 1;
    padding-right: 6px;
    min-height: 120px;
}

.notes-user-results {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
    background: rgba(245,158,11,0.04);
    border: 1px solid rgba(245,158,11,0.18);
    border-radius: 8px;
}
.notes-user-row {
    padding: 7px 9px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    transition: background 0.12s;
}
.notes-user-row:hover { background: rgba(245,158,11,0.12); }
.notes-user-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(245,158,11,0.18); border: 1px solid rgba(245,158,11,0.35);
    color: var(--amber); display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.notes-user-info { min-width: 0; flex: 1; }
.notes-user-name { font-size: 12px; color: var(--text-1); font-weight: 500; }
.notes-user-meta { font-size: 10px; color: var(--text-3); margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.notes-user-display {
    display: flex; align-items: center; gap: 7px;
}
.notes-user-display-avatar {
    width: 22px; height: 22px; border-radius: 50%;
    object-fit: cover;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.35);
    color: var(--amber);
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
    flex-shrink: 0;
}

.notes-meta-right {
    font-size: 10px; color: var(--text-3); text-align: right;
    cursor: help;
}
.notes-meta-right .dim {
    color: var(--text-3);
    margin-top: 2px;
}

.note-text .mention {
    color: var(--cyan);
    background: rgba(26,198,255,0.10);
    padding: 1px 5px;
    border-radius: 4px;
    font-weight: 600;
}

.note-edit-block {
    background: rgba(245,158,11,0.04);
    border: 1px dashed rgba(245,158,11,0.28);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

/* ── Note Card ────────────────────────────────────────────────────────── */
.note-card {
    background: var(--bg-card); border-right: 1px solid; border-top: 1px solid; border-bottom: 1px solid;
    border-radius: 0 10px 10px 0; padding: 14px 16px;
    position: relative; overflow: hidden; margin-bottom: 10px;
}
.note-card-bar { position: absolute; top: 0; left: 0; right: 0; height: 1px; }
.note-type-badge {
    font-size: 10px; font-weight: 700; padding: 3px 8px;
    border-radius: 5px; letter-spacing: 1px; display: inline-block;
}
.note-tag { font-size: 10px; background: rgba(255,255,255,0.06); color: var(--text-3); padding: 2px 8px; border-radius: 8px; }
.note-link { font-size: 10px; background: rgba(59,139,255,0.15); color: var(--blue); padding: 2px 8px; border-radius: 8px; cursor: pointer; }

/* ── Email Preview ────────────────────────────────────────────────────── */
.email-preview-wrap { background: #fff; border-radius: 12px; padding: 22px; color: #1a1a1a; box-shadow: 0 0 24px rgba(217,79,255,0.1); }

/* ── Team Chat ────────────────────────────────────────────────────────── */
.team-sidebar { width: 240px; border-right: 1px solid var(--border-2); flex-shrink: 0; display: flex; flex-direction: column; }
.team-sidebar-header {
    padding: 14px 14px 10px; display: flex; align-items: center; justify-content: space-between;
}
.team-new-chat-btn {
    width: 24px; height: 24px; border-radius: 50%;
    background: rgba(217,79,255,0.18); border: 1px solid var(--magenta); color: var(--magenta);
    font-size: 16px; line-height: 1; cursor: pointer; padding: 0;
    box-shadow: 0 0 8px rgba(217,79,255,0.3);
    transition: all 0.15s;
}
.team-new-chat-btn:hover { background: rgba(217,79,255,0.32); transform: scale(1.05); }

.team-mod-picker {
    margin: 8px 14px 6px; padding: 10px 10px 8px;
    background: rgba(217,79,255,0.06); border: 1px solid rgba(217,79,255,0.22);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(217,79,255,0.08);
}
.team-mod-picker-label {
    font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--magenta); margin-bottom: 8px; font-weight: 600;
}
.team-mod-picker-empty { font-size: 11px; color: var(--text-3); padding: 4px; }
.team-mod-row {
    padding: 6px 6px; cursor: pointer; border-radius: 6px;
    display: flex; align-items: center; gap: 9px; transition: background 0.12s;
}
.team-mod-row:hover { background: rgba(217,79,255,0.12); }
.team-mod-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    background: rgba(217,79,255,0.18); border: 1px solid rgba(217,79,255,0.35);
    color: var(--magenta); display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; flex-shrink: 0;
}
.team-mod-info { min-width: 0; }
.team-mod-name { font-size: 12px; color: var(--text-1); font-weight: 500; }
.team-mod-meta { font-size: 10px; color: var(--text-3); margin-top: 2px; }

.team-empty-list {
    padding: 24px 18px; text-align: center; font-size: 12px;
    color: var(--text-3); line-height: 1.5;
}

.team-channel-btn {
    padding: 8px 14px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    border-left: 2px solid transparent; transition: all 0.15s;
}
.team-channel-btn.active { background: rgba(217,79,255,0.08); border-left-color: var(--magenta); }
.team-online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.team-msg { display: flex; gap: 12px; }
.team-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
}
.team-unread {
    font-size: 10px; background: var(--red); color: #fff;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 6px var(--red);
}

/* ── Composer Modal ───────────────────────────────────────────────────── */
.composer-backdrop {
    position: fixed; inset: 0;
    background: rgba(3,7,15,0.88);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; backdrop-filter: blur(10px);
}
.composer-modal {
    width: 660px; max-height: 88vh;
    background: var(--bg-deep);
    border: 1px solid rgba(26,198,255,0.2);
    border-radius: 18px;
    display: flex; flex-direction: column; overflow: hidden;
    animation: composer-in 0.25s ease;
    box-shadow: 0 40px 100px rgba(0,0,0,0.7), 0 0 40px rgba(26,198,255,0.05);
}
.composer-header {
    padding: 18px 24px 14px; border-bottom: 1px solid var(--border-2);
    display: flex; align-items: center; justify-content: space-between;
}
.composer-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.composer-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.composer-close {
    background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px; width: 30px; height: 30px; cursor: pointer;
    color: var(--text-3); font-size: 15px; display: flex; align-items: center; justify-content: center;
    transition: all 0.15s;
}
.composer-close:hover { background: rgba(255,255,255,0.12); color: var(--text-1); }
.composer-steps { display: flex; padding: 14px 24px; gap: 6px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.composer-step-circle {
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 700; transition: all 0.2s;
}
.composer-body { flex: 1; overflow-y: auto; padding: 20px 24px; }
.composer-footer { padding: 12px 24px; display: flex; justify-content: space-between; }

/* ── Reach Banner ─────────────────────────────────────────────────────── */
.reach-banner {
    background: rgba(26,198,255,0.05);
    border: 1px solid rgba(26,198,255,0.15);
    border-radius: 10px; padding: 12px 16px;
    display: flex; justify-content: space-between; align-items: center;
}
.reach-value { font-family: var(--mono); color: var(--cyan); font-size: 18px; font-weight: 700; text-shadow: 0 0 10px var(--cyan); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
    .hub-kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .hub-timeline-panel { display: none; }
}
@media (max-width: 900px) {
    .hub-channels-grid { grid-template-columns: repeat(2, 1fr); }
    .studio-right { display: none; }
}

/* ══ Mobile ≤ 767px ══════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    /* Tabs: horizontal scroll instead of wrapping */
    .hub-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
        gap: 4px;
    }
    .hub-tabs::-webkit-scrollbar { display: none; }

    .hub-tab {
        flex-shrink: 0;
        padding: 8px 14px;
        font-size: 12px;
    }

    /* KPI strip: 2 columns */
    .hub-kpi-grid { grid-template-columns: repeat(2, 1fr); }

    /* Main content: single column stack */
    .hub-main {
        flex-direction: column;
        overflow-y: auto;
    }

    /* Studio panel full width */
    .hub-studio-panel,
    .hub-studio { width: 100% !important; max-width: 100%; }

    /* Channels grid: 1 column */
    .hub-channels-grid { grid-template-columns: 1fr; }

    /* Timeline visible on mobile (was hidden at 1200px) */
    .hub-timeline-panel { display: none; }

    /* Composer modal full width */
    .composer-modal {
        width: calc(100vw - 24px);
        max-height: 92dvh;
        border-radius: 14px;
    }

    .composer-body { padding: 14px 16px; }
    .composer-footer { padding: 10px 16px; }

    /* Reach banner: stack */
    .reach-banner { flex-direction: column; align-items: flex-start; gap: 8px; }

    /* Context bar */
    .hub-context-bar { padding: 8px 12px; }
}
