/* Hybrid refactor: preserve the business views while making them denser and clearer. */
:root {
    --workspace-max: 1760px;
    --workspace-gap: clamp(14px, 1.35vw, 24px);
    --workspace-surface: #ffffff;
    --workspace-muted: #f3f7f6;
    --workspace-line: #dbe5e2;
    --workspace-ink: #12343d;
    --workspace-copy: #566d73;
}

.sidebar {
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.24) transparent;
}

.sidebar .nav-links {
    padding-bottom: 18px;
}

.main-content {
    min-width: 0;
    padding: 18px clamp(18px, 2vw, 34px) 42px;
}

.main-content > :not(.messages) {
    width: min(100%, var(--workspace-max));
    margin-inline: auto;
}

.planning-page .main-content > *,
.schools-map-page .main-content > * {
    width: 100%;
    max-width: none;
}

.topbar {
    position: sticky;
    z-index: 45;
    top: 0;
    min-height: 70px;
    margin: -18px calc(clamp(18px, 2vw, 34px) * -1) 18px;
    padding: 12px clamp(18px, 2vw, 34px);
    border-bottom: 1px solid rgba(23, 50, 58, 0.1);
    background: rgba(244, 247, 246, 0.94);
    box-shadow: 0 8px 22px rgba(15, 48, 54, 0.045);
    backdrop-filter: blur(14px);
}

.topbar h1 {
    margin: 1px 0 0;
    font-size: clamp(1.45rem, 1.8vw, 2rem);
    line-height: 1.05;
}

.topbar .eyebrow {
    margin: 0;
    font-size: 0.72rem;
}

.topbar-actions {
    gap: 7px;
}

@media (max-width: 1700px) and (min-width: 861px) {
    .topbar-search-trigger {
        width: 42px;
        min-width: 42px;
        padding-inline: 0;
    }

    .topbar-search-trigger span {
        display: none;
    }
}

.topbar-icon-link,
.topbar-search-trigger,
.topbar-logout-link {
    min-height: 40px;
}

.school-chip {
    min-width: 180px;
    max-width: 260px;
    padding: 7px 11px;
}

.section-card,
.quote-hub-panel {
    border-radius: 15px;
}

.section-card {
    padding: clamp(15px, 1.35vw, 22px);
}

.section-head {
    gap: 14px;
    margin-bottom: 14px;
}

.section-head h2,
.section-head h3,
.section-head h4 {
    margin-bottom: 2px;
}

.quote-hub-panel {
    padding: 18px 20px;
}

.quote-hub-head {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(500px, 1.5fr);
    align-items: end;
    gap: 18px;
}

.quote-hub-head h2 {
    margin: 2px 0 5px;
    font-size: clamp(1.45rem, 1.7vw, 1.9rem);
}

.quote-hub-head > div:first-child > p:last-child {
    max-width: 680px;
    margin: 0;
}

.quote-hub-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
}

.quote-hub-actions .hero-badge {
    display: none;
}

.quote-state-strip.quote-state-strip-compact {
    gap: 8px;
    margin-top: 14px;
}

.quote-state-pill {
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 12px;
}

.quote-state-pill strong {
    font-size: 1.18rem;
}

.quote-state-pill small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body[data-page="quotes"] .photographer-page-brief,
body[data-page="active_campaign"] .photographer-page-brief,
body[data-page="orders"] .photographer-page-brief,
body[data-page="shipments"] .photographer-page-brief,
body[data-page="billing"] .photographer-page-brief,
body[data-page="history"] .photographer-page-brief,
body[data-page="product_templates"] .dynamic-template-actions,
body[data-page="pouch_templates"] .dynamic-template-actions {
    display: none;
}

.quote-ledger-shell,
.orders-ledger-shell,
.school-ledger-shell {
    margin-top: 14px;
}

.quote-ledger-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 12px;
}

