:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef2f6;
    --text: #17202a;
    --muted: #6a7582;
    --line: #d9e0e7;
    --brand: #16736b;
    --brand-dark: #0f5550;
    --danger: #b42318;
    --warning: #8a5a00;
    --shadow: 0 18px 45px rgba(28, 38, 47, .08);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

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

body.has-sync-lock {
    overflow: hidden;
}

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

button,
input,
textarea {
    font: inherit;
}

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

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

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 20px;
    background: #15201f;
    color: #f5fbfa;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.sidebar-toggle,
.sidebar-backdrop {
    display: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand--sidebar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    padding: 4px 2px 2px;
}

.brand.large {
    margin-bottom: 28px;
}

.brand-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 70px;
    height: 52px;
    border-radius: 8px;
    background: #fff;
    padding: 7px;
}

.brand.large .brand-logo-frame {
    width: 94px;
    height: 76px;
}

.brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand strong,
.brand small {
    display: block;
}

.brand-product strong {
    line-height: 1.1;
}

.brand--sidebar .brand-product {
    display: grid;
    gap: 0;
    min-width: 0;
    align-content: center;
    min-height: 64px;
}

.brand--sidebar .brand-product small {
    margin-top: 0;
    max-width: 15ch;
    font-size: 14px;
    line-height: 1.3;
    color: #d5e2e0;
    font-weight: 500;
}

.brand-mark {
    display: inline-block;
    flex: 0 0 auto;
    background: currentColor;
}

.brand-mark--sidebar {
    width: 78px;
    height: 64px;
    color: rgba(255, 255, 255, .95);
    -webkit-mask-image: url("../img/logo-ceol.svg");
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
    mask-image: url("../img/logo-ceol.svg");
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
}

.brand small {
    color: #9fb3b0;
    margin-top: 2px;
}

.nav {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.nav-section {
    display: grid;
    gap: 4px;
}

.nav-section-title {
    padding: 0 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #88a29e;
}

.nav-section-items {
    display: grid;
    gap: 4px;
}

.nav-section:first-child .nav-section-items a {
    background: rgba(255, 255, 255, .04);
}

.nav a {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 10px;
    align-items: center;
    min-height: 38px;
    padding: 0 11px;
    border-radius: 8px;
    color: #cfdbd9;
    font-size: 13px;
    line-height: 1.25;
}

.nav a.active,
.nav a:hover:not(.disabled) {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.nav a.disabled {
    opacity: .45;
    cursor: default;
}

.nav-group {
    display: grid;
    gap: 6px;
}

.nav-sub {
    display: grid;
    gap: 4px;
    margin-top: -2px;
    padding-left: 34px;
}

.nav-sub a {
    grid-template-columns: 1fr;
    align-items: center;
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
    color: #b8c9c6;
}

.nav-sub a.active,
.nav-sub a:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.workspace {
    min-width: 0;
    min-height: 100vh;
}

.shell--no-sidebar .workspace {
    width: min(100%, 1240px);
    margin: 0 auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 26px 34px;
    background: rgba(255, 255, 255, .84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(12px);
}

.topbar-intro {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-intro--professional {
    gap: 24px;
}

.topbar-brand .brand-logo-frame {
    width: 84px;
    height: 64px;
}

.topbar-brand--professional {
    padding-right: 24px;
    border-right: 1px solid var(--line);
}

.topbar-brand .brand-product strong,
.topbar-brand .brand-product small {
    display: block;
}

.topbar-brand .brand-product strong {
    color: var(--text);
}

.topbar-brand .brand-product small {
    color: var(--muted);
}

.topbar-title-block {
    display: grid;
    gap: 6px;
}

.topbar-title-block h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.15;
}

.topbar-context {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef6f3;
    color: var(--brand-dark);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

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

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: 26px;
}

h2 {
    margin-bottom: 0;
    font-size: 17px;
}

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

.user-menu-link {
    color: inherit;
    font-weight: 600;
}

.user-menu-link:hover {
    color: var(--brand-dark);
}

.user-menu-assistant {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
}

.user-menu-assistant img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-menu-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.user-menu-logout:hover {
    border-color: rgba(18, 130, 118, 0.28);
    background: rgba(18, 130, 118, 0.08);
    color: var(--brand-dark);
}

.user-menu-logout__icon {
    font-size: 16px;
    line-height: 1;
}

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

.content {
    padding: 30px 34px 44px;
}

.analytics-hero-panel {
    margin-bottom: 18px;
}

.analytics-hero-header {
    align-items: flex-start;
    gap: 20px;
}

.analytics-toolbar {
    display: grid;
    gap: 12px;
    justify-items: end;
}

.analytics-filter-form {
    width: min(100%, 360px);
}

.analytics-filter-form label {
    gap: 6px;
}

.analytics-filter-form select {
    min-width: 260px;
}

.analytics-empty-state {
    padding: 18px 20px;
}

.analytics-empty-state strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text);
    font-size: 17px;
}

.analytics-empty-state p {
    margin: 0;
    max-width: 620px;
    color: var(--muted);
    line-height: 1.5;
}

.analytics-window-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.analytics-window-pill {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f5f9fb;
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
}

.secondary-button.is-disabled {
    pointer-events: none;
    opacity: .45;
}

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

.analytics-summary-card {
    min-height: 122px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    background: #fff;
}

.analytics-summary-card--accent {
    background: #fff6d7;
    border-color: #f0d98f;
}

.analytics-summary-title {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.analytics-summary-value {
    display: block;
    font-size: 30px;
    line-height: 1.05;
    color: var(--text);
}

.analytics-summary-subtitle {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
}

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

.analytics-chart-panel--wide {
    grid-column: 1 / -1;
}

.analytics-svg-wrap {
    width: 100%;
    overflow: hidden;
}

.analytics-svg {
    display: block;
    width: 100%;
    height: auto;
}

.analytics-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    margin-top: 12px;
}

.analytics-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.analytics-legend-item i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.analytics-table-panel {
    margin-bottom: 18px;
}

.analytics-table td.number,
.analytics-table th.number {
    text-align: right;
}

.auxiliary-hero-panel {
    margin-bottom: 16px;
}

.auxiliary-hero-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 24px;
}

.auxiliary-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
}

.auxiliary-filter-form {
    width: 100%;
}

.auxiliary-filter-form label {
    gap: 6px;
}

.auxiliary-filter-form select {
    width: 100%;
    min-width: 0;
}

.auxiliary-action-group {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.auxiliary-refresh-form {
    margin: 0;
}

.auxiliary-window-pill {
    display: grid;
    gap: 3px;
    min-width: 220px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f6fafc;
}

.auxiliary-window-pill span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.auxiliary-window-pill strong {
    font-size: 16px;
    line-height: 1.15;
}

.auxiliary-window-pill small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.auxiliary-tabs-panel {
    margin-bottom: 18px;
    padding: 14px;
}

.auxiliary-tabbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.auxiliary-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 999px;
    background: #fff;
    color: #4f6472;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease;
}

.auxiliary-tab:hover,
.auxiliary-tab:focus-visible {
    border-color: rgba(15, 92, 83, .3);
    color: #0f5c53;
    outline: none;
}

.auxiliary-tab.is-active {
    border-color: rgba(15, 92, 83, .34);
    background: #eef8f4;
    color: #0f5c53;
    box-shadow: inset 0 0 0 1px rgba(15, 92, 83, .08);
}

.auxiliary-summary-grid {
    margin-bottom: 18px;
}

.auxiliary-notes-panel,
.auxiliary-table-panel {
    margin-bottom: 18px;
}

.auxiliary-notes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.auxiliary-note-card {
    display: grid;
    gap: 8px;
    min-height: 104px;
    padding: 16px 18px;
    border: 1px solid rgba(15, 92, 83, .12);
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fcfb 0%, #f1f8f6 100%);
}

.auxiliary-note-card strong {
    color: #0f5c53;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auxiliary-note-card p {
    margin: 0;
    color: #435563;
    line-height: 1.55;
}

.auxiliary-chart-grid {
    margin-bottom: 18px;
}

.auxiliary-table {
    table-layout: auto;
}

.auxiliary-table th,
.auxiliary-table td {
    min-width: 92px;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    vertical-align: top;
    line-height: 1.35;
}

.auxiliary-table th {
    min-width: 118px;
    vertical-align: middle;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.auxiliary-table th.number,
.auxiliary-table td.number,
.auxiliary-table td:nth-child(4):has(+ td) {
    white-space: nowrap;
}

.auxiliary-table td.number {
    vertical-align: middle;
}

.auxiliary-table td:has(.auxiliary-status-badge) {
    min-width: 112px;
    vertical-align: middle;
}

.auxiliary-expandable-row > td {
    padding: 0;
}

.auxiliary-row-details {
    display: block;
}

.auxiliary-row-details summary {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 0 12px;
    cursor: pointer;
    list-style: none;
}

.auxiliary-row-details summary::-webkit-details-marker {
    display: none;
}

.auxiliary-row-details summary:hover {
    background: #f7fbfa;
}

.auxiliary-row-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(15, 92, 83, .24);
    border-radius: 6px;
    background: #f3fbf9;
}

.auxiliary-row-toggle::before,
.auxiliary-row-toggle::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: 10px;
    height: 2px;
    border-radius: 999px;
    background: #0f766e;
}

.auxiliary-row-toggle::after {
    transform: rotate(90deg);
}

.auxiliary-row-details[open] .auxiliary-row-toggle::after {
    opacity: 0;
}

.auxiliary-row-summary-grid {
    display: grid;
    align-items: center;
    grid-template-columns: repeat(var(--auxiliary-column-count), minmax(0, 1fr));
    column-gap: 18px;
    width: 100%;
}

.auxiliary-row-summary-grid > span:first-child {
    font-weight: 600;
}

.auxiliary-row-summary-grid > span.number {
    text-align: right;
}

.auxiliary-row-children {
    display: grid;
    gap: 10px;
    padding: 14px 18px 18px 44px;
    border-top: 1px solid #d7e2e8;
    background: #fbfdfd;
}

.auxiliary-row-children > strong {
    color: #34495a;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auxiliary-row-children table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
    border: 1px solid #dbe6ec;
    border-radius: 8px;
    overflow: hidden;
}

.auxiliary-row-children th,
.auxiliary-row-children td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5edf2;
    text-align: left;
}

.auxiliary-row-children th.number,
.auxiliary-row-children td.number {
    text-align: right;
}

.auxiliary-row-children th {
    color: #5d6c7a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auxiliary-row-children tbody tr:last-child td {
    border-bottom: 0;
}

.auxiliary-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.auxiliary-status-badge--success {
    background: #e7f6ef;
    color: #166c51;
}

.auxiliary-status-badge--warning {
    background: #fff4db;
    color: #9b6a06;
}

.auxiliary-status-badge--danger {
    background: #fdecec;
    color: #b42318;
}

.auxiliary-status-badge--info {
    background: #eaf2ff;
    color: #2558b8;
}

.auxiliary-status-badge--muted {
    background: #eef2f6;
    color: #667684;
}

.auxiliary-empty-state {
    padding: 28px;
    border: 1px dashed rgba(56, 80, 98, .18);
    border-radius: 12px;
    background: #fbfdfe;
}

.shell--no-sidebar .topbar,
.shell--no-sidebar .content {
    padding-left: 24px;
    padding-right: 24px;
}

.shell--no-sidebar .topbar {
    gap: 20px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.shell--no-sidebar .topbar-intro {
    flex: 1 1 auto;
}

.shell--no-sidebar .user-menu {
    align-self: flex-start;
    padding-top: 4px;
}

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

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

.metric {
    padding: 18px;
}

.metric span {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
}

.metric strong {
    font-size: 30px;
}

.panel-grid {
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(420px, 1.15fr);
    gap: 18px;
    margin-bottom: 18px;
}

.panel {
    padding: 20px;
}

.panel.narrow {
    max-width: 560px;
}

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

.steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.steps li {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    color: var(--muted);
}

.steps span {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

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

.status,
.permission-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--brand-dark);
    font-size: 13px;
}

.status.ok {
    background: #e7f5ef;
    color: #116149;
}

.status.bad {
    background: #fff0ec;
    color: var(--danger);
}

.status.deleted {
    background: #eceff3;
    color: #596574;
}

.permissions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.empty {
    color: var(--muted);
    margin: 0;
}

.muted {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.alert {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--surface);
    transition: opacity .22s ease, transform .22s ease;
}

.alert.success {
    color: #f4fffb;
    border-color: rgba(12, 88, 66, .28);
    background: #126950;
}

.alert.soft-success {
    color: #0f6b4f;
    border-color: rgba(15, 107, 79, .22);
    background: #f1fbf6;
}

.alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.alert.danger {
    color: var(--danger);
    border-color: rgba(180, 35, 24, .22);
    background: #fff5f3;
}

.alert.warning {
    color: var(--warning);
    border-color: rgba(138, 90, 0, .22);
    background: #fff8e8;
}

.login-page {
    min-height: 100vh;
    margin: 0;
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        linear-gradient(115deg, rgba(10, 24, 39, .74), rgba(10, 24, 39, .46)),
        radial-gradient(circle at top left, rgba(255, 184, 0, .18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(242, 105, 66, .16), transparent 24%),
        url("../img/login-background-20260510.jpg") center center / cover no-repeat,
        #dfe7ea;
}

.login-panel {
    width: min(100%, 1120px);
}

.login-layout {
    min-height: min(760px, calc(100vh - 64px));
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(340px, 1.08fr) minmax(320px, .92fr);
    width: min(100%, 920px);
    min-height: 540px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .34);
    border-radius: 26px;
    background: rgba(255, 255, 255, .16);
    box-shadow: 0 34px 110px rgba(10, 24, 39, .24);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(20, 55, 76, .22), rgba(20, 55, 76, .06));
    pointer-events: none;
}

.login-hero-panel,
.login-form-panel,
.login-copy,
.login-form-shell,
.login-card .alert {
    position: relative;
    z-index: 1;
}

.login-hero-panel {
    display: flex;
    align-items: stretch;
    padding: 26px;
    background:
        linear-gradient(155deg, rgba(113, 156, 199, .28), rgba(53, 93, 126, .42)),
        radial-gradient(circle at top left, rgba(255, 184, 0, .14), transparent 32%),
        radial-gradient(circle at bottom right, rgba(242, 105, 66, .12), transparent 28%);
    border-right: 1px solid rgba(255, 255, 255, .16);
}

.login-hero-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 26px;
    width: 100%;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .16),
        0 18px 40px rgba(13, 27, 39, .10);
}

.login-brand-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 206px;
    height: 148px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-hero-copy {
    display: grid;
    gap: 0;
    min-width: 0;
}

.login-hero-copy h1 {
    margin: 0;
    color: #f8fbff;
    max-width: 340px;
    font-size: 40px;
    line-height: 1.08;
    text-wrap: balance;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 44px 46px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(255, 255, 255, .93));
}

