.sfl-persona-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

.sfl-shell-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.sfl-shell-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.sfl-shell-subtitle {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: #666;
}

.sfl-shell-tiles-section {
    margin-top: 8px;
}

.sfl-shell-tiles-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 1024px) {
    .sfl-shell-tiles-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .sfl-shell-tiles-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .sfl-shell-header {
        flex-direction: column;
    }
    .sfl-shell-tiles-grid {
        grid-template-columns: 1fr;
    }
}

.sfl-card {
    border-radius: 16px;
    border: 1px solid #e2e2e2;
    padding: 14px 16px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 120px;
}

.sfl-shell-tile {
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.sfl-shell-tile:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.04);
}

.sfl-shell-tile-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sfl-shell-tile-label {
    font-size: 0.95rem;
    font-weight: 600;
}

.sfl-shell-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 999px;
    border: 1px solid #ddd;
    padding: 2px 8px;
    white-space: nowrap;
}

.sfl-shell-tile-body {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

.sfl-shell-tile--static {
    cursor: default;
}

/* ================================
   Unified Brand & Media Demo Console
   (shared UI, persona-seeded data)
   ================================ */

.sfl-bm-console {
    --sfl-bm-accent: var(--sfl-workspace-accent, #2563eb);
    max-width: 1200px;
    margin: 0 auto;
    padding: 22px 16px 40px;
}

.sfl-bm-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 14px;
}

.sfl-bm-eyebrow {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6b7280;
    margin-bottom: 8px;
}

.sfl-bm-title {
    font-size: 1.35rem;
    font-weight: 650;
    margin: 0;
}

.sfl-bm-subtitle {
    margin-top: 4px;
    color: #555;
    font-size: 0.9rem;
}

.sfl-bm-topbar-right {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.sfl-bm-chip {
    border: 1px solid #e2e2e2;
    background: #fff;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.75rem;
    color: #222;
    white-space: nowrap;
}

.sfl-bm-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 10px 0 16px;
}

@media (max-width: 1100px) {
    .sfl-bm-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .sfl-bm-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sfl-bm-topbar {
        flex-direction: column;
    }
}

@media (max-width: 420px) {
    .sfl-bm-kpis {
        grid-template-columns: 1fr;
    }
}

.sfl-bm-kpi-card {
    border-radius: 16px;
    border: 1px solid #e7e7e7;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    padding: 12px 12px 10px;
}

.sfl-bm-kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
}

.sfl-bm-kpi-label {
    font-size: 0.78rem;
    color: #555;
    font-weight: 600;
}

.sfl-bm-kpi-value {
    margin-top: 6px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #111;
}

.sfl-bm-kpi-delta {
    font-size: 0.75rem;
    font-weight: 650;
    color: #111;
}

