:root {
    --erp-bg: #f3f6fa;
    --erp-surface: #ffffff;
    --erp-surface-muted: #f8fafc;
    --erp-surface-strong: #eef3f9;
    --erp-border: #d7e0ea;
    --erp-border-strong: #c4d0dd;
    --erp-text: #182534;
    --erp-text-soft: #5d6b7d;
    --erp-text-faint: #7c8998;
    --erp-primary: #1f4f7f;
    --erp-primary-strong: #163a5d;
    --erp-accent: #2e7d66;
    --erp-danger: #b14444;
    --erp-warning: #b67a1d;
    --erp-shadow: 0 10px 30px rgba(16, 33, 54, 0.06);
    --erp-shadow-soft: 0 3px 10px rgba(16, 33, 54, 0.05);
    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --shell-width: 1680px;
    --font-sans: "Aptos", "Segoe UI", "Trebuchet MS", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-sans);
    color: var(--erp-text);
    background:
        linear-gradient(180deg, rgba(31, 79, 127, 0.03), rgba(31, 79, 127, 0) 120px),
        var(--erp-bg);
}

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

button,
input,
select,
textarea {
    font: inherit;
}

code {
    font-family: "Cascadia Mono", "Consolas", monospace;
}

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

.app-shell__content {
    padding: 18px 0 28px;
}

.app-shell--auth {
    background:
        linear-gradient(180deg, rgba(31, 79, 127, 0.06), rgba(31, 79, 127, 0) 150px),
        linear-gradient(180deg, #f7f9fc 0%, #eef3f8 100%);
}

.shell-container {
    width: min(calc(100% - 28px), var(--shell-width));
    margin: 0 auto;
}

.corp-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--erp-border);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(24, 37, 52, 0.03);
}

.corp-header__inner,
.corp-header__actions,
.corp-nav,
.corp-topbar__inner,
.corp-topbar__meta {
    display: flex;
    align-items: center;
}

.corp-header__inner {
    gap: 18px;
    min-height: 68px;
}

.corp-header__actions {
    gap: 10px;
    margin-left: auto;
}

.corp-topbar {
    display: none;
}

.brand {
    display: inline-flex;
    align-items: center;
    min-width: fit-content;
}

.brand--image {
    max-width: 188px;
}

.brand__logo {
    display: block;
    width: 100%;
    height: auto;
}

.brand__logo--header {
    width: auto;
    max-height: 36px;
}

.corp-nav {
    flex: 1;
    flex-wrap: wrap;
    gap: 8px;
}

.corp-nav__group {
    position: relative;
}

.corp-nav__link,
.corp-nav__submenu-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: var(--erp-text-soft);
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.corp-nav__link:hover,
.corp-nav__link:focus-visible,
.corp-nav__submenu-link:hover,
.corp-nav__submenu-link:focus-visible {
    background: var(--erp-surface-strong);
    color: var(--erp-primary);
}

.corp-nav__link--trigger {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.corp-nav__link--summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 1.6px solid currentColor;
    border-bottom: 1.6px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform 160ms ease;
}

.corp-nav__link--active,
.corp-nav__group--active .corp-nav__link--summary,
.corp-nav__group.is-open .corp-nav__link--summary {
    background: rgba(31, 79, 127, 0.09);
    color: var(--erp-primary-strong);
}

.corp-nav__group.is-open .corp-nav__link--summary::after {
    transform: rotate(-135deg) translateY(-1px);
}

.corp-nav__submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    display: none;
    gap: 4px;
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    border-radius: var(--radius-md);
    box-shadow: var(--erp-shadow);
}

.corp-nav__submenu[hidden] {
    display: none !important;
}

.corp-nav__group.is-open .corp-nav__submenu {
    display: grid;
}

.corp-nav__submenu-link--active {
    background: rgba(31, 79, 127, 0.09);
    color: var(--erp-primary-strong);
}

.corp-user {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 10px;
    border-left: 1px solid var(--erp-border);
    color: var(--erp-text-soft);
    font-size: 0.87rem;
    font-weight: 700;
    white-space: nowrap;
}

.auth-page,
.dashboard-page {
    padding-top: 2px;
}

.auth-app-layout,
.auth-layout,
.dashboard-page .stack-lg {
    display: grid;
    gap: 18px;
}

.auth-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    align-items: start;
}

.auth-app-layout {
    min-height: calc(100vh - 110px);
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    align-items: center;
}

.auth-app-layout--compact {
    grid-template-columns: minmax(320px, 460px);
    justify-content: center;
}

