:root {
    --bg: #f7f1e6;
    --panel: #ffffff;
    --panel-soft: #fffaf3;
    --text: #3b2d20;
    --muted: #7a6651;
    --line: rgba(120, 97, 66, 0.18);
    --brand: #153052;
    --brand-soft: #f0e6d6;
    --good: #12805c;
    --warn: #b7791f;
    --bad: #b42318;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(199, 210, 254, 0.22), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #efe5d6 100%);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(100%, 430px);
    padding: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.97);
    box-shadow: 0 24px 60px rgba(65, 48, 31, 0.14);
}

.login-card * {
    box-sizing: border-box;
}

.login-title {
    margin: 5px 0 8px;
    color: var(--text);
    font-size: 30px;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: 0;
}

.login-subtitle {
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.login-label {
    display: block;
    margin: 14px 0 6px;
    color: #5f4a35;
    font-size: 12px;
    font-weight: 800;
}

.login-input {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.login-input:focus {
    outline: 2px solid rgba(21, 48, 82, 0.18);
    border-color: var(--brand);
}

.login-submit {
    width: 100%;
    min-height: 46px;
    margin-top: 22px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 18px rgba(21, 48, 82, 0.16);
}

.login-submit:hover {
    background: #21456f;
}

.login-card .error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #f1c27d;
    border-radius: 8px;
    background: #fff7ed;
    color: #8a4b0f;
    font-size: 13px;
    font-weight: 650;
}

.app-shell {
    min-height: 100vh;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 72px;
    padding: 12px 28px;
    background:
        linear-gradient(135deg, rgba(255, 252, 247, 0.97) 0%, rgba(246, 238, 224, 0.97) 100%);
    border-bottom: 1px solid rgba(120, 97, 66, 0.16);
    box-shadow: 0 16px 38px rgba(65, 48, 31, 0.1);
    backdrop-filter: blur(18px);
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 230px;
    color: var(--text);
    text-decoration: none;
}

.brand-logo {
    width: auto;
    height: 38px;
    flex: 0 0 auto;
}

.arx-logo {
    height: 42px;
    max-width: 120px;
    object-fit: contain;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-kicker {
    color: #9b7b57;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-title {
    color: #3b2d20;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0;
}

.top-nav-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}

.top-nav-link,
.ask-button,
.logout-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #5f4a35;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
}

.top-nav-link:hover,
.top-nav-link:focus,
.ask-button:hover {
    background: var(--brand-soft);
    color: #3b2d20;
    text-decoration: none;
}

.ask-button {
    background: #153052;
    color: #fff;
    box-shadow: 0 10px 18px rgba(21, 48, 82, 0.16);
}

.ask-button:hover {
    background: #21456f;
    color: #fff;
}

.logout-button {
    border-color: rgba(21, 48, 82, 0.22);
    color: #153052;
}

.logout-button:hover {
    background: var(--brand-soft);
    color: #153052;
    text-decoration: none;
}

.page-shell {
    max-width: 1560px;
    margin: 0 auto;
    padding: 28px;
}

.page-header {
    margin-bottom: 22px;
}

.eyebrow,
.section-kicker {
    color: #60758d;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-title {
    margin: 4px 0 6px;
    color: var(--text);
    font-size: 36px;
    font-weight: 850;
    letter-spacing: 0;
}

.page-subtitle,
.section-subtitle,
.muted-copy {
    color: var(--muted);
    font-size: 15px;
    margin: 0;
}

.prototype-banner,
.placeholder-strip {
    margin-top: 14px;
    padding: 11px 13px;
    border: 1px solid #f1c27d;
    border-radius: 8px;
    background: #fff7ed;
    color: #8a4b0f;
    font-size: 13px;
    font-weight: 650;
}

.content-band,
.filter-bar,
.panel-card,
.kpi-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 14px 34px rgba(65, 48, 31, 0.08);
}

.content-band {
    padding: 28px;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(250px, 1.4fr) repeat(5, minmax(170px, 1fr));
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
}