.cookie-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    gap: 16px;
    width: min(460px, calc(100vw - 32px));
    padding: 18px 18px 16px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 18px;
    background: rgba(17, 31, 43, .88);
    box-shadow: 0 22px 60px rgba(10, 24, 39, .26);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.cookie-banner__copy {
    display: grid;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.cookie-banner__copy strong {
    color: #f5fbff;
    font-size: 15px;
    line-height: 1.25;
}

.cookie-banner__copy p {
    margin: 0;
    color: rgba(231, 240, 247, .84);
    font-size: 13px;
    line-height: 1.5;
}

.cookie-banner__action {
    flex: 0 0 auto;
    min-height: 42px;
    padding-inline: 18px;
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .12);
    color: #f5fbff;
}

.cookie-banner__action:hover,
.cookie-banner__action:focus-visible {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.login-copy {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
}

.login-copy h2 {
    margin: 0;
    color: #1d2a36;
    font-size: 36px;
    line-height: 1.05;
}

.login-form-shell {
    margin-top: 2px;
}

.form {
    display: grid;
    gap: 18px;
}

.login-card .form .primary-button,
.login-card .secondary-button {
    min-height: 52px;
}

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

.form-grid.compact {
    grid-template-columns: minmax(180px, 260px);
}

.form-grid.period-grid {
    grid-template-columns: minmax(150px, 1fr) minmax(120px, 160px);
    max-width: 430px;
}

.form-grid.adjustment-values-grid {
    grid-template-columns: minmax(170px, 1fr) minmax(120px, 160px);
}

.form-grid.adjustment-closing-grid {
    grid-template-columns: minmax(280px, 1.2fr) minmax(260px, 1fr);
}

.form label {
    display: grid;
    gap: 7px;
}

.form label span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.form input,
.form select,
.form textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.form input,
.form select {
    min-height: 44px;
    padding: 0 12px;
}

.form textarea {
    min-height: 150px;
    padding: 12px;
    resize: vertical;
}

@media (max-width: 900px) {
    .login-page {
        padding: 20px;
        background-position: center top;
    }

    .login-panel {
        width: min(100%, 560px);
    }

    .login-layout {
        min-height: auto;
        justify-content: center;
    }

    .login-card {
        width: 100%;
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 20px;
        background: rgba(255, 255, 255, .16);
    }

    .login-card::before {
        border-radius: 20px;
    }

    .login-hero-panel {
        padding: 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, .16);
    }

    .login-brand-logo-frame {
        width: 154px;
        height: 116px;
    }

    .login-hero-copy h1 {
        font-size: 32px;
    }

    .login-form-panel {
        padding: 28px;
    }

    .cookie-banner {
        right: 16px;
        bottom: 16px;
        left: 16px;
        width: auto;
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__action {
        width: 100%;
    }
}

.form select {
    cursor: pointer;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
}

.form input[aria-invalid="true"] {
    border-color: rgba(180, 35, 24, .45);
    background: #fff8f7;
}

.form input[aria-invalid="true"]:focus {
    border-color: var(--danger);
    outline: 3px solid rgba(180, 35, 24, .12);
}

.amhp-upload-field {
    gap: 10px;
}

.amhp-upload-input {
    position: absolute;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.amhp-upload-surface {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 20px;
    border: 1px dashed rgba(22, 115, 107, .28);
    border-radius: 12px;
    background: linear-gradient(180deg, #fbfefd 0%, #f3f8f7 100%);
    cursor: pointer;
    transition: border-color .18s ease, background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.amhp-upload-field:hover .amhp-upload-surface {
    border-color: rgba(22, 115, 107, .46);
    background: linear-gradient(180deg, #fcfffe 0%, #eef7f5 100%);
    box-shadow: 0 10px 24px rgba(20, 65, 60, .08);
}

.amhp-upload-input:focus + .amhp-upload-surface,
.amhp-upload-input:focus-visible + .amhp-upload-surface {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
    outline-offset: 0;
}

.amhp-upload-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.amhp-upload-copy strong {
    display: block;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.amhp-upload-copy small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.amhp-upload-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    background: rgba(22, 115, 107, .1);
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.amhp-upload-selection {
    display: block;
    min-height: 20px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.has-selected-files .amhp-upload-selection {
    color: var(--text);
    font-weight: 600;
}

.invoice-adjustment-competency-form {
    display: grid;
    gap: 14px;
}

.invoice-adjustment-competency-grid {
    grid-template-columns: 180px 160px auto;
    align-items: end;
    max-width: none;
}

.invoice-adjustment-competency-field select {
    min-height: 48px;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 8px 18px rgba(28, 38, 47, .05);
}

.invoice-adjustment-competency-field select:focus {
    box-shadow: 0 0 0 3px rgba(22, 115, 107, .12), 0 12px 24px rgba(28, 38, 47, .08);
}

.invoice-adjustment-competency-actions {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.invoice-adjustment-competency-actions .secondary-button {
    min-height: 48px;
    padding-inline: 18px;
    border-radius: 12px;
}

.invoice-adjustment-competency-actions--danger {
    justify-content: space-between;
    margin-top: 14px;
}

.invoice-adjustment-competency-actions--danger .danger-button {
    min-height: 44px;
    padding-inline: 16px;
    border-radius: 12px;
}

.invoice-adjustment-competency-actions--danger .muted {
    margin: 0;
}

.invoice-adjustment-competency-state {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    padding: 14px 16px;
    border: 1px solid rgba(22, 115, 107, .12);
    border-radius: 14px;
    background: linear-gradient(180deg, #fbfefd 0%, #f4faf8 100%);
}

.invoice-adjustment-competency-state strong {
    color: var(--text);
    font-size: 15px;
}

.invoice-adjustment-competency-state .muted {
    flex: 1 1 100%;
    margin: 0;
}

.invoice-adjustment-import-grid {
    grid-template-columns: minmax(320px, .92fr) minmax(0, 1.08fr);
}

.invoice-adjustment-upload-field {
    gap: 12px;
}

.invoice-adjustment-upload-field .amhp-upload-action {
    min-height: 38px;
    padding-inline: 12px;
    border-radius: 10px;
    font-size: 12px;
}

.invoice-adjustment-upload-actions {
    margin-top: 18px;
}

.invoice-adjustment-import-grid > .panel,
.invoice-adjustment-workspace > .panel {
    min-width: 0;
}

.invoice-adjustment-batches-table small {
    display: block;
    margin-top: 4px;
}

.invoice-adjustment-batches-table td:last-child {
    white-space: nowrap;
}

.invoice-adjustment-number-cell {
    text-align: right;
}

.invoice-adjustment-workspace {
    grid-template-columns: minmax(0, 1.3fr) minmax(340px, .92fr);
    align-items: start;
    margin-top: 18px;
}

.invoice-adjustment-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.invoice-adjustment-metrics .metric {
    min-width: 0;
    padding: 14px 16px;
    border-radius: 12px;
}

.invoice-adjustment-metrics .metric span {
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
}

.invoice-adjustment-metrics .metric strong {
    font-size: clamp(14px, 1.25vw, 17px);
    line-height: 1.25;
    font-weight: 700;
}

.invoice-adjustment-metrics .metric small {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
}

.invoice-adjustment-entry-grid {
    grid-template-columns: 200px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
}

.form-section-label {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.invoice-adjustment-mode-control {
    width: 100%;
    max-width: none;
    min-height: 52px;
}

.invoice-adjustment-option-reduction input:checked + span {
    background: #fff5f3;
    color: var(--danger);
}

.invoice-adjustment-option-increase input:checked + span {
    background: #eefaf5;
    color: #116149;
}

.invoice-adjustment-observation-field textarea {
    min-height: 112px;
}

.invoice-adjustment-inner-panel {
    margin: 10px 0 18px;
    padding: 18px;
    overflow: hidden;
}

.invoice-adjustment-inner-header {
    padding: 0 0 14px;
    border: 0;
}

.invoice-adjustment-panel-hint {
    margin: 10px 0 0;
    font-size: 12px;
    line-height: 1.5;
}

.invoice-adjustment-professional-row {
    grid-template-columns: minmax(0, 1fr) 150px;
    align-items: start;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid rgba(57, 76, 90, .12);
    border-radius: 12px;
    background: #fff;
}

.invoice-adjustment-professional-row label {
    display: grid;
    gap: 8px;
    align-content: start;
}

.invoice-adjustment-professionals-field {
    min-width: 0;
}

.invoice-adjustment-percent-field {
    align-self: start;
}

.invoice-adjustment-professional-row select[multiple] {
    min-height: 184px;
    padding: 8px 10px;
}

.invoice-adjustment-professional-row:last-child {
    margin-bottom: 0;
}

.invoice-adjustment-professional-actions,
.invoice-adjustment-invoice-actions {
    margin: 0;
}

.invoice-adjustment-professional-remove {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px;
    font-size: 22px;
    line-height: 1;
}

.invoice-adjustment-professional-remove[hidden] {
    display: none;
}

.invoice-adjustment-invoice-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    margin: 0 0 14px;
}

.invoice-adjustment-invoice-toolbar .report-summary-search {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.invoice-adjustment-search-field {
    position: relative;
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 14px;
    overflow: hidden;
}

.invoice-adjustment-search-field .report-summary-search-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    z-index: 1;
    width: 14px;
    height: 14px;
    margin: 0;
    transform: translateY(-50%);
}

.invoice-adjustment-search-field .report-summary-search-icon::after {
    right: -5px;
    bottom: -2px;
}

.invoice-adjustment-invoice-toolbar .invoice-adjustment-search-field input {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 46px;
    height: 46px;
    margin: 0;
    padding: 0 14px 0 40px;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 14px;
    line-height: 46px;
}

.invoice-adjustment-selection-summary {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
}

.invoice-adjustment-invoices-wrap {
    max-height: 520px;
}

.invoice-adjustment-invoices-wrap table {
    width: 100%;
    min-width: 0;
}

.invoice-adjustment-invoices-wrap thead th:nth-child(5),
.invoice-adjustment-invoices-wrap thead th:nth-child(6),
.invoice-adjustment-invoices-wrap thead th:nth-child(7),
.invoice-adjustment-invoices-wrap tbody td:nth-child(5),
.invoice-adjustment-invoices-wrap tbody td:nth-child(6),
.invoice-adjustment-invoices-wrap tbody td:nth-child(7) {
    text-align: right;
}

.invoice-adjustment-invoices-wrap input[type="checkbox"] {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
    vertical-align: middle;
    accent-color: var(--brand);
}

.invoice-adjustment-invoices-wrap td:first-child,
.invoice-adjustment-invoices-wrap th:first-child {
    width: 48px;
    text-align: center;
}

.invoice-adjustment-submit-row {
    margin-top: 8px;
}

.invoice-adjustment-rules-list {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.invoice-adjustment-rule-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(57, 76, 90, .12);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    box-shadow: 0 10px 24px rgba(19, 31, 41, .05);
    min-width: 0;
}

.invoice-adjustment-rule-card.is-cancelled {
    background: linear-gradient(180deg, #fcfdfd 0%, #f5f8f9 100%);
    opacity: .82;
}

.invoice-adjustment-rule-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.invoice-adjustment-rule-card__headline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.invoice-adjustment-rule-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.invoice-adjustment-rule-card__notes {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.invoice-adjustment-rule-card__meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(57, 76, 90, .12);
    border-radius: 12px;
    background: #fff;
}

.invoice-adjustment-rule-card__meta-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
}

.invoice-adjustment-rule-card__meta-item--file {
    display: block;
}

.invoice-adjustment-rule-card__label {
    display: block;
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.invoice-adjustment-rule-card__meta strong {
    display: block;
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    text-align: right;
}

.invoice-adjustment-rule-card__meta-item--file .invoice-adjustment-rule-card__label {
    display: block;
    margin-bottom: 4px;
}

.invoice-adjustment-rule-card__meta-item--file strong {
    display: block;
    font-size: 15px;
    text-align: left;
}

.invoice-adjustment-rule-card__meta-item--amount {
    align-items: center;
}

.invoice-adjustment-rule-card__hint {
    margin: -2px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.invoice-adjustment-rule-card__section {
    display: grid;
    gap: 8px;
}

.invoice-adjustment-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
}

.invoice-adjustment-chip-list--invoices {
    align-content: flex-start;
}

.invoice-adjustment-chip-list--invoices .repasse-chip {
    overflow-wrap: anywhere;
}

.invoice-adjustment-chip-list .repasse-chip--muted {
    background: #f3f6f8;
    color: var(--muted);
    border-color: rgba(57, 76, 90, .12);
}

.sync-actions-grid > .panel {
    display: flex;
    flex-direction: column;
}

.sync-actions-grid .form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.sync-connection-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f7faf9;
}

.sync-connection-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-connection-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.sync-connection-copy strong {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.sync-connection-copy small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.sync-connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--line);
    box-shadow: 0 0 0 4px rgba(106, 117, 130, .08);
}

.sync-connection-state.is-success {
    border-color: rgba(17, 97, 73, .16);
    background: #eef8f4;
}

.sync-connection-state.is-success .sync-connection-dot {
    background: #116149;
    box-shadow: 0 0 0 4px rgba(17, 97, 73, .12);
}

.sync-connection-state.is-error {
    border-color: rgba(180, 35, 24, .16);
    background: #fff7f5;
}

.sync-connection-state.is-error .sync-connection-dot {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, .12);
}

.sync-connection-state.is-empty {
    border-color: rgba(138, 90, 0, .16);
    background: #fff9ef;
}

.sync-connection-state.is-empty .sync-connection-dot {
    background: #8a5a00;
    box-shadow: 0 0 0 4px rgba(138, 90, 0, .12);
}

.sync-retry-button {
    min-height: 38px;
    white-space: nowrap;
}

.sync-competency-alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    margin-top: 14px;
    border: 1px solid rgba(201, 140, 21, .2);
    border-radius: 12px;
    background: #fff8ea;
}

.sync-competency-alert[hidden] {
    display: none !important;
}

.sync-competency-alert__copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.sync-competency-alert__copy strong {
    color: #8a5a00;
    font-size: 14px;
    line-height: 1.35;
}

.sync-competency-alert__copy small {
    color: #78674a;
    font-size: 12px;
    line-height: 1.45;
}

.sync-form-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.imports-run-link {
    display: inline-grid;
    gap: 2px;
    color: inherit;
    text-decoration: none;
}

.imports-run-link strong {
    color: #0f5c53;
}

.imports-run-link:hover strong,
.imports-run-link:focus-visible strong {
    text-decoration: underline;
}

.import-findings-panel {
    display: grid;
    gap: 20px;
}

.import-findings-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 20px;
}

.import-findings-header__copy h2 {
    margin: 4px 0 8px;
}

.import-findings-header__copy p {
    margin: 0;
    color: var(--muted);
}

.import-findings-header__eyebrow {
    color: #0f5c53;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.import-findings-header__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 10px;
}

.import-findings-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.import-findings-summary-card {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}

.import-findings-summary-card small,
.import-findings-summary-card span {
    color: var(--muted);
}

.import-findings-summary-card strong {
    font-size: 28px;
    line-height: 1;
}

.import-findings-summary-card--critical {
    border-color: rgba(180, 35, 24, .2);
    background: #fff7f5;
}

.import-findings-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.import-findings-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px 18px;
}

.import-findings-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 10px;
}

.import-findings-filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px 12px;
}

.import-findings-filter-form label {
    display: grid;
    gap: 6px;
    min-width: 170px;
}

.import-findings-filter-form label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.import-findings-filter-form select {
    min-width: 170px;
}

.import-findings-filter-form .secondary-button {
    min-height: 44px;
}

.import-findings-filter.is-active {
    border-color: rgba(15, 92, 83, .24);
    background: #eef8f4;
    color: #0f5c53;
}

.import-findings-filter--suggestions {
    margin-left: 6px;
}

.import-findings-group__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px 20px;
}

.import-findings-group__header p {
    margin: 6px 0 0;
    color: var(--muted);
}

.import-findings-group__summary {
    display: flex;
    align-items: center;
    gap: 10px;
}

.import-findings-list {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(56, 80, 98, .08);
    border-radius: 14px;
    background: #f3f6fa;
}

.import-finding-card {
    padding: 18px;
    border: 1px solid rgba(56, 80, 98, .14);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.import-finding-card__header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 14px;
}

.import-finding-card__title h3 {
    margin: 0;
    font-size: 16px;
}

.import-finding-card__title p {
    margin: 6px 0 0;
    color: var(--muted);
}

.import-finding-card__badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.import-finding-card__amount {
    font-size: 15px;
    white-space: nowrap;
}

.import-finding-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px 16px;
    margin: 0;
}