.quote-ledger-head > div:first-child {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.quote-ledger-head > div:first-child p {
    max-width: 760px;
}

.quote-ledger-filters,
.orders-ledger-filters,
.school-ledger-filters,
.system-template-filter-form,
.system-template-filter-bar {
    gap: 8px;
}

.quote-ledger-filters .form-field,
.orders-ledger-filters .form-field,
.school-ledger-filters .form-field {
    min-width: 126px;
}

.quote-ledger-filters .quote-filter-search,
.orders-ledger-filters .quote-filter-search,
.school-ledger-filters .quote-filter-search {
    min-width: 220px;
}

.quote-ledger-filters .form-field > span,
.orders-ledger-filters .form-field > span,
.school-ledger-filters .form-field > span {
    font-size: 0.72rem;
}

.table-wrap {
    border-radius: 12px;
}

.data-table th {
    padding: 9px 11px;
    font-size: 0.72rem;
    letter-spacing: 0.035em;
}

.data-table td {
    padding: 10px 11px;
    vertical-align: middle;
}

.data-table tbody tr {
    min-height: 58px;
}

.data-table .button-link,
.data-table button,
.data-table .primary-btn,
.data-table .secondary-btn {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.76rem;
}

.dynamic-template-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    margin-bottom: 14px;
    padding: 18px 20px;
}

.dynamic-template-hero h2 {
    margin-block: 2px 5px;
    font-size: clamp(1.45rem, 1.8vw, 1.9rem);
}

.dynamic-template-hero .hero-badge {
    max-width: 360px;
}

.dynamic-template-libraries {
    grid-template-columns: minmax(300px, 0.65fr) minmax(520px, 1.35fr);
    gap: 14px;
}

.dynamic-template-card-grid,
.system-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.system-template-card,
.dynamic-template-library-card {
    min-width: 0;
}

.system-template-card {
    display: grid;
    grid-template-rows: auto minmax(52px, 1fr) auto;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--workspace-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(20, 52, 59, 0.045);
}

.system-template-card .pouch-pair-preview {
    width: 100%;
    padding: 8px;
    border-radius: 11px;
    background: #edf4f2;
}

.system-template-card .pouch-pair-preview .dynamic-template-canvas {
    min-height: 96px;
}

.system-template-card > div:nth-child(2) {
    display: grid;
    align-content: start;
    gap: 3px;
}

.system-template-card > div:nth-child(2) strong,
.system-template-card > div:nth-child(2) small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.system-template-card > div:nth-child(2) strong {
    color: var(--workspace-ink);
    font-size: 0.88rem;
    line-height: 1.3;
}

.system-template-card > div:nth-child(2) small {
    color: var(--workspace-copy);
    white-space: nowrap;
}

.system-template-card .button-link {
    width: 100%;
    min-height: 36px;
    padding: 7px 10px;
}

.system-template-filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(190px, 0.55fr) auto;
    align-items: end;
    gap: 9px;
    margin: 14px 0;
}

.system-template-filter-form label {
    display: grid;
    gap: 5px;
    color: var(--workspace-copy);
    font-size: 0.76rem;
    font-weight: 800;
}

.system-template-filter-form input,
.system-template-filter-form select {
    width: 100%;
}

/* Quote creation is a workspace, not a modal displayed inside another page. */
.quote-builder-page {
    padding: 0;
    border: 0;
    background: transparent;
}