.filter-label {
    display: block;
    margin-bottom: 6px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.filter-strip-title {
    margin: 0 0 8px 2px;
    color: #60758d;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.filter-control .Select-control,
.filter-control .DateInput_input {
    border-radius: 8px;
}

.section-tabs {
    margin-bottom: 16px;
}

.section-tabs .tab {
    border: 1px solid var(--line) !important;
    border-radius: 8px 8px 0 0;
    padding: 12px 16px !important;
    color: #475569;
    font-weight: 750;
}

.section-tabs .tab--selected {
    color: var(--brand) !important;
    border-top: 3px solid var(--brand) !important;
}

.tab-content-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.section-header {
    margin: 8px 0 14px;
}

.section-title {
    margin: 3px 0 5px;
    font-size: 24px;
    font-weight: 850;
    letter-spacing: 0;
}

.kpi-grid {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.kpi-grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi-grid.three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.kpi-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.kpi-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.kpi-grid.six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.kpi-grid.seven {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.kpi-card {
    min-height: 108px;
    padding: 15px;
}

.kpi-card-rich {
    min-height: 190px;
    display: flex;
    flex-direction: column;
}

.kpi-grid.compact .kpi-card {
    min-height: 92px;
}

.kpi-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
}

.kpi-label-row {
    min-height: 26px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
    border: 1px solid rgba(120, 97, 66, 0.12);
    padding: 3px;
}

.kpi-value {
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
    font-weight: 850;
    line-height: 1;
}

.kpi-card-rich .kpi-value {
    font-size: 25px;
}

.kpi-card-hero {
    min-height: 142px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff7ed 100%);
}

.kpi-value-xl {
    font-size: 32px;
}

.kpi-period-label {
    margin-top: 8px;
    color: #60758d;
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
}

.kpi-mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 12px;
}

.kpi-mini-grid div {
    padding: 7px;
    border-radius: 8px;
    background: rgba(255, 247, 237, 0.85);
}

.kpi-mini-grid span {
    display: block;
    color: #7a6651;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.kpi-mini-grid strong {
    display: block;
    margin-top: 3px;
    color: #3b2d20;
    font-size: 12px;
    font-weight: 900;
}

.kpi-mini-grid .metric-good strong,
.kpi-mini-grid .metric-good span {
    color: var(--good);
}

.kpi-mini-grid .metric-warn strong,
.kpi-mini-grid .metric-warn span {
    color: var(--warn);
}

.kpi-mini-grid .metric-bad strong,
.kpi-mini-grid .metric-bad span {
    color: var(--bad);
}

.kpi-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.kpi-chip {
    padding: 4px 7px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid rgba(120, 97, 66, 0.14);
    font-size: 11px;
    font-weight: 850;
}

.kpi-subtext {
    margin-top: 8px;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.25;
}

.metric-good {
    color: var(--good);
}

.metric-warn {
    color: var(--warn);
}

.metric-bad {
    color: var(--bad);
}

.metric-neutral {
    color: var(--text);
}

.channel-score-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.two-column-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.overview-trend-mix-grid {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.three-column-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.mini-chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.panel-card {
    min-width: 0;
    padding: 15px;
}

.card-title {
    margin-bottom: 10px;
    color: #1e293b;
    font-size: 14px;
    font-weight: 850;
}

.chart-graph {
    min-height: 260px;
}

.mini-chart-card .chart-graph {
    min-height: 220px;
}

.table-panel {
    overflow: hidden;
}

.sla-lens-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sla-lens-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 10px 26px rgba(65, 48, 31, 0.07);
    overflow: hidden;
}

.sla-lens-summary {
    cursor: pointer;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    background: #fff7ed;
    color: #3b2d20;
}

.sla-lens-title {
    font-size: 15px;
    font-weight: 850;
}

.sla-lens-subtitle {
    color: var(--muted);
    font-size: 12px;
}

.sla-table-grid {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 18px;
}

.sla-table-grid .table-panel {
    flex: 0 0 560px;
    scroll-snap-align: start;
}

.sla-table-grid .dash-table-container {
    min-width: 540px;
}

.sla-table-grid::-webkit-scrollbar {
    height: 10px;
}

.sla-table-grid::-webkit-scrollbar-track {
    background: rgba(120, 97, 66, 0.09);
    border-radius: 999px;
}

.sla-table-grid::-webkit-scrollbar-thumb {
    background: rgba(120, 97, 66, 0.34);
    border-radius: 999px;
}

.table-panel .dash-spreadsheet-container {
    max-height: 560px;
}

.report-panel {
    margin-bottom: 16px;
}

.ag-grid-panel {
    width: 100%;
}

.table-action-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
}

