:root {
    color-scheme: light;
    --bg: #f3f6fb;
    --panel: #ffffff;
    --text: #172033;
    --muted: #7b8191;
    --line: #edf0f5;
    --primary: #6c5ffc;
    --primary-dark: #5a4bea;
    --primary-soft: rgba(108, 95, 252, 0.12);
    --accent: #23b7e5;
    --success: #26bf94;
    --sidebar: #111c43;
    --sidebar-muted: #a3aed1;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --shadow: 0 0.25rem 1rem rgba(27, 46, 94, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 74px;
    margin: 0;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: block;
    width: 156px;
    height: auto;
    max-height: 34px;
    object-fit: contain;
}

.brand-version {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(35, 183, 229, 0.14);
    color: #9ee6fb;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.side-nav {
    display: grid;
    gap: 4px;
    padding: 18px 14px;
}

.nav-item,
.sub-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--sidebar-muted);
    font-size: 14px;
    font-weight: 600;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.nav-category {
    margin: 12px 14px 8px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.nav-item.is-active,
.nav-item:hover,
.sub-nav a:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item:hover,
.sub-nav a:hover {
    transform: translateX(2px);
}

.side-menu__icon,
.sub-nav .bx {
    width: 22px;
    min-width: 22px;
    text-align: center;
    color: #8ea0d8;
    font-size: 20px;
}

.nav-item.is-active .side-menu__icon,
.nav-item:hover .side-menu__icon,
.sub-nav a:hover .bx {
    color: white;
}

.sub-nav {
    display: grid;
    gap: 3px;
    margin: 0 0 14px 20px;
}

.sub-nav a {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.main-area {
    display: flex;
    flex-direction: column;
    padding: 24px 28px;
    min-width: 0;
    min-height: 100vh;
}

.main-area:has(.crm-workspace) {
    height: 100vh;
    overflow: hidden;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: -24px -28px 24px;
    min-height: 74px;
    padding: 16px 28px;
    background: white;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.topbar h1,
.section-head h2,
.hero-panel h2 {
    margin: 0;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.userbox {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafd;
    color: var(--text);
    font-weight: 700;
}

.user-chip .bx {
    color: var(--primary);
    font-size: 20px;
}

.panel,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 24px;
}

.welcome-panel {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f0f0f0;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.welcome-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100%;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.8fr);
    gap: 18px;
}

.hero-panel {
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    position: absolute;
    inset: 0 0 auto auto;
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, rgba(108, 95, 252, 0.16), rgba(35, 183, 229, 0.14));
    border-bottom-left-radius: 100%;
    content: "";
}

.hero-panel p {
    max-width: 720px;
    color: var(--muted);
    line-height: 1.7;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    gap: 8px;
    line-height: 1;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.primary-button .bx,
.secondary-button .bx,
.ghost-button .bx {
    font-size: 18px;
}

.primary-button {
    background: var(--primary);
    color: white;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-button,
.ghost-button {
    background: white;
    color: var(--primary);
    border-color: var(--line);
}

.secondary-button:hover,
.ghost-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.metrics-panel h3 {
    margin-top: 0;
}

.metrics {
    display: grid;
    gap: 14px;
    margin: 0;
}

.metrics div {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.metrics dt {
    font-size: 28px;
    font-weight: 800;
}

.metrics dd {
    margin: 4px 0 0;
    color: var(--muted);
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.feature-card {
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 12px;
    min-height: 360px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 0.125rem 0.5rem rgba(27, 46, 94, 0.04);
    transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0.5rem 1.25rem rgba(27, 46, 94, 0.08);
    transform: translateY(-2px);
}

.feature-card strong {
    font-size: 20px;
    font-weight: 700;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
}

.feature-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    background: #f8fafd;
    object-fit: cover;
    object-position: center;
}

.market-overview-panel {
    display: grid;
    min-height: calc(100vh - 122px);
    padding: 20px;
}

.main-area:has(.market-overview-panel) {
    padding-bottom: 0;
}

.market-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    align-items: stretch;
}

.market-card-grid .feature-card {
    grid-template-rows: minmax(140px, 1fr) auto auto;
    min-height: 0;
    height: 100%;
    gap: 10px;
    padding: 12px;
}

.market-card-grid .feature-image {
    height: 100%;
    min-height: 0;
    max-height: 400px;
    background: transparent;
    object-fit: contain;
    object-position: center;
}

.market-card-grid .feature-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.notice {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(35, 183, 229, 0.25);
    border-radius: 8px;
    background: rgba(35, 183, 229, 0.08);
    color: #1d5d73;
}

.service-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.service-refresh-range {
    display: grid;
    grid-template-columns: repeat(2, minmax(138px, 1fr));
    gap: 8px;
    align-items: end;
}

.service-date-field {
    gap: 4px;
    min-width: 138px;
}

.service-date-input {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 13px;
}

.service-refresh-button:disabled {
    opacity: 0.72;
    cursor: wait;
    transform: none;
}

.service-status {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.source-modal[hidden] {
    display: none;
}

.source-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.source-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 28, 67, 0.42);
}

.source-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    width: min(460px, 100%);
    padding: 22px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.22);
}

.source-modal-head,
.source-modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.source-modal-head h3 {
    margin: 0;
    font-size: 20px;
}

.source-modal-note {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.source-modal-actions {
    justify-content: flex-end;
    padding-top: 4px;
}

.source-modal-status {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.service-modal[hidden] {
    display: none;
}

.service-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
}

.service-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 28, 67, 0.42);
}

.service-modal-card {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 12px;
    width: min(360px, 100%);
    padding: 28px 26px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.22);
    text-align: center;
}

.service-modal-card h3 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
}

.service-modal-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.service-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid var(--primary-soft);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: service-spin 0.8s linear infinite;
}

.service-modal-open {
    overflow: hidden;
}