.auth-app-panel,
.auth-card,
.auth-story,
.panel {
    border-radius: var(--radius-lg);
}

.auth-app-panel--brand,
.auth-story,
.panel--accent {
    background:
        linear-gradient(180deg, rgba(22, 58, 93, 0.98), rgba(31, 79, 127, 0.96)),
        #163a5d;
    color: #ffffff;
}

.auth-app-panel--brand,
.auth-story {
    padding: 24px;
    box-shadow: var(--erp-shadow);
}

.auth-app-panel--form,
.auth-card,
.panel {
    background: var(--erp-surface);
    border: 1px solid var(--erp-border);
    box-shadow: var(--erp-shadow-soft);
}

.auth-app-panel--form,
.auth-card {
    padding: 24px;
}

.panel {
    padding: 18px;
}

.panel--soft {
    background: var(--erp-surface-muted);
}

.panel--embedded {
    margin-top: 16px;
    box-shadow: none;
}

.panel--map {
    overflow: hidden;
}

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

.auth-card__header {
    margin-bottom: 16px;
}

.auth-feature-list,
.trust-grid,
.stats-grid,
.content-grid,
.summary-grid,
.admin-form-grid,
.bloomfield-summary-grid {
    display: grid;
    gap: 14px;
}

.auth-feature-list,
.trust-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

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

.content-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

.summary-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

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

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

.bloomfield-summary-grid--compact {
    display: flex;
    align-items: stretch;
    gap: 10px;
    flex-wrap: wrap;
}

.bloomfield-summary-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.bloomfield-summary-bar .bloomfield-summary-grid {
    flex: 1;
    min-width: 0;
}

.dashboard-intro,
.dashboard-actions,
.admin-hero,
.admin-toolbar,
.admin-actions-inline,
.bloomfield-hero__actions,
.bloomfield-filter-pills,
.bloomfield-hero__top,
.bloomfield-filter-card__header,
.bloomfield-table-header,
.bloomfield-topbar__main,
.bloomfield-topbar__meta,
.bloomfield-overview-grid,
.bloomfield-summary-strip,
.bloomfield-section-head,
.bloomfield-table-tools,
.bloomfield-table-meta,
.parcelario-filters,
.map-panel__header,
.map-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.dashboard-intro,
.admin-hero,
.admin-toolbar,
.bloomfield-hero__top,
.bloomfield-filter-card__header,
.bloomfield-table-header,
.bloomfield-topbar__main,
.bloomfield-section-head,
.map-panel__header {
    justify-content: space-between;
}

.dashboard-header {
    display: grid;
    gap: 10px;
}

.dashboard-actions,
.admin-actions-inline,
.corp-header__actions,
.bloomfield-hero__actions,
.map-legend,
.bloomfield-topbar__meta,
.bloomfield-summary-strip,
.parcelario-filters {
    justify-content: flex-end;
}

.session-card,
.trust-card,
.summary-card,
.bloomfield-summary-card,
.bloomfield-kpi {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--erp-border);
    background: var(--erp-surface-muted);
}

.stat-card {
    padding: 16px;
}