.import-finding-card__meta div {
    display: grid;
    gap: 3px;
}

.import-finding-card__meta dt {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.import-finding-card__meta dd {
    margin: 0;
    font-size: 14px;
}

.import-finding-card__references {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
}

.import-finding-card__references strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
}

.import-finding-card__references ul {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
}

.import-finding-card__references li + li {
    margin-top: 6px;
}

.import-finding-card__resolution {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f8fafc;
}

.import-finding-card__resolution strong {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
}

.import-finding-card__resolution p {
    margin: 0;
}

.import-finding-card__resolution-meta {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.import-finding-card__resolution-meta div {
    display: grid;
    gap: 2px;
}

.import-finding-card__resolution-meta dt {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5f7384;
}

.import-finding-card__resolution-meta dd {
    margin: 0;
    color: var(--text);
}

.import-finding-card__resolution small {
    display: block;
    margin-top: 6px;
}

.import-finding-card__suggestions {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(15, 92, 83, .14);
    border-radius: 10px;
    background: #eef8f4;
}

.import-finding-card__suggestions strong {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #0f5c53;
}

.import-finding-card__suggestions ul {
    margin: 0;
    padding-left: 18px;
}

.import-finding-card__suggestions li + li {
    margin-top: 6px;
}

.import-finding-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

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

.generic-reassignment-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(320px, 1.15fr);
    gap: 16px;
    align-items: start;
}

.generic-reassignment-field {
    display: grid;
    gap: 8px;
}

.generic-reassignment-field--full {
    grid-column: 1 / -1;
}

.generic-reassignment-field span {
    font-size: 13px;
    font-weight: 600;
    color: #465867;
}

.generic-reassignment-field select,
.generic-reassignment-field textarea {
    width: 100%;
}

.generic-reassignment-field select {
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3.5 5.5 7 9l3.5-3.5' stroke='%23627688' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px 14px;
}

@media (max-width: 720px) {
    .sync-connection-state {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .sync-competency-alert {
        flex-direction: column;
        align-items: start;
    }

    .sync-retry-button {
        width: 100%;
    }

    .amhp-upload-surface {
        align-items: flex-start;
        flex-direction: column;
    }

    .amhp-upload-action {
        width: 100%;
    }

    .import-findings-summary {
        grid-template-columns: 1fr 1fr;
    }

    .import-findings-header__actions {
        justify-content: flex-start;
    }

    .import-findings-bulk-actions {
        justify-content: flex-start;
    }

    .import-finding-card__meta {
        grid-template-columns: 1fr;
    }

    .generic-reassignment-grid {
        grid-template-columns: 1fr;
    }

    .invoice-adjustment-competency-grid,
    .invoice-adjustment-entry-grid,
    .invoice-adjustment-professional-row,
    .invoice-adjustment-rule-card__meta {
        grid-template-columns: 1fr;
    }

    .invoice-adjustment-invoice-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .invoice-adjustment-invoice-toolbar .report-summary-search {
        max-width: none;
    }

    .invoice-adjustment-selection-summary {
        text-align: left;
        white-space: normal;
    }
}

@media (max-width: 1600px) {
    .invoice-adjustment-workspace {
        grid-template-columns: 1fr;
    }
}

.professional-picker {
    position: relative;
}

.professional-picker-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400 !important;
    cursor: pointer;
}

.professional-picker-trigger:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
}

.professional-picker.is-open .professional-picker-trigger {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 115, 107, .12);
}

.professional-picker-trigger-main {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.professional-picker-trigger-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 400 !important;
}

.professional-picker-trigger-caret {
    width: 10px;
    height: 10px;
    border-right: 2px solid #6f7f8e;
    border-bottom: 2px solid #6f7f8e;
    transform: rotate(45deg) translateY(-2px);
    flex: 0 0 auto;
}

.professional-picker-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.professional-picker-dot--neutral {
    background: #c7d1d9;
}

.professional-picker-dot--missing {
    background: #c24132;
}

.professional-picker-dot--defined {
    background: #1f7a5c;
}

.professional-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    border: 1px solid rgba(42, 65, 80, .14);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 34px rgba(20, 42, 58, .14);
    overflow: hidden;
}

.professional-picker-legend {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: nowrap;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(42, 65, 80, .08);
    background: #f7fafc;
    white-space: nowrap;
    overflow-x: auto;
}

.professional-picker-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #5f707e;
    font-size: 11px;
    font-weight: 400 !important;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
}

.professional-picker-legend-item span {
    font-weight: 400 !important;
    white-space: nowrap;
}

.professional-picker-options {
    max-height: 280px;
    overflow-y: auto;
}

.professional-picker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid rgba(42, 65, 80, .06);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-weight: 400 !important;
    text-align: left;
    cursor: pointer;
}

.professional-picker-option:last-child {
    border-bottom: 0;
}

.professional-picker-option:hover,
.professional-picker-option:focus {
    background: #f4f8fb;
    outline: none;
}

.professional-picker-option-label {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 400 !important;
}

.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    white-space: nowrap;
    font-weight: 700;
    flex-shrink: 0;
    cursor: pointer;
}

.primary-button:disabled {
    opacity: .72;
    cursor: wait;
}

.primary-button:hover {
    background: var(--brand-dark);
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    cursor: pointer;
}

.secondary-button:hover {
    border-color: rgba(22, 115, 107, .35);
    color: var(--brand-dark);
}

.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    cursor: pointer;
    transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}

.ghost-button:hover {
    border-color: rgba(22, 115, 107, .14);
    background: rgba(22, 115, 107, .06);
    color: var(--brand-dark);
}

.primary-button.is-loading,
.secondary-button.is-loading,
.ghost-button.is-loading {
    cursor: wait;
}

.primary-button.is-loading::after,
.secondary-button.is-loading::after,
.ghost-button.is-loading::after {
    content: "";
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: repasse-button-spin .7s linear infinite;
}

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

.secondary-button.amhp-lines-button {
    border-color: rgba(22, 115, 107, .25);
    background: #edf8f5;
    color: var(--brand-dark);
}

.secondary-button.amhp-lines-button:hover {
    border-color: rgba(22, 115, 107, .45);
    background: #dff2ee;
}

.secondary-button.amhp-import-button {
    border-color: rgba(42, 93, 159, .24);
    background: #eef5ff;
    color: #244f86;
}

.secondary-button.amhp-import-button:hover {
    border-color: rgba(42, 93, 159, .42);
    background: #e1edff;
    color: #1f4678;
}

.query-panel {
    margin-bottom: 18px;
}

.query-form textarea {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    line-height: 1.55;
}

.query-actions {
    display: flex;
    align-items: end;
    gap: 12px;
}

.report-filter-panel,
.report-detail-panel {
    margin-bottom: 18px;
}

.rules-module-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    position: sticky;
    top: 14px;
    z-index: 12;
    padding: 10px 12px;
    border: 1px solid rgba(42, 65, 80, .10);
    border-radius: 10px;
    background: rgba(246, 247, 249, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(20, 42, 58, .06);
    margin-bottom: 18px;
}

.rules-module-link {
    text-decoration: none;
}

.rules-module-link--toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.rules-module-link__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.rules-module-link.is-active {
    border-color: rgba(22, 115, 107, .28);
    background: #edf8f5;
    color: var(--brand-dark);
}

.report-filter-grid {
    grid-template-columns: minmax(130px, 160px) minmax(110px, 140px) minmax(260px, 1fr);
}

.provider-billing-entry-grid {
    grid-template-columns: minmax(220px, 260px) minmax(170px, 210px);
    align-items: start;
}

.provider-billing-entry-grid .provider-billing-notes-field textarea {
    min-height: 120px;
}

.provider-billing-notes-block {
    display: block;
    margin-top: 14px;
}

.provider-billing-notes-block textarea {
    min-height: 120px;
}

.provider-billing-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.provider-billing-summary-grid .analytics-summary-card {
    min-height: 98px;
    padding: 12px 14px;
}

.provider-billing-summary-grid .analytics-summary-title {
    margin-bottom: 6px;
    font-size: 10px;
}

.provider-billing-summary-grid .analytics-summary-value {
    font-size: 23px;
}

.provider-billing-summary-grid .analytics-summary-subtitle {
    margin-top: 6px;
    font-size: 11px;
    line-height: 1.35;
}

.provider-billing-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.provider-billing-reopen-lock {
    display: grid;
    gap: 6px;
}

.provider-billing-reopen-lock__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.provider-billing-reopen-lock__icon {
    font-size: 15px;
    line-height: 1;
}

.provider-billing-reopen-lock__caption {
    display: block;
    max-width: 320px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.provider-billing-number-input {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.provider-billing-totals-row {
    background: #d7e1ea;
}

.provider-billing-totals-row td {
    font-size: 15px;
    font-weight: 700;
}

.provider-billing-totals-row strong {
    font-size: 15px;
}

.report-year-filter-grid {
    grid-template-columns: minmax(140px, 180px);
}

.report-filter-submit {
    display: flex;
    align-items: end;
}

.memory-filter-grid {
    grid-template-columns: minmax(170px, 220px) minmax(130px, 160px) minmax(110px, 140px) minmax(280px, 1fr) auto;
}

.link-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.report-home-links-grid {
    margin-top: 18px;
}

.report-home-empty-year {
    margin-top: 18px;
}

.link-card {
    display: grid;
    gap: 18px;
    padding: 20px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #f7fafc;
}

.link-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 600;
}

.link-card p,
.panel-copy {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.link-card .primary-button,
.link-card .secondary-button {
    justify-self: start;
}

.dashboard-focus-strip {
    display: grid;
    grid-template-columns: minmax(280px, 1.3fr) repeat(2, minmax(220px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.dashboard-focus-card {
    display: grid;
    gap: 8px;
    padding: 20px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 12px;
    background: #f7fafc;
}

.dashboard-focus-card span,
.dashboard-progress-card span {
    color: var(--muted);
    font-size: 13px;
}

.dashboard-focus-card strong,
.dashboard-progress-card strong {
    font-size: 28px;
    line-height: 1.05;
}

.dashboard-focus-card small,
.dashboard-progress-card small {
    color: #5e6f7c;
    line-height: 1.45;
}

.dashboard-focus-card--primary {
    background: linear-gradient(135deg, #16736b 0%, #215f78 100%);
    border-color: rgba(22, 115, 107, .32);
    color: #fff;
}

.dashboard-focus-card--primary span,
.dashboard-focus-card--primary small,
.dashboard-focus-card--primary strong {
    color: #fff;
}

.dashboard-progress-grid,
.dashboard-base-grid {
    margin-top: 18px;
}

.dashboard-progress-card {
    position: relative;
}

.dashboard-progress-bar {
    width: 100%;
    height: 8px;
    margin-top: 4px;
    border-radius: 999px;
    background: #e4edf3;
    overflow: hidden;
}

.dashboard-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16736b 0%, #2a8795 100%);
}

.dashboard-main-grid,
.dashboard-history-grid {
    margin-top: 18px;
}

.dashboard-pending-list {
    display: grid;
    gap: 12px;
}

.dashboard-pending-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #f9fbfd;
    color: inherit;
    text-decoration: none;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}

.dashboard-pending-item:hover {
    border-color: rgba(22, 115, 107, .24);
    background: #f2f8f6;
    transform: translateY(-1px);
}

.dashboard-pending-item strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.dashboard-pending-item small {
    color: #5e6f7c;
    line-height: 1.45;
}

.dashboard-pending-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e6f2ef;
    color: var(--brand-dark);
    font-weight: 700;
}

.dashboard-quick-actions {
    grid-template-columns: 1fr;
    gap: 12px;
}

.dashboard-quick-actions .link-card {
    padding: 18px;
    gap: 14px;
}

.memory-formula-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 18px;
}

.memory-formula-list li {
    color: #40505f;
    line-height: 1.5;
}

.audit-filter-grid {
    grid-template-columns:
        minmax(180px, 220px)
        minmax(190px, 230px)
        minmax(170px, 210px)
        minmax(150px, 170px)
        minmax(150px, 170px)
        minmax(260px, 1fr)
        auto;
}

.audit-log-table {
    table-layout: fixed;
}

.audit-log-table td,
.audit-log-table th {
    white-space: normal;
    vertical-align: top;
}

.audit-action-cell strong,
.audit-origin-cell strong {
    display: block;
    font-weight: 600;
}

.audit-origin-cell small,
.audit-action-cell small {
    margin-top: 4px;
    line-height: 1.45;
}

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

.amhp-total-grid {
    grid-template-columns: repeat(4, minmax(220px, 1fr));
}

.metric-warning {
    border-color: rgba(194, 112, 38, .32);
    background: #fffaf4;
}

.metric-warning strong {
    color: #9a4d0f;
}

.rules-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(360px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.rules-main-stack {
    display: grid;
    gap: 18px;
}

.rules-intro-panel {
    margin-bottom: 18px;
}

.rules-grouping-panel {
    margin-bottom: 18px;
}

.rules-grouping-panel[hidden] {
    display: none !important;
}

.rules-intro-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.rules-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.rules-grouping-list {
    display: grid;
    gap: 12px;
}

.rules-grouping-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 12px;
    background: #f9fbfd;
}

.rules-grouping-card__body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.rules-grouping-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}

.rules-grouping-card__type,
.rules-grouping-card__count {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.rules-grouping-card__type {
    background: #eef7f5;
    color: #1f6b63;
}

.rules-grouping-card__count {
    background: #f2f6fa;
    color: #556979;
}

.rules-grouping-card__summary {
    display: block;
    color: var(--text);
    font-size: 15px;
    line-height: 1.4;
}

.rules-grouping-card__scope {
    color: #526372;
    font-size: 13px;
    line-height: 1.45;
}

.rules-grouping-card__description {
    margin: 0;
    color: #526372;
    font-size: 13px;
    line-height: 1.55;
}

.rules-grouping-card__current {
    color: var(--muted);
    line-height: 1.45;
}

.rules-grouping-card__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

@media (max-width: 900px) {
    .rules-grouping-card {
        grid-template-columns: 1fr;
    }

    .rules-grouping-card__actions {
        justify-content: start;
    }
}

.rules-intro-item {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #f7fafc;
    color: inherit;
    text-decoration: none;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.rules-intro-item:hover {
    border-color: rgba(27, 127, 112, .28);
    background: #f3faf8;
    box-shadow: 0 10px 24px rgba(27, 127, 112, .08);
    transform: translateY(-1px);
}

.rules-intro-item:focus-visible {
    outline: none;
    border-color: rgba(27, 127, 112, .45);
    box-shadow: 0 0 0 3px rgba(27, 127, 112, .18);
}

.rules-intro-item strong {
    font-size: 14px;
    line-height: 1.4;
}

.rules-intro-item small {
    color: var(--muted);
    line-height: 1.45;
}

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

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

.rules-profile-group {
    display: grid;
    gap: 0;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.rules-profile-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: #c7d6e0;
    border-bottom: 1px solid rgba(60, 84, 102, .14);
}

.rules-profile-group-trigger {
    width: 100%;
    border: 0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color .18s ease, box-shadow .18s ease;
}

.rules-profile-group-trigger:hover {
    background: #bccfdb;
}

.rules-profile-group-trigger:focus-visible {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(21, 117, 109, .32);
}

.rules-profile-group-heading {
    display: grid;
    gap: 2px;
}

.rules-profile-group-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.rules-profile-group-hint {
    color: #526372;
    font-size: 12px;
}

.rules-profile-group-meta {
    color: #526372;
    font-size: 12px;
    white-space: nowrap;
}

.rules-profile-group .table-wrap {
    border-radius: 0;
}

.rules-profile-table {
    width: 100%;
    table-layout: fixed;
}

.rules-profile-table__col-group {
    width: 25%;
}

.rules-profile-table__col-items {
    width: 28%;
}

.rules-profile-table__col-notes {
    width: 31%;
}

.rules-profile-table__col-actions {
    width: 16%;
}

.rules-profile-table th,
.rules-profile-table td {
    vertical-align: top;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.4;
    overflow: hidden;
}

.rules-profile-table td strong,
.rules-profile-table td small {
    display: block;
}

.rules-profile-table td > * {
    max-width: 100%;
}

.rules-profile-table td strong + small {
    margin-top: 4px;
}

.rules-profile-table td:nth-child(2),
.rules-profile-table td:nth-child(3) {
    padding-right: 16px;
}

.rules-profile-table td:nth-child(3) {
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rules-profile-table th:last-child,
.rules-profile-table td:last-child {
    text-align: right;
}

.rules-profile-table td:last-child {
    white-space: nowrap;
    overflow: visible;
}

.rules-profile-table td.row-action-buttons {
    padding-left: 12px;
}

.rules-profile-table td.row-action-buttons > * {
    flex-shrink: 0;
}

@media (max-width: 1180px) {
    .rules-profile-table__col-group {
        width: 23%;
    }

    .rules-profile-table__col-items {
        width: 29%;
    }

    .rules-profile-table__col-notes {
        width: 30%;
    }

    .rules-profile-table__col-actions {
        width: 18%;
    }
}

.rules-procedure-catalog {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 10px;
    background: #f8fbfd;
}

.rules-procedure-catalog__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.rules-procedure-catalog__toolbar strong,
.rules-procedure-catalog__toolbar small {
    display: block;
}

.rules-procedure-filters {
    display: grid;
    gap: 12px;
}

.rules-procedure-filters__types {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.rules-procedure-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid rgba(60, 84, 102, .12);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.rules-procedure-filter-chip.is-active {
    border-color: rgba(27, 127, 112, .28);
    background: #eef8f6;
    color: var(--brand);
}

.rules-procedure-filters__form {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) auto auto auto;
    gap: 10px;
    align-items: end;
}

.rules-procedure-filters__search input {
    width: 100%;
}

.rules-procedure-filters__letter,
.rules-procedure-filters__toggle {
    display: grid;
    gap: 6px;
}

.rules-procedure-filters__toggle {
    grid-auto-flow: column;
    align-items: center;
    justify-content: start;
    white-space: nowrap;
}

.rules-procedure-catalog__summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--muted);
    font-size: 12px;
}

.rules-procedure-catalog__list {
    display: grid;
    gap: 6px;
    max-height: 520px;
    overflow: auto;
    padding-right: 4px;
}

.rules-procedure-catalog__item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 8px;
    background: #fff;
}

.rules-procedure-catalog__item:hover {
    border-color: rgba(27, 127, 112, .28);
    background: #f3faf8;
}

.rules-procedure-catalog__item.is-selected {
    border-color: rgba(27, 127, 112, .28);
    background: #eef8f6;
}

.rules-procedure-catalog__item input {
    margin: 0;
}

.rules-procedure-catalog__item-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.rules-procedure-catalog__item-main strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.25;
}