.sfl-bm-kpi-delta--up { color: #0f5132; }
.sfl-bm-kpi-delta--down { color: #842029; }
.sfl-bm-kpi-delta--flat { color: #333; }

.sfl-bm-kpi-spark {
    margin-top: 6px;
    color: var(--sfl-bm-accent) !important;
    opacity: 0.9;
}


.sfl-bm-spark {
    width: 100%;
    height: 28px;
}

.sfl-bm-body {
    border: 1px solid #e7e7e7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.03);
    overflow: hidden;
}

.sfl-bm-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.sfl-bm-tab {
    border: 1px solid #e6e6e6;
    background: #fff;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 650;
    cursor: pointer;
}

.sfl-bm-tab.is-active {
    border-color: var(--sfl-bm-accent);
    color: var(--sfl-bm-accent);
}

.sfl-bm-panels {
    padding: 14px;
}

.sfl-bm-panel {
    display: none;
}

.sfl-bm-panel.is-active {
    display: block;
}

.sfl-bm-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
}

@media (max-width: 900px) {
    .sfl-bm-grid {
        grid-template-columns: 1fr;
    }
}

.sfl-bm-panel-card {
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.sfl-bm-panel-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 10px;
    color: #111;
}

.sfl-bm-note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #555;
}

.sfl-bm-chart {
    color: var(--sfl-bm-accent);
}

.sfl-bm-line {
    width: 100%;
    height: 180px;
}


/* Ensure SVG strokes inherit the workspace accent (avoid theme forcing black SVG strokes) */
.sfl-bm-console .sfl-bm-line,
.sfl-bm-console .sfl-bm-spark {
    color: var(--sfl-bm-accent);
}
.sfl-bm-console .sfl-bm-line path,
.sfl-bm-console .sfl-bm-spark path {
    stroke: var(--sfl-bm-accent) !important;
}
.sfl-bm-console .sfl-bm-line {
    color: var(--sfl-bm-accent) !important;
}
.sfl-bm-console .sfl-bm-spark {
    color: var(--sfl-bm-accent) !important;
}


.sfl-bm-grid line {
    stroke: #eaeaea;
    stroke-width: 1;
}

.sfl-bm-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sfl-bm-bar-axis {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #6b7280;
    padding-left: 150px;
    padding-right: 80px;
    margin-top: -2px;
}

@media (max-width: 520px) {
    .sfl-bm-bar-axis {
        padding-left: 0;
        padding-right: 0;
    }
}

.sfl-bm-bar-row {
    display: grid;
    grid-template-columns: 140px 1fr 80px;
    gap: 10px;
    align-items: center;
}

@media (max-width: 520px) {
    .sfl-bm-bar-row {
        grid-template-columns: 1fr;
        gap: 6px;
        align-items: stretch;
    }
}

.sfl-bm-bar-label {
    font-size: 0.82rem;
    color: #111;
    font-weight: 650;
}

.sfl-bm-bar-track {
    height: 10px;
    background: #f0f0f0;
    border-radius: 999px;
    overflow: hidden;
}

.sfl-bm-bar-fill {
    height: 10px;
    background: var(--sfl-bm-accent) !important;
    border-radius: 999px;
}

.sfl-bm-bar-value {
    font-size: 0.82rem;
    color: #111;
    text-align: right;
}

.sfl-bm-insights {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

@media (max-width: 900px) {
    .sfl-bm-insights {
        grid-template-columns: 1fr;
    }
}

.sfl-bm-insight-card {
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 12px;
    background: #fff;
}

.sfl-bm-insight-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.sfl-bm-insight-title {
    font-weight: 750;
    font-size: 0.9rem;
    color: #111;
}

.sfl-bm-pill {
    font-size: 0.72rem;
    border: 1px solid #e2e2e2;
    padding: 2px 8px;
    border-radius: 999px;
    color: #111;
    white-space: nowrap;
}

.sfl-bm-insight-body {
    color: #555;
    font-size: 0.86rem;
    line-height: 1.35;
}

.sfl-bm-table-wrap {
    overflow-x: auto;
    border: 1px solid #eee;
    border-radius: 12px;
}

.sfl-bm-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.sfl-bm-table th,
.sfl-bm-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
    font-size: 0.85rem;
}

.sfl-bm-table th {
    font-weight: 750;
    color: #111;
    background: #fafafa;
}

.sfl-bm-empty {
    font-size: 0.85rem;
    color: #666;
    padding: 10px 0;
}


/* ================================
   Embedded demo console (inside persona shells)
   ================================ */

.sfl-shell-console-section {
    margin-bottom: 18px;
}

.sfl-bm-console.sfl-bm-embedded {
    padding: 0;
    margin: 0;
    max-width: 100%;
}

.sfl-bm-embedded-top {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}


/* Axis labels + subtle animations */

.sfl-bm-axis-label { fill: #6b7280; font-size: 10px; }
.sfl-bm-axis-x { fill: #6b7280; font-size: 10px; }
.sfl-bm-axis text {
    fill: #6b7280;
    font-size: 10px;
}

@media (prefers-reduced-motion: no-preference) {
    .sfl-bm-bar-fill {
        transform: scaleX(0);
        transform-origin: left center;
        animation: sfl-bm-bar-grow 900ms ease-out forwards;
    }
    .sfl-bm-line path {
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
        animation: sfl-bm-line-draw 1100ms ease-out forwards;
    }
}

@keyframes sfl-bm-bar-grow {
    to { transform: scaleX(1); }
}

@keyframes sfl-bm-line-draw {
    to { stroke-dashoffset: 0; }
}

.sfl-bm-tab:hover{ border-color: var(--sfl-bm-accent); box-shadow: 0 1px 0 rgba(0,0,0,0.02); }


/* === Enhanced demo UX (AI summary + Lens + subtle animations) === */

.sfl-bm-ai-lens{
    display:grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin: 14px 0 6px;
}
@media (max-width: 820px){
    .sfl-bm-ai-lens{ grid-template-columns: 1fr; }
}

.sfl-bm-ai-card,
.sfl-bm-lens-card{
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 1px 10px rgba(0,0,0,0.04);
}

.sfl-bm-ai-head{
    display:flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}
.sfl-bm-ai-title{
    font-weight: 700;
    font-size: 0.95rem;
}
.sfl-bm-ai-meta{
    font-size: 0.78rem;
    color: #666;
}
.sfl-bm-ai-headline{
    margin-top: 8px;
    font-size: 0.95rem;
    color: #222;
}
.sfl-bm-ai-bullets{
    margin: 8px 0 0 18px;
    padding: 0;
    color: #333;
    font-size: 0.9rem;
}
.sfl-bm-ai-bullets li{ margin: 6px 0; }

.sfl-bm-lens-title{
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}
.sfl-bm-lens-bar{
    display:flex;
    flex-wrap: wrap;
    gap: 8px;
}
.sfl-bm-lens-btn{
    appearance:none;
    border: 1px solid #d9d9d9;
    background: transparent;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    cursor: pointer;
}
.sfl-bm-lens-btn:hover{
    box-shadow: 0 1px 10px rgba(0,0,0,0.05);
}
.sfl-bm-lens-btn.is-active{
    border-color: #999;
    box-shadow: 0 1px 10px rgba(0,0,0,0.06);
}
.sfl-bm-lens-hint{
    margin-top: 8px;
    font-size: 0.78rem;
    color: #666;
}

.sfl-bm-insight-card.is-hidden-by-lens{ display:none; }

/* Subtle on-load animations (respect reduced motion) */
.sfl-bm-console .sfl-bm-bar-fill{
    transform-origin: left center;
    transform: scaleX(0);
}
.sfl-bm-console.sfl-is-ready .sfl-bm-bar-fill{
    animation: sflBarGrow 900ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes sflBarGrow{
    to{ transform: scaleX(1); }
}

.sfl-bm-console .sfl-bm-line path{
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
}
.sfl-bm-console.sfl-is-ready .sfl-bm-line path{
    animation: sflLineDraw 1200ms ease forwards;
}
@keyframes sflLineDraw{
    to{ stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce){
    .sfl-bm-console .sfl-bm-bar-fill,
    .sfl-bm-console .sfl-bm-line path{
        animation: none !important;
        transform: none !important;
        stroke-dashoffset: 0 !important;
    }
}