.session-card__label,
.trust-card__label,
.stat-card__label,
.summary-card__label,
.bloomfield-summary-card__label,
.bloomfield-kpi__label,
.field__label,
.form-label {
    margin: 0;
    color: var(--erp-text-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.session-card__value,
.trust-card__value,
.stat-card__value,
.summary-card__value,
.bloomfield-summary-card__value,
.hero-title,
.section-title,
.bloomfield-page-title,
.bloomfield-subtitle,
.map-panel__title {
    margin: 0;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.session-card__value,
.trust-card__value,
.summary-card__value {
    margin-top: 8px;
    font-size: 1.1rem;
    font-weight: 800;
}

.stat-card__value,
.bloomfield-summary-card__value {
    margin-top: 8px;
    font-size: clamp(1.7rem, 2.4vw, 2.2rem);
    font-weight: 800;
}

.session-card__meta,
.trust-card__hint,
.stat-card__caption,
.bloomfield-summary-card__meta,
.bloomfield-muted,
.section-copy,
.map-panel__copy,
.form-hint,
.field__error,
.alert,
.roadmap-item,
.auth-feature__copy,
.sync-overlay__copy {
    font-size: 0.9rem;
    line-height: 1.5;
}

.session-card__meta,
.trust-card__hint,
.stat-card__caption,
.bloomfield-summary-card__meta,
.bloomfield-muted,
.section-copy,
.map-panel__copy,
.form-hint,
.auth-feature__copy {
    margin: 0;
    color: var(--erp-text-soft);
}

.eyebrow {
    margin: 0;
    color: var(--erp-primary);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow--pink,
.eyebrow--gold,
.eyebrow--blue {
    color: var(--erp-primary);
}

.hero-title {
    max-width: 14ch;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 800;
}

.section-title {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 800;
}

.section-title--compact {
    font-size: clamp(1.15rem, 1.8vw, 1.55rem);
}

.section-title--xl,
.bloomfield-page-title,
.bloomfield-subtitle,
.map-panel__title {
    font-size: clamp(1.35rem, 2.4vw, 1.95rem);
    font-weight: 800;
}

.section-title--light,
.section-copy--on-dark,
.section-copy--light,
.trust-card,
.summary-card {
    color: #ffffff;
}

.section-copy--lead {
    max-width: 72rem;
    font-size: 0.98rem;
    color: var(--erp-text-soft);
}

.auth-feature {
    padding: 14px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-feature__title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 800;
}

.auth-app-panel__footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.86rem;
    font-weight: 700;
}

.auth-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #7be0ae;
}

.roadmap-list {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}

.roadmap-item {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--erp-border);
    background: var(--erp-surface);
}

.world-map {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background:
        linear-gradient(180deg, #f8fafd, #eef3f8);
}

.world-map::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0)),
        radial-gradient(circle at 20% 20%, rgba(31, 79, 127, 0.05), transparent 26%);
    pointer-events: none;
}

.world-map__continent,
.world-map__highlight {
    position: absolute;
    background-image: radial-gradient(circle, currentColor 0 34%, transparent 38%);
    background-size: 12px 12px;
    background-repeat: repeat;
}

.world-map__continent {
    color: #d8e0e9;
}

.world-map__highlight {
    color: rgba(31, 79, 127, 0.8);
}

.world-map__continent--north-america {
    top: 16%;
    left: 6%;
    width: 25%;
    height: 29%;
    clip-path: polygon(10% 35%, 22% 18%, 48% 10%, 74% 0%, 100% 18%, 82% 42%, 78% 66%, 56% 100%, 36% 92%, 18% 74%, 0% 52%);
}

.world-map__continent--south-america {
    top: 48%;
    left: 20%;
    width: 12%;
    height: 29%;
    clip-path: polygon(44% 0%, 68% 12%, 84% 34%, 74% 58%, 60% 78%, 54% 100%, 34% 90%, 24% 72%, 14% 44%, 20% 18%);
}

.world-map__continent--greenland {
    top: 8%;
    left: 31%;
    width: 10%;
    height: 11%;
    clip-path: polygon(16% 54%, 34% 14%, 72% 10%, 92% 34%, 78% 74%, 34% 86%);
}

.world-map__continent--eurasia {
    top: 11%;
    left: 44%;
    width: 43%;
    height: 28%;
    clip-path: polygon(0% 54%, 10% 28%, 22% 20%, 34% 8%, 56% 8%, 70% 18%, 100% 24%, 88% 42%, 68% 46%, 64% 58%, 84% 72%, 82% 90%, 58% 88%, 42% 78%, 28% 66%, 18% 68%, 0% 66%);
}

.world-map__continent--africa {
    top: 38%;
    left: 50%;
    width: 17%;
    height: 37%;
    clip-path: polygon(26% 2%, 48% 10%, 68% 24%, 80% 40%, 74% 68%, 60% 100%, 34% 92%, 22% 68%, 18% 42%, 8% 18%);
}

.world-map__continent--australia {
    top: 73%;
    left: 79%;
    width: 12%;
    height: 11%;
    clip-path: polygon(12% 46%, 30% 18%, 66% 12%, 88% 36%, 92% 64%, 68% 88%, 32% 84%, 10% 68%);
}

.world-map__highlight--north-america {
    top: 18%;
    left: 9%;
    width: 18%;
    height: 20%;
    clip-path: polygon(4% 60%, 18% 18%, 44% 4%, 76% 4%, 98% 26%, 82% 56%, 54% 84%, 22% 80%);
}

.world-map__highlight--europe {
    top: 16%;
    left: 50%;
    width: 13%;
    height: 17%;
    clip-path: polygon(0% 56%, 18% 20%, 54% 6%, 96% 20%, 86% 64%, 52% 90%, 14% 82%);
}