.table-export-button {
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.table-export-button.icon-only {
    border: 1px solid rgba(21, 48, 82, 0.2);
    background: #fff;
    color: #153052;
    box-shadow: 0 8px 18px rgba(21, 48, 82, 0.1);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.table-export-button.icon-only,
.dash-table-container .dash-spreadsheet-menu button.export {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.download-icon,
.dash-table-container .dash-spreadsheet-menu button.export::after {
    --download-icon-url: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3Cpath d='M12 15V3'/%3E%3C/svg%3E");
    content: "";
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--download-icon-url) center / contain no-repeat;
    mask: var(--download-icon-url) center / contain no-repeat;
}

.download-icon::before,
.download-icon::after,
.dash-table-container .dash-spreadsheet-menu button.export::before {
    display: none;
}

.table-export-button.icon-only:hover,
.dash-table-container .dash-spreadsheet-menu button.export:hover {
    background: #153052;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(21, 48, 82, 0.16);
}

.kpi-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.kpi-card-link:hover .kpi-card {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(21, 48, 82, 0.14);
}

.scroll-anchor {
    scroll-margin-top: 96px;
}

.table-fullscreen-button {
    width: 32px;
    height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid rgba(120, 97, 66, 0.28);
    border-radius: 8px;
    background: #fff;
    color: #153052;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.fullscreen-icon {
    position: relative;
    width: 17px;
    height: 17px;
    display: inline-block;
    background:
        linear-gradient(currentColor, currentColor) left top / 7px 2px no-repeat,
        linear-gradient(currentColor, currentColor) left top / 2px 7px no-repeat,
        linear-gradient(currentColor, currentColor) right top / 7px 2px no-repeat,
        linear-gradient(currentColor, currentColor) right top / 2px 7px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 7px 2px no-repeat,
        linear-gradient(currentColor, currentColor) left bottom / 2px 7px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 7px 2px no-repeat,
        linear-gradient(currentColor, currentColor) right bottom / 2px 7px no-repeat;
}

.table-fullscreen-button.is-open .fullscreen-icon {
    background: none;
}

.table-fullscreen-button.is-open .fullscreen-icon::before,
.table-fullscreen-button.is-open .fullscreen-icon::after {
    content: "";
    position: absolute;
    top: 7px;
    left: 1px;
    width: 15px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.table-fullscreen-button.is-open .fullscreen-icon::before {
    transform: rotate(45deg);
}

.table-fullscreen-button.is-open .fullscreen-icon::after {
    transform: rotate(-45deg);
}

.ag-grid-panel.fullscreen-active .table-action-row {
    position: fixed;
    top: 18px;
    right: 28px;
    z-index: 151;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    background: rgba(255, 250, 243, 0.96);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.ag-grid-panel.fullscreen-active .table-fullscreen-target {
    position: fixed;
    inset: 12px;
    z-index: 150;
    padding: 74px 14px 14px;
    border-radius: 8px;
    background: #fffaf3;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
    transform: none !important;
    zoom: 1 !important;
}

.ag-grid-panel.fullscreen-active .table-fullscreen-target .report-ag-grid {
    height: calc(100vh - 112px) !important;
    width: calc(100vw - 52px) !important;
}

.ag-grid-panel.fullscreen-active .table-fullscreen-button {
    background: #153052;
    color: #fff;
}

.report-ag-grid {
    --ag-font-family: Inter, Arial, sans-serif;
    --ag-font-size: 12px;
    --ag-border-radius: 8px;
    --ag-header-background-color: #fff7ed;
    --ag-header-foreground-color: #3b2d20;
    --ag-odd-row-background-color: #fffdf8;
    --ag-row-border-color: #e5e7eb;
    --ag-selected-row-background-color: #eef4ff;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.report-ag-grid .ag-header-group-cell-label,
.report-ag-grid .ag-header-cell-label {
    font-weight: 900;
}

.dimension-cell {
    background: #fff3c4;
    color: #3b2d20;
    font-weight: 850;
}

.dimension-cell-light {
    background: #fff9e6;
    color: #3b2d20;
    font-weight: 760;
}

.traffic-good {
    color: var(--good);
    font-weight: 850;
}

.traffic-bad {
    color: var(--bad);
    font-weight: 850;
}

.reports-filter-bar {
    grid-template-columns: repeat(6, minmax(160px, 1fr));
}

.performance-filter-bar {
    grid-template-columns: minmax(160px, 0.8fr) minmax(160px, 0.8fr) minmax(200px, 1fr) minmax(260px, 1.4fr);
}

.performance-logo,
.brand-lens-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.brand-lens-logo {
    width: 72px;
    height: 72px;
}

.logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #153052;
    color: #fff;
    font-weight: 850;
}

.brand-lens-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid rgba(120, 97, 66, 0.16);
}

.brand-lens-title {
    color: #1e293b;
    font-size: 20px;
    font-weight: 900;
}

.brand-lens-subtitle {
    color: var(--muted);
    font-size: 13px;
}

.chart-action-row,
.variance-control-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.secondary-action-button {
    min-height: 34px;
    padding: 7px 12px;
    border: 1px solid rgba(21, 48, 82, 0.2);
    border-radius: 8px;
    background: #fff;
    color: #153052;
    font-size: 12px;
    font-weight: 850;
}

.segmented-radio {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
}

.segmented-radio-option {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(120, 97, 66, 0.18);
    border-radius: 8px;
    background: #fffaf3;
    color: #3b2d20;
    font-size: 12px;
    font-weight: 850;
}

.segmented-radio-option input {
    margin: 0;
}

.sob-soi-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.8fr);
    gap: 14px;
    align-items: stretch;
}

.brand-health-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.brand-category-layout {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.sob-soi-chart-pane {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sob-soi-chart-pane .segmented-radio {
    margin-bottom: 8px;
}

.sob-soi-detail-shell,
.brand-detail-panel {
    height: 100%;
}

.sob-soi-detail-shell,
.brand-category-detail-shell,
.brand-exec-detail-shell {
    min-width: 0;
    display: flex;
}

.sob-soi-detail-shell > .brand-detail-panel,
.brand-category-detail-shell > .brand-detail-panel,
.brand-exec-detail-shell > .brand-detail-panel {
    width: 100%;
}

.brand-detail-panel {
    padding: 14px;
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    background: #fffaf3;
}

.brand-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.brand-detail-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    background: #fff;
    padding: 5px;
}

.brand-detail-title {
    color: #1e293b;
    font-size: 16px;
    font-weight: 900;
}

.brand-detail-subtitle {
    margin-top: 2px;
    font-size: 12px;
    font-weight: 800;
}

.brand-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.sob-soi-detail-panel .brand-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
}

.brand-detail-grid div {
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(120, 97, 66, 0.1);
}

.brand-detail-grid span {
    display: block;
    color: #7a6651;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.brand-detail-grid strong {
    display: block;
    margin-top: 3px;
    color: #3b2d20;
    font-size: 13px;
    font-weight: 900;
}

.brand-detail-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sob-soi-detail-panel .brand-detail-list {
    gap: 6px;
    margin-top: 8px;
}

.sob-soi-detail-panel .brand-detail-list div,
.sob-soi-detail-panel .brand-detail-grid div {
    padding: 7px;
}

.brand-detail-list div {
    padding: 8px;
    border: 1px solid rgba(120, 97, 66, 0.1);
    border-radius: 8px;
    background: #fff;
}

.brand-detail-list span {
    display: block;
    color: #7a6651;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.brand-detail-list strong {
    display: block;
    margin-top: 3px;
    color: #3b2d20;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.25;
}

.brand-detail-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.compact-detail-chart {
    min-height: 220px;
}

.brand-detail-donut-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.brand-detail-note {
    margin-top: 11px;
    color: #6b7280;
    font-size: 11px;
    line-height: 1.35;
}

.product-local-filter {
    max-width: 420px;
}

.product-diagnostic-split-shell {
    grid-template-columns: minmax(0, 1.85fr) minmax(360px, 0.9fr);
}

.product-detail-header {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin-bottom: 14px;
}

.product-image-placeholder {
    width: 96px;
    aspect-ratio: 1;
    border: 1px dashed rgba(21, 48, 82, 0.28);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fffaf3;
    color: #7a6651;
    font-size: 11px;
    font-weight: 850;
    text-align: center;
    padding: 10px;
}

.product-detail-panel .chart-graph {
    margin-top: 10px;
}

.inventory-filter-bar {
    grid-template-columns: minmax(150px, 0.65fr) minmax(160px, 0.7fr) minmax(280px, 1.25fr) minmax(210px, 0.95fr);
}

.inventory-two-column {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    align-items: stretch;
}

.inventory-diagnostic-split-shell {
    grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.78fr);
    min-height: 760px;
}