.rules-procedure-catalog__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.rules-procedure-catalog__tags small {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    background: #f3f7fa;
    border: 1px solid rgba(60, 84, 102, .1);
    overflow-wrap: anywhere;
}

.rules-procedure-catalog__selected-flag {
    color: var(--brand);
    background: rgba(27, 127, 112, .08) !important;
    border-color: rgba(27, 127, 112, .18) !important;
}

@media (max-width: 900px) {
    .rules-procedure-filters__form {
        grid-template-columns: 1fr;
    }
}

.confirm-modal.classification-preview-modal {
    width: min(100%, 1040px);
    max-height: min(92vh, 860px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.classification-preview-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--surface);
}

.classification-preview-heading {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.classification-preview-header .muted {
    display: block;
}

.classification-preview-header .icon-button {
    flex: 0 0 auto;
    align-self: flex-start;
}

.classification-preview-body {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 14px;
    min-height: 0;
    overflow: hidden;
}

.classification-preview-summary {
    margin: 0;
    color: #526372;
    font-size: 13px;
}

.classification-preview-table-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 8px;
    background: #fff;
}

.classification-preview-section {
    display: grid;
    gap: 10px;
}

.classification-preview-section-header {
    display: grid;
    gap: 4px;
}

.classification-preview-section-header h3 {
    margin: 0;
    font-size: 15px;
}

.classification-preview-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

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

.classification-preview-card {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(57, 76, 90, .12);
    background: #fff;
}

.classification-preview-card--soft {
    background: #f7fafc;
}

.classification-preview-card__eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: #eef7f5;
    color: #1f6b63;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.classification-preview-card strong {
    margin: 0;
    color: var(--text);
    font-size: 15px;
}

.classification-preview-card small {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.classification-preview-table {
    width: max(100%, 940px);
    min-width: 940px;
    table-layout: auto;
}

.classification-preview-table th,
.classification-preview-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    vertical-align: top;
}

.classification-preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7fafc;
}

.classification-preview-table .classification-preview-col-source,
.classification-preview-table .classification-preview-col-code,
.classification-preview-table .classification-preview-col-type,
.classification-preview-table .classification-preview-cell-source,
.classification-preview-table .classification-preview-cell-code,
.classification-preview-table .classification-preview-cell-type {
    white-space: nowrap;
}

.classification-preview-table .classification-preview-col-source,
.classification-preview-table .classification-preview-cell-source {
    min-width: 120px;
}

.classification-preview-table .classification-preview-col-code,
.classification-preview-table .classification-preview-cell-code {
    min-width: 92px;
}

.classification-preview-table .classification-preview-col-type,
.classification-preview-table .classification-preview-cell-type {
    min-width: 116px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: keep-all;
}

.classification-preview-table .classification-preview-col-description,
.classification-preview-table .classification-preview-cell-description {
    min-width: 300px;
}

.classification-preview-table .classification-preview-col-context,
.classification-preview-table .classification-preview-cell-context {
    min-width: 340px;
}

.rules-form-panel {
    align-self: start;
}

.rules-section-panel {
    display: none;
    gap: 0;
    scroll-margin-top: 112px;
}

.rules-section-panel.is-editing,
.rules-section-panel:target {
    display: grid;
}

.rules-section-panel:target {
    border-color: rgba(22, 115, 107, .32);
    box-shadow: 0 18px 40px rgba(22, 115, 107, .08);
}

.rules-form-panel.is-editing {
    border: 2px solid #16736b;
    box-shadow: 0 18px 40px rgba(22, 115, 107, .10);
}

.rules-editing-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(22, 115, 107, .18);
    border-radius: 999px;
    background: #eef7f5;
    color: #1f6b63;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.rules-return-link {
    display: flex;
    justify-content: flex-end;
    margin: 0 0 12px;
}

.rules-return-link__button {
    min-height: 42px;
    padding: 0 16px;
    border-color: rgba(22, 115, 107, .34);
    background: #eef7f5;
    color: #14584f;
    box-shadow: 0 10px 24px rgba(22, 115, 107, .08);
}

.rules-return-link__button:hover {
    border-color: rgba(22, 115, 107, .45);
    background: #e4f3ef;
    color: #0f4d45;
}

.rules-assistant-stack {
    display: grid;
    gap: 18px;
}

.rules-assistant-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr);
    gap: 18px;
    align-items: start;
}

.rules-assistant-shell--with-result {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
}

.rules-assistant-panel {
    display: grid;
    gap: 18px;
}

.rules-assistant-panel--simple {
    max-width: 920px;
}

.rules-assistant-sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 20px;
}