.world-map__highlight--middle-east {
    top: 48%;
    left: 58%;
    width: 8%;
    height: 10%;
    clip-path: polygon(10% 18%, 88% 24%, 100% 58%, 68% 88%, 16% 82%, 0% 48%);
}

.world-map__highlight--asia {
    top: 31%;
    left: 69%;
    width: 18%;
    height: 18%;
    clip-path: polygon(2% 14%, 92% 10%, 100% 46%, 80% 86%, 12% 92%, 0% 46%);
}

.world-map__highlight--south-africa {
    top: 75%;
    left: 54%;
    width: 6%;
    height: 8%;
    clip-path: polygon(8% 20%, 80% 8%, 100% 44%, 66% 92%, 16% 88%, 0% 56%);
}

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field__label {
    font-size: 0.76rem;
}

.field__control,
.form-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--erp-border-strong);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--erp-text);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field__control:focus,
.form-input:focus {
    outline: none;
    border-color: rgba(31, 79, 127, 0.55);
    box-shadow: 0 0 0 4px rgba(31, 79, 127, 0.1);
}

.field__error,
.form-hint--error {
    color: var(--erp-danger);
}

.form-input--error {
    border-color: rgba(177, 68, 68, 0.55);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--erp-text-soft);
    font-size: 0.9rem;
}

.checkbox__control {
    width: 15px;
    height: 15px;
    accent-color: var(--erp-primary);
}

.auth-inline-link {
    color: var(--erp-primary);
    font-size: 0.88rem;
    font-weight: 700;
}

.auth-inline-link:hover,
.auth-inline-link:focus-visible {
    color: var(--erp-primary-strong);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button:hover {
    box-shadow: 0 2px 10px rgba(16, 33, 54, 0.08);
}

.button--small {
    min-height: 32px;
    padding: 6px 10px;
    font-size: 0.82rem;
}

.button--block {
    width: 100%;
}

.button--primary {
    background: var(--erp-primary);
    color: #ffffff;
}

.button--primary:hover {
    background: var(--erp-primary-strong);
}

.button--secondary,
.button--ghost {
    background: #ffffff;
    border-color: var(--erp-border);
    color: var(--erp-text);
}

.button--secondary:hover,
.button--ghost:hover {
    border-color: rgba(31, 79, 127, 0.28);
    color: var(--erp-primary);
}

.button--ghost {
    background: var(--erp-surface-muted);
}

.alert {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
}

.alert--success {
    background: rgba(46, 125, 102, 0.08);
    border-color: rgba(46, 125, 102, 0.18);
    color: #256854;
}

.alert--error {
    background: rgba(177, 68, 68, 0.08);
    border-color: rgba(177, 68, 68, 0.18);
    color: #973c3c;
}

.admin-table-wrap,
.bloomfield-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--erp-border);
    border-radius: var(--radius-md);
    background: #ffffff;
}

.admin-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e7edf4;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6f9fc;
    color: var(--erp-text-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-table tbody tr:hover {
    background: rgba(31, 79, 127, 0.03);
}

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

.admin-table__actions {
    min-width: 210px;
}

.admin-table--sm {
    min-width: 1040px;
}

.admin-table--sm th,
.admin-table--sm td {
    padding: 8px 10px;
    font-size: 0.82rem;
}

.admin-table--sm th {
    font-size: 0.68rem;
}

.admin-table__empty {
    color: var(--erp-text-soft);
    text-align: center;
}

.admin-pagination {
    margin-top: 14px;
}

.admin-pagination nav {
    display: flex;
    justify-content: flex-end;
}

.erp-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 2px;
}