.quote-builder-page > .quote-modal-card {
    width: 100%;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.quote-builder-page .quote-modal-head {
    position: sticky;
    z-index: 32;
    top: 72px;
    margin-bottom: 12px;
    padding: 12px 15px;
    border: 1px solid var(--workspace-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(20, 52, 59, 0.06);
    backdrop-filter: blur(12px);
}

.quote-builder-page .quote-modal-head h3 {
    margin: 1px 0 0;
    font-size: 1.28rem;
}

.quote-builder-page .quote-wizard-shell {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.quote-builder-page .quote-wizard-sidebar {
    position: sticky;
    top: 145px;
    padding: 10px;
    border: 1px solid var(--workspace-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(20, 52, 59, 0.05);
}

.quote-builder-page .quote-stepper-lite,
.quote-builder-page .quote-stepper-rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
}

.quote-builder-page .quote-step-lite {
    min-height: 66px;
    justify-content: start;
    text-align: left;
}

.quote-builder-page .quote-wizard-main {
    min-width: 0;
    padding-top: 0;
}

.quote-builder-page .quote-step-card,
.quote-builder-page .quote-context-card,
.quote-builder-page .quote-sheet-block {
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(20, 52, 59, 0.045);
}

.quote-builder-page .quote-context-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quote-builder-page .quote-context-card-calendar,
.quote-builder-page .quote-context-card-identity {
    grid-column: 1 / -1;
}

.quote-builder-page .quote-sheet-toolbar {
    position: sticky;
    z-index: 8;
    top: 145px;
    padding: 9px;
    border: 1px solid var(--workspace-line);
    border-radius: 11px;
    background: rgba(248, 251, 250, 0.97);
    backdrop-filter: blur(8px);
}

.quote-builder-page .quote-sheet-row {
    min-height: 64px;
}

/* Mail workspaces keep the mailbox visible and remove duplicated page headings. */
.photographer-messages-page .topbar,
.secretariat-page .topbar {
    margin-bottom: 10px;
}

.mail-page-toolbar {
    grid-template-columns: auto minmax(240px, 1fr) auto;
    padding: 10px 12px;
    border-radius: 14px;
}

.mail-page-title {
    display: none;
}

.mail-channel-tabs {
    grid-column: 1;
}

.mail-global-search {
    grid-column: 2;
}

.mail-toolbar-actions {
    grid-column: 3;
}

.mail-workspace {
    min-height: 620px;
    max-height: calc(100vh - 172px);
    border-radius: 15px;
}

.mail-conversation-item {
    min-height: 76px;
    padding: 10px 12px;
}

.mail-thread {
    padding: 16px 18px;
}

.mail-message {
    width: min(86%, 820px);
}

/* Administration: one semantic main element and a stable local navigation. */
.administration-v2-hero {
    min-height: 96px;
    padding: 14px 18px;
}

.administration-v2-hero > div:first-child h2 {
    display: none;
}

.administration-v2-hero > div:first-child > p:last-child {
    max-width: 760px;
    font-size: 0.9rem;
}

.administration-v2-shell {
    grid-template-columns: 230px minmax(0, 1fr);
    align-items: start;
}

.administration-v2-nav {
    position: sticky;
    top: 86px;
    max-height: calc(100vh - 104px);
    overflow-y: auto;
}

.administration-v2-content {
    min-width: 0;
}

.administration-v2-nav-item small {
    display: none;
}

@media (max-width: 1180px) {
    .quote-hub-head,
    .dynamic-template-libraries {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-hub-actions {
        justify-content: flex-start;
    }

    .quote-builder-page .quote-wizard-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-builder-page .quote-wizard-sidebar {
        position: sticky;
        top: 141px;
        z-index: 20;
    }

    .quote-builder-page .quote-stepper-lite,
    .quote-builder-page .quote-stepper-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .quote-builder-page .quote-step-lite small {
        display: none;
    }

    .administration-v2-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .administration-v2-nav {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .administration-v2-nav nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }

    .admin-team-top-grid,
    .administration-v2-content > .two-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 860px) {
    body[data-page="campaign_detail"] .stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar {
        overflow: visible;
    }

    .main-content {
        padding: 14px 12px 30px;
    }

    .main-content > :not(.messages) {
        width: 100%;
    }

    .topbar {
        position: relative;
        top: auto;
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    .quote-builder-page .quote-modal-head,
    .quote-builder-page .quote-wizard-sidebar,
    .quote-builder-page .quote-sheet-toolbar,
    .administration-v2-nav {
        position: static;
    }

    .quote-builder-page .quote-context-grid,
    .administration-v2-shell {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-builder-page .quote-context-card-calendar,
    .quote-builder-page .quote-context-card-identity {
        grid-column: auto;
    }

    .mail-page-toolbar {
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 9px;
    }

    .mail-page-toolbar > * {
        grid-column: auto;
    }

    .mail-channel-tabs {
        width: 100%;
        overflow: hidden;
        padding-bottom: 0;
    }

    .mail-channel-tabs a {
        min-width: 0;
        flex: 1 1 0;
        padding-inline: 5px;
        font-size: 0.72rem;
        line-height: 1.2;
        text-align: center;
        white-space: normal;
    }

    .mail-global-search {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .mail-toolbar-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mail-toolbar-actions > * {
        width: 100%;
    }

    .mail-workspace {
        max-height: none;
    }

    .system-template-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 560px) {
    .dashboard-simple-hero h2 {
        max-width: 100%;
        font-size: 1.35rem;
        line-height: 1.15;
        overflow-wrap: anywhere;
    }

    .quote-hub-panel,
    .section-card,
    .administration-v2-hero {
        padding: 14px;
    }

    .quote-builder-page .quote-stepper-lite,
    .quote-builder-page .quote-stepper-rail {
        grid-template-columns: minmax(0, 1fr);
    }

    .quote-builder-page .quote-step-lite {
        min-height: 50px;
    }

    .quote-state-strip.quote-state-strip-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mail-global-search,
    .mail-toolbar-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .administration-v2-nav nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .administration-v2-nav-item {
        min-width: 0;
        padding: 8px;
    }

    .mail-empty-state {
        max-width: 100%;
        overflow-wrap: anywhere;
    }
}

/* KPI cards are direct navigation targets on the simplified dashboard. */
.dashboard-simple-kpis > a {
    display: block;
    padding: 17px 18px;
    border: 1px solid rgba(20, 52, 59, 0.08);
    border-radius: 16px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(18, 59, 67, 0.05);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-simple-kpis > a:first-child {
    border-color: rgba(229, 138, 50, 0.3);
    background: linear-gradient(135deg, rgba(242, 161, 78, 0.1), #fff 68%);
}

.dashboard-simple-kpis > a:hover,
.dashboard-simple-kpis > a:focus-visible {
    border-color: rgba(47, 143, 131, 0.35);
    box-shadow: 0 14px 30px rgba(18, 59, 67, 0.1);
    transform: translateY(-2px);
}

.dashboard-simple-kpis > a span,
.dashboard-simple-kpis > a strong,
.dashboard-simple-kpis > a small {
    display: block;
}

.dashboard-simple-kpis > a span {
    color: #607477;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.dashboard-simple-kpis > a strong {
    margin-top: 5px;
    color: #082c36;
    font-size: 1.55rem;
}

.dashboard-simple-kpis > a small {
    margin-top: 3px;
    color: #708187;
}

/* Final cross-page pass: keep dense workspaces readable at every width. */
.campaign-state-summary {
    margin: 0 0 16px;
    padding: 10px;
    border: 1px solid var(--line, #dce7e4);
    border-radius: 16px;
    background: #fff;
}

body[data-page="campaign_detail"] .stat-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.education-api-overview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.education-api-state-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.education-api-overview-card {
    min-width: 0;
    padding: 16px;
}

body[data-page="stats"] .main-content,
body[data-page="stats"] .stats-cockpit,
body[data-page="stats"] .stats-cockpit > *,
body[data-page="administration"] .main-content,
body[data-page="administration"] .administration-v2-content,
body[data-page="administration"] .administration-v2-content > * {
    min-width: 0;
    max-width: 100%;
}

.stats-cockpit-table-wrap,
.stats-cockpit-month-chart,
.template-editor-toolbar,
.template-editor-shell,
.production-tabs {
    max-width: 100%;
}

.template-editor-toolbar {
    position: sticky;
    top: 82px;
    z-index: 18;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
}

.template-editor-shell {
    min-height: min(720px, calc(100vh - 190px));
}

.pouch-pair-preview .dynamic-template-canvas-label,
.pouch-pair-preview [class*="canvas-label"] {
    min-height: 18px;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
}

.planning-counter-badge,
.planning-agenda-day-head-counters span,
.planning-agenda-day-summary-strip span {
    min-height: 30px;
    font-size: 0.75rem;
}

.planning-counter-badge strong,
.planning-agenda-day-head-counters strong,
.planning-agenda-day-summary-strip strong {
    font-size: 0.72rem;
}

.planning-agenda-day-head-counters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 3px;
    padding-inline: 3px;
}

.planning-agenda-day-head-counters .planning-counter-badge {
    min-width: 0;
    justify-content: center;
    gap: 2px;
    padding: 3px;
    font-size: 0.6875rem;
}

.planning-agenda-view-pill,
.planning-agenda-group-stats,
.planning-agenda-photographer-stats {
    font-size: 0.72rem;
}

.planning-agenda-group-copy small,
.planning-agenda-week-corner small,
.planning-agenda-day-head-top > span,
.planning-agenda-time-axis > span {
    font-size: 0.72rem;
}

.catalog-v2-family-icon,
.catalog-v2-card span,
.catalog-v2-product-card .catalog-v2-media-badges span,
.catalog-v2-origin,
.catalog-v2-price-grid span,
.dynamic-template-origin,
.dynamic-render-badge {
    font-size: 0.72rem;
}

.pouch-pair-preview .dynamic-template-canvas > small {
    font-size: 0.5rem;
    line-height: 1;
}

.dynamic-template-builder-page button,
.dynamic-template-builder-page small,
.dynamic-template-builder-page .template-layer-icon,
.dynamic-template-builder-page .template-object-pose,
.production-page small,
.production-action-grid small,
.secretariat-mail-state-strip span,
.secretariat-mail-workspace .mail-inbox-stats span {
    font-size: 0.6875rem !important;
}

.planning-agenda-mini-weekdays span,
.planning-agenda-mini-day {
    font-size: 0.78rem;
}

.dynamic-template-builder-page small,
.dynamic-template-builder-page .form-field > span,
.dynamic-template-library-card small,
.system-template-card small {
    font-size: 0.75rem;
}

@media (max-width: 1180px) {
    body[data-page="campaign_detail"] .stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .education-api-overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .education-api-state-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .production-tabs {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: thin;
    }

    .production-tabs a {
        min-width: 190px;
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
}

@media (max-width: 860px) {
    body[data-page="stats"] .stats-cockpit {
        width: 100%;
        overflow: hidden;
    }

    body[data-page="stats"] .stats-cockpit-hero,
    body[data-page="stats"] .stats-cockpit-decision-grid,
    body[data-page="stats"] .stats-cockpit-flow-grid,
    body[data-page="stats"] .stats-cockpit-ranking-grid,
    body[data-page="stats"] .stats-cockpit-ranking-grid-balanced {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-page="stats"] .stats-cockpit-filter,
    body[data-page="stats"] .stats-cockpit-kpis,
    body[data-page="stats"] .stats-cockpit-ratios,
    body[data-page="stats"] .stats-cockpit-insights,
    body[data-page="stats"] .stats-cockpit-distributions,
    body[data-page="stats"] .stats-cockpit-channel-list,
    body[data-page="stats"] .stats-cockpit-operation-grid,
    body[data-page="stats"] .stats-cockpit-finance-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body[data-page="stats"] .stats-cockpit-table-wrap,
    body[data-page="stats"] .stats-cockpit-month-chart {
        width: 100%;
        overflow-x: auto;
    }

    body[data-page="stats"] .stats-cockpit-month-chart {
        display: grid;
        min-width: 720px;
    }

    body[data-page="stats"] .stats-cockpit-campaign-ranking > a,
    body[data-page="stats"] .stats-cockpit-compact-ranking > a,
    body[data-page="stats"] .stats-cockpit-compact-ranking > article {
        grid-template-columns: 32px minmax(0, 1fr);
    }

    body[data-page="stats"] .stats-cockpit-campaign-ranking dl,
    body[data-page="stats"] .stats-cockpit-compact-ranking > a > strong,
    body[data-page="stats"] .stats-cockpit-compact-ranking > article > strong {
        grid-column: 1 / -1;
    }

    .administration-v2-content .admin-team-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }

    .administration-v2-content .admin-team-row-role,
    .administration-v2-content .admin-team-row-actions {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        justify-items: start;
    }

    .administration-v2-content .admin-team-row-groups {
        width: 100%;
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
    }

    .administration-v2-content .admin-team-row-groups .selector-pill {
        width: auto;
        min-height: 30px;
        flex: 0 1 auto;
        padding: 5px 9px;
        font-size: 0.75rem;
    }

    .administration-v2-content .selector-pill {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .template-editor-toolbar {
        position: static;
        overflow-x: auto;
    }

    .template-editor-shell {
        min-height: auto;
        overflow: visible;
    }
}

@media (max-width: 560px) {
    body[data-page="campaign_detail"] .stat-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .education-api-overview-grid,
    .education-api-state-strip,
    .campaign-state-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .production-tabs a {
        min-width: 165px;
    }
}