@keyframes service-spin {
    to {
        transform: rotate(360deg);
    }
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.mt-4 {
    margin-top: 1.5rem;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.data-table th,
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.data-table th {
    background: #f8fafd;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.data-table th .bx {
    margin-right: 8px;
    color: var(--primary);
    font-size: 16px;
    vertical-align: -2px;
}

.brand-table-sort {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.25;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
}

.brand-table-sort::after {
    margin-left: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    opacity: 0.55;
    content: "\2195";
}

.brand-table-sort.is-sorted-asc::after {
    color: var(--primary);
    opacity: 1;
    content: "\2191";
}

.brand-table-sort.is-sorted-desc::after {
    color: var(--primary);
    opacity: 1;
    content: "\2193";
}

.data-table tr:last-child td {
    border-bottom: 0;
}

.table-footer {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.table-pagination[hidden] {
    display: none;
}

.table-pagination-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-pagination .mini-button {
    min-height: 30px;
    padding: 5px 10px;
}

.table-pagination .mini-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.is-yes {
    background: rgba(38, 191, 148, 0.12);
    color: #15926f;
}

.status-pill.is-no {
    background: rgba(123, 129, 145, 0.12);
    color: var(--muted);
}

.brand-dynamic-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 48px;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.brand-dynamic-pill.is-flat {
    background: rgba(123, 129, 145, 0.1);
    color: var(--muted);
}

.brand-dynamic-pill.is-up {
    background: rgba(38, 191, 148, 0.12);
    color: #15926f;
}

.brand-dynamic-pill.is-down {
    background: rgba(230, 83, 60, 0.12);
    color: #bd3b26;
}

.brand-dynamic-triangle {
    width: 0;
    height: 0;
    border-right: 5px solid transparent;
    border-left: 5px solid transparent;
}

.brand-dynamic-pill.is-up .brand-dynamic-triangle {
    border-bottom: 8px solid #15926f;
}

.brand-dynamic-pill.is-down .brand-dynamic-triangle {
    border-top: 8px solid #bd3b26;
}

.brand-dynamic-button {
    appearance: none;
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    cursor: pointer;
}

.brand-dynamic-button:hover .brand-dynamic-pill,
.brand-dynamic-button:focus-visible .brand-dynamic-pill {
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.brand-dynamic-button:focus-visible {
    outline: 0;
}

.search-input,
.form-control {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
}

.search-input {
    min-height: 40px;
    border: 0;
    padding-left: 0;
    background: transparent;
    outline: 0;
}

.search-control {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 300px);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.search-control .bx {
    color: var(--muted);
    font-size: 19px;
}

.brand-filterbar {
    display: grid;
    grid-template-columns: minmax(145px, 0.75fr) minmax(140px, 0.7fr) minmax(118px, 0.56fr) minmax(130px, 0.58fr) minmax(98px, 0.42fr) auto;
    gap: 8px;
    align-items: end;
    margin-bottom: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.brand-table-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary);
    font-weight: 800;
}

.brand-table-link .bx {
    font-size: 17px;
    transition: transform 0.16s ease;
}

.brand-table-link:hover .bx {
    transform: translateX(2px);
}

.tenant-mix-page {
    display: grid;
    gap: 18px;
}

.tenant-mix-card {
    display: grid;
    gap: 18px;
}

.tenant-mix-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.tenant-mix-head h3 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 22px;
}

.tenant-mix-total {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 11px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.tenant-mix-filters {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(180px, 240px);
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.tenant-mix-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
    gap: 18px;
    align-items: center;
}

.tenant-mix-chart-wrap {
    display: grid;
    place-items: center;
    min-height: 390px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.tenant-mix-chart-wrap > div {
    width: 100%;
}

.tenant-mix-legend {
    display: grid;
    gap: 7px;
}

.tenant-mix-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 32px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.tenant-mix-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.tenant-mix-name {
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.tenant-mix-legend-row strong {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.tenant-mix-table-wrap {
    overflow-x: auto;
}

.tenant-mix-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}

.tenant-mix-table th,
.tenant-mix-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.tenant-mix-table tr:last-child td {
    border-bottom: 0;
}

.tenant-mix-table th {
    background: #f8fafd;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.tenant-mix-table th:not(:first-child),
.tenant-mix-table td:not(:first-child) {
    width: 150px;
    text-align: right;
}

.tenant-mix-table-category {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-weight: 700;
}

.tenant-mix-table td[data-tenant-mix-average],
.tenant-mix-table td[data-tenant-mix-own] {
    color: var(--text);
    font-weight: 800;
}

.tenant-mix-table td[data-tenant-mix-diff] {
    font-weight: 900;
}

.tenant-mix-table td[data-tenant-mix-diff].is-positive {
    color: #15926f;
}

.tenant-mix-table td[data-tenant-mix-diff].is-negative {
    color: #bd3b26;
}

.tenant-mix-table td[data-tenant-mix-diff].is-neutral {
    color: var(--muted);
}

.tenant-efficiency-block {
    display: grid;
    gap: 12px;
    padding-top: 4px;
}

.tenant-efficiency-table-wrap {
    max-height: 620px;
    overflow: auto;
    position: relative;
}

.tenant-efficiency-table {
    min-width: 4708px;
    table-layout: fixed;
}

.tenant-efficiency-table th,
.tenant-efficiency-table td {
    width: 112px;
    min-width: 112px;
    text-align: center;
}

.tenant-efficiency-table th:first-child,
.tenant-efficiency-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 340px;
    min-width: 340px;
    text-align: left;
    background: white;
}

.tenant-efficiency-table th:first-child {
    z-index: 4;
    background: #f8fafd;
}

.tenant-efficiency-table thead th {
    white-space: nowrap;
}

.tenant-efficiency-table tbody tr.market-demo-fixed-row td:first-child {
    background: inherit;
}

.profile-page {
    display: grid;
    gap: 18px;
}

.profile-messages {
    display: grid;
    gap: 8px;
}

.profile-message {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.profile-message-success {
    border-color: rgba(38, 191, 148, 0.24);
    background: rgba(38, 191, 148, 0.1);
    color: #168a6b;
}

.profile-message-error {
    border-color: rgba(230, 83, 60, 0.24);
    background: rgba(230, 83, 60, 0.08);
    color: #bd3b26;
}

.profile-card {
    display: grid;
    gap: 18px;
}

.profile-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.profile-card-head h3 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 20px;
}

.profile-template-actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.profile-template-button {
    min-height: 34px;
    padding: 8px 12px;
    white-space: normal;
}

.profile-form {
    display: grid;
    gap: 16px;
}

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

.profile-field {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.profile-field-wide {
    grid-column: 1 / -1;
}

.profile-field em {
    color: #bd3b26;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    text-transform: none;
}

.profile-field input,
.profile-field textarea {
    font-weight: 400;
}

.profile-field input::placeholder,
.profile-field textarea::placeholder {
    color: var(--muted);
    font-weight: 400;
}

.profile-textarea {
    width: 100%;
    min-height: 112px;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-transform: none;
}

.profile-excel-upload {
    margin: 0;
}

.profile-excel-button {
    position: relative;
    overflow: hidden;
}

.profile-excel-button input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.profile-excel-button.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 4px;
}

.profile-form-actions span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.profile-card-muted {
    background: #fbfcff;
}

.profile-card-muted .secondary-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.profile-tenant-data-table {
    min-width: 880px;
    table-layout: fixed;
}

.profile-tenant-data-table .profile-month-col {
    width: auto;
}

.profile-tenant-data-table .profile-status-col {
    width: 160px;
}

.profile-tenant-data-table .profile-action-col {
    width: 170px;
}

.profile-tenant-data-table th,
.profile-tenant-data-table td {
    vertical-align: middle;
}

.profile-tenant-data-table thead tr:first-child th {
    text-align: center;
}

.profile-tenant-data-table thead tr:nth-child(2) th {
    font-size: 12px;
    text-align: center;
}

.profile-tenant-data-table tbody td:nth-child(3),
.profile-tenant-data-table tbody td:nth-child(5) {
    text-align: center;
}

.profile-tenant-data-table thead tr:first-child th:nth-child(2),
.profile-tenant-data-table tbody td:nth-child(2),
.profile-tenant-data-table thead tr:nth-child(2) th:first-child {
    border-left: 1px solid #d6deea;
}

.profile-tenant-data-table thead tr:first-child th:nth-child(3),
.profile-tenant-data-table tbody td:nth-child(4),
.profile-tenant-data-table thead tr:nth-child(2) th:nth-child(3) {
    border-left: 1px solid #d6deea;
}

.tenant-data-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.tenant-data-status.is-loaded {
    background: rgba(38, 191, 148, 0.12);
    color: #15926f;
}

.tenant-data-status.is-empty {
    background: rgba(230, 83, 60, 0.1);
    color: #bd3b26;
    font-weight: 900;
}

.tenant-data-action {
    min-height: 34px;
    padding: 7px 12px;
}

.profile-placeholder {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
    padding: 16px;
    border: 1px dashed #dbe2ef;
    border-radius: 8px;
    background: white;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.profile-placeholder .bx {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 22px;
}

.brand-profile-hero {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
    min-height: 72px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.brand-profile-mark {
    display: grid;
    place-items: center;
    min-height: 72px;
    padding: 8px;
    background:
        linear-gradient(135deg, rgba(38, 120, 217, 0.12), rgba(35, 183, 229, 0.12)),
        white;
}

.brand-profile-mark img {
    display: block;
    width: min(100%, 50px);
    height: 50px;
    object-fit: contain;
}

.brand-profile-mark .bx {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(35, 183, 229, 0.12);
    color: #127b9c;
    font-size: 28px;
}

.brand-profile-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-content: start;
    align-items: start;
    gap: 8px;
    min-width: 0;
    padding: 8px 14px 8px 0;
}

.brand-profile-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.brand-back-link {
    flex: 0 0 auto;
    width: max-content;
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.brand-profile-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-width: 0;
}

.brand-profile-menu a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 8px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #f8fafd;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.brand-profile-menu a:hover,
.brand-profile-menu a.is-active {
    border-color: rgba(108, 95, 252, 0.22);
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.brand-profile-menu .bx {
    font-size: 15px;
}

.brand-profile-summary {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: start;
    justify-self: end;
    gap: 8px;
    min-height: 0;
    min-width: 0;
    line-height: 1;
}

.brand-profile-title h2 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.1;
}

.brand-profile-title p {
    max-width: 820px;
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.brand-profile-tags,
.brand-region-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.brand-profile-tags {
    width: auto;
    justify-content: flex-end;
    margin-left: auto;
}

.brand-profile-tags span,
.brand-region-list span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
}

.brand-profile-tags span {
    min-height: 20px;
    padding: 3px 8px;
    line-height: 1;
}

.brand-tabs {
    display: grid;
    gap: 0;
}

.brand-tab-panel[hidden] {
    display: none;
}

.brand-tab-panel {
    min-width: 0;
}

.brand-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.brand-metric {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.brand-metric > .bx {
    display: grid;
    place-items: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(35, 183, 229, 0.12);
    color: #127b9c;
    font-size: 22px;
}

.brand-metric strong,
.brand-metric span,
.brand-metric p {
    display: block;
}

.brand-metric strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1;
}

.brand-metric span {
    margin-top: 3px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.brand-metric p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
}

.brand-profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    gap: 18px;
    align-items: start;
    margin-bottom: 18px;
}

.brand-profile-main,
.brand-side-panel,
.brand-news-panel {
    min-width: 0;
}

.brand-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.brand-section-head-spaced {
    margin-top: 22px;
}

.brand-section-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 18px;
}

.brand-section-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.brand-profile-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
}

.brand-profile-table th,
.brand-profile-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.brand-profile-table tr:last-child th,
.brand-profile-table tr:last-child td {
    border-bottom: 0;
}

.brand-profile-table th {
    width: 230px;
    background: #f8fafd;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.brand-profile-table td {
    color: var(--text);
    font-weight: 500;
}

.brand-profile-value-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.brand-profile-value-link:hover {
    text-decoration: underline;
}

.brand-profile-value {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.brand-crm-add-button {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.brand-crm-add-button.is-added {
    border-color: rgba(22, 128, 90, 0.22);
    background: rgba(22, 128, 90, 0.12);
    color: #0f6e4d;
}

.brand-crm-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(680px, 100%);
    max-height: min(88vh, 720px);
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.24);
    overflow: hidden;
}

.brand-crm-modal-body {
    padding: 16px 18px;
    overflow: auto;
}

.brand-crm-goal-list {
    display: grid;
    gap: 8px;
}

.brand-crm-goal-option {
    appearance: none;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.brand-crm-goal-option:hover {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.brand-crm-goal-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 900;
}

.brand-crm-goal-content {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.brand-crm-goal-content strong {
    color: var(--text);
    font-size: 13px;
    font-weight: 850;
    line-height: 1.25;
}

.brand-crm-goal-content small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.brand-crm-goal-stage {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-crm-goal-stage.is-active {
    background: rgba(240, 173, 78, 0.18);
    color: #9a640f;
}

.brand-description-block {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.brand-description-block .brand-section-head {
    margin-bottom: 8px;
}

.brand-description-block p {
    max-width: 980px;
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
}

.brand-news-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.brand-news-summary strong {
    color: inherit;
    font-size: 14px;
    line-height: 1;
}

.brand-news-filter-badge {
    appearance: none;
    font-family: inherit;
    gap: 5px;
    border: 0;
    cursor: pointer;
    transition: box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.brand-news-filter-badge:hover,
.brand-news-filter-badge.is-active {
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.brand-news-filter-badge:active {
    transform: translateY(1px);
}

.brand-news-filter-all {
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
}

.brand-news-filter-open {
    background: rgba(38, 191, 148, 0.14);
    color: #168a6b;
}

.brand-news-filter-close {
    background: rgba(230, 83, 60, 0.12);
    color: #bd3b26;
}

.brand-news-filter-regions {
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
}

.brand-related-list {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.brand-related-list a {
    display: grid;
    gap: 3px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    transition: color 0.16s ease;
}

.brand-related-list a:hover {
    color: var(--primary);
}

.brand-related-list strong {
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.brand-related-list span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.brand-trends-block,
.brand-event-block {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.brand-trends-block .brand-section-head,
.brand-event-block .brand-section-head {
    margin-bottom: 10px;
}

.brand-trends-block + .brand-event-block,
.brand-event-block + .brand-event-block {
    margin-top: 18px;
}

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

.brand-trend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid rgba(38, 191, 148, 0.2);
    border-radius: 8px;
    background: rgba(38, 191, 148, 0.09);
    color: #14795f;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
}

.brand-trend-item.is-down {
    border-color: rgba(230, 83, 60, 0.22);
    background: rgba(230, 83, 60, 0.09);
    color: #b93d2a;
}

.brand-trend-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.brand-trend-item .bx {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: rgba(38, 191, 148, 0.18);
    color: #12815f;
    font-size: 17px;
    line-height: 1;
}

.brand-trend-item strong {
    flex: 0 0 auto;
    color: #12815f;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-trend-item.is-down .bx {
    background: rgba(230, 83, 60, 0.16);
    color: #b93d2a;
}

.brand-trend-item.is-down strong {
    color: #b93d2a;
}

.brand-trend-modal[hidden] {
    display: none;
}

.brand-trend-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 24px;
}

.brand-trend-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.58);
}

.brand-trend-modal-card {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.26);
}

.mall-brand-trend-modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 48px);
    overflow: auto;
}

.mall-brand-dynamic-modal-content {
    display: grid;
    gap: 0;
    margin-top: 14px;
}

.brand-dynamic-modal-trends {
    margin-top: 14px;
}

.brand-trend-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
}

.brand-trend-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding-right: 36px;
}

.brand-trend-modal-head h3 {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 20px;
}

.brand-trend-modal-head strong {
    flex: 0 0 auto;
    margin-top: 4px;
    color: #12815f;
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.brand-trend-modal-head strong.is-down {
    color: #b93d2a;
}

.brand-trend-modal-period {
    margin: 10px 0 14px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.brand-trend-modal-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 13px;
}

.brand-trend-modal-table th,
.brand-trend-modal-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.brand-trend-modal-table tr:last-child th,
.brand-trend-modal-table tr:last-child td {
    border-bottom: 0;
}

.brand-trend-modal-table th {
    width: 46%;
    background: #f8fafd;
    color: var(--muted);
    font-weight: 800;
}

.brand-trend-modal-table td {
    color: var(--text);
    font-weight: 700;
}

.brand-event-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
}

.brand-event-table th,
.brand-event-table td {
    padding: 8px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.brand-event-table tr:last-child td {
    border-bottom: 0;
}

.brand-event-table th {
    background: #f8fafd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.brand-event-table td {
    color: var(--text);
    font-weight: 500;
    line-height: 1.35;
    word-break: break-word;
}

.brand-event-table .brand-event-empty {
    padding: 14px 10px;
    color: var(--muted);
    font-weight: 400;
    text-align: center;
}

.brand-event-table th:first-child,
.brand-event-table td:first-child {
    width: 31%;
}

.brand-event-table th:nth-child(2),
.brand-event-table td:nth-child(2) {
    width: 39%;
}

.brand-event-table th:last-child,
.brand-event-table td:last-child {
    width: 30%;
}

.brand-empty-state {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
}

.brand-news-table {
    min-width: 980px;
}

.brand-regions-panel {
    margin-bottom: 18px;
}

.brand-region-search {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 340px;
    min-height: 38px;
    margin-bottom: 12px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
}

.brand-region-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 14px;
}

.brand-regions-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    align-items: stretch;
}

.brand-regions-table-wrap {
    min-width: 0;
    overflow-x: auto;
}

.brand-region-table {
    width: 100%;
    min-width: 820px;
    border-collapse: collapse;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.brand-region-table th,
.brand-region-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.brand-region-table tr:last-child td {
    border-bottom: 0;
}

.brand-region-table th {
    background: #f8fafd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.brand-region-sort {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    text-transform: inherit;
    cursor: pointer;
}

.brand-region-sort::after {
    content: "↕";
    margin-left: auto;
    color: #9aa3b2;
    font-size: 11px;
}

.brand-region-sort.is-sorted-asc::after {
    content: "↑";
    color: var(--primary);
}

.brand-region-sort.is-sorted-desc::after {
    content: "↓";
    color: var(--primary);
}

.brand-region-table td {
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
}

.brand-region-table th:first-child,
.brand-region-table td:first-child {
    width: 32%;
}

.brand-region-table th:nth-child(2),
.brand-region-table td:nth-child(2) {
    width: 22%;
}

.brand-region-table th:last-child,
.brand-region-table td:last-child {
    width: 46%;
}

.market-demo-panel {
    display: grid;
    gap: 18px;
}

.market-demo-note {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.65;
}

.market-demo-note p {
    margin: 0;
}

.market-demo-note p + p {
    margin-top: 10px;
}

.market-demo-note strong {
    color: var(--text);
    font-weight: 700;
}

.market-demo-title {
    margin-bottom: -6px;
}

.market-demo-filters {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(220px, 0.55fr) auto;
    gap: 12px;
    align-items: end;
}

.market-demo-filter .multi-filter-menu {
    inset-inline-start: 0;
    inset-inline-end: auto;
    min-width: 100%;
}

.market-demo-button {
    min-height: 42px;
    white-space: nowrap;
}

.market-demo-table-wrap {
    margin: 0;
}

.market-demo-table {
    width: 10400px;
    min-width: 10400px;
    font-size: 12px;
}

.market-demo-table th,
.market-demo-table td {
    padding: 10px 12px;
    border-right: 1px solid var(--line);
    vertical-align: middle;
    white-space: nowrap;
}

.market-demo-table th:last-child,
.market-demo-table td:last-child {
    border-right: 0;
}

.market-demo-table th {
    text-align: center;
}

.market-demo-table thead tr:first-child th:nth-child(4),
.market-demo-table thead tr:first-child th:nth-child(n + 5),
.market-demo-table thead tr:nth-child(2) th:first-child,
.market-demo-table thead tr:nth-child(2) th:nth-child(7n + 8),
.market-demo-table td:nth-child(7n + 4) {
    border-left: 2px solid #d7deeb;
}

.market-demo-table.tenant-efficiency-table thead tr:first-child th,
.market-demo-table.tenant-efficiency-table thead tr:nth-child(2) th,
.market-demo-table.tenant-efficiency-table td {
    border-left: 0;
}

.market-demo-table.tenant-efficiency-table thead tr:first-child th:nth-child(n + 2),
.market-demo-table.tenant-efficiency-table thead tr:nth-child(2) th:nth-child(3n + 1),
.market-demo-table.tenant-efficiency-table td:nth-child(3n + 2) {
    border-left: 2px solid #d7deeb;
}

.market-demo-table.tenant-efficiency-table {
    width: 4708px;
    min-width: 4708px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.tenant-efficiency-category-col {
    width: 340px;
}

.tenant-efficiency-number-col {
    width: 112px;
}

.market-demo-table.tenant-efficiency-table th,
.market-demo-table.tenant-efficiency-table td {
    width: 112px;
    min-width: 112px;
    padding-right: 8px;
    padding-left: 8px;
    text-align: center;
}

.market-demo-table.tenant-efficiency-table th:first-child,
.market-demo-table.tenant-efficiency-table td:first-child {
    width: 340px;
    min-width: 340px;
    text-align: left;
}

.market-demo-table.tenant-efficiency-table thead th {
    position: sticky;
    z-index: 5;
    background: #f8fafd;
}

.market-demo-table.tenant-efficiency-table thead tr:first-child th {
    top: 0;
    height: 40px;
}

.market-demo-table.tenant-efficiency-table thead tr:nth-child(2) th {
    top: 40px;
    height: 40px;
}

.market-demo-table.tenant-efficiency-table thead tr:first-child th:first-child {
    left: 0;
    z-index: 12;
    height: 80px;
}

.market-demo-table.tenant-efficiency-table thead tr:nth-child(2) th:first-child {
    left: auto;
    z-index: 5;
    height: 40px;
}

.market-demo-table.tenant-efficiency-table tbody td:first-child {
    left: 0;
    z-index: 3;
}

.market-demo-sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 24px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1.25;
    text-align: center;
    text-transform: inherit;
    cursor: pointer;
}

.market-demo-sort::after {
    content: "\2195";
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    opacity: 0.55;
}

.market-demo-sort.is-sorted-asc::after {
    content: "\2191";
    color: var(--primary);
    opacity: 1;
}

.market-demo-sort.is-sorted-desc::after {
    content: "\2193";
    color: var(--primary);
    opacity: 1;
}

.market-demo-table th:first-child,
.market-demo-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 190px;
    background: white;
    font-weight: 800;
}

.market-demo-table th:first-child {
    z-index: 3;
    background: #f8fafd;
}

.market-demo-row-own td {
    background: rgba(108, 95, 252, 0.07);
    border-top: 2px solid #b8c2d6;
    color: #332a8f;
    font-weight: 800;
}

.market-demo-row-market td {
    background: rgba(35, 183, 229, 0.08);
    color: #0f6f8c;
    font-weight: 800;
}

.market-demo-row-diff td {
    background: rgba(38, 191, 148, 0.1);
    color: #167a5e;
    font-weight: 800;
}

.market-demo-row-muted td {
    background: #fbfcff;
    border-bottom: 2px solid #b8c2d6;
    color: var(--muted);
    font-weight: 700;
}

.market-demo-table.tenant-efficiency-table th:first-child,
.market-demo-table.tenant-efficiency-table td:first-child {
    left: 0;
    width: 340px;
    min-width: 340px;
    text-align: left;
}

.market-demo-table.tenant-efficiency-table thead tr:first-child th:first-child {
    z-index: 12;
    background: #f8fafd;
}

.market-demo-table.tenant-efficiency-table thead tr:nth-child(2) th:first-child {
    left: auto;
    z-index: 5;
    background: #f8fafd;
}

.market-demo-table.tenant-efficiency-table tbody td:first-child {
    z-index: 3;
}

.market-demo-table.tenant-efficiency-table tbody tr.market-demo-row-own td:first-child {
    background: #f2f1ff;
}

.market-demo-table.tenant-efficiency-table tbody tr.market-demo-row-market td:first-child {
    background: #f0fbfd;
}

.market-demo-table.tenant-efficiency-table tbody tr.market-demo-row-diff td:first-child {
    background: #eefbf7;
}

.market-demo-table.tenant-efficiency-table tbody tr.market-demo-row-muted td:first-child {
    background: #fbfcff;
}

.market-demo-diff-chart {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.market-demo-diff-chart .brand-section-head {
    margin: 0;
}

#marketDifferenceChart,
#marketTrendChart1,
#marketTrendChart2,
#marketTrendChart3 {
    min-height: 180px;
}

.market-demo-charts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.market-demo-charts article {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.market-demo-charts h4 {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.finance-bfo-stack {
    display: grid;
    gap: 16px;
}

.finance-bfo-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.finance-bfo-hero .brand-section-head {
    margin-bottom: 8px;
}

.finance-bfo-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.finance-source-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 8px 12px;
    border: 1px solid rgba(35, 183, 229, 0.28);
    border-radius: 8px;
    background: rgba(35, 183, 229, 0.1);
    color: #127b9c;
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.finance-source-badge .bx {
    font-size: 17px;
}

.finance-bfo-section .brand-section-head {
    margin-bottom: 14px;
}

.finance-bfo-kv {
    display: grid;
    grid-template-columns: minmax(170px, 0.28fr) minmax(0, 1fr);
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.finance-bfo-kv dt,
.finance-bfo-kv dd {
    min-height: 42px;
    margin: 0;
    padding: 11px 13px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    line-height: 1.45;
}

.finance-bfo-kv dt {
    background: #f8fafd;
    color: var(--muted);
    font-weight: 800;
    text-transform: uppercase;
}

.finance-bfo-kv dd {
    color: var(--text);
    font-weight: 500;
}

.finance-bfo-kv dt:nth-last-of-type(1),
.finance-bfo-kv dd:nth-last-of-type(1) {
    border-bottom: 0;
}

.finance-bfo-balance,
.finance-bfo-grid {
    display: grid;
    gap: 12px;
}

.finance-bfo-balance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 12px;
}

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

.finance-bfo-results {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.finance-bfo-kpi {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.finance-bfo-kpi-main {
    background: linear-gradient(180deg, rgba(108, 95, 252, 0.08), rgba(35, 183, 229, 0.06)), white;
}

.finance-bfo-kpi span,
.finance-bfo-kpi strong,
.finance-bfo-kpi em {
    display: block;
}

.finance-bfo-kpi span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}

.finance-bfo-kpi strong {
    margin-top: 7px;
    color: var(--text);
    font-size: 23px;
    font-weight: 800;
    line-height: 1.1;
}

.finance-bfo-kpi strong small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.finance-bfo-kpi em {
    margin-top: 7px;
    color: #168a6b;
    font-size: 12px;
    font-style: normal;
    font-weight: 800;
}

.finance-bfo-kpi-negative {
    background: rgba(230, 83, 60, 0.06);
}

.finance-bfo-kpi-negative strong {
    color: #bd3b26;
}

.finance-bfo-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.brand-photo-panel {
    display: grid;
    gap: 18px;
}

.brand-photo-upload {
    display: grid;
    grid-template-columns: minmax(190px, 0.45fr) minmax(150px, 0.35fr) minmax(220px, 1fr) auto;
    grid-template-areas:
        "picker preview caption submit"
        "picker filename caption submit";
    gap: 12px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.brand-photo-dropzone {
    position: relative;
    display: flex;
    grid-area: picker;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 42px;
    overflow: hidden;
    border: 1px dashed rgba(108, 95, 252, 0.42);
    border-radius: 8px;
    background: white;
    color: var(--primary);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.brand-photo-selected-preview {
    grid-area: preview;
    width: 100%;
    max-width: 150px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #eef2f8;
}

.brand-photo-selected-preview[hidden] {
    display: none;
}

.brand-photo-selected-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.brand-photo-messages {
    display: grid;
    gap: 8px;
}

.brand-photo-message {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.brand-photo-message-success {
    border-color: rgba(38, 191, 148, 0.24);
    background: rgba(38, 191, 148, 0.1);
    color: #168a6b;
}

.brand-photo-message-error {
    border-color: rgba(230, 83, 60, 0.24);
    background: rgba(230, 83, 60, 0.08);
    color: #bd3b26;
}

.brand-photo-dropzone .bx {
    font-size: 20px;
}

.brand-photo-file {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.brand-photo-file-status {
    display: flex;
    grid-area: filename;
    align-items: center;
    min-width: 0;
    min-height: 42px;
    overflow: hidden;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-photo-file-status.has-file {
    color: var(--text);
}

.brand-photo-caption {
    grid-area: caption;
    min-width: 0;
}

.brand-photo-submit {
    grid-area: submit;
    min-height: 42px;
    white-space: nowrap;
}

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

.brand-photo-tile {
    display: grid;
    grid-template-rows: auto minmax(54px, 1fr) auto;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: var(--shadow);
}

.brand-photo-preview {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 0;
    padding: 0;
    background: #eef2f8;
    cursor: zoom-in;
}

.brand-photo-preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.brand-photo-preview:hover img {
    transform: scale(1.04);
}

.brand-photo-meta {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
}

.brand-photo-meta strong {
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-photo-meta span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.brand-photo-delete {
    padding: 0 12px 12px;
}

.brand-photo-delete button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    border: 1px solid rgba(230, 83, 60, 0.2);
    border-radius: 8px;
    background: rgba(230, 83, 60, 0.08);
    color: #bd3b26;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease;
}

.brand-photo-delete button:hover {
    border-color: rgba(230, 83, 60, 0.38);
    background: rgba(230, 83, 60, 0.13);
}

.brand-photo-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    place-items: center;
    padding: 34px;
    background: rgba(17, 24, 39, 0.78);
}

.brand-photo-modal.is-open {
    display: grid;
}

.brand-photo-modal figure {
    width: min(1060px, 100%);
    max-height: calc(100vh - 78px);
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    background: white;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.24);
}

.brand-photo-modal img {
    display: block;
    width: 100%;
    max-height: calc(100vh - 148px);
    object-fit: contain;
    background: #111827;
}

.brand-photo-modal figcaption {
    min-height: 42px;
    padding: 12px 14px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.brand-photo-modal-close {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: white;
    cursor: pointer;
}

.brand-photo-modal-close .bx {
    font-size: 26px;
}

.mall-list-panel {
    --mall-col-name: 34%;
    --mall-col-region: 24%;
    --mall-col-type: 24%;
    --mall-col-gla: 18%;
}

.mall-filterbar {
    grid-template-columns:
        minmax(220px, var(--mall-col-name))
        minmax(170px, var(--mall-col-region))
        minmax(180px, var(--mall-col-type))
        minmax(130px, var(--mall-col-gla));
}

.mall-table .mall-col-name {
    width: var(--mall-col-name);
}

.mall-table .mall-col-region {
    width: var(--mall-col-region);
}

.mall-table .mall-col-type {
    width: var(--mall-col-type);
}

.mall-table .mall-col-gla {
    width: var(--mall-col-gla);
}

.news-panel {
    --news-col-date: 11%;
    --news-col-section: 12%;
    --news-col-event: 13%;
    --news-col-region: 13%;
    --news-col-brand: 13%;
    --news-col-topic: 30%;
    --news-col-link: 8%;
    overflow: visible;
}

.news-filterbar {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: minmax(170px, 0.82fr) minmax(92px, 0.65fr) minmax(104px, 0.72fr) minmax(112px, 0.78fr) minmax(130px, 0.9fr) minmax(190px, 1.15fr) 42px;
    gap: 8px;
    align-items: end;
    margin-bottom: 18px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    overflow: visible;
}

.news-filterbar .multi-filter {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.news-filterbar .multi-filter-label {
    min-height: 15px;
}

.news-date-range {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
    min-width: 0;
}

.news-date-input {
    min-width: 0;
    padding: 9px 6px;
    font-size: 12px;
}

.news-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
}

.news-text-filter {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.news-text-search {
    min-width: 0;
}

.news-table .news-col-date {
    width: var(--news-col-date);
}

.news-table .news-col-section {
    width: var(--news-col-section);
}

.news-table .news-col-event {
    width: var(--news-col-event);
}

.news-table .news-col-region {
    width: var(--news-col-region);
}

.news-table .news-col-brand {
    width: var(--news-col-brand);
}

.news-table .news-col-topic {
    width: var(--news-col-topic);
}

.news-table .news-col-link {
    width: var(--news-col-link);
}

.news-table {
    min-width: 1120px;
}

.news-table td {
    vertical-align: middle;
}

.multi-filter {
    position: relative;
    min-width: 0;
}

.multi-filter-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.multi-filter-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    appearance: none;
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    text-transform: none;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.multi-filter-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-filter-button:hover,
.multi-filter-button[aria-expanded="true"] {
    border-color: var(--primary);
}

.multi-filter-button:focus-visible {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.multi-filter-button[aria-expanded="true"] {
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.multi-filter-menu {
    position: absolute;
    inset-block-start: calc(100% + 6px);
    inset-inline: 0;
    z-index: 80;
    display: grid;
    gap: 5px;
    width: max-content;
    min-width: 100%;
    max-width: min(340px, calc(100vw - 36px));
    max-height: 260px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    box-shadow: 0 0.75rem 2rem rgba(27, 46, 94, 0.14);
    overflow-y: auto;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
}

.multi-filter[data-filter="region"] .multi-filter-menu,
.multi-filter[data-filter="brand"] .multi-filter-menu {
    inset-inline-start: auto;
    inset-inline-end: 0;
}

.multi-filter-menu[hidden] {
    display: none;
}

.multi-filter-search-wrap {
    position: sticky;
    top: -10px;
    z-index: 1;
    margin: -10px -10px 4px;
    padding: 10px;
    border-bottom: 1px solid var(--line);
    background: white;
}

.multi-filter-search {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 500;
}

.multi-filter-menu .check-row {
    align-items: center;
    min-height: 34px;
    padding: 7px 8px;
    border-radius: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.16s ease, color 0.16s ease;
}

.multi-filter-menu .check-row:hover {
    background: #f4f6fb;
}

.multi-filter-menu .check-row:has(.news-filter-check:checked) {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.multi-filter-empty {
    padding: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.news-filter-check {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.news-filter-reset {
    width: 42px;
    min-width: 42px;
    padding: 0;
    align-self: end;
}

.news-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.news-section-badge {
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
}

.news-section-malls {
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
}

.news-section-market {
    background: rgba(38, 191, 148, 0.14);
    color: #168a6b;
}

.news-section-other {
    background: rgba(123, 129, 145, 0.14);
    color: #5e6573;
}

.news-event-badge {
    background: rgba(38, 191, 148, 0.14);
    color: #168a6b;
}

.news-event-close {
    background: rgba(230, 83, 60, 0.12);
    color: #bd3b26;
}

.news-event-event {
    background: rgba(240, 173, 78, 0.18);
    color: #9a640f;
}

.news-event-other {
    background: rgba(123, 129, 145, 0.14);
    color: #5e6573;
}

.brand-news-summary .brand-news-filter-badge {
    border: 1px solid transparent;
    font-family: inherit;
    text-transform: none;
}

.brand-news-summary .brand-news-filter-badge strong {
    color: inherit;
}

.brand-news-summary .brand-news-filter-all {
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
}

.brand-news-summary .brand-news-filter-open {
    background: rgba(38, 191, 148, 0.14);
    color: #168a6b;
}

.brand-news-summary .brand-news-filter-close {
    background: rgba(230, 83, 60, 0.12);
    color: #bd3b26;
}

.brand-news-summary .brand-news-filter-regions {
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
}

.brand-news-summary .brand-news-filter-badge.is-active {
    border-color: currentColor;
}

.news-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    white-space: nowrap;
}

.news-link:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.news-link .bx {
    font-size: 16px;
}

.muted-cell {
    color: var(--muted);
}

.weekly-brands-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
    padding: 10px 14px;
    border: 1px solid #f0ad4e;
    border-radius: 8px;
    background: #fff3cd;
    color: #856404;
    font-size: 14px;
    line-height: 1.35;
}

.weekly-inline-brand {
    font-weight: 800;
}

.weekly-separator {
    opacity: 0.7;
}

.brand-search-control {
    width: 100%;
}

.filter-field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-field-compact {
    min-width: 120px;
}

.filter-select,
.filter-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    text-transform: none;
}

.filter-select {
    padding: 9px 34px 9px 12px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--muted) 50%),
        linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position:
        calc(100% - 17px) 18px,
        calc(100% - 12px) 18px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.multi-filter-button.filter-select {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.filter-input {
    padding: 9px 12px;
}

.advanced-filter-trigger {
    min-width: 210px;
    align-self: end;
    white-space: nowrap;
}

.filter-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    font-size: 11px;
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(17, 28, 67, 0.52);
}

.modal-backdrop[hidden] {
    display: none;
}

.filter-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1180px, 100%);
    max-height: min(88vh, 820px);
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.24);
    overflow: hidden;
}

.filter-modal-header,
.filter-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.filter-modal-header h3,
.filter-block h4 {
    margin: 0;
}

.filter-block h4 {
    margin-bottom: 12px;
}

.filter-modal-footer {
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    border-bottom: 0;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--muted);
    cursor: pointer;
}

.icon-button .bx {
    font-size: 22px;
}

.icon-button:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.filter-modal-body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    overflow: auto;
}

.filter-block {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.filter-block-wide,
.filter-modal-side {
    min-width: 0;
}

.filter-modal-side {
    display: grid;
    gap: 14px;
    align-content: start;
}

.filter-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-button {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--primary);
    font-weight: 800;
    cursor: pointer;
}

.mini-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.filter-check-grid,
.filter-check-list {
    display: grid;
    gap: 5px;
}

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

.filter-check-list-inline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-subcategory-panel {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.filter-subcategory-panel[hidden],
.filter-subcategory-group[hidden] {
    display: none;
}

.filter-hint {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.filter-subcategory-list {
    display: grid;
    gap: 12px;
}

.filter-subcategory-group {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.filter-subcategory-group h5 {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
}

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

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 24px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
}

.check-row-full {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
}

.advanced-check {
    width: 16px;
    height: 16px;
    margin-top: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

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

.filter-subtitle {
    margin-top: 20px !important;
    margin-bottom: 10px !important;
    color: var(--muted);
    font-size: 13px;
}

.auth-page {
    background:
        radial-gradient(circle at 18% 18%, rgba(35, 183, 229, 0.2), transparent 26%),
        linear-gradient(135deg, #111c43 0%, #293b83 56%, #6c5ffc 100%);
}

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

.auth-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: center;
    width: min(920px, 100%);
}

.auth-copy {
    color: white;
}

.auth-logo {
    display: block;
    width: 240px;
    height: auto;
    max-width: 100%;
}

.auth-copy h1 {
    margin: 18px 0 10px;
    font-size: 42px;
}

.auth-copy p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.login-card {
    display: grid;
    gap: 14px;
    padding: 24px;
    border: 0;
}

.login-card h2 {
    margin: 0 0 4px;
}

.login-card label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
}

.form-error {
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff0f0;
    color: #a21d1d;
    font-size: 14px;
}

@media (max-width: 1040px) {
    .market-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .market-overview-panel {
        min-height: auto;
    }
}

@media (max-width: 860px) {
    .app-shell,
    .content-grid,
    .auth-panel,
    .card-grid,
    .brand-filterbar,
    .filter-modal-body {
        grid-template-columns: 1fr;
    }

    .news-filterbar {
        grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.75fr) minmax(90px, 0.75fr) minmax(90px, 0.75fr) minmax(120px, 0.9fr) minmax(160px, 1fr) 40px;
        gap: 8px;
        padding: 10px;
    }

    .brand-profile-hero,
    .brand-profile-layout,
    .brand-regions-layout,
    .tenant-mix-filters,
    .tenant-mix-layout,
    .market-demo-filters,
    .market-demo-charts,
    .brand-metrics-grid,
    .finance-bfo-balance,
    .finance-bfo-grid,
    .finance-bfo-results,
    .finance-bfo-kv,
    .brand-photo-upload,
    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .finance-bfo-hero {
        flex-direction: column;
    }

    .finance-bfo-kv dt {
        border-bottom: 0;
    }

    .finance-bfo-kv dd {
        padding-top: 0;
    }

    .brand-profile-mark {
        min-height: 72px;
        padding: 8px;
    }

    .brand-profile-title {
        grid-template-columns: 1fr;
        padding: 8px 12px 10px;
    }

    .brand-profile-toolbar,
    .profile-card-head,
    .profile-form-actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-profile-summary {
        justify-content: flex-end;
        width: 100%;
    }

    .profile-card-head .secondary-button,
    .profile-form-actions .primary-button {
        width: 100%;
    }

    .brand-profile-title h2 {
        font-size: 24px;
    }

    .brand-profile-table th {
        width: 160px;
    }

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

    .brand-photo-upload {
        grid-template-areas:
            "picker"
            "preview"
            "filename"
            "caption"
            "submit";
    }

    .brand-photo-selected-preview {
        max-width: 220px;
    }

    .news-filter-reset {
        width: 40px;
        min-width: 40px;
    }

    .sidebar {
        position: static;
    }

    .brand {
        min-height: 66px;
    }

    .side-nav {
        padding: 12px;
    }

    .topbar,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .main-area {
        padding: 18px;
    }

    .topbar {
        margin: -18px -18px 18px;
        padding: 16px 18px;
    }

    .search-input {
        max-width: none;
    }

    .advanced-filter-trigger {
        width: 100%;
        min-width: 0;
    }

    .news-filter-reset {
        width: 100%;
    }

    .modal-backdrop {
        padding: 12px;
    }

    .filter-modal {
        max-height: 92vh;
    }

    .filter-modal-header,
    .filter-modal-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-modal-footer .primary-button,
    .filter-modal-footer .secondary-button {
        width: 100%;
    }

    .filter-check-grid {
        grid-template-columns: 1fr;
    }

    .filter-check-list-inline {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .brand-photo-grid {
        grid-template-columns: 1fr;
    }

    .brand-photo-modal {
        padding: 16px;
    }

    .brand-photo-modal-close {
        top: 10px;
        right: 10px;
    }
}

.crm-workspace {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    flex: 1 1 auto;
    height: calc(100vh - 122px);
    min-height: 0;
}

.crm-dashboard-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
}

.crm-dashboard-tab {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.crm-dashboard-tab .bx {
    color: var(--primary);
    font-size: 17px;
}

.crm-dashboard-tab.is-active,
.crm-dashboard-tab:hover {
    border-color: var(--line);
    background: #f8fafd;
    color: var(--text);
}

.crm-dashboard-action {
    margin-left: auto;
    min-height: 36px;
}

.crm-grid {
    display: grid;
    grid-template-columns: minmax(230px, 0.78fr) minmax(280px, 1fr) minmax(360px, 1.28fr);
    gap: 16px;
    min-height: 620px;
}

.crm-view[hidden] {
    display: none;
}

.crm-tasks-board {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 16px;
    min-height: 0;
    height: 100%;
}

.crm-placeholder-view {
    display: grid;
    min-height: 0;
    overflow: auto;
}

.crm-column {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-all-tasks-column {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    min-height: 0;
    overflow: hidden;
}

.crm-all-task-side {
    min-height: 0;
    overflow: auto;
}

.crm-stats-column {
    display: grid;
    gap: 16px;
    align-content: start;
}

.crm-stats-report-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.crm-stats-report-bar strong {
    margin-right: 4px;
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.crm-stats-report-bar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.crm-stats-report-bar input {
    min-height: 34px;
    width: 142px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}

.crm-stats-report-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.crm-stats-report-bar .primary-button {
    min-height: 34px;
    padding: 7px 12px;
}

.crm-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.crm-stats-card {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.crm-stats-card-wide {
    grid-column: span 2;
}

.crm-stats-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.crm-stats-card-head h3 {
    margin: 0;
    color: var(--text);
    font-size: 16px;
    font-weight: 850;
}

.crm-chart {
    min-height: 292px;
}

.crm-tasks-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
}

.crm-stats-subchart {
    min-width: 0;
    padding: 10px 10px 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-stats-subchart h4 {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.crm-small-chart {
    min-height: 224px;
}

.crm-task-type-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.8fr) minmax(260px, 1fr);
    gap: 18px;
    align-items: center;
}

.crm-donut-chart {
    min-height: 292px;
}

.crm-task-type-legend {
    display: grid;
    gap: 8px;
}

.crm-task-type-legend-title {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.crm-task-type-legend-row {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font-size: 12px;
    font-weight: 750;
}

.crm-task-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.crm-task-type-legend-row strong {
    font-size: 12px;
    font-weight: 900;
}

.crm-broker-efficiency-card {
    min-height: 0;
}

.crm-broker-table-wrap {
    overflow: auto;
    max-height: 520px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-broker-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
}

.crm-broker-table th,
.crm-broker-table td {
    min-width: 58px;
    padding: 7px 8px;
    border-right: 1px solid #edf1f7;
    border-bottom: 1px solid #edf1f7;
    color: var(--text);
    text-align: center;
    white-space: nowrap;
}

.crm-broker-table th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #f8fafd;
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
}

.crm-broker-table thead tr:nth-child(2) th {
    top: 32px;
}

.crm-broker-table thead tr:nth-child(3) th {
    top: 64px;
}

.crm-broker-table td {
    font-weight: 700;
}

.crm-broker-table .crm-broker-sticky-col {
    position: sticky;
    left: 0;
    z-index: 4;
    min-width: 150px;
    background: #fbfcff;
    text-align: left;
    font-weight: 900;
}

.crm-broker-table thead .crm-broker-sticky-col {
    z-index: 5;
    background: #f8fafd;
}

.crm-broker-total-head {
    background: rgba(39, 174, 96, 0.12) !important;
    color: #16805a !important;
}

.crm-broker-table td.is-good {
    color: #0f6e4d;
}

.crm-broker-table td.is-mid {
    color: #9a640f;
}

.crm-broker-table td.is-low {
    color: #b73737;
}

.crm-broker-total-row td {
    position: sticky;
    bottom: 0;
    z-index: 2;
    border-top: 2px solid #d7deeb;
    background: #f8fafd;
    font-weight: 950;
}

.crm-broker-total-row .crm-broker-sticky-col {
    z-index: 5;
    background: #eef7f2;
    color: #16805a;
}

.crm-column-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.crm-column-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
}

.crm-goals-head {
    margin-bottom: 10px;
}

.crm-goal-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
}

.crm-goal-filter-set {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.crm-goal-filter-card {
    appearance: none;
    display: grid;
    gap: 3px;
    min-height: 58px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafd;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.crm-goal-filter-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-goal-filter-card strong {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.crm-goal-filter-card.is-total {
    background: rgba(39, 174, 96, 0.14);
    color: #16805a;
}

.crm-goal-filter-card.is-stage-one {
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
}

.crm-goal-filter-card.is-stage-two {
    background: rgba(240, 173, 78, 0.18);
    color: #9a640f;
}

.crm-goal-filter-card.is-active {
    border-color: currentColor;
}

.crm-goal-filter-card.is-total.is-active {
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.16);
}

.crm-goal-filter-card.is-stage-one.is-active {
    box-shadow: 0 0 0 3px rgba(108, 95, 252, 0.16);
}

.crm-goal-filter-card.is-stage-two.is-active {
    box-shadow: 0 0 0 3px rgba(240, 173, 78, 0.22);
}

.crm-add-goal-button {
    align-self: stretch;
    min-height: 58px;
    white-space: nowrap;
}

.crm-task-context {
    display: grid;
    gap: 4px;
    width: 100%;
    min-width: 0;
}

.crm-task-context h2 span {
    font: inherit;
}

.crm-task-context p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.crm-task-meta-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
}

.crm-task-meta-lines {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.crm-goal-save-report-button {
    min-height: 34px;
    padding: 7px 10px;
    white-space: nowrap;
}

.crm-goal-save-report-button.is-saved {
    border-color: rgba(39, 174, 96, 0.24);
    background: rgba(39, 174, 96, 0.12);
    color: #16805a;
}

.crm-goal-comment {
    display: grid;
    gap: 6px;
    width: 100%;
    margin-top: 8px;
}

.crm-goal-comment label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.crm-goal-comment textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 74px;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.crm-goal-comment textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.crm-goal-comment-save {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.crm-goal-comment-save.is-saved {
    border-color: rgba(39, 174, 96, 0.24);
    background: rgba(39, 174, 96, 0.12);
    color: #16805a;
}

.crm-goal-list {
    display: grid;
    gap: 10px;
}

.crm-task-list {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-task-summary {
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.crm-summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 12px;
}

.crm-summary-table td {
    padding: 8px 10px;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    color: var(--text);
    font-weight: 700;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}

.crm-summary-table tr {
    cursor: pointer;
}

.crm-summary-table tr:focus {
    outline: none;
}

.crm-summary-table tr:hover td {
    border-top-color: rgba(15, 23, 42, 0.08);
    border-bottom-color: rgba(15, 23, 42, 0.08);
}

.crm-summary-table td:first-child {
    width: 58%;
    border-left: 4px solid transparent;
    border-radius: 8px 0 0 8px;
}

.crm-summary-table td:nth-child(2),
.crm-summary-table td:nth-child(3) {
    width: 21%;
    text-align: center;
    font-weight: 900;
}

.crm-summary-table td:last-child {
    border-right: 1px solid transparent;
    border-radius: 0 8px 8px 0;
}

.crm-summary-table tr.is-total td {
    border-color: rgba(39, 174, 96, 0.18);
    background: rgba(39, 174, 96, 0.1);
    color: #16805a;
}

.crm-summary-table tr.is-total td:first-child {
    border-left-color: #27ae60;
}

.crm-summary-table tr.is-reject td {
    border-color: rgba(226, 80, 80, 0.18);
    background: rgba(226, 80, 80, 0.09);
    color: #b73737;
}

.crm-summary-table tr.is-reject td:first-child {
    border-left-color: #e25050;
}

.crm-summary-table tr.is-interest td {
    border-color: rgba(35, 183, 229, 0.18);
    background: rgba(35, 183, 229, 0.09);
    color: #127b9c;
}

.crm-summary-table tr.is-interest td:first-child {
    border-left-color: #23b7e5;
}

.crm-summary-table tr.is-deal td {
    border-color: rgba(240, 173, 78, 0.2);
    background: rgba(240, 173, 78, 0.11);
    color: #9a640f;
}

.crm-summary-table tr.is-deal td:first-child {
    border-left-color: #f0ad4e;
}

.crm-summary-table tr.is-signed td {
    border-color: rgba(22, 128, 90, 0.22);
    background: rgba(22, 128, 90, 0.13);
    color: #0f6e4d;
}

.crm-summary-table tr.is-signed td:first-child {
    border-left-color: #16805a;
}

.crm-summary-table tr.is-active td {
    border-top-color: currentColor;
    border-bottom-color: currentColor;
    font-weight: 900;
}

.crm-summary-table tr.is-active td:last-child {
    border-right-color: currentColor;
}

.crm-goal-report-button {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-bottom: 12px;
    box-shadow: 0 8px 18px rgba(35, 183, 229, 0.18);
}

.crm-goal-report-button .bx {
    font-size: 18px;
}

.crm-task-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 12px;
}

.crm-task-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    background: #f8fafd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.crm-task-table th button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.crm-task-table th button::after {
    content: "";
    width: 0;
    height: 0;
    border-inline: 4px solid transparent;
    opacity: 0.35;
}

.crm-task-table th button[data-sort-direction="asc"]::after {
    border-bottom: 5px solid currentColor;
}

.crm-task-table th button[data-sort-direction="desc"]::after {
    border-top: 5px solid currentColor;
}

.crm-task-table th button.is-active {
    color: var(--primary);
}

.crm-task-table th:nth-child(1) {
    width: 48%;
}

.crm-task-table th:nth-child(2) {
    width: 27%;
}

.crm-task-table th:nth-child(3) {
    width: 25%;
}

.crm-task-table td {
    padding: 10px;
    border-bottom: 1px solid #edf1f7;
    color: var(--text);
    font-weight: 650;
    vertical-align: middle;
}

.crm-task-table tbody tr {
    cursor: pointer;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.crm-task-table tbody tr:hover,
.crm-task-table tbody tr:focus {
    outline: none;
    background: #f7fbff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.crm-task-table tbody tr.is-active {
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.crm-task-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-all-task-toolbar {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(220px, 0.55fr);
    gap: 12px;
    align-items: end;
    margin-bottom: 12px;
}

.crm-task-day-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.crm-task-day-card {
    display: grid;
    gap: 3px;
    min-height: 54px;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafd;
}

.crm-task-day-card span,
.crm-all-task-search-field span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-task-day-card strong {
    color: var(--text);
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.crm-task-day-card.is-total {
    background: rgba(35, 183, 229, 0.1);
    color: #127b9c;
}

.crm-task-day-card.is-done {
    background: rgba(22, 128, 90, 0.12);
    color: #0f6e4d;
}

.crm-all-task-search-field {
    display: grid;
    gap: 6px;
}

.crm-brand-title-link {
    color: var(--primary);
    text-decoration: none;
}

.crm-brand-title-link:hover {
    text-decoration: underline;
}

.crm-all-task-table-wrap {
    overflow: auto;
    min-height: 0;
    height: 100%;
    max-height: none;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-all-task-table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
    font-size: 12px;
}

.crm-all-task-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    background: #f8fafd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.crm-all-task-table th button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.crm-all-task-table th button::after {
    content: "";
    width: 0;
    height: 0;
    border-inline: 4px solid transparent;
    opacity: 0.35;
}

.crm-all-task-table th button[data-sort-direction="asc"]::after {
    border-bottom: 5px solid currentColor;
}

.crm-all-task-table th button[data-sort-direction="desc"]::after {
    border-top: 5px solid currentColor;
}

.crm-all-task-table th button.is-active {
    color: var(--primary);
}

.crm-all-task-table td {
    padding: 10px;
    border-bottom: 1px solid #edf1f7;
    color: var(--text);
    font-weight: 650;
    vertical-align: middle;
}

.crm-all-task-table tbody tr {
    cursor: pointer;
    transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.crm-all-task-table tbody tr.is-today {
    background: #fff8df;
}

.crm-all-task-table tbody tr:hover,
.crm-all-task-table tbody tr:focus {
    outline: none;
    background: #f7fbff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.crm-all-task-table tbody tr.is-today:hover,
.crm-all-task-table tbody tr.is-today:focus {
    background: #fff3cd;
}

.crm-all-task-table tbody tr.is-active {
    background: var(--primary-soft);
    box-shadow: inset 3px 0 0 var(--primary);
}

.crm-all-task-table tbody tr.is-active.is-today {
    background: #fff0bf;
}

.crm-all-task-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-all-task-table th:nth-child(1),
.crm-all-task-table th:nth-child(2) {
    width: 82px;
}

.crm-all-task-table th:nth-child(3) {
    width: 210px;
}

.crm-all-task-table th:nth-child(4) {
    width: 170px;
}

.crm-all-task-table th:nth-child(5) {
    width: 160px;
}

.crm-all-task-goal-cell {
    color: var(--muted);
    font-weight: 700;
}

.crm-all-task-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.crm-all-task-summary-card {
    display: grid;
    gap: 4px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #f8fafd;
}

.crm-all-task-summary-card span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-all-task-summary-card strong {
    color: var(--text);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.crm-all-task-summary-card.is-total {
    background: rgba(39, 174, 96, 0.12);
}

.crm-all-task-summary-card.is-reject {
    background: rgba(226, 80, 80, 0.08);
}

.crm-all-task-summary-card.is-interest {
    background: rgba(35, 183, 229, 0.1);
}

.crm-all-task-summary-card.is-deal {
    background: rgba(240, 173, 78, 0.12);
}

.crm-all-task-summary-card.is-signed {
    background: rgba(22, 128, 90, 0.12);
}

.crm-all-task-detail {
    display: grid;
    gap: 10px;
    margin: 0;
}

.crm-all-task-detail div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.crm-all-task-detail dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-all-task-detail dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.35;
}

.crm-task-title-cell {
    font-weight: 800;
    line-height: 1.35;
}

.crm-task-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.crm-task-status-badge.is-reject {
    background: rgba(226, 80, 80, 0.09);
    color: #b73737;
}

.crm-task-status-badge.is-interest {
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
}

.crm-task-status-badge.is-deal {
    background: rgba(240, 173, 78, 0.16);
    color: #9a640f;
}

.crm-task-status-badge.is-signed {
    background: rgba(22, 128, 90, 0.14);
    color: #0f6e4d;
}

.crm-task-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
    font-weight: 800;
    white-space: nowrap;
}

.crm-task-action .bx {
    color: var(--primary);
    font-size: 16px;
}

.crm-goal-card {
    appearance: none;
    display: grid;
    gap: 6px;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.crm-goal-card:hover,
.crm-goal-card.is-active {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.crm-goal-card span {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
}

.crm-goal-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.crm-goal-card b {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(108, 95, 252, 0.12);
    color: #4f46c6;
    font-size: 12px;
    font-weight: 800;
}

.crm-goal-card b.is-stage-two {
    background: rgba(240, 173, 78, 0.18);
    color: #9a640f;
}

.crm-priority-badge {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(35, 183, 229, 0.14);
    color: #127b9c;
    font-size: 12px;
    font-weight: 800;
}

.crm-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 16px;
}

.crm-detail-meta div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
}

.crm-detail-meta dt {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.crm-detail-meta dd {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.crm-detail-select {
    width: 100%;
    min-height: 34px;
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
}

.crm-detail-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.crm-detail-status-select.is-reject {
    border-color: rgba(226, 80, 80, 0.28);
    background: rgba(226, 80, 80, 0.09);
    color: #b73737;
}

.crm-detail-status-select.is-interest {
    border-color: rgba(35, 183, 229, 0.28);
    background: rgba(35, 183, 229, 0.09);
    color: #127b9c;
}

.crm-detail-status-select.is-deal {
    border-color: rgba(240, 173, 78, 0.32);
    background: rgba(240, 173, 78, 0.11);
    color: #9a640f;
}

.crm-detail-status-select.is-signed {
    border-color: rgba(22, 128, 90, 0.3);
    background: rgba(22, 128, 90, 0.13);
    color: #0f6e4d;
}

.crm-brand-comment {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}

.crm-brand-comment label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.crm-brand-comment textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 74px;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
}

.crm-brand-comment textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.crm-brand-comment-save {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.crm-brand-comment-save.is-saved {
    border-color: rgba(39, 174, 96, 0.24);
    background: rgba(39, 174, 96, 0.12);
    color: #16805a;
}

.crm-detail-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 16px;
}

.crm-detail-action-button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-height: 32px;
    padding: 7px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    color: var(--text);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.crm-detail-action-button .bx {
    color: var(--primary);
    font-size: 15px;
    flex: 0 0 auto;
}

.crm-detail-action-button:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.crm-goal-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(620px, 100%);
    max-height: min(88vh, 680px);
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.24);
    overflow: hidden;
}

.crm-goal-modal-body {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    overflow: auto;
}

.crm-goal-modal-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.crm-goal-modal-comment-field textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.45;
}

.crm-task-action-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(520px, 100%);
    max-height: min(88vh, 620px);
    border-radius: 8px;
    background: white;
    box-shadow: 0 1rem 3rem rgba(17, 28, 67, 0.24);
    overflow: hidden;
}

.crm-task-action-modal-body {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
    overflow: auto;
}

.crm-task-action-comment-field textarea {
    min-height: 96px;
    resize: vertical;
    line-height: 1.45;
}

.crm-brand-task-table-wrap {
    margin-top: 14px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
}

.crm-brand-task-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    font-size: 12px;
}

.crm-brand-task-table th {
    padding: 9px 10px;
    border-bottom: 1px solid var(--line);
    background: #f8fafd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.crm-brand-action-cell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.crm-brand-action-cell .bx {
    color: var(--primary);
    font-size: 15px;
}

.crm-brand-task-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf1f7;
    color: var(--text);
    font-weight: 650;
    vertical-align: middle;
}

.crm-brand-task-table tbody tr:hover {
    background: #f7fbff;
}

.crm-brand-task-table tbody tr.is-today {
    background: #fff8df;
}

.crm-brand-task-table tbody tr.is-today:hover {
    background: #fff3cd;
}

.crm-brand-task-table tbody tr:last-child td {
    border-bottom: 0;
}

.crm-brand-action-task {
    font-weight: 800;
}

.crm-brand-action-comment {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.crm-brand-action-buttons {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

.crm-brand-action-button {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

.crm-brand-action-button .bx {
    font-size: 17px;
}

.crm-brand-action-button.is-ok {
    border-color: rgba(22, 128, 90, 0.26);
    background: rgba(22, 128, 90, 0.1);
    color: #0f6e4d;
}

.crm-brand-action-button.is-cancel {
    border-color: rgba(226, 80, 80, 0.24);
    background: rgba(226, 80, 80, 0.08);
    color: #b73737;
}

.crm-brand-action-button.is-wait {
    border-color: rgba(240, 173, 78, 0.28);
    background: rgba(240, 173, 78, 0.1);
    color: #9a640f;
}

.crm-brand-action-button:hover {
    filter: brightness(0.97);
}

.crm-brand-action-empty {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

@media (max-width: 1180px) {
    .crm-grid {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .crm-tasks-board {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .crm-stats-grid,
    .crm-tasks-chart-grid,
    .crm-task-type-layout {
        grid-template-columns: 1fr;
    }

    .crm-stats-card-wide {
        grid-column: auto;
    }

    .crm-all-task-toolbar {
        grid-template-columns: 1fr;
    }

    .crm-dashboard-menu {
        flex-wrap: wrap;
    }

    .crm-dashboard-action {
        margin-left: 0;
    }

    .crm-goal-toolbar {
        grid-template-columns: 1fr;
    }

    .crm-add-goal-button {
        justify-content: center;
    }

    .crm-task-meta-row {
        grid-template-columns: 1fr;
    }

    .crm-goal-save-report-button {
        justify-content: center;
        width: 100%;
    }

    .crm-goal-modal-fields {
        grid-template-columns: 1fr;
    }
}

.brand-news-summary > button.brand-news-filter-badge {
    appearance: none !important;
    -webkit-appearance: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
    min-height: 26px !important;
    padding: 4px 10px !important;
    border-radius: 999px !important;
    border: 1px solid transparent !important;
    font-family: inherit !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    text-transform: none !important;
    cursor: pointer !important;
}

.brand-news-summary > button.brand-news-filter-badge strong {
    color: inherit !important;
    font-size: 14px !important;
    font-weight: 800 !important;
}

.brand-news-summary > button.brand-news-filter-all {
    background-color: rgba(108, 95, 252, 0.12) !important;
    color: #4f46c6 !important;
}

.brand-news-summary > button.brand-news-filter-open {
    background-color: rgba(38, 191, 148, 0.14) !important;
    color: #168a6b !important;
}

.brand-news-summary > button.brand-news-filter-close {
    background-color: rgba(230, 83, 60, 0.12) !important;
    color: #bd3b26 !important;
}

.brand-news-summary > button.brand-news-filter-badge.is-active {
    border-color: currentColor !important;
    box-shadow: 0 0 0 3px var(--primary-soft) !important;
}