.erp-pagination__summary {
    color: var(--erp-text-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.erp-pagination__controls,
.erp-pagination__pages {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.erp-pagination__button,
.erp-pagination__page,
.erp-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 7px;
    border: 1px solid transparent;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.erp-pagination__button,
.erp-pagination__page {
    background: #ffffff;
    border-color: var(--erp-border);
    color: var(--erp-text);
}

.erp-pagination__button:hover,
.erp-pagination__page:hover {
    border-color: rgba(31, 79, 127, 0.28);
    color: var(--erp-primary);
}

.erp-pagination__page--active {
    background: rgba(31, 79, 127, 0.1);
    border-color: rgba(31, 79, 127, 0.14);
    color: var(--erp-primary-strong);
}

.erp-pagination__button--disabled,
.erp-pagination__ellipsis {
    color: var(--erp-text-faint);
}

.erp-pagination__button--disabled {
    background: var(--erp-surface-muted);
    border-color: var(--erp-border);
}

.role-pill,
.bloomfield-block,
.bloomfield-score,
.bloomfield-inline-metric,
.bloomfield-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 700;
}

.role-pill {
    padding: 6px 10px;
    background: rgba(31, 79, 127, 0.08);
    color: var(--erp-primary-strong);
    font-size: 0.8rem;
}

.bloomfield-hero-card,
.bloomfield-topbar,
.bloomfield-summary-panel,
.bloomfield-import-panel,
.bloomfield-table-card {
    background: var(--erp-surface);
}

.bloomfield-topbar,
.bloomfield-summary-panel,
.bloomfield-import-panel,
.bloomfield-table-card {
    padding: 16px;
}

.bloomfield-topbar--minimal {
    padding: 14px 16px;
}

.bloomfield-sync {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}

.bloomfield-sync__label,
.bloomfield-kpi__label {
    color: var(--erp-text-faint);
}

.bloomfield-sync__label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.bloomfield-sync__value {
    color: var(--erp-text);
    font-size: 0.92rem;
    font-weight: 800;
}

.bloomfield-cell {
    display: grid;
    gap: 2px;
}

.bloomfield-cell__value,
.bloomfield-metric,
.bloomfield-kpi__value {
    color: var(--erp-text);
    font-weight: 800;
}

.bloomfield-cell__meta {
    color: var(--erp-text-faint);
    font-size: 0.74rem;
}

.bloomfield-summary-grid--compact .bloomfield-summary-card {
    flex: 0 1 260px;
    min-width: 210px;
    padding: 10px 12px;
}

.bloomfield-summary-grid--compact .bloomfield-summary-card__label {
    font-size: 0.66rem;
    letter-spacing: 0.07em;
}

.bloomfield-summary-grid--compact .bloomfield-summary-card__value {
    margin-top: 4px;
    font-size: clamp(1.05rem, 1.6vw, 1.35rem);
    line-height: 1.15;
}

.bloomfield-summary-grid--compact .bloomfield-summary-card__meta {
    margin-top: 2px;
    font-size: 0.8rem;
    line-height: 1.35;
}

.bloomfield-summary-bar .button,
.bloomfield-hero__actions .button {
    align-self: flex-start;
}

.bloomfield-hero__actions {
    gap: 10px;
}

.bloomfield-block {
    padding: 5px 9px;
    background: rgba(31, 79, 127, 0.08);
    color: var(--erp-primary-strong);
    font-size: 0.8rem;
}

.bloomfield-code {
    display: inline-block;
    max-width: 240px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef3f8;
    color: var(--erp-primary-strong);
    font-size: 0.78rem;
    white-space: normal;
    word-break: break-word;
}

.bloomfield-code--sm {
    padding: 3px 7px;
    font-size: 0.72rem;
}

.bloomfield-score {
    min-width: 84px;
    padding: 5px 8px;
    font-size: 0.78rem;
}

.bloomfield-score--high {
    background: rgba(46, 125, 102, 0.12);
    color: #256854;
}

.bloomfield-score--medium {
    background: rgba(182, 122, 29, 0.12);
    color: #946314;
}

.bloomfield-score--low {
    background: rgba(177, 68, 68, 0.12);
    color: #973c3c;
}

.bloomfield-inline-metric,
.bloomfield-chip {
    min-height: 30px;
    padding: 6px 10px;
    border: 1px solid var(--erp-border);
    background: #ffffff;
    color: var(--erp-text-soft);
    font-size: 0.8rem;
}

.bloomfield-inline-metric strong {
    color: var(--erp-text);
}

.bloomfield-chip:hover {
    border-color: rgba(31, 79, 127, 0.24);
    color: var(--erp-primary);
}

.bloomfield-chip--solid {
    background: rgba(31, 79, 127, 0.1);
    border-color: rgba(31, 79, 127, 0.1);
    color: var(--erp-primary-strong);
}

.bloomfield-table-card {
    padding-bottom: 16px;
}

.bloomfield-table-tools {
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e8eef5;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(150px, 0.85fr) repeat(2, minmax(140px, 1fr)) 120px;
    gap: 10px;
    align-items: start;
}

.bloomfield-import-form {
    min-width: min(100%, 640px);
}

.bloomfield-import-form--compact {
    flex: 1;
}

.form-group {
    min-width: 0;
}

.form-group--action {
    align-self: end;
}

.form-group--action .button {
    width: 100%;
}

.text-right {
    text-align: right;
}

.text-soft,
.bloomfield-muted {
    color: var(--erp-text-soft);
}

.sync-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(24, 37, 52, 0.35);
    backdrop-filter: blur(3px);
}

.sync-overlay[hidden] {
    display: none;
}

.sync-overlay__box {
    width: min(92vw, 340px);
    padding: 26px 24px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--erp-border);
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow);
    text-align: center;
}