.rules-assistant-mascot {
    grid-template-columns: 140px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 20px;
    background: linear-gradient(180deg, #fffdfa 0%, #fff8f2 100%);
    border: 1px solid rgba(214, 166, 120, .22);
}

.rules-assistant-mascot__media,
.rules-assistant-intro__media,
.rules-assistant-loading-card__media,
.rules-assistant-modal__hero-media {
    display: grid;
    place-items: center;
}

.rules-assistant-mascot__image {
    max-width: 132px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.rules-assistant-mascot__copy {
    display: grid;
    gap: 8px;
}

.rules-assistant-mascot__copy h3,
.rules-assistant-loading-card__copy strong,
.rules-assistant-modal__hero-copy strong {
    margin: 0;
    color: var(--text);
}

.rules-assistant-mascot__copy p,
.rules-assistant-loading-card__copy p,
.rules-assistant-modal__hero-copy p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.rules-assistant-inline-result {
    position: static;
}

.rules-assistant-prompt {
    min-height: 148px;
    line-height: 1.55;
    resize: vertical;
}

.rules-assistant-examples {
    display: grid;
    gap: 8px;
    padding: 14px 16px;
    border: 1px dashed rgba(86, 104, 122, .22);
    border-radius: 14px;
    background: #fbfcfe;
}

.rules-assistant-examples strong,
.rules-assistant-inline-block strong {
    color: var(--text);
    font-size: 13px;
}

.rules-assistant-examples ul,
.rules-assistant-inline-block ul,
.rules-assistant-bullet-list,
.rules-assistant-callout ul {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.rules-assistant-summary {
    display: grid;
    gap: 10px;
}

.rules-assistant-summary p,
.rules-assistant-action-card p {
    margin: 0;
}

.rules-assistant-confidence {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.rules-assistant-confidence--alta {
    background: #e7f6ef;
    color: #116145;
}

.rules-assistant-confidence--media {
    background: #fff5de;
    color: #8a5a00;
}

.rules-assistant-confidence--baixa {
    background: #fee9e7;
    color: #9e362b;
}

.rules-assistant-callout {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border-radius: 14px;
}

.rules-assistant-callout h3,
.rules-assistant-action-card h3 {
    margin: 0;
    color: var(--text);
}

.rules-assistant-callout--warning {
    border: 1px solid rgba(191, 127, 0, .18);
    background: #fff7e6;
}

.rules-assistant-callout--neutral {
    border: 1px solid rgba(86, 104, 122, .16);
    background: #f6f8fb;
}

.rules-assistant-actions {
    display: grid;
    gap: 16px;
}

.rules-assistant-action-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(191, 198, 210, .9);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.rules-assistant-actions--compact .rules-assistant-action-card {
    padding: 14px 16px;
    gap: 10px;
}

.rules-assistant-action-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rules-assistant-next-step {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid rgba(22, 115, 107, .16);
    border-radius: 16px;
    background: #f7fcfb;
}

.rules-assistant-next-step__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rules-assistant-action-card__effect {
    color: var(--text);
}

.rules-assistant-inline-block {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7fafc;
    border: 1px solid rgba(86, 104, 122, .12);
}

.rules-assistant-inline-link {
    color: #0f5c53;
    text-decoration: underline;
    text-decoration-color: rgba(15, 92, 83, .28);
    text-underline-offset: 2px;
    font-weight: 500;
}

.rules-assistant-inline-link:hover {
    color: #0b4a43;
    text-decoration-color: rgba(11, 74, 67, .42);
}

.rules-assistant-raw summary {
    cursor: pointer;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 600;
}

.rules-assistant-raw pre {
    margin: 10px 0 0;
    padding: 14px;
    border-radius: 12px;
    background: #0f172a;
    color: #d7e2ff;
    font-size: 12px;
    line-height: 1.5;
    overflow: auto;
}

.rules-assistant-more-actions summary {
    cursor: pointer;
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 600;
}

.rules-assistant-more-actions[open] {
    display: grid;
    gap: 14px;
}

.rules-assistant-modal {
    position: fixed;
    inset: 0;
    z-index: 245;
    display: none;
}

.rules-assistant-modal.is-visible {
    display: block;
}

.rules-assistant-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(11, 18, 24, .42);
    backdrop-filter: blur(4px);
}

.rules-assistant-modal__card {
    position: relative;
    width: min(100% - 32px, 860px);
    max-height: calc(100vh - 48px);
    margin: 24px auto;
    overflow: auto;
    display: grid;
    gap: 18px;
    z-index: 1;
}

.rules-assistant-modal__card--intro {
    width: min(100% - 32px, 920px);
}

.rules-assistant-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rules-assistant-modal__close {
    font-size: 26px;
    line-height: 1;
}

.rules-assistant-modal__actions {
    justify-content: flex-end;
}

.rules-assistant-modal__hero {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 16px;
    background: #f7fcfb;
    border: 1px solid rgba(22, 115, 107, .14);
}

.rules-assistant-modal__hero-image {
    max-width: 112px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.rules-assistant-intro {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.rules-assistant-intro__image {
    max-width: 220px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.rules-assistant-intro__copy {
    display: grid;
    gap: 16px;
}

.rules-assistant-intro__examples {
    display: grid;
    gap: 14px;
}

.rules-assistant-intro__example-block {
    display: grid;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fbfcfe;
    border: 1px solid rgba(86, 104, 122, .12);
}

.rules-assistant-intro__example-block strong {
    color: var(--text);
    font-size: 13px;
}

.rules-assistant-intro__check {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.rules-assistant-loading-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
    width: min(100%, 680px);
    padding: 22px 24px;
}

.rules-assistant-loading-card__image {
    max-width: 150px;
    width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 1080px) {
    .rules-assistant-shell,
    .rules-assistant-shell--with-result {
        grid-template-columns: 1fr;
    }

    .rules-assistant-sidebar,
    .rules-assistant-inline-result {
        position: static;
    }

    .rules-assistant-mascot,
    .rules-assistant-intro,
    .rules-assistant-loading-card,
    .rules-assistant-modal__hero {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .rules-assistant-intro__check {
        justify-content: center;
    }
}

.rules-filter-loading {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 18, 24, .34);
    backdrop-filter: blur(6px);
}

.rules-filter-loading__card {
    width: min(100%, 420px);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .12);
    background: rgba(248, 250, 252, .98);
    box-shadow: 0 22px 48px rgba(9, 18, 28, .18);
}

.rules-filter-loading__card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.rules-assistant-loading-card__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
}

.rules-assistant-loading-card__status span {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--primary);
    opacity: .3;
    animation: assistantLoadingPulse 1.2s ease-in-out infinite;
}

.rules-assistant-loading-card__status span:nth-child(2) {
    animation-delay: .18s;
}

.rules-assistant-loading-card__status span:nth-child(3) {
    animation-delay: .36s;
}

@keyframes assistantLoadingPulse {
    0%, 80%, 100% {
        transform: scale(.7);
        opacity: .28;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.rules-form {
    display: grid;
    gap: 14px;
}

.rules-form-shell {
    display: none;
    gap: 14px;
    margin-top: 18px;
}

.rules-section-panel:target .rules-form-shell,
.rules-section-panel.is-editing .rules-form-shell {
    display: grid;
}

.rules-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
}

.rules-wide-field {
    grid-column: span 2;
}

.rules-full-field {
    grid-column: 1 / -1;
}

.rules-code-field textarea {
    min-height: 96px;
    font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.rules-inline-note {
    margin-top: -4px;
    font-size: 12px;
    line-height: 1.5;
}

.rules-inline-note strong {
    font-weight: 700;
}

.rules-multiselect {
    min-height: 132px;
    padding: 10px 12px;
    line-height: 1.45;
}

.rules-multiselect--tall {
    min-height: 220px;
}

.rules-multiselect option {
    padding: 6px 8px;
}

[data-billing-context-field] select,
[data-billing-context-field] input[type="text"] {
    width: 100%;
}

[data-billing-context-field] input[type="text"] {
    margin-top: 8px;
}

.field-label-with-help {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.field-help {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 1px solid rgba(60, 84, 102, .2);
    border-radius: 999px;
    background: #fff;
    color: #607282;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    cursor: help;
    flex: 0 0 18px;
}

.field-help::before,
.field-help::after {
    position: absolute;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 20;
}

.field-help::before {
    content: "";
    top: calc(100% + 4px);
    left: 50%;
    transform: translate(-50%, -4px);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(30, 44, 56, .95);
}

.field-help::after {
    content: attr(data-tooltip);
    top: calc(100% + 10px);
    left: 0;
    width: min(300px, 70vw);
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(30, 44, 56, .95);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
    box-shadow: 0 14px 34px rgba(22, 29, 37, .22);
    transform: translateY(-4px);
}

.field-help:hover::before,
.field-help:hover::after,
.field-help:focus-visible::before,
.field-help:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.field-help:focus-visible {
    outline: 2px solid rgba(22, 115, 107, .22);
    outline-offset: 2px;
}

.field-help:hover::before,
.field-help:focus-visible::before {
    transform: translate(-50%, 0);
}

.rules-period-field {
    gap: 7px;
}

.rules-validity-field {
    display: grid;
    gap: 8px;
    align-content: start;
}

.rules-validity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.rules-validity-part {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.rules-validity-end {
    display: grid;
    gap: 7px;
    align-content: start;
}

.rules-validity-end > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.rules-validity-end > span small {
    display: inline;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
}

.rules-validity-toggle {
    width: fit-content;
    min-height: 42px;
    padding-inline: 14px;
}

.rules-validity-toggle.is-hidden {
    display: none;
}

.rules-validity-end-fields {
    display: none;
    gap: 8px;
}

.rules-validity-end-fields.is-visible {
    display: grid;
}

.rules-validity-clear {
    width: fit-content;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.rules-validity-clear:hover,
.rules-validity-clear:focus-visible {
    text-decoration: underline;
}

.rules-validity-hint {
    line-height: 1.4;
    grid-column: 1 / -1;
    margin-top: -2px;
}

.rules-period-inputs {
    display: grid;
    grid-template-columns: minmax(140px, 1fr) minmax(110px, 132px);
    gap: 10px;
}

.classification-repassable-state {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(57, 76, 90, .12);
    background: #f7fafc;
}

.classification-repassable-state.is-repassable {
    border-color: rgba(22, 115, 107, .18);
    background: #eef7f5;
}

.classification-repassable-state.is-non-repassable {
    border-color: rgba(185, 84, 84, .18);
    background: #fff4f4;
}

.classification-repassable-state strong {
    margin: 0;
    font-size: 14px;
    color: var(--text);
}

.classification-repassable-state__lead {
    margin: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}

.classification-repassable-state small {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.classification-repassable-state__examples {
    display: grid;
    gap: 4px;
    padding-top: 2px;
    font-size: 12px;
    color: var(--muted);
}

.classification-repassable-state__examples strong {
    font-size: 12px;
    color: var(--text);
}

.classification-repassable-state__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e8eef3;
    color: #4f6474;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.classification-repassable-state.is-repassable .classification-repassable-state__badge {
    background: #dff3ef;
    color: #1f6b63;
}

.classification-repassable-state.is-non-repassable .classification-repassable-state__badge {
    background: #fde3e3;
    color: #a24646;
}

.rules-reference-panel .report-filter-grid {
    grid-template-columns: minmax(170px, 220px) auto;
}

.rules-section-list {
    display: grid;
    gap: 14px;
}

.rules-form-shell + .rules-section-list {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.rules-money-treatment-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.rules-money-treatment-panel + .rules-section-list {
    margin-top: 16px;
}

.rules-engine-panel {
    display: grid;
    gap: 16px;
}

.rules-engine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.rules-engine-metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.rules-engine-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 12px;
    background: #fbfcfd;
}

.rules-engine-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rules-engine-card__header small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    text-align: right;
}

.rules-engine-card strong {
    font-size: 14px;
    line-height: 1.45;
}

.rules-engine-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.rules-engine-metric-card {
    display: grid;
    gap: 6px;
    padding: 16px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 12px;
    background: #fff;
}

.rules-engine-metric-card small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.45;
}

.rules-engine-metric-card strong {
    font-size: 24px;
    line-height: 1.1;
}

.rules-engine-metric-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.rules-engine-weights-table th,
.rules-engine-weights-table td {
    vertical-align: top;
}

.rules-engine-weights-table td strong {
    display: block;
    line-height: 1.45;
}

.rules-money-treatment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 6px;
}

.rules-money-treatment-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 12px;
    background: #f8fbfd;
}

.rules-money-treatment-card strong {
    font-size: 14px;
    line-height: 1.4;
}

.rules-money-treatment-card small {
    color: var(--muted);
    line-height: 1.5;
}

.rules-money-treatment-card__badge {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: #e8eef3;
    color: #4f6474;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.rules-section-panel:target .rules-form-shell + .rules-section-list,
.rules-section-panel.is-editing .rules-form-shell + .rules-section-list {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.rules-section-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.rules-section-list-header h3 {
    margin: 0 0 4px;
    font-size: 15px;
}

.rules-money-treatment-cell {
    min-width: 0;
}

.rules-money-treatment-cell__title {
    display: block;
    margin-bottom: 4px;
    line-height: 1.4;
}

.rules-money-treatment-cell__title--info {
    color: #1f6b63;
}

.rules-money-treatment-cell__title--success {
    color: #176b5a;
}

.rules-money-treatment-cell__title--warning {
    color: #986a19;
}

.rules-money-treatment-cell__title--neutral {
    color: #455868;
}

.rules-money-treatment-cell small {
    display: block;
    color: var(--muted);
    line-height: 1.45;
}

.rules-rule-list {
    display: grid;
    gap: 12px;
}

.rules-rule-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid rgba(60, 84, 102, .12);
    border-radius: 10px;
    background: #f8fbfd;
}

.rules-rule-toolbar label {
    display: grid;
    gap: 6px;
    margin: 0;
    color: #5b6d7d;
    font-size: 11px;
    font-weight: 700;
}

.rules-rule-toolbar input,
.rules-rule-toolbar select {
    min-height: 38px;
    font-size: 13px;
}

.rules-rule-list-empty {
    margin: 0;
}

.rules-rule-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: background-color .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.rules-rule-card:hover {
    border-color: rgba(24, 118, 108, .35);
    box-shadow: inset 3px 0 0 var(--brand);
}

.rules-rule-card.is-hidden-by-filter {
    display: none;
}

.rules-rule-card.is-superseded {
    border-color: rgba(132, 146, 160, .35);
    background: #fbfcfd;
}

.rules-rule-card__grid {
    display: grid;
    grid-template-columns: minmax(180px, 1.1fr) minmax(240px, 1.55fr) minmax(110px, .55fr) minmax(240px, 1.2fr) minmax(150px, .75fr) auto;
    gap: 0;
    align-items: stretch;
}

.rules-rule-card__grid > * {
    min-width: 0;
    padding: 14px 16px;
    border-right: 1px solid rgba(86, 104, 122, .12);
}

.rules-rule-card__grid > *:last-child {
    border-right: 0;
}

.rules-rule-card__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: #6d7f90;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.35;
}

.rules-rule-card__context strong,
.rules-rule-card__scope strong,
.rules-rule-card__metric strong,
.rules-rule-card__money strong {
    display: block;
    font-size: 13px;
    line-height: 1.45;
}

.rules-rule-card__context small,
.rules-rule-card__scope small,
.rules-rule-card__money small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.rules-rule-card__scope strong,
.rules-rule-card__money small {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.rules-rule-card__metric strong {
    font-size: 14px;
}

.rules-rule-card__money .rules-money-treatment-cell__title {
    margin-bottom: 4px;
    font-size: 13px;
    line-height: 1.45;
}

.rules-status-note {
    display: block;
    margin-top: 6px;
}

.rules-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .03em;
}

.rules-status-badge--muted {
    background: #eef2f6;
    color: #5d6f7f;
}

.report-table tr.is-superseded td {
    background: #fbfcfd;
}

.rules-rule-card__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 116px;
    background: #fbfcfd;
}

.rules-rule-card__actions > * {
    display: inline-flex !important;
    width: auto;
    margin: 0 !important;
}

.rules-rule-card__actions .row-button {
    width: 88px;
    justify-content: center;
}

.rules-rule-card__actions .secondary-button,
.rules-rule-card__actions .danger-button {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 600;
}

.rules-compact-table {
    table-layout: fixed;
}

.rules-compact-table th,
.rules-compact-table td {
    font-size: 11px;
    vertical-align: top;
}

.rules-compact-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.45;
}

.rules-compact-table th {
    white-space: normal;
    line-height: 1.35;
}

.rules-sortable-table tbody tr {
    transition: background-color .12s ease, box-shadow .12s ease;
}

.rules-sortable-table tbody tr:hover td,
.rules-profile-table tbody tr:hover td,
.rules-compact-table tbody tr:hover td {
    background: #f3faf8;
}

.rules-sortable-table tbody tr:hover {
    box-shadow: inset 3px 0 0 var(--brand);
}

.rules-sort-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    min-height: 24px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    cursor: pointer;
}

.rules-sort-button:hover,
.rules-sort-button:focus-visible {
    color: var(--brand);
}

.rules-sort-button:focus-visible {
    outline: 2px solid rgba(24, 118, 108, .28);
    outline-offset: 2px;
}

.rules-sort-button__label {
    min-width: 0;
}

.rules-sort-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border-radius: 999px;
    color: rgba(53, 70, 85, .55);
    font-size: 12px;
    line-height: 1;
}

.rules-sort-button__icon::before {
    content: "↕";
}

.rules-sortable-table th[data-sort-direction] .rules-sort-button__icon {
    background: rgba(24, 118, 108, .1);
    color: var(--brand);
}

.rules-sortable-table th[data-sort-direction="asc"] .rules-sort-button__icon::before {
    content: "↑";
}

.rules-sortable-table th[data-sort-direction="desc"] .rules-sort-button__icon::before {
    content: "↓";
}

.rules-admin-fee-table {
    min-width: 1180px;
}

.rules-context-cell strong,
.rules-context-cell small,
.rules-money-treatment-cell strong,
.rules-money-treatment-cell small {
    display: block;
}

.rules-context-cell strong {
    margin-bottom: 4px;
    font-size: 12px;
    line-height: 1.4;
}

.rules-context-cell small {
    color: var(--muted);
    line-height: 1.4;
}

.rules-scope-cell {
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.rules-compact-table td.row-action-buttons.rules-actions-cell {
    text-align: right;
    white-space: nowrap;
    width: 184px;
    min-width: 184px;
    padding-right: 10px;
    vertical-align: middle;
}

.rules-compact-table td.row-action-buttons.rules-actions-cell > * {
    display: inline-flex;
    vertical-align: middle;
}

.rules-compact-table th:last-child {
    width: 184px;
    min-width: 184px;
}

.rules-compact-table td.row-action-buttons.rules-actions-cell > * + * {
    margin-left: 6px;
    margin-top: 0;
}

.rules-compact-table td.row-action-buttons.rules-actions-cell .row-button,
.rules-compact-table td.row-action-buttons.rules-actions-cell .danger-button {
    min-height: 26px;
    min-width: 72px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 400;
}

.rules-support-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 18px;
}

.rule-id {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 7px;
    border: 1px solid rgba(24, 118, 108, .18);
    border-radius: 6px;
    background: #eef7f5;
    color: #1f6b63;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding-top: 0;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    flex: 0 0 auto;
    accent-color: var(--brand);
}

.checkbox-field span {
    line-height: 1.4;
}

.compact-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
}

.report-total-card {
    border-color: rgba(22, 115, 107, .28);
}

.report-table th,
.report-table td {
    font-size: 12px;
}

.report-table .number {
    text-align: right;
}

.report-table th.number {
    text-align: right;
}

.report-table--compact th,
.report-table--compact td {
    font-size: 11px;
}

.diagnostic-inline-details {
    margin-top: 8px;
}