.inventory-detail-shell {
    display: flex;
    min-width: 0;
}

.inventory-detail-shell > .brand-detail-panel {
    width: 100%;
}

.inventory-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.inventory-rule-card {
    padding: 16px;
}

.inventory-rule-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.inventory-rule-list div {
    padding: 10px;
    border: 1px solid rgba(120, 97, 66, 0.12);
    border-radius: 8px;
    background: #fff;
    color: #5f4a35;
    font-size: 12px;
    line-height: 1.35;
}

.inventory-rule-list strong {
    color: #153052;
    font-weight: 900;
}

.channel-section-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.channel-section-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    background: #fff;
    padding: 4px;
}

.executive-table-shell {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.diagnostic-split-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.8fr);
    gap: 14px;
    align-items: stretch;
    min-height: 900px;
}

.diagnostic-table-pane {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.brand-diagnostic-grid {
    --ag-font-family: Inter, Arial, sans-serif;
    --ag-font-size: 12px;
    --ag-header-background-color: #fff7ed;
    --ag-header-foreground-color: #3b2d20;
    --ag-row-hover-color: #fffaf3;
    --ag-selected-row-background-color: rgba(215, 180, 106, 0.22);
    border: 1px solid rgba(120, 97, 66, 0.16);
    border-radius: 8px;
    overflow: hidden;
    flex: 1 1 auto;
}

.brand-diagnostic-grid-shell {
    flex: 1 1 auto;
    min-height: 0;
}

.brand-diagnostic-grid .traffic-muted {
    color: #7a6651;
}

.brand-diagnostic-grid .ag-cell.traffic-good,
.brand-diagnostic-grid .ag-cell-value.traffic-good,
.brand-diagnostic-grid .traffic-good {
    color: var(--good) !important;
    font-weight: 850 !important;
}

.brand-diagnostic-grid .ag-cell.traffic-bad,
.brand-diagnostic-grid .ag-cell-value.traffic-bad,
.brand-diagnostic-grid .traffic-bad {
    color: var(--bad) !important;
    font-weight: 850 !important;
}

.diagnostic-table-pane .segmented-radio {
    margin-bottom: 10px;
    flex: 0 0 auto;
}

.sticky-detail-panel {
    position: relative;
    top: auto;
}

.wide-lens-layout {
    grid-template-columns: minmax(0, 2.2fr) minmax(300px, 0.75fr);
}

.dash-table-container .dash-spreadsheet-menu {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.dash-table-container .dash-spreadsheet-menu button.export {
    position: relative;
    min-height: 34px;
    padding: 0;
    border: 1px solid rgba(21, 48, 82, 0.22);
    border-radius: 8px;
    background: #fff;
    color: #153052;
    font-size: 0;
    font-weight: 850;
    box-shadow: 0 8px 18px rgba(21, 48, 82, 0.12);
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.dash-table-container .dash-spreadsheet-menu button.export::after {
    content: "";
}

.dash-table-container .dash-spreadsheet-menu button.export:hover {
    background: #153052;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(21, 48, 82, 0.16);
}

.card-subtitle {
    margin: -4px 0 12px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.metric-definition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.dsr-section-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dsr-section-block {
    border: 1px solid rgba(120, 97, 66, 0.18);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.98);
    overflow: hidden;
}

.dsr-section-summary {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: linear-gradient(90deg, #fff3c4 0%, #fff8e3 100%);
    color: #3b2d20;
}

.dsr-section-title {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
}

.dsr-section-count {
    color: #7a6651;
    font-size: 12px;
    font-weight: 750;
}

.metric-def-card {
    position: relative;
    min-height: 132px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 10px 26px rgba(65, 48, 31, 0.06);
}

.metric-def-label {
    padding-right: 34px;
    color: #1e293b;
    font-size: 13px;
    font-weight: 850;
}

.metric-info-button {
    position: absolute;
    top: 11px;
    right: 11px;
    width: 25px;
    height: 25px;
    border: 1px solid rgba(21, 48, 82, 0.22);
    border-radius: 50%;
    background: #f8fafc;
    color: var(--brand);
    font-size: 12px;
    font-weight: 850;
    line-height: 1;
}

.metric-def-copy {
    margin-top: 11px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.42;
}

.pivot-control-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
}

.report-radio-group label {
    margin-right: 16px;
    color: #3b2d20;
    font-size: 13px;
    font-weight: 750;
}

.pivot-builder-shell {
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 14px 34px rgba(65, 48, 31, 0.08);
}

.pivot-builder-header {
    margin-bottom: 14px;
}

.pivot-builder-title {
    color: #1e293b;
    font-size: 15px;
    font-weight: 900;
}

.pivot-builder-subtitle {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.pivot-builder-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(420px, 1.6fr);
    gap: 14px;
}

.pivot-builder-shelves {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pivot-builder-zone-card {
    min-height: 142px;
    padding: 12px;
    border: 1px solid rgba(120, 97, 66, 0.18);
    border-radius: 8px;
    background: #fff;
}

.pivot-builder-zone-title {
    margin-bottom: 8px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.pivot-builder-secondary-title {
    margin-top: 14px;
}

.pivot-builder-zone-body {
    min-height: 82px;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 8px;
    padding: 7px;
    border: 1px dashed rgba(120, 97, 66, 0.26);
    border-radius: 8px;
    background: #fffaf3;
}

.pivot-builder-zone-body.is-over {
    border-color: #153052;
    background: #eef4ff;
}

.pivot-builder-placeholder {
    color: #9a856f;
    font-size: 12px;
}

.pivot-builder-chip,
.pivot-builder-value-pill {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(21, 48, 82, 0.15);
    background: #f8fafc;
    color: #153052;
    font-size: 12px;
    font-weight: 800;
    cursor: grab;
}

.pivot-builder-chip-rows {
    background: #ecfeff;
}

.pivot-builder-chip-columns {
    background: #fef3c7;
}

.pivot-chip-remove {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(21, 48, 82, 0.12);
    color: #153052;
    font-size: 11px;
    font-weight: 900;
}

.matrix-pivot-reset-button {
    margin-top: 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
}

.compact-tabs {
    max-width: 420px;
}

.fy-report-shell {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(65, 48, 31, 0.08);
    overflow: hidden;
}

.fy-report-frame {
    display: block;
    width: 100%;
    height: min(86vh, 980px);
    min-height: 680px;
    border: 0;
    background: #fff;
}

.fy-report-shell.fullscreen {
    position: fixed;
    inset: 14px;
    z-index: 120;
    display: flex;
    flex-direction: column;
    border-radius: 8px;
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.34);
}

.fy-report-shell.fullscreen .fy-report-frame {
    flex: 1;
    min-height: 0;
    height: auto;
}

.fy-report-shell.fullscreen .table-action-row {
    padding: 10px 12px;
    margin: 0;
    background: #fff7ed;
    border-bottom: 1px solid var(--line);
}

@media (max-width: 760px) {
    .sla-table-grid .table-panel {
        flex-basis: 92vw;
    }

    .sob-soi-layout {
        grid-template-columns: 1fr;
    }

    .three-column-grid {
        grid-template-columns: 1fr;
    }
}

.empty-state {
    min-height: 280px;
}

.ask-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    z-index: 80;
    width: 390px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: -18px 0 40px rgba(15, 23, 42, 0.14);
    transition: right 0.22s ease;
}

.ask-drawer.open {
    right: 0;
}

.drawer-header,
.drawer-composer {
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.drawer-title {
    font-size: 20px;
    font-weight: 850;
}

.drawer-subtitle,
.drawer-section-title {
    color: var(--muted);
    font-size: 12px;
}

.drawer-close {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.drawer-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
}

.prompt-pill {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-soft);
    color: #334155;
    text-align: left;
    font-weight: 650;
}

.drawer-composer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.ask-input {
    width: 100%;
    min-height: 96px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    resize: vertical;
}

.ask-send {
    width: 100%;
    margin-top: 10px;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .filter-bar,
    .reports-filter-bar,
    .kpi-grid.five,
    .kpi-grid.six,
    .kpi-grid.seven,
    .kpi-grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column-grid {
        grid-template-columns: 1fr;
    }

    .pivot-control-row,
    .pivot-builder-grid,
    .pivot-builder-shelves {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .top-nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .top-nav-menu {
        flex-wrap: wrap;
    }

    .page-shell {
        padding: 18px;
    }

    .filter-bar,
    .reports-filter-bar,
    .kpi-grid,
    .kpi-grid.two,
    .kpi-grid.three,
    .kpi-grid.four,
    .kpi-grid.five,
    .kpi-grid.six,
    .kpi-grid.seven {
        grid-template-columns: 1fr;
    }
}