.sync-overlay__spinner {
    width: 36px;
    height: 36px;
    margin: 0 auto 12px;
    border: 3px solid var(--erp-border);
    border-top-color: var(--erp-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.sync-overlay__title {
    margin: 0 0 6px;
    font-size: 1rem;
    font-weight: 800;
}

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

.parcelario-filters .field {
    min-width: 180px;
}

.stack-sm > * + * {
    margin-top: 6px;
}

.stack-md > * + * {
    margin-top: 12px;
}

.stack-lg > * + * {
    margin-top: 18px;
}

.workspace-grid,
.module-grid,
.info-grid {
    display: grid;
    gap: 14px;
}

.workspace-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
}

.module-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.erp-kpi {
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--erp-border);
    background: var(--erp-surface-muted);
}

.erp-kpi__label {
    margin: 0;
    color: var(--erp-text-faint);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.erp-kpi__value {
    margin: 8px 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
}

.erp-kpi__meta {
    margin: 6px 0 0;
    color: var(--erp-text-soft);
    font-size: 0.84rem;
    line-height: 1.4;
}

.module-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid var(--erp-border);
    border-radius: var(--radius-md);
    background: var(--erp-surface-muted);
}

.module-card__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.module-card__copy {
    margin: 0;
    color: var(--erp-text-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.module-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.module-card__tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(31, 79, 127, 0.08);
    color: var(--erp-primary-strong);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-list {
    display: grid;
    gap: 8px;
}

.data-list__row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9eef4;
}

.data-list__row:last-child {
    border-bottom: 0;
}

.data-list__label {
    color: var(--erp-text-faint);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.data-list__value {
    min-width: 0;
    color: var(--erp-text);
    font-size: 0.9rem;
    font-weight: 700;
}

.panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.panel-head__meta {
    color: var(--erp-text-soft);
    font-size: 0.85rem;
    font-weight: 700;
}

.table-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    color: var(--erp-text-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.table-summary strong {
    color: var(--erp-text);
}

@media (max-width: 1200px) {
    .workspace-grid,
    .content-grid,
    .auth-layout,
    .auth-app-layout,
    .admin-form-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 980px) {
    .corp-header__inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 0;
    }

    .corp-header__actions,
    .corp-nav,
    .dashboard-actions,
    .admin-toolbar,
    .admin-actions-inline,
    .bloomfield-topbar__meta,
    .parcelario-filters {
        justify-content: flex-start;
    }

    .corp-user {
        border-left: 0;
        padding-left: 0;
    }

    .corp-nav__group {
        width: 100%;
    }

    .corp-nav__submenu {
        position: static;
        min-width: 0;
        width: 100%;
    }

    .bloomfield-table-tools,
    .bloomfield-hero__top,
    .bloomfield-summary-bar,
    .bloomfield-table-header,
    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 767px) {
    .shell-container {
        width: min(calc(100% - 20px), var(--shell-width));
    }

    .app-shell__content {
        padding: 14px 0 24px;
    }

    .panel,
    .auth-card,
    .auth-app-panel--brand,
    .auth-app-panel--form,
    .auth-story,
    .bloomfield-topbar,
    .bloomfield-summary-panel,
    .bloomfield-import-panel,
    .bloomfield-table-card {
        padding: 14px;
    }

    .button--secondary,
    .button--ghost,
    .dashboard-actions form,
    .dashboard-actions .button,
    .admin-toolbar .button,
    .admin-actions-inline form,
    .admin-actions-inline .button,
    .corp-header__actions form,
    .corp-header__actions .button {
        width: 100%;
    }

    .workspace-grid,
    .module-grid,
    .info-grid,
    .stats-grid,
    .trust-grid,
    .summary-grid,
    .bloomfield-summary-grid,
    .form-row {
        grid-template-columns: 1fr;
    }

    .bloomfield-summary-grid--compact .bloomfield-summary-card {
        flex-basis: 100%;
        min-width: 0;
    }

    .admin-table {
        min-width: 680px;
    }

    .admin-table__actions {
        min-width: 180px;
    }

    .world-map {
        min-height: 240px;
    }

    .data-list__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .erp-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .erp-pagination__controls {
        width: 100%;
        justify-content: flex-start;
    }
}