.diagnostic-inline-details summary {
    color: var(--brand);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.diagnostic-inline-details .table-wrap {
    margin-top: 8px;
}

.report-table .subtotal-row td {
    border-top: 2px solid rgba(24, 118, 108, .18);
    background: #eef6f3;
    font-weight: 700;
}

.report-summary-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.report-summary-search {
    display: flex;
    align-items: center;
    width: min(380px, 100%);
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(57, 76, 90, .16);
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 8px 18px rgba(28, 38, 47, .05);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.report-summary-search:focus-within {
    border-color: rgba(22, 115, 107, .42);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(22, 115, 107, .12), 0 12px 24px rgba(28, 38, 47, .08);
}

.report-summary-search-icon {
    position: relative;
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    margin-right: 10px;
    border: 2px solid #7a8b97;
    border-radius: 50%;
}

.report-summary-search-icon::after {
    content: '';
    position: absolute;
    right: -5px;
    bottom: -2px;
    width: 7px;
    height: 2px;
    border-radius: 999px;
    background: #7a8b97;
    transform: rotate(45deg);
}

.report-summary-search input {
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
    outline: none;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.report-summary-search input::placeholder {
    color: #7a8b97;
}

.report-summary-search input::-webkit-search-decoration,
.report-summary-search input::-webkit-search-cancel-button,
.report-summary-search input::-webkit-search-results-button,
.report-summary-search input::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

.report-summary-table thead th {
    background: #d4e0e8;
    color: #394c5a;
    border-bottom: 1px solid rgba(56, 80, 98, .16);
    text-align: center;
}

.report-summary-table thead th.number,
.report-summary-table tbody td.number,
.report-summary-table tfoot td.number {
    text-align: right;
}

.report-summary-table thead th.center,
.report-summary-table tbody td.center,
.report-summary-table tfoot td.center {
    text-align: center;
}

.report-summary-table tbody td {
    vertical-align: middle;
}

.report-diagnostic-row.is-clickable {
    cursor: pointer;
}

.report-diagnostic-row.is-clickable:hover td {
    background: #f2f7fb;
}

.report-diagnostic-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.report-diagnostic-button small {
    flex: 0 0 auto;
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
}

.report-summary-row {
    cursor: pointer;
    transition: background-color .18s ease;
}

.report-summary-row:hover td,
.report-summary-row:focus td {
    background: #f2f7fb;
}

.report-summary-row:focus {
    outline: none;
}

.report-summary-link {
    color: inherit;
    text-decoration: none;
}

.report-summary-link:hover {
    text-decoration: underline;
}

.report-summary-empty-row td {
    text-align: center;
    color: var(--muted);
    background: #fafcfd;
}

.professionals-toolbar {
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-start;
}

.segmented-control.professionals-type-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(100%, 300px);
}

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

.professionals-table {
    table-layout: fixed;
}

.professionals-table thead th {
    background: #d4e0e8;
    color: #394c5a;
    border-bottom: 1px solid rgba(56, 80, 98, .16);
    text-align: left;
}

.professionals-table tbody td {
    vertical-align: middle;
}

.professionals-table td {
    white-space: normal;
}

.professionals-name-cell {
    min-width: 0;
}

.professionals-name-cell small {
    display: block;
    margin-top: 2px;
}

.professional-alias-summary {
    background: #edf8f5;
    border: 1px solid #cfe5df;
    border-radius: 999px;
    color: #0f6f63;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    margin-top: 6px;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.professional-alias-summary.is-related {
    background: #f3f6fa;
    border-color: #d9e2ea;
    color: #46586a;
}

.professional-alias-link {
    color: var(--primary);
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    text-decoration: none;
}

.professional-alias-link:hover {
    text-decoration: underline;
}

.professionals-table th:nth-child(6),
.professionals-table td:nth-child(6),
.professionals-table th:nth-child(7),
.professionals-table td:nth-child(7) {
    text-align: center;
}

.professionals-amhp-cell small {
    display: block;
    margin-top: 2px;
}

.professionals-table td:last-child {
    white-space: normal;
}

.professionals-table .row-action-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: center;
    gap: 6px;
    text-align: center;
    white-space: normal;
}

.professionals-table td.row-action-buttons > * {
    margin-left: 0;
}

.professionals-table .row-button,
.professionals-table .danger-button,
.professionals-table .secondary-button {
    justify-content: center;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
    width: 100%;
}

.professionals-table .inline-form {
    display: contents;
}

.professional-alias-box {
    border-top: 1px solid var(--border);
    margin-top: 18px;
    padding-top: 18px;
}

.professional-alias-box__header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.professional-alias-box h3 {
    font-size: 16px;
    margin: 0 0 4px;
}

.professional-alias-suggestions {
    background: #f7fbfa;
    border: 1px solid #cfe5df;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 12px;
}

.professional-alias-suggestions > strong {
    display: block;
    font-size: 12px;
    letter-spacing: .02em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

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

.professional-alias-suggestion {
    align-items: center;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    gap: 10px;
    min-width: 0;
    padding: 10px;
}

.professional-alias-suggestion.is-selected {
    border-color: #48a99a;
    box-shadow: 0 0 0 2px rgba(72, 169, 154, .12);
}

.professional-alias-suggestion input[type="checkbox"] {
    accent-color: var(--primary);
    flex: 0 0 18px;
    height: 18px;
    margin: 0;
    min-height: 18px;
    width: 18px;
}

.professional-alias-suggestion span {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.professional-alias-suggestion small {
    color: var(--muted);
    line-height: 1.35;
}

@media (max-width: 900px) {
    .professional-alias-suggestion-grid {
        grid-template-columns: 1fr;
    }
}

.access-form-panel {
    margin-bottom: 18px;
}

.access-user-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-user-form-grid .is-hidden {
    display: none !important;
}

.access-role-form-grid {
    grid-template-columns: minmax(280px, .6fr) minmax(420px, 1.4fr);
}

.access-tabs {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    min-width: min(100%, 420px);
    margin-bottom: 18px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #edf3f7;
}

.access-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 8px;
    color: #5b6875;
    font-size: 13px;
    font-weight: 600;
}

.access-tabs a.active {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 1px 4px rgba(28, 38, 47, .08);
}

.access-default-permissions-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #f7fafc;
}

.access-invitation-panel {
    display: grid;
    gap: 12px;
    margin-top: 4px;
    padding: 14px;
    border: 1px solid rgba(24, 118, 108, .16);
    border-radius: 10px;
    background: #eef6f3;
}

.access-invitation-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
}

.access-invitation-actions input,
.access-inline-link input {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.access-permissions-panel {
    display: grid;
    gap: 14px;
}

.access-permission-groups {
    display: grid;
    gap: 14px;
}

.access-permission-group {
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #fbfcfd;
    overflow: hidden;
}

.access-permission-group > header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(56, 80, 98, .10);
    background: #d4e0e8;
    color: #394c5a;
}

.access-permissions-table {
    table-layout: fixed;
}

.access-permissions-table thead th {
    background: #edf3f7;
}

.access-permission-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

.access-permission-options {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.access-permission-option {
    position: relative;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(56, 80, 98, .10);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.access-permission-option:hover {
    border-color: rgba(22, 115, 107, .24);
    background: #f7fbfa;
}

.access-permission-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.access-permission-check {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1.5px solid #9aabb7;
    border-radius: 6px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.access-permission-check::after {
    content: '';
    width: 9px;
    height: 5px;
    margin-top: -1px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    opacity: 0;
    transform: rotate(-45deg) scale(.8);
    transition: opacity .16s ease, transform .16s ease;
}

.access-permission-option input:checked + .access-permission-check {
    border-color: var(--brand);
    background: var(--brand);
    box-shadow: 0 0 0 3px rgba(22, 115, 107, .12);
}

.access-permission-option input:checked + .access-permission-check::after {
    opacity: 1;
    transform: rotate(-45deg) scale(1);
}

.access-permission-option input:focus-visible + .access-permission-check {
    box-shadow: 0 0 0 3px rgba(22, 115, 107, .20);
}

.access-permission-option:has(input:checked) {
    border-color: rgba(22, 115, 107, .28);
    background: #f2faf7;
}

.access-permission-option strong,
.access-permission-option small {
    display: block;
}

.access-permission-option strong {
    font-size: 13px;
    font-weight: 600;
}

.access-permission-option small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.access-permission-option.is-hidden,
.js-access-additional-group.is-hidden {
    display: none !important;
}

.access-users-table {
    table-layout: fixed;
}

.access-users-table thead th,
.access-roles-table thead th {
    background: #d4e0e8;
    color: #394c5a;
    border-bottom: 1px solid rgba(56, 80, 98, .16);
}

.access-users-name-cell,
.access-invite-cell {
    white-space: normal;
}

.access-inline-link {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.access-inline-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.access-setup-user {
    margin-bottom: 16px;
}

.access-setup-user strong,
.access-setup-user small {
    display: block;
}

.repasse-sheet-panel {
    padding: 0;
    overflow: hidden;
    background: #e8eef3;
}

.repasse-sheet-panel .table-wrap {
    overflow-x: hidden;
}

.repasse-sheet-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.repasse-sheet-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
}

.repasse-sheet-header-actions {
    display: flex;
    justify-content: flex-end;
}

.repasse-sheet-title-group {
    min-width: 0;
}

.repasse-sheet-title,
.repasse-sheet-professional,
.repasse-sheet-subtitle {
    text-transform: uppercase;
    text-align: center;
}

.repasse-sheet-title {
    font-size: 15px;
    font-weight: 600;
}

.repasse-sheet-professional {
    margin-top: 4px;
    font-size: 17px;
    font-weight: 600;
}

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

.repasse-sheet-caption {
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    text-transform: none;
}

.repasse-sheet-pdf-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border-color: rgba(10, 100, 91, .2);
    background: #15756d;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 18px rgba(21, 117, 109, .16);
}

.repasse-sheet-pdf-button:hover {
    background: #126860;
}

@media (max-width: 720px) {
    .repasse-sheet-header-top {
        grid-template-columns: 1fr;
    }

    .repasse-sheet-header-spacer {
        display: none;
    }

    .repasse-sheet-header-actions {
        justify-content: center;
    }
}

.repasse-sheet-block,
.repasse-sheet-closing {
    margin: 18px;
    padding: 18px;
    border: 1px solid rgba(50, 72, 88, .10);
    border-radius: 12px;
    background: #f2f6f9;
    box-shadow: 0 10px 24px rgba(20, 42, 58, .04);
}

.repasse-sheet-band {
    margin: 0 0 16px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #314352;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    text-transform: none;
}

.repasse-sheet-band--accent {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(160, 133, 22, .24);
    border-radius: 999px;
    background: #fff4c2;
    color: #5b4b15;
    font-size: 14px;
}

.repasse-sheet-table {
    border: 1px solid rgba(13, 28, 40, .10);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(20, 42, 58, .05);
}

.repasse-sheet-table table {
    border-collapse: collapse;
    table-layout: fixed;
    width: 100%;
}

.repasse-sheet-table th,
.repasse-sheet-table td {
    padding: 10px 11px;
    border: 1px solid rgba(13, 28, 40, .12);
    vertical-align: top;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.35;
}

.repasse-sheet-table tbody td {
    background: #fff;
}

.repasse-sheet-table tbody tr:nth-child(even):not(.repasse-subsection-head):not(.repasse-subsection-subhead) td {
    background: #fbfcfd;
}

.repasse-sheet-table .number {
    text-align: right;
    white-space: nowrap;
}

.repasse-sheet-table th.number {
    text-align: right;
}

.repasse-sheet-table tfoot .subtotal-row td {
    background: #eef6f3;
    border-top: 2px solid rgba(24, 118, 108, .18);
    font-size: 12px;
}

.repasse-sheet-table tfoot .subtotal-row td:first-child {
    color: #244f4a;
}

.repasse-sheet-table tfoot .subtotal-row--warning td {
    background: #fff5ed;
    border-top-color: rgba(184, 96, 40, .20);
    color: #8b4d1f;
}

.repasse-sheet-table tfoot .subtotal-row--accent td {
    background: #eef6f3;
    border-top-color: rgba(24, 118, 108, .20);
    color: #0f5c53;
}

.repasse-sheet-table tfoot .subtotal-row .report-total {
    color: #0f5c53;
    font-size: 13px;
}

.fono-report-panel {
    background: #e8eef3;
}

.fono-related-strip {
    display: grid;
    gap: 10px;
    margin: 0 18px 18px;
    padding: 14px 18px;
    border: 1px solid rgba(31, 61, 82, .10);
    border-radius: 12px;
    background: #f8fbfd;
}

.fono-related-strip > span {
    color: var(--muted);
    font-size: 12px;
}

.fono-related-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fono-related-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border: 1px solid rgba(31, 61, 82, .10);
    border-radius: 999px;
    background: #fff;
    font-size: 12px;
    color: #2a4254;
}

.fono-section-note {
    display: block;
    margin: -6px 0 16px;
}

.fono-unit-block + .fono-unit-block {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(31, 61, 82, .10);
}

.fono-unit-card {
    margin-top: 16px;
    border: 1px solid rgba(31, 61, 82, .12);
    border-radius: 10px;
    background: #fbfdff;
    overflow: hidden;
}

.fono-unit-card:first-of-type {
    margin-top: 0;
}

.fono-unit-card[open] {
    background: #fff;
    box-shadow: 0 10px 22px rgba(20, 42, 58, .05);
}

.fono-unit-card__summary {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(0, 1.4fr) auto;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.fono-unit-card__summary::-webkit-details-marker {
    display: none;
}

.fono-unit-card__summary::marker {
    display: none;
}

.fono-unit-card__heading {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.fono-unit-card__heading .repasse-sheet-band--accent {
    max-width: 100%;
}

.fono-unit-card__totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 12px;
    min-width: 0;
}

.fono-unit-card__total {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid rgba(31, 61, 82, .10);
    border-radius: 8px;
    background: #f4f8fb;
}

.fono-unit-card__total span {
    color: var(--muted);
    font-size: 11px;
}

.fono-unit-card__total strong {
    font-size: 15px;
    color: #233441;
}

.fono-unit-card__total--payable {
    background: #eef9f5;
    border-color: rgba(15, 92, 83, .16);
}

.fono-unit-card__total--payable strong {
    color: #0f5c53;
}

.repasse-sheet-total-card--grand {
    border: 1px solid rgba(15, 92, 83, .18);
    background: linear-gradient(180deg, #eef9f5 0%, #e3f5ee 100%);
    box-shadow: 0 12px 24px rgba(15, 92, 83, .08);
}

.repasse-sheet-total-card--grand span {
    color: #0f5c53;
    font-weight: 600;
}

.repasse-sheet-total-card--grand strong {
    color: #0b4a43;
    font-size: 24px;
}

.repasse-sheet-total-card--grand small {
    color: #2f5b55;
}

.fono-unit-card__chevron {
    width: 12px;
    height: 12px;
    border-right: 2px solid #4a6172;
    border-bottom: 2px solid #4a6172;
    transform: rotate(45deg);
    transition: transform .18s ease;
    margin-right: 6px;
}

.fono-unit-card[open] .fono-unit-card__chevron {
    transform: rotate(225deg);
}

.fono-unit-card__body {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
    border-top: 1px solid rgba(31, 61, 82, .10);
}

.fono-unit-section {
    padding: 14px;
    border: 1px solid rgba(31, 61, 82, .10);
    border-radius: 10px;
    background: #f8fbfd;
}

.fono-unit-section--support {
    background: #f6faf4;
}

.fono-unit-section__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.fono-unit-section__header h3 {
    margin: 2px 0 0;
    font-size: 16px;
    font-weight: 600;
    color: #263845;
}

.fono-unit-section__eyebrow {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fono-unit-section__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.fono-unit-section__meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(31, 61, 82, .10);
    border-radius: 999px;
    background: #fff;
    color: #415260;
    font-size: 11px;
    white-space: nowrap;
}

.fono-unit-header {
    align-items: start;
}

.fono-unit-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.fono-sheet-table + .fono-sheet-table {
    margin-top: 14px;
}

.fono-table-title {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(13, 28, 40, .10);
    background: #d6e1e9;
    color: #334756;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.fono-sheet-table table {
    table-layout: fixed;
}

.fono-sheet-table thead th {
    text-align: center;
}

.fono-procedure-cell small {
    display: block;
    font-size: 11px;
    line-height: 1.45;
    color: #415260;
}

.fono-stack-cell {
    line-height: 1.35;
}

.fono-stack-title {
    color: #22313d;
    font-size: 13px;
}

.fono-stack-cell small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    text-transform: none;
}

.repasse-sheet-table thead tr:nth-child(2) th {
    background: #d8e4ec;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
}

.repasse-sheet-table thead th {
    background: #c7d6e0;
    color: #405261;
    border-color: rgba(60, 84, 102, .18);
    box-shadow: inset 0 -1px 0 rgba(60, 84, 102, .12);
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
}

.repasse-sheet-table--highlight thead th {
    background: #e6f4ef;
    color: #0f5c53;
}

.repasse-surgery-row--highlight td {
    background: #fbfefd;
}

.repasse-subsection-head td,
.repasse-subsection-subhead td {
    padding-top: 11px;
    padding-bottom: 11px;
    font-size: 11px;
    text-align: center;
    vertical-align: middle;
    text-transform: uppercase;
}

.repasse-sheet-table .repasse-subsection-head td {
    background: #c7d6e0 !important;
    border-top: 2px solid rgba(60, 84, 102, .18);
    color: #405261;
    font-weight: 700;
}

.repasse-sheet-table .repasse-subsection-subhead td {
    background: #d8e4ec !important;
    color: var(--muted);
    font-weight: 600;
}

.repasse-inline-note {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
}

.repasse-payer-note {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
}

.repasse-row-excluded td {
    background: #fbfcfd;
}

.repasse-row-excluded .repasse-payer-note:last-child {
    color: #7d5a06;
}

.repasse-anomaly-block {
    border: 1px solid rgba(194, 164, 68, .24);
    background: #fffdf6;
}

.repasse-unassigned-surgery-hint {
    margin: -4px 0 14px;
}

.repasse-anomaly-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: baseline;
    margin: 12px 0 16px;
}

.repasse-anomaly-summary strong {
    font-size: 15px;
}

.repasse-anomaly-table small {
    display: block;
    margin-top: 4px;
}

.repasse-minimum-review {
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid rgba(194, 164, 68, .28);
    border-radius: 12px;
    background: #fff9ec;
}

.repasse-minimum-review--approved {
    border-color: rgba(22, 123, 88, .2);
    background: #eef8f3;
}

.repasse-minimum-review--rejected {
    border-color: rgba(95, 114, 129, .22);
    background: #f6f8fa;
}

.repasse-minimum-review strong,
.repasse-minimum-review small {
    display: block;
}

.repasse-minimum-review small {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
    color: #5a6c79;
    text-transform: none;
}

.js-repasse-refresh-root[aria-busy="true"] {
    opacity: .94;
    transition: opacity 120ms ease;
}

.repasse-minimum-review-lock {
    margin-top: 10px !important;
    color: #8a6116 !important;
    font-weight: 600;
}

.repasse-minimum-review-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin-top: 12px;
}

