.territory-dashboard {
    padding: 24px 0 12px;
}

.territory-dashboard__panel {
    background: linear-gradient(135deg, #f6f8fc 0%, #eef3fb 100%);
    border: 1px solid rgba(57, 74, 97, 0.08);
    border-radius: 28px;
    box-shadow: 0 22px 48px rgba(30, 48, 80, 0.08);
    overflow: hidden;
}

.territory-dashboard__hero {
    background: linear-gradient(135deg, #17315b 0%, #2d4b80 70%, #4063a1 100%);
    color: #fff;
    display: grid;
    gap: 34px;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
    padding: 36px;
}

.territory-dashboard__hero-copy { align-self: center; }

.territory-dashboard__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    padding: 10px 16px;
    text-transform: uppercase;
}

.territory-dashboard__title {
    color: #fff;
    font-size: 44px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    margin: 18px 0 16px;
    max-width: 680px;
}

.territory-dashboard__description {
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
    margin: 0;
    max-width: 760px;
}

.territory-dashboard__hero-proof { display: grid; gap: 9px; list-style: none; margin: 24px 0 0; padding: 0; }
.territory-dashboard__hero-proof li { align-items: baseline; color: rgba(255,255,255,.78); display: flex; flex-wrap: wrap; font-size: 14px; gap: 7px; line-height: 1.4; }
.territory-dashboard__hero-proof li::before { background: #f2cb59; border-radius: 50%; content: ""; height: 7px; width: 7px; }
.territory-dashboard__hero-proof strong { color: #fff; font-weight: 800; }
.territory-dashboard__hero-metrics { align-self: stretch; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.42); border-radius: 26px; box-shadow: 0 20px 42px rgba(8,24,20,.18); color: #163128; padding: 22px; }
.territory-dashboard__hero-metrics-head { align-items: baseline; display: flex; gap: 12px; justify-content: space-between; margin-bottom: 16px; }
.territory-dashboard__hero-metrics-head span { color: #597268; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.territory-dashboard__hero-metrics-head strong { color: #1f5f4c; font-size: 14px; font-weight: 800; }
.territory-dashboard__hero-metrics-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.territory-dashboard__hero-metrics-grid article { align-items: center; background: linear-gradient(135deg,#124f3e 0%,#287d7b 100%); border-radius: 18px; display: flex; gap: 12px; min-height: 88px; padding: 15px; }
.territory-dashboard__hero-metrics-grid i { align-items: center; background: rgba(6,45,35,.22); border-radius: 14px; color: #fff; display: inline-flex; font-size: 23px; height: 42px; justify-content: center; width: 42px; }
.territory-dashboard__hero-metrics-grid strong, .territory-dashboard__hero-metrics-grid span { display: block; }
.territory-dashboard__hero-metrics-grid strong { color: #fff; font-size: 28px; font-weight: 850; letter-spacing: -.04em; line-height: 1; }
.territory-dashboard__hero-metrics-grid span { color: rgba(255,255,255,.88); font-size: 12px; font-weight: 700; line-height: 1.25; margin-top: 6px; }
.territory-dashboard__hero-metrics-note { color: #597268; font-size: 12px; line-height: 1.5; margin: 16px 0 0; }

.territory-dashboard__body {
    padding: 32px 36px 40px;
}

.territory-dashboard__toolbar {
    align-items: end;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 1.35fr);
    margin-bottom: 28px;
}

.territory-dashboard__control-label {
    color: #43546f;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.territory-dashboard__select {
    appearance: none;
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.14);
    border-radius: 16px;
    color: #17315b;
    font-size: 16px;
    font-weight: 600;
    outline: none;
    padding: 14px 18px;
    width: 100%;
}

.territory-dashboard__summary {
    align-self: stretch;
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 20px;
    color: #40536f;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    min-height: 94px;
    padding: 18px 22px;
}

.territory-dashboard__summary-strong {
    color: #17315b;
    font-size: 20px;
    font-weight: 800;
}

.territory-dashboard__summary-meta {
    color: #5d6d85;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 6px;
}

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

.territory-dashboard__card {
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 22px;
    min-height: 150px;
    padding: 20px 22px;
}

.territory-dashboard__card-label {
    color: #5d6d85;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.territory-dashboard__card-value {
    color: #17315b;
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 10px;
}

.territory-dashboard__card-caption {
    color: #61738e;
    font-size: 15px;
    line-height: 1.6;
}

.territory-dashboard__card-delta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.territory-dashboard__card-delta.is-up {
    background: rgba(27, 123, 77, 0.12);
    color: #176645;
}

.territory-dashboard__card-delta.is-down {
    background: rgba(168, 74, 27, 0.12);
    color: #8b3f18;
}

.territory-dashboard__card-delta.is-flat {
    background: rgba(57, 74, 97, 0.1);
    color: #4a5f7d;
}

.territory-dashboard__grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.territory-dashboard__decision-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 18px 0;
}

.territory-dashboard__decision-card,
.territory-dashboard__priority-matrix,
.territory-dashboard__benchmark {
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 22px;
    box-shadow: 0 16px 34px rgba(30, 48, 80, 0.06);
    padding: 22px;
}

.territory-dashboard__decision-label,
.territory-dashboard__priority-heading span,
.territory-dashboard__benchmark-heading span {
    color: #5d6d85;
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.territory-dashboard__decision-title,
.territory-dashboard__priority-heading h4,
.territory-dashboard__benchmark-heading h4 {
    color: #17315b;
    font-size: 18px;
    font-weight: 850;
    line-height: 1.25;
    margin: 0 0 10px;
}

.territory-dashboard__decision-copy,
.territory-dashboard__priority-heading p,
.territory-dashboard__priority-conclusion,
.territory-dashboard__benchmark-heading p,
.territory-dashboard__benchmark-footnote {
    color: #5d6d85;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
}

.territory-dashboard__priority-matrix,
.territory-dashboard__benchmark {
    margin: 18px 0;
}

.territory-dashboard__priority-heading,
.territory-dashboard__benchmark-heading {
    align-items: flex-start;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.territory-dashboard__priority-method,
.territory-dashboard__benchmark-reference {
    background: rgba(57, 74, 97, 0.08);
    border-radius: 16px;
    color: #40536f;
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.45;
    padding: 10px 12px;
    text-align: right;
}

.territory-dashboard__priority-axes,
.territory-dashboard__benchmark-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.territory-dashboard__priority-axis,
.territory-dashboard__benchmark-item {
    background: linear-gradient(180deg, #f9fbfd 0%, #f3f6fa 100%);
    border: 1px solid rgba(57, 74, 97, 0.08);
    border-radius: 18px;
    min-height: 112px;
    padding: 16px;
}

.territory-dashboard__priority-axis strong,
.territory-dashboard__benchmark-delta {
    color: #17315b;
    display: block;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin: 8px 0 6px;
}

.territory-dashboard__benchmark-item > strong {
    color: #17315b;
    display: block;
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.03em;
    line-height: 1;
    margin: 10px 0 8px;
}

.territory-dashboard__priority-axis-head {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.territory-dashboard__priority-axis-head strong {
    margin: 0;
    font-size: 15px;
    letter-spacing: 0;
}

.territory-dashboard__priority-axis-head span {
    border-radius: 999px;
    font-size: 11px;
    font-weight: 850;
    padding: 6px 9px;
}

.territory-dashboard__priority-axis-head .is-alta {
    background: rgba(168, 74, 27, 0.12);
    color: #8b3f18;
}

.territory-dashboard__priority-axis-head .is-média,
.territory-dashboard__priority-axis-head .is-media {
    background: rgba(198, 147, 37, 0.16);
    color: #87600f;
}

.territory-dashboard__priority-axis-head .is-baixa {
    background: rgba(27, 123, 77, 0.12);
    color: #176645;
}

.territory-dashboard__priority-track {
    background: rgba(57, 74, 97, 0.1);
    border-radius: 999px;
    height: 9px;
    margin: 14px 0 10px;
    overflow: hidden;
}

.territory-dashboard__priority-track i {
    background: linear-gradient(90deg, #2b7a62 0%, #f2cb59 58%, #b66a2b 100%);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.territory-dashboard__priority-value {
    color: #17315b;
    font-size: 14px;
    font-weight: 850;
    margin-bottom: 6px;
}

.territory-dashboard__priority-axis span,
.territory-dashboard__benchmark-label {
    color: #40536f;
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
}

.territory-dashboard__priority-axis p,
.territory-dashboard__benchmark-item p {
    color: #61738e;
    font-size: 12px;
    line-height: 1.45;
    margin: 0;
}

.territory-dashboard__benchmark-delta {
    display: inline-flex;
    font-size: 12px;
    margin-top: 12px;
    padding: 7px 9px;
    border-radius: 999px;
}

.territory-dashboard__benchmark-delta.is-up {
    background: rgba(27, 123, 77, 0.12);
    color: #176645;
}

.territory-dashboard__benchmark-delta.is-down {
    background: rgba(168, 74, 27, 0.12);
    color: #8b3f18;
}

.territory-dashboard__benchmark-delta.is-neutral {
    background: rgba(57, 74, 97, 0.1);
    color: #4a5f7d;
}

.territory-dashboard__priority-conclusion,
.territory-dashboard__benchmark-footnote {
    margin-top: 14px;
}

.territory-dashboard__comparison {
    margin-top: 18px;
}

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

.territory-dashboard__comparison-toolbar .territory-dashboard__select {
    max-width: 320px;
}

.territory-dashboard__ranking {
    display: grid;
    gap: 12px;
}

.territory-dashboard__ranking-item {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 18px;
    padding: 14px 16px;
}

.territory-dashboard__ranking-position {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #17315b 0%, #4c6da9 100%);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
}

.territory-dashboard__ranking-name {
    color: #17315b;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}

.territory-dashboard__ranking-meta {
    color: #5d6d85;
    font-size: 13px;
    line-height: 1.5;
}

.territory-dashboard__ranking-value {
    color: #17315b;
    font-size: 20px;
    font-weight: 800;
    text-align: right;
}

.territory-dashboard__highlights {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.territory-dashboard__highlight {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(245,248,252,0.98) 100%);
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 22px;
    padding: 20px 22px;
}

.territory-dashboard__highlight-title {
    color: #17315b;
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 10px;
}

.territory-dashboard__highlight-copy {
    color: #5d6d85;
    font-size: 14px;
    line-height: 1.75;
    margin: 0;
}

.territory-dashboard__box {
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 24px;
    padding: 24px;
}

.territory-dashboard__box-title {
    color: #17315b;
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 8px;
}

.territory-dashboard__box-copy {
    color: #5d6d85;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 22px;
}

.territory-dashboard__trend-list {
    display: grid;
    gap: 16px;
}

.territory-dashboard__trend-item {
    display: grid;
    gap: 8px;
}

.territory-dashboard__trend-meta {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.territory-dashboard__trend-label {
    color: #17315b;
    font-size: 15px;
    font-weight: 700;
}

.territory-dashboard__trend-value {
    color: #4f6281;
    font-size: 14px;
    font-weight: 700;
}

.territory-dashboard__trend-bar {
    background: #ebf0f7;
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}

.territory-dashboard__trend-fill {
    background: linear-gradient(90deg, #27497d 0%, #5f7fba 100%);
    border-radius: inherit;
    display: block;
    height: 100%;
}

.territory-dashboard__stats {
    display: grid;
    gap: 12px;
}

.territory-dashboard__stat {
    align-items: center;
    border-bottom: 1px solid rgba(57, 74, 97, 0.08);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
}

.territory-dashboard__stat:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.territory-dashboard__stat-label {
    color: #5d6d85;
    font-size: 14px;
    font-weight: 600;
}

.territory-dashboard__stat-value {
    color: #17315b;
    font-size: 18px;
    font-weight: 800;
    text-align: right;
}

.territory-dashboard__footnote {
    color: #687993;
    font-size: 13px;
    line-height: 1.7;
    margin-top: 20px;
}

.territory-dashboard__loading,
.territory-dashboard__error {
    background: #fff;
    border: 1px solid rgba(57, 74, 97, 0.1);
    border-radius: 24px;
    color: #17315b;
    font-size: 17px;
    padding: 24px;
}

.territory-dashboard__error {
    border-color: rgba(163, 30, 30, 0.14);
    color: #8b2733;
}

@media (max-width: 1199px) {
    .territory-dashboard__cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .territory-dashboard__highlights {
        grid-template-columns: 1fr;
    }

    .territory-dashboard__grid {
        grid-template-columns: 1fr;
    }

    .territory-dashboard__decision-grid {
        grid-template-columns: 1fr;
    }

    .territory-dashboard__priority-axes,
    .territory-dashboard__benchmark-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .territory-dashboard__toolbar {
        grid-template-columns: 1fr;
    }

    .territory-dashboard__hero,
    .territory-dashboard__body {
        padding: 28px 24px;
    }

    .territory-dashboard__hero { grid-template-columns: 1fr; }

    .territory-dashboard__title {
        font-size: 34px;
    }

    .territory-dashboard__priority-heading,
    .territory-dashboard__benchmark-heading {
        display: grid;
    }

    .territory-dashboard__priority-method,
    .territory-dashboard__benchmark-reference {
        text-align: left;
    }
}

@media (max-width: 767px) {
    .territory-dashboard__cards {
        grid-template-columns: 1fr;
    }

    .territory-dashboard__title {
        font-size: 30px;
    }

    .territory-dashboard__card-value {
        font-size: 36px;
    }

    .territory-dashboard__hero-metrics { padding: 16px; }
    .territory-dashboard__hero-metrics-grid { gap: 10px; }
    .territory-dashboard__hero-metrics-grid article { min-height: 78px; padding: 12px; }
    .territory-dashboard__hero-metrics-grid strong { font-size: 23px; }

    .territory-dashboard__priority-axes,
    .territory-dashboard__benchmark-grid {
        grid-template-columns: 1fr;
    }
}