.repasse-minimum-review-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.repasse-minimum-review-form label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.repasse-minimum-review-form label span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #5a6c79;
}

.repasse-minimum-review-form input[type="text"] {
    min-width: 118px;
    max-width: 140px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.2;
    text-align: right;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
}

.repasse-minimum-review-form input[type="text"]:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
    outline-offset: 0;
}

.repasse-minimum-review-form--primary {
    display: grid;
    grid-template-columns: minmax(130px, 150px) auto;
    align-items: end;
    width: 100%;
}

.repasse-minimum-review-submit,
.repasse-minimum-review-dismiss {
    min-width: 170px;
}

.repasse-minimum-review-form--inline {
    align-items: end;
    justify-content: flex-start;
}

@media (max-width: 840px) {
    .repasse-minimum-review-actions {
        grid-template-columns: 1fr;
    }

    .repasse-minimum-review-form--primary {
        grid-template-columns: 1fr;
    }
}

.repasse-procedure-note {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    line-height: 1.45;
    text-transform: none;
}

.repasse-primary-line {
    display: block;
    line-height: 1.45;
}

.repasse-sheet-block .empty {
    margin: 0;
    padding: 16px 18px;
    border: 1px dashed rgba(60, 84, 102, .18);
    border-radius: 10px;
    background: #fbfcfd;
}

.report-detail-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #1f5f8b;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.report-detail-button:hover {
    color: #174766;
    text-decoration: underline;
}

.repasse-col-ambulatory-payer {
    width: 27%;
}

.repasse-col-ambulatory-money {
    width: calc(73% / 7);
}

.repasse-col-surgery-stack {
    width: 58%;
}

.repasse-col-surgery-money {
    width: 14%;
}

.repasse-col-adjustment-description {
    width: 42%;
}

.repasse-col-adjustment-installment {
    width: 12%;
}

.repasse-col-adjustment-value {
    width: calc(46% / 3);
}

.repasse-adjustment-separator {
    display: inline-block;
    margin: 0 6px;
    color: var(--muted);
}

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

.repasse-closing-grid--fonos {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.repasse-closing-grid div {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.repasse-closing-grid span {
    color: var(--muted);
    font-size: 12px;
}

.repasse-closing-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
    font-weight: 600;
}

.repasse-closing-grid small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.repasse-closing-total {
    background: #fff9c6;
    border-color: rgba(160, 133, 22, .26);
}

.repasse-closing-subtotal {
    background: #eef6f3;
    border-color: rgba(24, 118, 108, .16);
}

.repasse-sheet-closing--top {
    margin-top: 18px;
}

.confirm-modal.repasse-detail-modal {
    width: min(calc(100vw - 32px), 1320px);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.confirm-modal.repasse-rules-modal {
    width: min(calc(100vw - 32px), 1360px);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.repasse-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.repasse-detail-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.repasse-detail-body {
    min-height: 180px;
    overflow: auto;
}

.rule-diagnostic-modal {
    width: min(calc(100vw - 32px), 1440px);
}

.rule-diagnostic-intro {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.rule-diagnostic-note {
    width: 100%;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.rule-diagnostic-table th,
.rule-diagnostic-table td {
    font-size: 12px;
    white-space: normal;
    vertical-align: top;
}

.rule-diagnostic-table th:nth-child(9),
.rule-diagnostic-table td:nth-child(9) {
    min-width: 260px;
}

.repasse-rules-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.repasse-rules-body {
    display: grid;
    gap: 16px;
    min-height: 220px;
    overflow: auto;
    padding-right: 4px;
}

.repasse-rules-section {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(57, 76, 90, .12);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    box-shadow: 0 10px 24px rgba(19, 31, 41, .05);
}

.repasse-rules-section-header h3 {
    margin: 0;
    font-size: 16px;
}

.repasse-rules-section-header .muted {
    display: block;
    margin-top: 4px;
}

.repasse-origin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.repasse-origin-card,
.repasse-info-card {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border: 1px solid rgba(57, 76, 90, .12);
    border-radius: 16px;
    background: #fff;
}

.repasse-origin-card strong,
.repasse-info-card h4 {
    margin: 0;
    font-size: 15px;
    color: var(--text);
}

.repasse-origin-card p,
.repasse-origin-card small,
.repasse-info-card p {
    margin: 0;
}

.repasse-origin-badge,
.repasse-chip {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(22, 115, 107, .16);
    background: #eef7f5;
    color: #1f6b63;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.repasse-chip--strong {
    background: #fff5cc;
    border-color: rgba(186, 150, 0, .18);
    color: #8b6b00;
}

.repasse-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

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

.repasse-info-card__topline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.repasse-info-card__subtitle {
    margin: -4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.repasse-row-mode-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.repasse-row-mode-actions form {
    margin: 0;
}

.repasse-row-mode-caption {
    display: block;
    margin-top: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #486167;
}

.repasse-row-mode-actions .secondary-button,
.repasse-row-mode-actions .ghost-button {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.repasse-row-mode-actions .secondary-button {
    border-color: rgba(22, 115, 107, .22);
    background: #eef7f5;
    color: #1f6b63;
}

.repasse-info-card--highlight {
    border-color: rgba(22, 115, 107, .18);
    background: linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}

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

.repasse-kv div {
    display: grid;
    gap: 4px;
}

.repasse-kv dt {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.repasse-kv dd {
    margin: 0;
    font-size: 13px;
    color: var(--text);
    word-break: break-word;
}

.repasse-kv__wide {
    grid-column: 1 / -1;
}

.repasse-kv--metrics dd {
    font-size: 15px;
    font-weight: 700;
}

.repasse-rules-subsection {
    display: grid;
    gap: 10px;
}

.repasse-rules-subsection h4 {
    margin: 0;
    font-size: 14px;
}

.repasse-rules-section .table-wrap {
    overflow: visible;
}

.repasse-rules-table {
    width: 100%;
    table-layout: fixed;
}

.repasse-rules-table th,
.repasse-rules-table td {
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
    font-size: 11px;
    line-height: 1.45;
}

.repasse-rules-table td strong {
    display: block;
}

.repasse-rules-table td small {
    display: block;
    margin-top: 4px;
}

.repasse-detail-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 14px;
}

.repasse-detail-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(420px, 100%);
    justify-self: start;
}

.repasse-detail-total {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(57, 76, 90, .14);
    border-radius: 10px;
    background: #fbfcfd;
}

.repasse-detail-total span {
    color: var(--muted);
    font-size: 12px;
}

.repasse-detail-total strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    font-weight: 600;
}

.repasse-detail-total--accent {
    background: #eef6f3;
    border-color: rgba(24, 118, 108, .16);
}

.repasse-detail-total--accent strong {
    color: #0f5c53;
}

.repasse-detail-controls {
    display: grid;
    grid-template-columns: minmax(340px, 1.4fr) repeat(2, minmax(220px, 1fr));
    gap: 12px;
    align-items: end;
}

.repasse-detail-filter {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.repasse-detail-filter span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.repasse-detail-filter select {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(57, 76, 90, .16);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.repasse-detail-filter select:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
}

.repasse-detail-search {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.repasse-detail-search span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.repasse-detail-search input {
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(57, 76, 90, .16);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
}

.repasse-detail-search input:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(22, 115, 107, .12);
}

.repasse-detail-table-wrap {
    max-height: 68vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.repasse-detail-table {
    table-layout: fixed;
    width: 100%;
}

.repasse-detail-table th,
.repasse-detail-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.repasse-detail-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fbfcfd;
}

.repasse-detail-col-date {
    width: 8%;
}

.repasse-detail-col-patient {
    width: 18%;
}

.repasse-detail-col-guide {
    width: 8%;
}

.repasse-detail-col-procedure {
    width: 25%;
}

.repasse-detail-col-rule {
    width: 23%;
}

.repasse-detail-col-percent {
    width: 8%;
}

.repasse-detail-col-value {
    width: 10%;
}

.repasse-detail-rule-cell {
    font-size: 12px;
    line-height: 1.45;
}

.repasse-detail-rule-line {
    display: block;
    color: #394c5a;
}

.repasse-detail-rule-line + .repasse-detail-rule-line {
    margin-top: 2px;
}

.repasse-detail-rule-line strong {
    color: #20313f;
    font-weight: 700;
}

.repasse-detail-rule-line.muted,
.repasse-detail-rule-line.muted strong {
    color: var(--muted);
}

.repasse-detail-percent-cell {
    white-space: nowrap;
}

.repasse-detail-percent-cell strong,
.repasse-detail-percent-cell span {
    display: block;
}

.repasse-detail-percent-cell span {
    margin-top: 2px;
    color: #607284;
    font-size: 11px;
    font-weight: 600;
}

.repasse-detail-group-row td {
    padding: 10px 12px;
    background: #eef3f7;
    border-top: 1px solid rgba(60, 84, 102, .16);
    border-bottom: 1px solid rgba(60, 84, 102, .12);
}

.repasse-detail-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.repasse-detail-group-label strong {
    font-size: 13px;
    font-weight: 600;
    color: #394c5a;
}

.repasse-detail-group-label span {
    color: var(--muted);
    font-size: 12px;
}

.repasse-detail-amount-cell {
    white-space: nowrap;
}

.amhp-grid {
    grid-template-columns: minmax(360px, .85fr) minmax(440px, 1.15fr);
}

.mini-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.mini-metric-grid--fonos {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.mini-metric {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfd;
}

.mini-metric span,
.amount-summary-grid span,
.field-hint {
    color: var(--muted);
    font-size: 12px;
}

.mini-metric strong {
    display: block;
    margin-top: 6px;
    font-size: 20px;
}

.mini-metric small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.mini-metric.warning strong {
    color: var(--warning);
}

.mini-metric--adjustments {
    background: #f7fbfd;
    border-color: #cfe0ea;
}

.mini-metric--adjustments strong {
    font-size: 22px;
}

.report-closure-strip {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin: 0 0 16px;
    padding: 10px 14px;
    border: 1px solid rgba(24, 118, 108, .16);
    border-radius: 8px;
    background: #eef6f3;
    color: #0f5c53;
}

.report-closure-strip span {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #4f6f6a;
}

.report-closure-strip strong {
    font-size: 14px;
}

.report-closure-strip small {
    color: #4f6f6a;
}

.report-closure-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eef6f3;
    color: #0f5c53;
    font-size: 12px;
    line-height: 1;
}

.report-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    line-height: 1;
}

.report-status-chip--closed {
    background: #eef6f3;
    color: #0f5c53;
}

.report-status-chip--open {
    background: #fff1eb;
    color: #b14b21;
}

.report-status-chip--warning {
    background: #fff7d6;
    color: #8b5a00;
}

.report-status-chip--critical {
    background: #fff1ee;
    color: #b42318;
}

.report-status-chip--info {
    background: #eef4ff;
    color: #1849a9;
}

.report-status-chip--resolved {
    background: #eef8f4;
    color: #116149;
}

.report-status-chip--reviewed {
    background: #f3f4f6;
    color: #344054;
}

.fono-status-panel,
.report-status-panel {
    position: relative;
}

.fono-status-panel.is-loading .report-table,
.report-status-panel.is-loading .report-table {
    opacity: .42;
    pointer-events: none;
}

.fono-status-loading,
.report-status-loading {
    position: absolute;
    top: 76px;
    left: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1px solid rgba(24, 118, 108, .18);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12);
    color: #263a4d;
    transform: translateX(-50%);
}

.fono-status-loading strong,
.report-status-loading strong {
    font-size: 13px;
}

.report-action-disabled {
    opacity: .68;
    cursor: not-allowed;
    pointer-events: none;
}

.review-tabs {
    margin-bottom: 18px;
}

.review-history-filter {
    margin-bottom: 18px;
}

.review-history-filter label {
    width: min(100%, 360px);
}

.review-request-list {
    display: grid;
    gap: 14px;
}

.review-request-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.review-request-card--editing {
    margin-bottom: 16px;
    background: #f8fbfc;
}

.review-request-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 18px;
    margin-bottom: 14px;
}

.review-request-header h3 {
    margin: 0 0 4px;
    font-size: 18px;
}

.review-request-header-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.review-request-line {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.review-request-line:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.review-request-line span {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.review-request-line p {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.55;
}

.review-request-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.repasse-sheet-header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.repasse-sheet-total-card {
    background: #eef6f3;
    border-color: rgba(24, 118, 108, .18);
}

.repasse-sheet-total-card strong {
    color: #0f5c53;
}

.repasse-sheet-total-card--grand {
    background: #fff9c6;
    border-color: rgba(160, 133, 22, .26);
}

.repasse-sheet-total-card--grand strong {
    color: #5b4b15;
}

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

.amount-summary-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.amount-summary-grid strong {
    display: block;
    margin-top: 5px;
    font-size: 16px;
}

.fono-unit-summary {
    margin-top: 14px;
}

@media (max-width: 980px) {
    .fono-unit-card__summary {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .fono-unit-card__totals {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .fono-unit-card__chevron {
        margin-left: 6px;
    }

    .fono-unit-section__header {
        flex-direction: column;
    }

    .fono-unit-section__meta {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .fono-unit-card__totals {
        grid-template-columns: 1fr;
    }

    .fono-unit-card__summary,
    .fono-unit-card__body {
        padding-left: 14px;
        padding-right: 14px;
    }
}

.field-hint {
    display: block;
    margin-top: 0;
}

.confirm-modal.amhp-lines-modal {
    width: min(calc(100vw - 32px), 1480px);
    max-height: 92vh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.amhp-lines-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.amhp-lines-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.amhp-lines-body {
    min-height: 180px;
    overflow: auto;
}

.amhp-lines-table-wrap {
    max-height: 68vh;
    overflow: auto;
}

.amhp-lines-table {
    min-width: 1320px;
}

.amhp-lines-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fbfcfd;
}

.report-total {
    color: #0f5c53;
    font-weight: 700;
}

.report-description-cell {
    min-width: 260px;
    max-width: 480px;
    white-space: normal;
}

.limit-field {
    width: min(100%, 170px);
}

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

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

.row-action-buttons {
    white-space: nowrap;
}

td.row-action-buttons {
    text-align: right;
}

td.row-action-buttons > * {
    display: inline-flex;
    vertical-align: middle;
}

td.row-action-buttons > * + * {
    margin-left: 6px;
}

div.row-action-buttons,
span.row-action-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    justify-content: flex-end;
}

.segmented-control {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    width: min(100%, 340px);
    min-height: 42px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-2);
}

.segmented-control label {
    display: grid;
}

.segmented-control input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-control span {
    display: grid;
    place-items: center;
    border-radius: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.segmented-control input:checked + span {
    background: #fff;
    color: var(--brand-dark);
    box-shadow: 0 1px 4px rgba(28, 38, 47, .08);
}

.segmented-control .adjustment-option-debit input:checked + span {
    background: #fff5f3;
    color: var(--danger);
}

.segmented-control .adjustment-option-credit input:checked + span {
    background: #eefaf5;
    color: #116149;
}

.adjustments-grid {
    grid-template-columns: minmax(360px, .8fr) minmax(520px, 1.2fr);
}

.professional-picker {
    display: grid;
    gap: 8px;
}

.professional-results {
    display: grid;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.professional-results[hidden] {
    display: none;
}

.professional-result {
    display: grid;
    gap: 3px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    cursor: pointer;
    padding: 10px 12px;
    text-align: left;
}

.professional-result:last-child {
    border-bottom: 0;
}

.professional-result:hover {
    background: #f6fbfa;
}

.professional-result strong {
    font-size: 14px;
}

.professional-result small,
.selected-professional {
    color: var(--muted);
    font-size: 12px;
}

.selected-professional {
    margin: 0;
}

.adjustments-table {
    max-height: 64vh;
}

.adjustments-table table {
    table-layout: auto;
}

.adjustments-list-panel {
    position: relative;
    min-height: 540px;
    padding-bottom: 92px;
    overflow: hidden;
}

.adjustments-sticky-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 15px 20px;
    border-top: 1px solid rgba(36, 92, 124, .16);
    border-radius: 0 0 6px 6px;
    background: linear-gradient(135deg, #edf5fb, #f7fbfd);
    white-space: nowrap;
}

.adjustments-sticky-title {
    color: #3d5363;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.adjustments-sticky-item {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    padding-left: 22px;
    border-left: 1px solid rgba(36, 92, 124, .14);
    font-size: 12px;
}

.adjustments-sticky-item > span {
    color: var(--muted);
}

.adjustments-sticky-item strong {
    font-size: 14px;
    font-weight: 400;
}

.adjustments-sticky-item-balance {
    margin-left: auto;
}

.adjustments-table th,
.adjustments-table td {
    padding: 8px 7px;
    font-size: 12px;
    font-weight: 400;
    white-space: nowrap;
}

.adjustments-table th {
    font-size: 11px;
    font-weight: 600;
}

.adjustments-table td:first-child {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amount-credit {
    color: #116149;
    font-weight: 400;
}

.amount-debit {
    color: var(--danger);
    font-weight: 400;
}

.row-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
}

.query-result {
    max-height: 62vh;
}

.result-cell {
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid rgba(180, 35, 24, .28);
    border-radius: 8px;
    background: #fff5f3;
    color: var(--danger);
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
    cursor: pointer;
}

.adjustments-table .danger-button {
    min-height: 28px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 400;
}

.danger-button:disabled {
    opacity: .72;
    cursor: wait;
}

.danger-button:hover {
    background: #ffe8e2;
}

body.modal-open {
    overflow: hidden;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(23, 32, 42, .42);
}

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

.confirm-modal {
    width: min(100%, 430px);
    overflow: hidden;
    border: 1px solid rgba(217, 224, 231, .96);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 26px 70px rgba(23, 32, 42, .22);
}

.confirm-modal-header,
.confirm-modal-body,
.confirm-modal-actions {
    padding: 18px 20px;
}

.confirm-modal-header {
    border-bottom: 1px solid var(--line);
}

.confirm-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.confirm-modal-body {
    color: var(--muted);
    line-height: 1.55;
}

.confirm-modal-message {
    margin: 0;
}

.confirm-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    background: #fbfcfd;
}

.confirm-modal .primary-button,
.confirm-modal .secondary-button,
.confirm-modal .danger-button {
    min-width: 96px;
    min-height: 38px;
    padding: 0 14px;
}

.sync-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    color: var(--muted);
    font-size: 14px;
}

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

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--line);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

.report-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 220;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(11, 18, 24, .44);
    backdrop-filter: blur(8px);
}

.report-loading-card {
    width: min(100%, 440px);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 24px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(248, 250, 252, .98);
    box-shadow: 0 24px 60px rgba(9, 18, 28, .22);
}

.report-loading-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
    flex: 0 0 auto;
}

.report-loading-copy {
    display: grid;
    gap: 4px;
}

.report-loading-copy strong {
    color: var(--text);
    font-size: 16px;
}

.report-loading-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.sync-lock-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    justify-items: center;
    align-items: start;
    overflow-y: auto;
    padding: 28px;
    background: rgba(11, 18, 24, .58);
    backdrop-filter: blur(10px);
}

.sync-lock-card {
    width: min(100%, 980px);
    display: grid;
    gap: 22px;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
    background: rgba(248, 250, 252, .98);
    box-shadow: 0 30px 80px rgba(9, 18, 28, .28);
}

.sync-lock-live,
.sync-lock-complete {
    display: grid;
    gap: 22px;
    min-height: 0;
}

.sync-lock-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sync-lock-status-cluster {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sync-lock-eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: #e9f5f1;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sync-lock-activity-spinner {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(22, 115, 107, .18);
    border-top-color: var(--brand);
    border-right-color: #2d8793;
    border-radius: 50%;
    animation: sync-lock-spin .9s linear infinite;
    flex: 0 0 auto;
}

.sync-lock-activity-spinner::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 2px solid transparent;
    border-left-color: rgba(45, 135, 147, .72);
    border-radius: 50%;
    animation: sync-lock-spin 1.25s linear infinite reverse;
}

.sync-lock-header {
    display: grid;
    gap: 8px;
}

.sync-lock-header h2 {
    margin: 0;
    font-size: 26px;
}

.sync-lock-header p,
.sync-lock-footer {
    margin: 0;
    color: #526372;
    line-height: 1.6;
}

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

.sync-lock-meta-item,
.sync-lock-metric,
.sync-stage {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
    border: 1px solid rgba(56, 80, 98, .12);
    border-radius: 10px;
    background: #fff;
}

.sync-lock-meta-item span,
.sync-lock-metric span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.sync-lock-meta-item strong {
    font-size: 15px;
    line-height: 1.4;
}

.sync-lock-progress-shell {
    display: grid;
    gap: 10px;
}

.sync-lock-progress-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.sync-lock-progress-header strong {
    font-size: 16px;
}

.sync-lock-progress-header span {
    color: var(--muted);
    font-size: 13px;
}

.sync-lock-progress-bar {
    width: 100%;
    height: 12px;
    border-radius: 999px;
    background: #dfe8ef;
    overflow: hidden;
}

.sync-lock-progress-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #16736b 0%, #2d8793 100%);
    transition: width .35s ease;
    position: relative;
    overflow: hidden;
}

.sync-lock-progress-bar span::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            110deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, .26) 35%,
            rgba(255, 255, 255, 0) 70%
        );
    transform: translateX(-100%);
    animation: sync-lock-sheen 1.4s ease-in-out infinite;
}

.sync-lock-stage-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.sync-stage strong {
    font-size: 14px;
}

.sync-stage span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.sync-stage.is-active {
    border-color: rgba(22, 115, 107, .28);
    background: #edf8f5;
}

.sync-stage.is-complete {
    border-color: rgba(22, 115, 107, .18);
    background: #f3fbf8;
}

.sync-stage.is-failed {
    border-color: rgba(180, 35, 24, .22);
    background: #fff4f1;
}

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

.sync-lock-complete-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .8fr));
    gap: 14px;
}

.sync-lock-metric strong {
    font-size: 28px;
    line-height: 1;
}

.sync-lock-metric small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.sync-lock-metric--hero {
    background: linear-gradient(180deg, #eef8f5 0%, #e5f3f1 100%);
    border-color: rgba(22, 115, 107, .16);
}

.sync-lock-metric--hero strong {
    font-size: 40px;
}

.sync-lock-metrics--complete .sync-lock-metric strong {
    font-size: 24px;
}

.sync-lock-complete-actions {
    display: flex;
    justify-content: flex-end;
}

.sync-lock-complete-actions .primary-button {
    min-width: 220px;
}

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

@keyframes sync-lock-sheen {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(120%);
    }
}

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

@media (max-width: 980px) {
    .shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 40;
        width: min(320px, 86vw);
        height: 100dvh;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 14px 18px;
        transform: translateX(calc(-100% - 16px));
        transition: transform 180ms ease;
        box-shadow: 0 24px 48px rgba(0, 0, 0, .24);
    }

    .brand--sidebar {
        gap: 10px;
        padding: 4px 0 2px;
    }

    .brand--sidebar .brand-product small {
        min-height: 50px;
        font-size: 13px;
    }

    .brand-mark--sidebar {
        width: 60px;
        height: 50px;
    }

    .sidebar-toggle {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 35;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 40px;
        padding: 0 12px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 999px;
        background: rgba(21, 32, 31, .88);
        color: #f5fbfa;
        box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
        backdrop-filter: blur(10px);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: block;
        background: rgba(8, 15, 18, .54);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .shell.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .shell.sidebar-open .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .nav {
        gap: 8px;
    }

    .nav-section {
        gap: 3px;
    }

    .nav-section-title {
        padding: 0 10px;
        font-size: 10px;
    }

    .nav a {
        grid-template-columns: 20px 1fr;
        min-height: 36px;
        padding: 0 9px;
    }

    .shell:not(.shell--no-sidebar) .topbar {
        padding-left: 76px;
    }

    .metric-grid,
    .analytics-summary-grid,
    .analytics-grid,
    .report-kpi-grid,
    .mini-metric-grid,
    .amount-summary-grid,
    .repasse-closing-grid,
    .dashboard-focus-strip,
    .panel-grid,
    .rules-intro-list,
    .rules-card-grid,
    .rules-support-grid,
    .query-actions,
    .form-grid,
    .sync-lock-complete-grid,
    .sync-lock-meta,
    .sync-lock-metrics,
    .sync-lock-stage-list {
        grid-template-columns: 1fr;
    }

    .rules-wide-field {
        grid-column: auto;
    }

    .rules-period-inputs {
        grid-template-columns: 1fr;
    }

    .rules-validity-grid {
        grid-template-columns: 1fr;
    }

    .rules-rule-card__grid {
        grid-template-columns: 1fr;
    }

    .rules-rule-card__grid > * {
        border-right: 0;
        border-bottom: 1px solid rgba(86, 104, 122, .12);
    }

    .rules-rule-card__grid > *:last-child {
        border-bottom: 0;
    }

    .rules-rule-card__actions {
        justify-items: stretch;
    }

    .rules-rule-toolbar {
        grid-template-columns: 1fr;
    }

    .rules-single-grid {
        grid-template-columns: 1fr;
    }

    .rules-reference-panel .report-filter-grid {
        grid-template-columns: 1fr;
    }

    .provider-billing-entry-grid {
        grid-template-columns: 1fr;
    }

    .provider-billing-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .provider-billing-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .rules-module-nav {
        top: 10px;
        padding: 8px 10px;
    }

    .query-actions {
        display: grid;
    }

    .limit-field {
        width: 100%;
    }

    .repasse-detail-controls {
        grid-template-columns: 1fr;
    }

    .repasse-detail-totals {
        width: 100%;
        justify-self: stretch;
    }

    .analytics-toolbar,
    .analytics-window-nav,
    .auxiliary-hero-header,
    .auxiliary-toolbar {
        justify-items: stretch;
        justify-content: flex-start;
    }

    .auxiliary-toolbar {
        flex-wrap: wrap;
        width: 100%;
    }

    .auxiliary-filter-form {
        width: 100%;
    }

    .auxiliary-filter-form select {
        min-width: 0;
        width: 100%;
    }

    .auxiliary-window-pill {
        width: 100%;
    }

    .auxiliary-action-group {
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

.form-grid--four {
    grid-template-columns: 150px 130px minmax(320px, 1fr) auto;
}

.form-span-2 {
    grid-column: span 2;
}

.compact-select {
    min-width: 260px;
}

.inline-form .compact-select {
    max-width: 420px;
}

.report-table .inline-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 900px) {
    .form-grid--four {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: auto;
    }

    .compact-select,
    .inline-form .compact-select {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 620px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 22px;
    }

    .content {
        padding: 22px;
    }

    .sync-lock-overlay {
        padding: 16px;
    }

    .sync-lock-card {
        padding: 22px;
    }

    .sync-lock-topline,
    .sync-lock-progress-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-backdrop {
        align-items: end;
        padding: 14px;
    }

    .confirm-modal-actions {
        justify-content: stretch;
    }

    .confirm-modal .primary-button,
    .confirm-modal .secondary-button,
    .confirm-modal .danger-button {
        flex: 1;
    }

    .metric strong {
        font-size: 25px;
    }

    th,
    td {
        padding: 10px 8px;
    }
}
